Skip to content

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 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.

  1. Download and install VirtualBox

  2. Download and install Vagrant

  3. 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
    
  4. Download the Edge Builder project

  5. Unzip into edgebuilder-vagrant folder which will be the vagrant project directory used for v1.0.0 demos

  6. 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

  7. Obtain a license file for Edge Builder, as described in Obtain and Install License, and copy it to your edgebuilder-vagrant folder

  8. Start the demo environment
  9. 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 is master accessible on the IP address 192.168.56.10, and the second one is node1 accessible on the IP address 192.168.56.11

  10. 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 address 192.168.56.10, and the edge nodes node1, node2, and node3, accessible on the IP addresses 192.168.56.11, 192.168.56.12, and 192.168.56.13 respectively

    Note

    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 the boot_timeout variable in edgebuilder-vagrant/Vagrantfile

    config.vm.boot_timeout = 1800  // Increase the timeout to 30mins
    
  11. 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)
    

  12. 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:

  1. Run vagrant ssh to start an SSH session on the master node:

    vagrant ssh master
    
  2. Check Edge Builder server is installed and available:

    sudo edgebuilder-server -h
    
  3. Check Edge Builder CLI is installed and available:

    sudo edgebuilder-cli -h
    
  4. 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:

  1. Run vagrant ssh to SSH the edge node:

    vagrant ssh node1
    
  2. Check Edge Builder node components are installed on node1 and available:

    sudo edgebuilder-node -h
    
  3. 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