NetOcean Installation on GCP Environment

This page provides steps for the configuration of cloud server in Google cloud environment. It includes the following points:

  1. How to create a fresh instance without any image/snapshot
  2. How to create a snapshot
  3. How to create an instance using snapshot
  4. How to add additional disks on an instance
  5. How to mount the additional disk on the instance
  6. Configuration changes after instance is created

NetOcean Installation on GCP

Create a Fresh Instance in GCP

All the Google cloud instances are included in a project. Only the admin-privileged user has the access to perform any operation regarding the servers/instances on the platform. Following are the steps, which are included to create any fresh instance on any Google cloud platform:

  1. Login with the tkid username and password in the GKE platform.
  2. Select VM Instances inside the Compute Engine from the left pane.
  3. On the top-right pane, select “CREATE INSTANCE” to add any new instance. It displays another page inside which user needs to enter the configuration for the instances.

Enter Instance name, Zone, CPU, and RAM for this instance. Also, select the OS from the boot disk using the option “Change”.

  1. Upon selecting option “Change”, user is redirected to OS Images. Using this, user can select the OS version to boot the system. The current used OS version is 04 LTS.
  2. After selecting the OS version, select the boot disk Size (GB). The minimum value is 10 GB. An instance of maximum 2048 GB (2 TB) can be created.
  3. Click “Select” to launch the instance with the entered configuration.
  4. Now, go to the VM Instances again and check if the instance is running or not. User can verify it from the instance name provided earlier in the configuration. Note: For further installation, please refer the Appendix section.
  5. Verify the instance is successfully created or not.
  6. Login into the instance console.

Install Cavisson CavBin

Follow these steps to install NetStorm software on NetStorm server:

  1. Open a terminal window (using left mouse button). Ensure that the user is working as root.
  2. Create following directory: mkdir /root/cavisson_libs.
  3. Copy Cavisson Software (CavBin file) in /root/cavisson_libs directory as provided.
  4. Run the command cd /root/cavisson_libs.
  5. Make the CavBin permission executable. chmod +x Cav4.3.0.38.Ubuntu1604_64.bin.
  6. Execute the 3.0.38.Ubuntu1604_64.bin in /root/cavisson_libs location by the command: ./ Cav4.3.0.38.Ubuntu1604_64.bin.
  1. After executing the CavBin, enter ‘1’ for fresh NS installation.

Initialising kernel version …
min 1204 max 1604
———————————————————————-
Starting NetStorm Installation. Start Date: 04/24/20, Time: 04:18:05
1 for Installation, 2 for Upgrade Packages

  1. For DNS configuration, enter appropriate value (y /n).

Configuring DNS server
To configure DNS server name, enter y else n: n

  1. Press ‘y’ for kernel related packages installation. Press ‘n’ to skip its installation.

Note:

    • For installation on Ubuntu ver. 16.04.02, kernel related packages installation is required.
    • For installation on Ubuntu ver. 16.04.06, kernel related packages installation is NOT required.
  1. Press ‘n’ to skip the ldap related packages installation. (Not Required)

  1. Enter system configurations.

Enter System Configuration
Enter 1 for NetStorm and 2 for NetOcean and 3 for NetVision and 4 for NetStorm + NetOcean and 5 for NetCloud and 6 for NetDiagnostics: 6
Enter the NetDiagnostics Admin Interface: [As provided by the vendor] 
Enter the NetDiagnostics Admin IP (Enter in IP/Netbits format): [As provided by the vendor]
Enter the NetDiagnostics Admin Gateway to reach NetOcean Admin IP (Enter -, if none): –
Enter the NetDiagnostics Load Interface(s), if multiple enter as eth1|eth2 : [Use admin interface]

For NetOcean Installation, Press 2

 Note: This completes the CavBin Installation.
  1. Reboot the system by command ‘reboot’ for successful installation.

          Note: Reboot the system irrespective the installation of kernel packages.
  1. Run the command bash –l so that changes can be reflected to support NS successfully.
    • Select ‘1’ for work.

    • Check the release by command nsu_get_version. Below is just an example, this displays the details of the latest version:

  1. Check the CavBin release by command nsu_get_version -C.

15. Check the Postgres status by command /etc/init.d/postgress status.

16. Check the tomcat running status by command ps -ef | grep tomcat.

Now you check on UI, product type will be NetOcean. Below is the snapshot:

Upgrade Cavisson Release

Follow these steps to install Cavisson Release:

  1. Download the Cavisson Release (for third party and for NetStorm) from the shared location: http://nde.cavisson.com/dashboard/
  2. Copy it in upgrade directory of the blade at the following location: /home/cavisson/work/upgrade
  3. Make it executable by running the command: chmod +x   thirdpartybuild   netstormbuild
  4. Execute the thirdparty release by running the following command: ./thirdparty.4.1.14.37.Ubuntu1604_64.bin
  5. After this, execute the NetStorm release: ./netstorm.4.1.14.37.Ubuntu1604_64.bin
  6. Check the release by running the following command: nsu_get_version

The release version should be reflecting in the output (for example): 

 Appendix

How to Create a Snapshot for Quick Installation in Future

There are few basic points, which need to remember before creating any snapshot.

  1. The instance should not be in running state, it should be stopped.
  2. User can create a high configuration instance from a low configuration snapshot but the vice-versa is not applicable.

Following are the steps to create a snapshot in Google Cloud Platform.

  1. Click on VM Instance inside Compute Engine from the left pane.
  2. Click on the check box associated with the instance. By clicking the STOP button from the top pane, user can stop that instance.
  3. System is prompted for the confirmation, select “STOP”.
  4. Click on Snapshots from the left pane inside Compute Engine. This displays all the existing snapshots created earlier.
  5. On the top-right pane, click “CREATE SNAPSHOT”. User is redirected to the configuration page for the snapshot.
  6. Enter Snapshot name and Source Disk to create the snapshot. Here, source disk is a drop-down option. User needs to enter the name of that instance to create the snapshot.

Here, Instance-Testing is the name of the instance. Click “Create” to create that snapshot.

How to Create an Instance Using Snapshot

Following are the steps to create an instance using the created snapshot:

  1. Select VM Instance from the left pane inside Compute Engine.
  2. On the top-right pane, select “CREATE INSTANCE” to add any new instance. It displays another page inside which user needs to enter the configuration for the instances.
  3. Enter Instance name, Zone, CPU, and RAM for this instance. Also, select the OS from the boot disk using the option “Change”.
  4. Earlier OS Images are used to create the instance, now use “Snapshots” to create the same.

  1. Select the Snapshot name created earlier, here “cav-481b66” is the created snapshot.
  2. Enter the boot disk size whose minimum value is 10 GB and maximum is 2048 GB i.e. 2 TB.
  3. Click on “Select” to use the snapshot for the instance.
  4. Now, click “Create” to create the instance.

How to Add Additional Disks on an Instance

As the user can create a maximum of 2 TB as a boot disk on an instance, so if the additional disk is needed to add on a machine, the user can add an additional disk to it. The planned hard disk configurations for different products are as follows:

  • NetStorm – 2TB
  • NetOcean – 1TB
  • NetDiagnostics – 8TB

We are using 500 GB for the root partition for ND and 7.5 TB for the home partition in ND. Rest NS and NO are on root and there is no additional disk attached for them.

Following are the steps to add additional disks on an instance

  1. Select VM instance from the left pane inside Compute Engine.
  2. Click on the instance name to add additional disks.
  3. Select “EDIT” from the top pane to change the configurations.
  4. On Additional disks, select “Add item”.

  1. Enter the configuration for the additional disks. Add the disk name, Disk Size (GB), and Source type. The Source type is None (blank disk).
  2. Click “Create” to save the changes of the additional disks.
  3. Click “Save” to add the additional disks on the instance.

This adds an additional disk sdb in the instance.

root@sample-instance-in-tb:/home/cavisson.login# lsblk -l
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb    8:16   0   4T  0 disk
sda    8:0    0   2T  0 disk
sda1   8:1    0   2T  0 part /

Before mounting the disk on the instance, take a backup of the home directory to avoid data loss after mounting. The steps need to take backup and mount the disk are as follows:

  1. Go to / directory and create the tar for the home directory using: tar -cvzf home.tar.gz home (1.5 minutes)
  2. To create a filesystem greater than 2 TB, the partition table should be of gpt type. By default, it is of MsDoS type. Run the commands which are in bold.

root@sample-instance-in-tb:/home/cavisson.login# parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel gpt
(parted) mkpart primary 0% 100%
(parted) print
Model: Google PersistentDisk (scsi)
Disk /dev/sdb: 4398GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number  Start   End     Size    File system  Name     Flags
1      1049kB  4398GB  4398GB               primary
(parted) q

3. Format the filesystem, so that it can be mounted. mkfs.ext4 /dev/sdb1 (0.6 minute)

4. Add the filesystem & mount point in the /etc/fstab file so that it can be mounted even after reboot.

root@sample-instance-in-tb:/home/cavisson.login# cat /etc/fstab
LABEL=cloudimg-rootfs   /     ext4 defaults    0 0
/dev/sdb1 /home                     ext4    defaults        0       2

5. Run mount -a to mount the partition

root@sample-instance-in-tb:/home/cavisson.login# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             15G     0   15G   0% /dev
tmpfs           3.0G  8.7M  3.0G   1% /run
/dev/sda1       2.0T   11G  2.0T   1% /
tmpfs            15G  4.0K   15G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            15G     0   15G   0% /sys/fs/cgroup
tmpfs           3.0G     0  3.0G   0% /run/user/1002
/dev/sdb1       4.0T   67M  3.8T   1% /home

  1. Go to / directory and untar the tar file created earlier (1.5 minutes). Use tar -xvzf home.tar.gz to untar the file.

Configuration Changes after Instance Creation

As we are making all the instances from a snapshot, so that configuration file will be the same as of the original machine from which we have created the snapshot.

  1. /etc/cav.conf – Here change the product type according to the requirement. The machine IP is the same as the instance IP. The user also needs to update the AdminIF, which is the load interface from where the IP is connected. Use “ifconfig” to check the load interface of the instance.
  2. Check the cmon is running or not using /etc/init.d/cmon show.