Skip to end of metadata
Go to start of metadata

Follow the steps below to set up the development environment on your client machine, and to establish credentials with which you may access the repositories.

Create a Linux Foundation Account

Follow the instructions on the identity portal to create a Linux Foundation account and get access to the ONAP Gerrit instance.  Then verify that you can log in at and that you can see the ONAP list of repositories.


get your MBP 2016 ready for development

generate keys - either ssh-add the key or rename it as id_rsa and put it into your ~/.ssh dir

Install the JDK (as dmg) -

Install homebrew package manager - 

/usr/bin/ruby -e "$(curl -fsSL"

python should already be installed. - do a --version check

install pip - sudo easy_install pip

install openstack tools

install docker (dmg) -

install maven - apache-maven-3.5.0-bin.tar, create and ~./m2 and place settings.xml there

git comes with Xcode or Homebrew - do a --version check

install git-review via homebrew:  brew install git-review

Unix Setup


install java 

set JAVA_HOME in ~/.bashrc

yum install java-1.8.0-openjdk-devel

get it via alternatives --config javac


export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-

install git and development tools
yum install git
yum groupinstall 'Development Tools'
install npm
(will also be installed automatically by the ecomp build) - TODO: UPDATE as ecomp is locked

download and install Maven 3.5.0

create an ~/.m2 folder and copy our settings.xml there

add maven to your path - check it with mvn --version

tar -xvf apache-maven-3.5.0-bin.tar.gz
Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in
Install docker (required for some repos like dcae-inventory off dcae
sudo yum install -y yum-utils
sudo yum-config-manager     --add-repo
sudo yum-config-manager --enable docker-ce-edge
sudo yum makecache fast
sudo yum install docker-ce
sudo systemctl start docker

Ubuntu 16.04

enable ubuntu desktop

apt-get update

apt-get install ubuntu-desktop

enable static IP

vi /etc/network/interfaces


iface enp0s25 inet static







disable strict host checking (client and server)
in ~/.ssh/config
Host *
   StrictHostKeyChecking no

Enable non CD repositories so an apt-get update will work

comment out the CD first line in /etc/apt/sources.list
enable ssh if skipped during installation so we can remote sshsudo apt-get install openssh-server
enable root login and gui (no sudo su -)
sudo passwd root

sudo usermod -U root

sudo reboot now

sudo vi /etc/lightdm/lightdm.conf





: enable root login

vi /etc/ssh/sshd_config
PermitRootLogin prohibit-password
PermitRootLogin yes

systemctl restart sshd

The 131 version of Java 8 is installed by default - currently running 151

set JAVA_HOME in ~/.bashrc or /etc/environment

ubuntu@ubuntu:~$ echo $JAVA_HOME

if not

sudo apt install openjdk-8-jdk

install git and development tools
sudo apt-get install git
install npm
(will also be installed automatically by the ecomp build)
sudo apt install npm

download and install Maven 3.5.0

create an ~/.m2 folder and copy our settings.xml there

add maven to your path - check it with mvn --version

tar -xvf apache-maven-3.5.0-bin.tar.gz


sudo apt install maven

Add the following option to your MAVEN_OPTS in order not to periodically hang on downloading artifacts in linux

in /etc/environment

Install docker (required when building docker images)

use the current as of 20180621 17.03 version in the script
which is

curl | sh

Build ONAP

root@obriendev:/home/ubuntu/onap# mvn clean install -U -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true


Maven Projects

If you have imported an existing maven project into eclipse - you may run into eclipse-only build issues (both runtime when deploying the war to a local tomcat and at design time resolving spring jars) because the maven dependencies libarary is missing from project | Java Build Path | Maven Dependencies

Specific to WAR projects - insert the following in your .classpath file off the project

	<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
			<attribute name="maven.pomderived" value="true"/>
			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

Install git-review

<<TODO: describe a Linux client set-up for Git and git-review>>

To install git-review on Linux (Ubuntu), type the following command.

sudo apt-get install git-review

Windows Setup

Note: The DCAE and SDC  repo will not fully clone in a windows environment (even git-bash) until some file paths are reduced below 255 chars -  DCAE-24 - Getting issue details... STATUS  and  SDC-21 - Getting issue details... STATUS  - you may use Linux or OSX native or VMs as an alternative for now.

Enabling long paths in windows - thanks Michael Lando

git config --system core.longpaths true

Installing Git

To install Git on your client, visit:, and download the appropriate installation image for your host. Once downloaded, execute the installation script ("open" the .msi file).

During installation, you will see the following dialog box.  Include the "Git Bash" and "Git GUI" components (this is the default).To do this, leave the following boxes checked:

If you intend to type Git commands from the Windows Command Prompt, leave the default setting for adjusting the PATH environment:

The repositories use Unix-style line-feed for line termination, so on your windows Git client, select the conversion option:

Select the following option based on your own preference (non-default shown, so 'winpty' is not required):

Choose the defaults here:

The installer lets you choose the experimental 'difftool'; either choice will work. Continue with the installation dialogs until the installation is complete.

Install Python on Windows (optional) - required to get pip for git-review

Not all components require Python for development. See the documentation for your component in the Development Guides section. (Note: the "node-gyp" tool requires Python.)

Download Python version 2.7.10:

Execute the install file that you just downloaded. (You must have administrative privileges.) During installation, select "Add python.exe to Path", overriding the default setting. Also, be sure to install "pip" (this is the default).

Continue with the installation until it is completed.

Set up Git review and Configure Git

Run Git Bash as Administrator (for example, in Windows 10, use the Windows menu, scroll to the Git directory, right-click on Git-bash, and select "Run as administrator":

Within Git Bash, type the following command: assumes you already installed python above

$ pip install git-review

To use git review, you have to be in a Git clone directory that already contains a (possibly hidden) .gitreview configuration file (see Gerrit/Advanced usage#Setting up a repository for git-remote), otherwise you will get the error message UnboundLocalError: local variable 'no_git_dir' referenced before assignment.

The Git and git-review installation steps above are derived from the description at: 

Configure Git to remember your Linux Foundation user name and email address (the user name and email address associated with your Linux Foundation login):

git config --global <your_LF_account_email>

git config --global --add gitreview.username <your_LF_user_name>

Configure git review

git config --global gitreview.remote origin

If you are using VPN, you might encounter a proxy problem while connecting to the Linux Foundation website. To avoid the problem, you should add the proxy setting in git config, using the following command:

git config --global https.proxy https://<proxy username>:<proxy password>@<proxy url> 

git config --global http.proxy http://<proxy username>:<proxy password>@<proxy url>

NOTE: When entering the proxy username, you might be required to add the domain name in front of the username.

Install Putty and Generate Keys

An alternate method for creating public and private keys, without using PuTTY, is given here:

If you already have keys registered with PuTTY, skip this section.

PuTTY is a terminal emulator that uses Secure SHell (SSH) to communicate with a host. You need to install PuTTY in order to create a public/private encryption key pair. This pair of keys enables Git to communicate securely with the repositories.

To install PuTTY, visit, and follow the links to the appropriate Windows installation for your machine (32-bit or 64 bit). The downloaded file will be named putty-0.67-installer.msi or the like.

Execute the .msi file. Use all the default settings, thereby ensuring that you will install pageant.exe, plink.exe, and puttygen.exe.

Generate Public and Private Keys


ssh-keygen -t rsa


The puttygen utility, installed with putty, generates public and private keys used for secure communication with Gerrit.

You should execute puttygen.exe as an Administrator, otherwise, the key files will be stored in %localappdata%\VirtualStore\PuTTY, typically C:\Users\<user>\AppData\Local\VirtualStore\Program Files (x86)\PuTTY.

To do this, right-click on C:\Program Files (x86)\PuTTY\puttygen.exe and select Run as Administrator:

Answer "Yes" to the User Account Control challenge. Then click the "Generate" button in the puttygen window. puttygen will ask you to move your mouse over its dialog box to generate random seed bits. After it has computed a public key, it will display a dialog box resembling the following:

If you want to edit this key pair in the future, create a text file containing a short phrase, called a "passphrase". Copy and paste this passphrase into the "Key passphrase" and "Confirm passphrase" lines, then select "Save public key" and choose a filename (e.g. public.txt); also "Save private key" and choose another filename (e.g. private.ppk). Since you ran puttygen as Administrator, the files are visible to Windows Explorer.

Close puttygen.

Load Your Private Key Into Pageant

Pageant is an SSH authentication agent. It holds your private keys in memory, already decoded, so that you can use them often without needing to type a passphrase.

To load your private key into pageant, right-click on the private key file (e.g. private.ppk in this example), and select Load into pageant:

This action not only loads private.ppk into pageant, but also starts pageant if it is not already running. You will be prompted for the passphrase that you entered into puttygen when you created the key. If successful, pageant will load the key without further interaction.

Pageant: a background job with a dialog box

pageant runs without opening any visible window. When it is running, it puts an icon of a computer wearing a hat () into the System tray.

You can right-click on this icon to perform actions with pageant, including "View Keys" (which brings up a dialog box that allows you to add or remove keys.)

The "Add Key" button offers another way to enter your private key into pegeant: after clicking on "Add Key", select the file containing your private key (for example, private.ppk).

Set the GIT_SSH Environment Variable

From the Desktop, right-click the Windows logo at the very bottom left corner of the screen,  , and select "System". Within the System dialog box, select "Advanced system settings" to get the Power User Task Menu.

In the next dialog box, select "Environment Variables":

If you don't already have a GIT_SSH entry in your System Variables list, click "New..." and create GIT_SSH, defined to be the location of plink.exe :

Copy/paste the known_hosts entries listed, into a file named known_hosts under your .ssh profile (something like C:\Users\<my-id>\.ssh) (if known_hosts does not exist, create it).

Install NodeJS

The dcae build will install npm in most cases - however if you run into issues like the following - install it yourself

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (npm install) on project ecompportal-FE-os: Failed to run task: 'npm install' failed. (error code -4048)

Install NodeJs from

verify your install by doing 

$ npm -version

From git bash

  • npm install bower -g
  • npm install grunt-cli -g


IDE: Eclipse: Does Not Support Gerrit Plugin

Eclipse plugins (including the Mylin Gerrit connector plugin and Egit) do not support a 2.12 Gerrit server, so if you use Eclipse as your development IDE, you must do reviews using the Gerrit web interface.

IDE: IntelliJ

Installing Intellij Community Edition on Linux 


Unpack the ideaIC.gz or ideaIU.gz file.

A new instance must not be extracted over an existing one. The target folder must be empty.

tar xfz ideaIC.tar.gz or ideaIU.tar.gz. <new_archive_folder>

The recommended install location according to the filesystem hierarchy standard (FHS) is /opt. For example, it's possible to enter the following command:

sudo tar xf -*.tar.gz -C /opt/

Go to the bin directory, for example

cd opt/-*/binH

Start Intellij

Run from the bin subdirectory.

Refer to

Installing IntelliJ Community Edition and the Java SDK on Windows

If you are using IntelliJ to do Java compilations, download the IntelliJ installation image from The installation dialog gives you the opportunity to associated IntelliJ with file type .java, among others. Installation takes several minutes.

When you start your first IntelliJ project, you will need to specify the Java Software Development Kit (SDK) as the project's. If you do not have the Java SDK installed on your machine, you can download it from within IntelliJ by selecting Maven as the New Project type and clicking on "Download SDK": (Or, visit

Installing the Gerrit plugin in IntelliJ

Open File -> Settings -> Plugins of IntelliJ, and click on the Browse repositories... button.

In the new window, search for Gerrit, click Install to install the plugin, and finally restart IntelliJ.

To verify whether the Gerrit plugin is installed successfully, you can click File -> New -> Project from Version Control and verify whether Gerrit is present.

Other Tools

The component you are working on may require additional tool installations, see the relevant section under Development Guides.


For console (mvn) Install maven 3.3.3+ (currently 3.5.0) - as 3.2.x will have issues with the ODL certificate not matching

Will also fix

hostname in certificate didn't match: <> != <> OR <>

Selecting a connection method

Once Git is installed, you will need to select a connection method to the Gerrit host,

We recommend using SSH, in which case you need to register your private key in your account settings on the Gerrit host. However, if you are using a Virtual Private Network (VPN), you will require the HTTPS method, since most VPNs won't allow an ssh connection.

SSH Connection (Recommended)

Log in to the Gerrit host, pull down the menu under your user name (at the extreme top right of the browser window), click on "Settings":

Click your account name on the top right corner of the website and click on Settings.

In the Settings window, select SSH Public Keys, and then click Add Key... .

 Enter the public PuTTY key you generated above (by copying and pasting the entire contents of the file public.txt, in our example above.) and click Add.

HTTPS Connection (Alternate)

If you choose to use HTTP/HTTPS, you'll need to generate an access password. Log in to the Gerrit host, pull down the menu under your user name (at the extreme top right of the browser window), click on "Settings", and select "HTTP Password":

The icon at the right of the generated password allows you to copy the generated password to your clipboard, it will be needed when you interact with Git/Gerrit.

This password may have a limited time to live, so you might get errors like this one:

Problem running 'git remote update gerrit'
Fetching gerrit
fatal: unable to access ' ': Unknown SSL protocol error in connection to error: Could not fetch gerrit

Regenerating a password will most likely solve the connectivity issue. Sometimes, the Gerrit interface on HTTPS might be temporarily faulty, so retries might be needed.

Working with a Proxy

For developers working with a proxy, you might have proxy issues connecting to Linux Foundation website. To avoid the connection issue, you must define the proxy setting for both IntelliJ and Git.

To configure the proxy settings in IntelliJ, click File -> Settings -> Appearance & Behavior -> System Settings -> HTTP Proxy, enter the correct proxy settings and click Apply. In case of Manual proxy configuration, while entering the Host name, there is no need to write http:// in front of the URL. For example, if the proxy value is, you would put as the Host name.

To configure the proxy settings for Git, play the following command:

git config --global https.proxy https://<proxy username>:<proxy password>@<proxy url> 
git config --global http.proxy http://<proxy username>:<proxy password>@<proxy url>

Note: while entering the proxy username, sometimes it may require to add the domain name in front.

Building all ONAP projects

see Building Entire ONAP

Maven Example settings.xml

The most current settings.xml that you should use to build ONAP can be found in the oparent repo at

Save this Maven settings.xml as your ~/.m2/settings.xml 

Some notes on the settings.xml:

If you are behind a proxy you can add a proxy section to your settings.xml 


  • No labels


  1. If you have Git installed, you can use the "ssh-keygen" command from the Git Bash shell to generate a private-public key pair.  (This is not as sophisticated as the Putty/plink configuration, but much easier to make it work.)  Then look in your home directory for the .ssh/ file and upload its contents to the Gerrit web site's SSH area.  At that point you are set to type git commands in Git Bash.


  2. Chris: good idea! If you've got editing permissions, go ahead and modify the page acccordingly.

  3.   is also need for org.eclipse.core.runtime and sth else

  4. Is there any guide for remote debug with IDEs ? thx

    1. Xing, 

          Hi, good question and definitely required, I was planning on posting a section to the devops wiki on this later today.  It involves exposing a different port for each docker container that has a JRE after an agreed on port like 5005 is enabled and the JVM restarted.

          Ideally the compose files would enable the debug port in prep of this during deployment - I'll enter a JIRA on this as well.

      UCA-25 - Getting issue details... STATUS


  5. In the web page above instructions for windows users there is mention of a known_hosts file. I was expecting to see a lists of known_hosts to be added somewhere here in the instructions. 


    Copy/paste the known_hosts entries listed, into a file named known_hosts under your .ssh profile (something like C:\Users\<my-id>\.ssh) (if known_hosts does not exist, create it).

    Install NodeJS" 

    1. Steven,

         The mention of known_hosts can be ignored in my experience.  The dynamic file will get created on your first ssh and fill up on every new connect with the server/key pair.  Actually without a "-o StrictHostKeyChecking=no" in your ssh the known_hosts creates issues when you rebuild environments and swap out an IP for a local DNS name like robot - in that case you can also just remove that entry.


  6. I disagree with the advice (in the Installing Git section) to checkout files with Windows-style line endings (on Windows). I am aware of some unit tests in ONAP that compare test-generated outputs with fixed expected outputs, stored as file resources within the git repo. Some of these unit tests directly compare the raw file contents and expect an exact match. Automatic CRLF conversion will cause test failures for such projects.

  7. Please add a pointer to the appropriate page that explains ONAP has adopted the Google no-tabs-just-spaces code style. 

    1. Here is the page that Chris refers to: Java code style

      1. However, following that code style is not mandatory for R1 Amsterdam. Expect it to be mandatory in a future release.

  8. Does anybody recently proceeded successfully with clone of project on Windows e.g. 7?

    1. I find running VMware workstation on Windows and VMware Fusion on OSX works well - then you just develop in Ubuntu 16 or Redhat 7.3 in a VM.

      When I was at Nokia we developed this way on our windows machines so we could be in sync with our Linux developer box - in a config way

      That being said, I have ran into projects that came from a windows environment in ONAP (the CR/LF) so some developers here do run natively.  I have cloned on a windows 10 machine but this is inside cygwin - will post details

  9. Hi All,

    I was trying to build onap code and found some errors. can you please suggest is there any work around.

    I am using git bash and OS is windows 10.

    First time execution of command "repo init -u" found bellow error.

    ImportError: No module named fcntl

    i downloaded and paste it into python package library path.

    after execution of same command there are some more errors for that i need help to resolve.please find bellow error:

    $ repo init -u
    fatal: UriFormatException encountered.

    $ Traceback (most recent call last):
    File "C:\Users\mayangup\onap\.repo\repo/", line 531, in <module>
    File "C:\Users\mayangup\onap\.repo\repo/", line 507, in _Main
    result = repo._Run(argv) or 0
    File "C:\Users\mayangup\onap\.repo\repo/", line 180, in _Run
    result = cmd.Execute(copts, cargs)
    File "C:\Users\mayangup\onap\.repo\repo\subcmds\", line 387, in Execute
    git_require(MIN_GIT_VERSION, fail=True)
    File "C:\Users\mayangup\onap\.repo\repo\", line 121, in git_require
    git_version = git.version_tuple()
    File "C:\Users\mayangup\onap\.repo\repo\", line 104, in version_tuple
    ver_str = git.version()
    File "C:\Users\mayangup\onap\.repo\repo\", line 94, in version
    if p.Wait() == 0:
    File "C:\Users\mayangup\onap\.repo\repo\", line 249, in Wait
    rc = self._CaptureOutput()
    File "C:\Users\mayangup\onap\.repo\repo\", line 262, in _CaptureOutput
    flags = fcntl.fcntl(s.fd, fcntl.F_GETFL)
    AttributeError: 'module' object has no attribute 'F_GETFL'

    Can you please suggest what will be the work around.


    Mayank Gupta

  10. How do you download the ONAP JAR package? URL......

  11. Hi?

    in Unix Setup >  Ubuntu 16.04,   it explains steps on Ubuntu 16.04.  My question is that we can use Ubuntu1 16.04  version now ?  Because in Deploying SDC on a Linux VM for Development ,  it highlights ubuntu 14.04 (do not use ubuntu 16.04).

    which one is the latest tip?

  12. Hi!

    I'm trying to push a commit towards with the git review command, but get the following error:

    $ git review -s
    Problems encountered installing commit-msg hook
    The following command failed with exit code 104

    Does anyone know what I have done wrong? I have tried following the instructions on this page. I'm working in Windows 10.


    Henrik Andersson

    1. Try following this instruction for installing the commit-msg hook:

      In my case, instead of running "git review", I am running the equivalent "git push origin HEAD:refs/for/master" command (under Git Bash on Windows 7) which you can see here:


      1. Thank you! This helped me along!


    2. I was ok on windows 10 using python 2.7, pip and git review - this has helped with other issues on linux/osx

      f you get a 404 on commit hooks - reconfigure -

      curl -kLo `git rev-parse --git-dir`/hooks/commit-msg; chmod +x `git rev-parse --git-dir`/hooks/commit-msg
      git commit --amend
      git review -R