Actions

HowTo Setup AlphaCom NetworkDisk

From Zenitel Wiki

Revision as of 13:06, 14 June 2018 by Roarl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
AlphaCom icon 300px.png
Obsolete icon This product is discontinued!


The following services is supported on NetworkDisk:

  • Extended Aphache/PHP/Mysql support
  • Mysql Database storage
  • Log storage

Creating Samba shares

The only requirement for the sharing device is that it supports the SAMBA/CIFS protocol, and it has sufficient disk space.

Share names

On the sharing device tree separate shares needs to be setup:

Share Name Description
alphalocal The AlphaCom Extended Application packages. Mounted locally on /usr/local/
alphadb Storage space for the AlphaCom MySQL databases. Mounted locally on /var/mysql/
alphalog Storage space for AlphaCom system log. Mouned locally on /var/log/

Share user

Default:

user = ace
passswd = alphacom

If other user/passwd is to be used the mounting scripts described below needs to be updated.

Required tools for setting up AlphaCom NetworkDisk

The setup procedure requires some manual steps using a ssh terminal and sftp file transfer.

Recommended tools to use:

SSH terminal: PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/)
sftp client: WinSCP (http://winscp.net/eng/index.php)

Netdisk Configuration file

The IP address for the sharing device, and share user information is stored in simple confoguration file (shell variables):

The configuration file for an unprepared system is:

/opt/amc/config/netdiskconfig_prepare.sh

When the netdisk prepare routines are finished the file will be renamed to

/opt/amc/config/netdiskconfig.sh

When the netdiskconfig.sh file is present, the AlphCom init scripts will try to run the Netdisk Applications at start-up time.

Preparing the shares for AlphaCom support

Open a SSH terminal to the AlphaCom target and su to root (use "su -"):

-bash-3.1$ su -
Password: {root-password}

Preparing the NetworkDisk shares

The script /opt/amc/scripts/netdiskprepare.sh is used to prepare the mount partitions for AlphaCom Extended Application support.

Mounting the shares, and test the content

First the the disks has to be mounted on the AlphaCom, command and typical output:

-bash-3.1# /opt/amc/scripts/netdiskprepare.sh mount

 ------------------- START -------------------------------
 Trying to mount netdisk shares
Disk sucsessfully mounted on /mnt/local
Disk sucsessfully mounted on /mnt/log
Disk sucsessfully mounted on /mnt/mysql

 ---------------------------------------------------------
 Free space on shares:
Filesystem            Size  Used Avail Use% Mounted on
//10.5.2.165/alphalog
                      465G  178M  465G   1% /mnt/log
//10.5.2.165/alphalocal
                      465G  178M  465G   1% /mnt/local
//10.5.2.165/alphadb  465G  178M  465G   1% /mnt/mysql

 ---------------------------------------------------------
 Used Space on shares:
AlphaCom Extended Applications : 0      /mnt/local
AlphaCom MySQL Database        : 0      /mnt/mysql
AlphaCom NetDisk logging       : 0      /mnt/log

 ---------------------------------------------------------
 Testing for a valid Extended Application share
 !! No AlphaCom Extended Applications found !!
 Use sftp to transfer and install a new packages to this mount
 Testing for a valid alphacom MySQL DB (simple test)
 !! No AlphaCom MySQL DB folder found !!
 Use this script with option 'initdb' to create and initialiaze an empty DB

------------------- END ---------------------------------

The scripts give two warnings saying that no Extended Application package installed, and no MySQL database found. Continue with paragraphs below until you can mount without the warnings. You can use the script to unmount the shares (and mount again for testing). Tip: Use the linux mount command to get a list of the active mounts in the system.

-bash-3.1# /opt/amc/scripts/netdiskprepare.sh umount

Installing AlphaCom Extended Application Package

Make sure the /mnt/local/ folder is empty. If necessary clean the folder. Be sure to be in right folder before issuing the command

-bash-3.1# rm -Rf *

Use a sftp client to transfer the package (alpha_extended_apps_xx.tbz2) to the folder /mnt/local.

-bash-3.1# tar xjf alpha_extended_apps_xx.tbz2

Preparing the AlphaCom MySQL Database

This requires that AlphaCom Extended package is successfully installed.

The procedure will initialize a new empty database on the share. Then an alphacom database will be created by running the sql script /opt/amc/config/create_alphacom_db.sql. This sql script might be updated by installing a application package like billing, or if necessary edit it directly on the target.

Initialiaze the MySql Database:

-bash-3.1# /opt/amc/scripts/netdiskprepare.sh initdb

------------------- START -------------------------------
Initialiazing AlphaCom MySQL DB - NB!! All Data will be lost !!
The AlphaCom Extended Applications need to be installed and mounted

---------------------------------------------------------
Cleaning MySQL mount: /mnt/mysql

---------------------------------------------------------
Running mysql_install_db

{.....MySQL output.....}

Database installed

---------------------------------------------------------
Starting the mysql daemon
MySql is staring... use option 'createdb' to create an empty alphacom db and user(s)

------------------- END ---------------------------------

Create the AlphaCom Database:

-bash-3.1# /opt/amc/scripts/netdiskprepare.sh createdb

 ------------------- START -------------------------------
 Creating AlphaCom Database
 DB 'alphacom' created

 ---------------------------------------------------------
 AlphaCom Database table listing (with user=alpha)
 Tables_in_alphacom
directory
------------------- END ---------------------------------

This scripts runs the sql statements in /opt/amc/config/create_alphacom_db.sql and then lists the tables in the database 'alphacom'. TIP: The MySQL daemon is now running and by using the MySQL client tool you can examine and modify, created databases, users etc..

-bash-3.1# /usr/local/mysql/bin/mysql

Stopping the MySQL daemon and unmounting the shares

-bash-3.1# /opt/amc/scripts/netdiskprepare.sh stopmysql
-bash-3.1# /opt/amc/scripts/netdiskprepare.sh umount

Starting the Extended Applications in run mode

-bash-3.1# /opt/amc/scripts/netdiskprepare.sh setrunmode

On the next reboot the init scripts will try to mount the disk and start the Extended Application Software from the NetworkDisk.

To disable runmode, and enable the netdiskprepare mode do:

-bash-3.1# /opt/amc/scripts/netdiskprepare.sh resetrunmode