编译tungstenfabric

https://github.com/Juniper/contrail-dev-env

2. Clone dev setup repo

git clone https://github.com/Juniper/contrail-dev-env
cd contrail-dev-env

3. Execute script to start 3 containers

sudo ./startup.sh -t R5.1

Note: This command runs container opencontrailnightly/developer-sandbox:master from opencontrailnightly docker hubby default. You can specify different image and/or tag using flags, e.g.

  1. to develop on nightly R5.0 container use: sudo ./startup.sh -t R5.0
  2. to develop code based on a tagged r5.0 release, use: sudo ./startup.sh -i opencontrail/developer-sandbox -t r5.0

docker ps -a should show these 3 containers

contrail-developer-sandbox [For running scons, unit-tests etc]
contrail-dev-env-rpm-repo  [Repo server for contrail RPMs after they are build]
contrail-dev-env-registry  [Registry for contrail containers after they are built]

4. Attach to developer-sandbox container

docker attach contrail-developer-sandbox

5. Prepare developer-sandbox container

Required first steps in the container:

cd /root/contrail-dev-env
make sync           # get latest code
make fetch_packages # pull third_party dependencies
make setup          # set up docker container
make dep            # install build dependencies

sudo curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo
chmod +x /usr/bin/repo
sudo vim /usr/bin/repo
REPO_URL = 'https://gerrit-google.tuna.tsinghua.edu.cn/git-repo' 

The descriptions of targets:

  • make sync - sync code in ./contrail directory using repo tool
  • make fetch_packages - pull ./third_party dependencies (after code checkout)
  • make setup - initial configuration of image (required to run once)
  • make dep - installs all build dependencies
  • make dep- - installs build dependencies for

6. Make artifacts

RPM packages

  • make list - lists all available RPM targets
  • make rpm - builds all RPMs
  • make rpm- - builds single RPM for

Container images

  • make list-containers - lists all container targets
  • make containers - builds all containers' images, requires RPM packages in /root/contrail/RPMS
  • make container- - builds single container as a target, with all docker dependencies

Deployers

  • make list-deployers - lists all deployers container targets
  • make deployers - builds all deployers
  • make deployer- - builds single deployer as a target, with all docker dependencies

Clean

  • make clean{-containers,-deployers,-repo,-rpm} - delete artifacts

 -v /dev/pts:/dev/pts

before make containers, you can export SB_BRANCH=R5.1
 

你可能感兴趣的:(cloud,虚拟网络)