Installing CORD in China

There are several complications in installing and operating CORD in China. This section provides some practical suggestions on how to work around these issues.

Note: The following assumes you've already read the main CORD installation guide, that you've understood the hardware and software requirements, and that you're well aware of how the standard installation process works.

Update Ubuntu Repositories

The default Ubuntu repositories are quite slow in China. The following repository should work faster:

Update your Ubuntu repository, both on the development machine and on the head node.

Prepare the Development Machine

By default, CORD uses an automated script to prepare the development machine. Unfortunately, the script won't work in China, since the standard Vagrant repositories are not reachable.

As a work-around, you can execute some manual commands. Copy and paste to your dev node the following:

Install essential software:

sudo apt-get update &&
sudo apt-get -y install apt-transport-https build-essential curl git python-dev python-netaddr python-pip software-properties-common sshpass qemu-kvm libvirt-bin libvirt-dev nfs-kernel-server &&

Install Ansible and related software:

sudo apt-add-repository -y ppa:ansible/ansible &&
sudo apt-get update &&
sudo apt-get install -y ansible &&
sudo pip install gitpython graphviz

Install Vagrant and related plugins:

curl -o /tmp/vagrant.deb vagrant_1.9.3_x86_64.deb &&
sudo dpkg -i /tmp/vagrant.deb &&
vagrant plugin list | grep -q vagrant-libvirt || vagrant plugin install vagrant-libvirt --plugin-version 0.0.35 &&
vagrant plugin list | grep -q vagrant-mutate || vagrant plugin install vagrant-mutate &&
vagrant plugin list | grep -q vagrant-hosts || vagrant plugin install vagrant-hosts &&

Download Vagrant VMs and mutate it to be used with Libvirt:

wget &&
vagrant box add ubuntu/trusty64 &&
vagrant mutate ubuntu/trusty64 libvirt --input-provider virtualbox

Install repo:

curl -o /tmp/repo ';a=blob_plain;f=repo;hb=refs/heads/stable' &&
echo "$REPO_SHA256SUM  /tmp/repo" | sha256sum -c - &&
sudo mv /tmp/repo /usr/local/bin/repo &&
sudo chmod a+x /usr/local/bin/repo

Note: repo is a tool from Google, that CORD uses to automatically manage multiple git repositories used in the project together. The original version of repo connects to Google at every initialization to download some software. This special version will let you connect to ONF instead at every initialization.

Download Source Code

Before it wasn't possible to download directly the CORD repository using repo, since the tool was trying to connect at every initialization to Google to check for updates.

With the custom version (see above) this is not an issue any more. To download the code, follow the steps below:

git config --global 'Test User' &&
git config --global '' &&
git config --global color.ui false &&
repo init -u -b master
repo sync

Warning: Note that master is just an example. You can replace it with the branch you prefer.

From now on in the guide, the cord directory just extracted will be referenced as CORD_ROOT. The CORD_ROOT directory should be ~/cord.

Replace with

The repository has been generally cleaned up from references to Google, but there are places in the code that refer to it. We suggest you to look carefully in the entire repositories and replace any occurrence with (or any other preferred address).

Replace Google DNS

Google DNS won't work in China. Unfortunately, it is still the default for all CORD services. Look in the entire repository for all the occurrences of,, or, and replace them with your preferred DNS server.

Replace Maven Mirror

Maven is used to build ONOS apps. The default Maven mirror doesn't work. In CORD_ROOT/onos-apps/settings.xml, add:

    <name>Nexus aliyun</name>

Replace Docker Mirror

The default Docker mirror won't work. Docker just opened a new mirror in China, which should be used instead.

Reference guide can be found at: Set the option --registry-mirror= in the following files:

  • CORD_ROOT/build/ansible/roles/docker/templates/docker.cfg
  • CORD_ROOT/build/maas/roles/compute-node/tasks/main.yml

Replace NPM Mirror

Add a line npm config set registry just before the “npm install” command is invoked, in the following files:

  • CORD_ROOT/orchestration/xos-gui/Dockerfile
  • CORD_ROOT/orchestration/xos-gui/Dockerfile.xos-gui-extension- builder

Create a file named npmrc in CORD_ROOT/orchestration/xos-gui/ and add the following content:

registry =
sass-binary-site =
phantomjs_cdnurl =

Add the line COPY ${CODE_SOURCE}/npmrc /root/.npmrc to the following files, before the npm install command is invoked, and after the CODE_SOURCE variable is defined:

  • CORD_ROOT/orchestration/xos-gui/Dockerfile
  • CORD_ROOT/orchestration/xos-gui/Dockerfile.xos-gui-extension-builder

Fix Google Maps for China

This is specific to E-CORD, which uses Google Maps to visualize where Central Offices are located. Default Google Maps APIs are not available from China. To fix this, replace

<div map-lazy-load="{API_KEY}">


<div map-lazy-load="{API_KEY}">



Developing for CORD

Now that repo issues have been solved, you can start developing for CORD also from China, and go through the default developer workflow described here. Happy coding!

Mailing Lists

CORD mailing lists are hosted on Google, but this doesn't mean you can't send and receive emails!

Mailing lists are:


You don't need to join the mailing list to be able to write to it, but you need that in order to receive automated updates. To subscribe to a mailing list, so to see emails from the rest of the community, send a blank email to, for example

results matching ""

    No results matching ""