Icon

Have questions? Stuck? Please check our FAQ for some common questions and answers.

This wiki documents the current development version of ONOS (master). Refer to the Wiki Archives for documentation for all previous versions of ONOS.

Skip to end of metadata
Go to start of metadata

The ONOS source code is stored at gerrit.onosproject.org. Setting up git and Gerrit will allow you to easily fetch and test any version of ONOS, including releases, development versions, and patches that have been submitted for review. Setting up a Gerrit account and ssh access will also enable you to submit your own patches to ONOS and also to participate in the ONOS code review process.

Read-only access to the ONOS source code via git

Make sure you've installed git, and then create a local clone of the source repository:

If all you want to do is compile and run ONOS, you've got the code and are ready to do so!

However, if you want to contribute code to ONOS, you need to configure git and Gerrit for ssh access, as described below.

Optional: Read-write access to the ONOS source code via Gerrit, ssh and git-review

There are two ways to clone the code from Gerrit, https:// or ssh://. Either way is fine for reading the code, but when it comes time to contribute your own patches the easiest and most secure way is to access Gerrit over SSH.

To make sure you're using the ssh:// remote, first check the URLs of the remotes in your ONOS repository:

If you see ssh:// URLs, everything is fine and you can move on to the next step (Configuring Gerrit). If you see https:// URLs, you should change them to ssh:// before continuing:

Substitute <username> with your Gerrit/Crowd username (the <username> must be specifically provisioned in Gerrit Profile for git)

You can double-check the URL on Gerrit by logging in, going to Projects -> List, then clicking on 'onos', On the grey bar, click 'SSH', then just underneath the grey bar will appear 'git clone ssh://...'. This is the URL you should set your remote to in your local git repository.

Configuring Gerrit

Ensure <username> is configured in Settings->Profile->Username; the Username is not populated for new accounts by default.

Prospective contributors should configure their account to receive notifications about their code submissions. The Settings page is accessed from the user dropdown on the upper right of the page:

To configure contacts by going to Contact Information, and filling out the fields, and hitting Save Changes :

To subscribe to the project, go to Watched Projects and enter onos-next in the Project Name field of the page. Hitting return should add onos-next to a table under the search field:

As shown above, email notifications are also configured from here by checking off the types of notifications to receive. 

Uploading SSH Public Keys

An SSH key should also be uploaded to the ONOS Gerrit server.

  1. Generate a key. Keep the default file name and location. This will generate an id_rsa and id_rsa.pub file in ~/.ssh:


  2. Upload the SSH public key. After logging into the Gerrit account, go to Settings > SSH Public Keys. Paste the contents of id_rsa.pub into the "Add SSH Public Key" box and hit Add:

 

 

 

 

 

 

 

 

 

 

 

 

 

Icon
A key must be uploaded per host if checking code out to multiple hosts with git.

Configuring git

Developers planning to contribute code should configure git with their username and email.

  • No labels