编译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-<pkg_name> - installs build dependencies for <pkg_name>

6. Make artifacts

RPM packages

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

Container images

  • make list-containers - lists all container targets
  • make containers - builds all containers' images, requires RPM packages in /root/contrail/RPMS
  • make container-<container_name> - 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-<container_name> - 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
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值