Versions Compared

Key

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

This section describes what typically comprises an ONOS test environment, and how to manage multiple test setups with test cells. ONOS instances using cells and utility scripts.

Table of Contents
maxLevel3

...

Info
This page assumes that the reader has been able to work through Installing and Running ONOS.

Overview

Testing and managing a distributed platform like ONOS can become a cumbersome task. 

...

For password-less login, the onos-push-keys  utility can be used to transfer one's SSH key to the VM.

Using the Test Environment

Once set up, changes to the codebase can be (relatively) quickly tested in a distributed setting as follows:

  1. Make changes to the code
  2. Build with mvn clean install
  3. Load the cell settings with cell <your_cell_name>
  4. Package executables for deployment with onos-package 
  5. Deploy to test VMs in the cell

For step 5, a developer can take advantage of the OC variables when using onos-install:

Code Block
languagetext
$ onos-install -f $OC1  #install ONOS to OC1

This procedure must be repeated for each target, as onos-install is only capable of handling one target at a time. In ONOS 1.1.0 and later, the onos-group command can be used to automatically target all cell member VMs at once:

Code Block
languagetext
$ onos-group install -f

Utilities such as onos-service also take the --cell argument that enables it to manage all cell members at once. For example, to restart all ONOS instances in a cell:

Code Block
languagetext
$ onos-service --cell restart

Using Lightweight Virtualization

Finally, a developer may not be able to run multiple VMs due to the resource constraints of their build machine or environment. In such cases, lightweight virtualization technologies may be used to supply the resource containment for each ONOS instance. Multiple instances using LXC demonstrates the use of LXC containers for this purpose.


...

Previous : Development Environment Setup
Next : Continuous Integration

...