Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
build:~$ sudo -s
build:~#

1.  Prerequisites Prerequisites and Setup for the Tutorial

...

    • Name: build, type: Linux:
      • Select 2GB of RAM
      • Hard disk: take the defaults: 8 GB and Create a virtual hard disk now
      • Hard disk file type: VDI
      • Storage on physical hard disk: Dynamically allocated
      • File location and size: type "build" for the name
    • Click on settings for the build VM:
      • Storage: Controller IDE – click on the disk with a + sign symbol to add an optical drive. Choose disk: browse to the location of the downloaded iso file.
      • Add a 2nd network adapter for host-only network (see the screenshot in the section for Creating onos-scratch VM.)
      • System: Motherboard tab – uncheck floppy, move optical to the top in the Boot Order box.
    • Install Ubuntu (use the same credentials as for the first Ubuntu VM). When the installation completes, power the VM on and login.

  • Generate a SSH public key on your build machine if you hadn't done so in the past.
    Login to the build machine and run the following command:

    Code Block
    languagetext
    build:~$ ssh-keygen -t rsa

    The default options and no password are fine for this tutorial.

  • Verify connectivity. From the build machine you should be able to SSH to the VM using the IP address assigned to eth1:

    Code Block
    languagetext
    build:~$ ssh -l sdn 192.168.56.101

    If the ssh connection failed make sure that the openssh-server is installed by running:

    Code Block
    languagetext
    $ sudo apt-get install openssh-server

    Check that you can ping the onos-scratch VM by IP from the build machine and reverse, for example:

    Code Block
    languagetext
    sdn@build:~$ ping 192.168.56.101

    Close the ssh connection to the onos-scratch VM.

...

2. Install required software

On the build machine

 

Install Git:

...

The VM only requires Java 8 - follow the instructions for Java 8 above performed on the build VM.

...

3. Set up your build environment

Environment variables

First off, you will need to export several environment variables. The ONOS source comes with a sample bash_profile that can set these variables for you. 

...

If previous version of ONOS is running, the service should be stopped (sudo service onos stop) before building with mvn. Otherwise, the test on onlab.nio package would fail with "address already in use" error.

...

4. Create a custom cell definition

A quick intro to cells

Under ONOS terminology, a cell is a collection of environment variables that are used:

...

See vicell -h for the list of options.

...

5. Package and deploy ONOS

Passwordless VM access

For convenience, before we can deploy anything to our VM, we will configure paswordless login to the VM from our build machine with onos-push-keys:

...