Tutorials Setup
In this section we describe how to create a setup that can be used to run the Edge Builder demos. We will explain how to:
- Setup a simple virtual machine (VM) based environment
- Check the installation of Edge Builder server components and CLI
- Check the installation of Edge Builder node components
Setup the virtual machine-based environment
The following instructions setup a simple virtual machine-based environment which is used to run the EdgeBuilder
tutorials. After running these instructions, you will have virtual machines in VirtualBox running Ubuntu-20.04 LTS
Linux distribution.
One VM will be the master
running Edge Builder server components and CLI. Other VM(s) will be the edge nodes running Edge Builder node components.
-
Download and install VirtualBox
-
Download and install Vagrant
-
Enable file sharing between the host and the VMs. To do this, install Guest Additions for VirtualBox by entering the following Vagrant CLI command in a command prompt:
vagrant plugin install vagrant-vbguest
-
Download the Edge Builder project
-
Unzip into
edgebuilder-vagrant
folder which will be the vagrant project directory used for v1.0.0 demos -
Change the current directory to
edgebuilder-vagrant
cd edgebuilder-vagrant
Info
The project directory is the directory containing the Vagrantfile file. By default, Vagrant shares your project directory to the
/vagrant
directory in the virtual machines -
Obtain a license file for Edge Builder, as described in Obtain and Install License, and copy it to your
edgebuilder-vagrant
folder - Start the demo environment
-
For tutorials with a master node and a single edge node, start the default demo environment by running the following command:
vagrant up
Info
It might take a few minutes for vagrant to be
up
, after that you should have two virtual machines up and running, the first one ismaster
accessible on the IP address192.168.56.10
, and the second one isnode1
accessible on the IP address192.168.56.11
-
For tutorials with master node and multiple edge nodes, start the demo environment by running the following command:
vagrant up
- The environment variable
NODE_COUNT
can be used to set the number of edge nodes
# In Linux and MacOS export NODE_COUNT=3 vagrant up # In Windows set NODE_COUNT=3 vagrant up
Info
It might take a few minutes for vagrant to finish starting the vms, after that you should have four virtual machines up and running, the first one is
master
accessible on the IP address192.168.56.10
, and the edge nodesnode1
,node2
, andnode3
, accessible on the IP addresses192.168.56.11
,192.168.56.12
, and192.168.56.13
respectivelyNote
The default vagrant timeout to boot the machines is set to
1200 secs
, depending on the network speed, and the number of nodes, it might be necessary to set this to a higher value. This can be done by setting theboot_timeout
variable inedgebuilder-vagrant/Vagrantfile
config.vm.boot_timeout = 1800 // Increase the timeout to 30mins
- The environment variable
-
The names and status of all the VMs can be viewed by using the
vagrant status
command:vagrant status
Expected output:
Current machine states: master running (virtualbox) node1 running (virtualbox)
-
To clean up delete the virtual machines, run:
vagrant destroy -f
Confirm Edge Builder server components and CLI are installed
Ensure the virtual machine master
is up and running by using the vagrant status
command:
-
Run vagrant ssh to start an SSH session on the
master
node:vagrant ssh master
-
Check Edge Builder server is installed and available:
sudo edgebuilder-server -h
-
Check Edge Builder CLI is installed and available:
sudo edgebuilder-cli -h
-
Run exit to return the command prompt of your host machine:
exit
Confirm Edge Builder node components are installed
Ensure the virtual machine node1
is up and running by using the vagrant status
command:
-
Run vagrant ssh to SSH the edge node:
vagrant ssh node1
-
Check Edge Builder node components are installed on
node1
and available:sudo edgebuilder-node -h
-
Run exit to return the command prompt of your host machine:
exit
Note
The edgebuilder-node components won't be installed on a node until the node is added to EdgeBuilder