Getting Started as a Developer

This brief note would serve as a reference for a developer looking to start-up on the Tungsten Fabric development environment.

PLEASE NOTE: Until 2018, Tungsten Fabric was named “OpenContrail”. There are still several references to the old name in the code and other utilities.

A new developer can refer to the Tungsten Fabric Architecture document at

To get information about latest releases and schedule, please refer to:

1. Registration and User Creation

  1. A new developer should register on Tungsten Fabric development/user mailing lists and Slack on this link:

  2. In order to submit blueprints for a new feature or to raise bugs on existing features, create a Linux Foundation ID:

  3. Have a look at the blueprints and bugs in our Jira:

  4. Create a GitHub account by signing up on (if you’re not already registered)

  5. Confirm you can log into the Gerrit with your Linux Foundation ID:

2. Ubuntu installation and configuration

Install Ubuntu version 16.04 trusty for the Tungsten Fabric stable installation.

2.1 Relevant packages for the Tungsten Fabric installation.

sudo apt-get update
sudo apt-get install git
sudo apt-get install git-core
sudo apt-get install ant
sudo apt-get install aptitude
sudo aptitude install build-essential
sudo apt-get install libev4 libev-dev

2.2 Generate SSH key and add it to local SSH-agent


ssh-keygen -t rsa -b 4096 -C "<>"
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
sudo apt-get install xclip
xclip -sel clip < ~/.ssh/

2.3 Add SSH key to GitHub account

  1. Go to profile and select settings

  2. Choose SSH and GPG keys -> New SSH key

  3. Give a title for the key

  4. Paste the key generated above ( xclip command will copy the key from .pub file to your clipboard)

  5. Add SSH key.

3. Tungsten Fabric + Devstack setup


3.1 Clone Contrail-installer and devstack Repositories

git clone
git clone -b stable/newton

3.2 Set up Tungsten Fabric (formerly known as OpenContrail)

  1. Copy the localrc file from samples to the current directory and edit it as required.

    cd contrail-installer cp samples/localrc-all localrc

    change eth interface: default is eth0 #CONTRAIL_BRANCH=R3.2 //Commented means code will be checked out from Trunk. //Else specify the branch and uncomment it.

  2. Execute


3.3 Set up DevStack

  1. Copy the opencontrail plugin to devstack neutron_plugins directory

    cp ../contrail-installer/devstack/lib/neutron_plugins/opencontrail
  2. Prepare localrc for devstack:

    cp ../contrail-installer/devstack/samples/localrc-all localrc
    Update “PHYSICAL_INTERFACE” as applicable.
    Add following to localrc file:
  3. Run

  4. The installation shall fail once. Once it fails, do the following change

    Edit the file “/usr/local/lib/python2.7/dist-packages/openstack/” at line 29 and replace “openstack.version” with “openstack”

    Line 29: DEFAULT_USER_AGENT = “openstacksdk/%s” % openstack

  5. Now do a restack. For this Tungsten Fabric needs to be restarted as well, i.e.

    ./ cd ../contrail_installer ./ restart cd -

3.4. Accessing Openstack and Tungsten Fabric GUIs

Openstack and contrail GUIs can be accessed as follows:-

  1. Openstack GUI: http://localhost/dashboard/

  2. Tungsten Fabric GUI: http://localhost:8080/

4. Setting up Gerrit for committing code-changes for review


4.1 Setup SSH access

  1. Log into your account at

  2. Go to top-right corner -> settings

  3. Left panel -> SSH public keys -> Add key

  4. Follow the instruction under heading “How to generate an SSH key”

  5. Test the SSH access

    $ ssh -p 29418
    \***\* Welcome to Gerrit Code Review \***\*
    Hi John Doe, you have successfully connected over SSH.

    Unfortunately, interactive shells are disabled. To clone a hosted Git repository, use:

    git clone
    Connection to hostname closed.

4.2 Pushing code-changes for review

  1. Install git-review

    sudo apt-get install git-review
  2. Configure Gerrit

    git config –global gitdir=$(git
    rev-parse –git-dir); scp -p -P 29418 ${gitdir}/hooks/
  3. Clone the repo where changes need to be committed

    git clone
  4. Commit the changes

    git commit -m "<commit-note>"

    Note: please ensure that any change being committed should have a corresponding launch-pad bug-id mentioned in the commit message, i.e. “Bug #1679466”

  5. Push the locally committed changes up for review

    git push ssh:// \
    HEAD:refs/for/<branch>%topic=<few-words-describing-the-change>, \,