Skip to main content

Prerequisites

Automatic System Reboot on Power Restore

In the event of a power failure, or any other reason that would cause the edge node to shutdown, the BIOS needs to be configured to automatically reboot.

  1. Reboot the device and press the F2 key while it is rebooting to open the BIOS settings.
  2. Navigate to Advanced -> Power -> After Power Failure
  3. Set to "Power On"

Automatic Updates

To ensure your device receives critical security updates, follow the steps below.

  1. Open the Terminal and run the following command
  2. $ sudo dpkg-reconfigure unattended-upgrades
  3. Select "Yes"
  4. Set to "Power On"

Autoupdate

Licensing Validation

In order for our software to reach the licensing servers correctly, please ensure these domains and IP addresses are not blocked:

https://go.netlicensing.io/core/v2 (54.246.21.52)
https://netlicensing.labs64.com/core/v2 (54.246.21.52)

Edge-to-Cloud Connectivity

In an edge-to-cloud deployment scenario where the edge nodes are behind a firewall, you have two options for VAS Portal to access the edge node.

This package installs the VAS Node, which helps edge NUC devices to connect to the VAS Portal in the cloud. It configures the network to connect to the VAS Portal and also provides the IP address to establish the connection from VAS Portal to manage VAS Nimble.

To install the VAS Node packages, run the following command in a terminal window:

$ sudo mcutils install vas-node
note

This package requires mcutils, which is preinstalled on Megh NUCs. If you are using your own machine, and would like to use VAS Node, please contact Megh support.

  1. Power Saving Options
    1. Open the system settings and open "Power"
    2. Under "Power Saving Options", click the toggle off for "Dim Screen"
    3. Set "Screen Blank" to "Never"
    4. Set "Automatic Suspend" to "Off"
  2. Disable Wayland
    1. Open the terminal and execute the following command:
    2. $ sudo vi /etc/gdm3/custom.conf
    3. Remove the # from the line and save:
    4. #WaylandEnable=false
    5. Reboot the device
  3. Install TeamViewer
    1. Open the terminal and execute the following commands:
    2. $ sudo apt update
      $ wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
      $ sudo apt install ./teamviewer_amd64.deb
    3. Enter "y" when prompted.
    4. You can create a personal password that you can use to login. Otherwise, TeamViewer will randomize the password.
      1. Navigate to Extras->Options->Advanced
      2. Scroll down to "Personal password" and enter the password you wish to use.

VLC

VLC allows you to test and debug the edge node to camera connection

  1. Open the terminal and execute the following command:
  2. $ sudo snap install vlc

Google Chrome

Chrome is encouraged as it is the best way to experience accessing Megh Portal

  1. Open the terminal and execute the following commands:
  2. $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    $ sudo apt install ./google-chrome-stable_current_amd64.deb

Accessing and Maintaining Edge Nodes

Using these 3rd party softwares are recommended to help with accessing, installing and maintaining edge nodes.

TeamViewer

note

TeamViewer requires a headless HDMI dongle or the device to be connected to a monitor.

  1. Power Saving Options
    1. Open the system settings and open "Power"
    2. Under "Power Saving Options", click the toggle off for "Dim Screen"
    3. Set "Screen Blank" to "Never"
    4. Set "Automatic Suspend" to "Off"
  2. Disable Wayland
    1. Open the terminal and execute the following command:
    2. $ sudo vi /etc/gdm3/custom.conf
    3. Remove the # from the line and save:
    4. $ #WaylandEnable=false
    5. Reboot the device.
  3. Install TeamViewer
    1. Open the terminal and execute the following commands:
    2. $ sudo apt update
      $ wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
      $ sudo apt install ./teamviewer_amd64.deb
    3. Enter "y" when prompted.
    4. You can create a personal password that you can use to login. Otherwise, TeamViewer will randomize the password.
      1. Navigate to Extras->Options->Advanced
      2. Scroll down to "Personal password" and enter the password you wish to use.

VLC

VLC allows you to test and debug the edge node to camera connection.

  1. Open the terminal and execute the following command:
  2. $ sudo snap install vlc

Google Chrome

  1. Open the terminal and execute the following commands:
  2. $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    $ sudo apt install ./google-chrome-stable_current_amd64.deb

Increasing the SWAP Memory

To allow the download of large files, you need to increase the swap memory.

It is recommended to install htop, a system monitor.

In a terminal window, enter:

$ sudo snap install htop

To increase the swap memory, execute the following commands:

$ sudo su
$ swapoff -a
$ dd if=/dev/zero of=/swapfile bs=1M count=<size you want>
$ mkswap /swapfile
$ swapon /swapfile

After "count=", enter the amount of memory you will need. A good rule is if your system memory is less than 16gb, swap should be double the RAM. (4GB RAM, 8GB Swap). If your system memory is over 16gb, then swap should equal the RAM.

An example of a machine with 16gb of RAM would be:

$ dd if=/dev/zero of=/swapfile bs=1M count=16000

Installing the Application

VAS Nimble

This package installs VAS Nimble, which is an analytics and machine learning engine application backend that provides access to run analytics and ML models on the camera feed. It also provides a REST API and WebSocket for metadata consumption.

If you are using your own machine, enter the following command in the command-line:

$ sudo mcutils install vas-nimble --version vX.X.X 

or

$ sudo mcutils install vas-nimble
note

In the above command user can specify the version tag to install specific release version image or can just give the second command to install latest image of vas-nimble/vas-portal.

Once the user hits the above command when prompted, enter 'y' to enable Nimble to recover itself on reboot or 'N' to not.

Nimble

Once the vas-nimble installation is completed, change directory to /opt/megh-vas/nimble.

$ cd /opt/megh-vas/nimble

Run the following command to bring up the nimble docker:

$ docker-compose up -d

VAS Portal

This package installs the VAS Portal, which is a web application and microservices backend that provides access to the Megh VAS platform. Through this application, you can manage VAS Nimble. It also provides a REST API and WebSocket for the same.

note

Package installation requires sudo privileges.

To install the VAS Portal packages, run the following command:

$ sudo mcutils install vas-portal --version vX.X.X

or

$ sudo mcutils install vas-portal

Once the user hits the above command, there will be few prompts in the installation process as mentioned below:

Portal1

When prompted, enter 'y' to enable Portal to recover itself on reboot or 'N' to not.

Portal2

Enter 'y' to enable or 'N' to disable HTTPS connections. When user enables HTTPS connections installer will prompt for DNS name(Public IPv4 DNS) otherwise it will go ahead with below prompt.

Portal3

Here user is asked to enter a deployment name for vas-portal which is being installed. This deployment name will be taken as the instance name of the current portal, users can access this portal using the same name on mobile application.

Once the installation is completed, change directory to /opt/megh-vas/portal.

$ cd /opt/megh-vas/portal

Run the following command to bring up all the dockers:

$ docker-compose up -d

Upgrading from previous vas-portal installation

If user has a vas-portal installation already and need to upgrade that installation to latest version, enter the following command in the command-line:

$ sudo mcutils update vas-portal --version vX.X.X

Here vX.X.X is the latest version name which user wants to install.

note

This command is supported for upgrading from vas-portal 0.17.0 or higher versions only.

Uninstalling Megh Packages

Uninstalling VAS Portal

Uninstalling this package will also remove the configuration packages, but it will not remove the data files if you opted out.

To uninstall the VAS Portal packages, run the following command:

$ sudo mcutils uninstall vas-portal

Uninstalling VAS Nimble

Uninstalling this package will also remove the configuration packages.

To uninstall the VAS Nimble packages, run the following command:

$ sudo mcutils uninstall vas-nimble

Uninstalling VAS Node

Uninstalling this package will uninstall the desktop services and the /opt/megh-vas/config.yaml file. It will not remove any ZeroTier configuration.

To uninstall the VAS Node packages, run the following command:

$ sudo mcutils uninstall vas-node

Configuring HTTPS to secure connection to Portal

  • Make sure all the VAS Suite containers are up and running

  • Copy the default nginx.conf from the Portal docker container to the current directory.

  • Create certificate using the certbot tool. Instructions can be found on the following link.

  • After HTTPS certificate is generated, link the certificate to the nginx configuration by updating the portal/nginx.conf and by volume linking the certificate files and the config files the Portal can be accessed securely over the https://<IP> link. uncomment this under the Portal section in the docker-compose.yaml file.

volumes:
- ${PWD}/portal/certificates:/etc/nginx/certificates
- ${PWD}/portal/nginx.conf:/etc/nginx/conf.d/default.conf