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.
- Reboot the device and press the F2 key while it is rebooting to open the BIOS settings.
- Navigate to Advanced -> Power -> After Power Failure
- Set to "Power On"
Automatic Updates
To ensure your device receives critical security updates, follow the steps below.
- Open the Terminal and run the following command
- Select "Yes"
- Set to "Power On"
$ sudo dpkg-reconfigure unattended-upgrades
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.
- VAS Node
- Port Forwarding
- ZeroTier
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
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.
- Power Saving Options
- Open the system settings and open "Power"
- Under "Power Saving Options", click the toggle off for "Dim Screen"
- Set "Screen Blank" to "Never"
- Set "Automatic Suspend" to "Off"
- Disable Wayland
- Open the terminal and execute the following command:
- Remove the # from the line and save:
- Reboot the device
- Install TeamViewer
- Open the terminal and execute the following commands:
- Enter "y" when prompted.
- You can create a personal password that you can use to login. Otherwise, TeamViewer will randomize the password.
- Navigate to Extras->Options->Advanced
- Scroll down to "Personal password" and enter the password you wish to use.
$ sudo vi /etc/gdm3/custom.conf
#WaylandEnable=false
$ sudo apt update
$ wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
$ sudo apt install ./teamviewer_amd64.deb
VLC
VLC allows you to test and debug the edge node to camera connection
- Open the terminal and execute the following command:
$ sudo snap install vlc
Google Chrome
Chrome is encouraged as it is the best way to experience accessing Megh Portal
- Open the terminal and execute the following commands:
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo apt install ./google-chrome-stable_current_amd64.deb
- Open the Terminal and run the following commands:
- Use the network ID Megh Computing provided in the following command:
- Login to your account at myzerotier.com.
- Navigate to Members.
- Click "Auth" and give a name and description for the machine.
- The Managed IP is the internal IP that can be used to access the machine within the subnet.
$ curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && \
if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo sh; fi
$ sudo zerotier-cli join < Network ID >
Are your users going to maintain their own ZeroTier portals?
Accessing and Maintaining Edge Nodes
Using these 3rd party softwares are recommended to help with accessing, installing and maintaining edge nodes.
TeamViewer
TeamViewer requires a headless HDMI dongle or the device to be connected to a monitor.
- Power Saving Options
- Open the system settings and open "Power"
- Under "Power Saving Options", click the toggle off for "Dim Screen"
- Set "Screen Blank" to "Never"
- Set "Automatic Suspend" to "Off"
- Disable Wayland
- Open the terminal and execute the following command:
- Remove the # from the line and save:
- Reboot the device.
- Install TeamViewer
- Open the terminal and execute the following commands:
- Enter "y" when prompted.
- You can create a personal password that you can use to login. Otherwise, TeamViewer will randomize the password.
- Navigate to Extras->Options->Advanced
- Scroll down to "Personal password" and enter the password you wish to use.
$ sudo vi /etc/gdm3/custom.conf
$ #WaylandEnable=false
$ sudo apt update
$ wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
$ sudo apt install ./teamviewer_amd64.deb
VLC
VLC allows you to test and debug the edge node to camera connection.
- Open the terminal and execute the following command:
$ sudo snap install vlc
Google Chrome
- Open the terminal and execute the following commands:
$ 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
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.
Package installation requires sudo privileges.
To install the VAS Portal packages, run the following command:
$ sudo mcutils install vas-portal
When prompted, enter 'y' to enable Portal to recover itself on reboot.
Enter 'N' to disable HTTPS connections.
Once the install is completed, change directory to /opt/megh-vas/portal
.
$ cd /opt/megh-vas/portal
Run the following command:
$ docker-compose up -d
Open Google Chrome and enter localhost
in the address bar.
To begin the registration process, you may update your domain now. If a subdomain is necessary, contact the Megh Support Team.
Complete this form by entering in your user information.
In Chrome, enter http://localhost:8080/monitor
, or replace localhost
with whatever your portal IP is. This will log you into InBucket, an inbox to verify your account with Megh.
You are now able to login to Megh Portal!
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 thehttps://<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