Page tree
Skip to end of metadata
Go to start of metadata


Cutting the 5.1 release from contrail sources
# Please note that v5.1 is the tag on git repos, r5.1 is the tag for build artifacts
#
# Also this process is validate on CentOS Linux release 7.5.1804 and CentOS Linux release 7.6.1810
# and follows documentation as per https://github.com/Juniper/contrail-dev-env/blob/v5.1/README.md
#
# All Details are already captured in Contrail-dev-env README file, however for ease of reference
# this installation assumes availability of git and docker on the host machine.
# which can be installed using
# For CentOS/RHEL/Fedora linux host:
#     yum install docker git
# For Ubuntu linux host:
#     apt install docker.io git
#
git clone -b v5.1 https://github.com/Juniper/contrail-dev-env
cd contrail-dev-env

# using tungstenfabric/developer-sandbox:r5.1 takes care of the mainfest file needed for release r5.1
./startup.sh -i tungstenfabric/developer-sandbox -t r5.1

# connect to container can use attach as alternative
docker exec -it contrail-developer-sandbox bash

##########################################
# execute all the below in the container #
##########################################

# switch to dev-env directory
cd /root/contrail-dev-env

# update tpc to point to tpc-R5.1 instead of tpc
# this is needed as tpc-R5.1 was not available at the time of cutting out release r5.1
sed -i 's/148.251.5.90\/tpc/148.251.5.90\/tpc-R5.1/g' tpc.repo.template

# followup with sandbox operations
make sync
make fetch_packages
make setup
make dep
export SRCVER=r5.1
export BUILDTAG=1

make rpm

export CONTRAIL_VERSION=r5.1
export CONTRAIL_CONTAINER_TAG=$CONTRAIL_VERSION
# avoid development setup to override the CONTRAIL_VERSION
sed -i '/CONTRAIL_VERSION/d' common.env


# you can skip this if you are not intending to push it to docker hub, else you can use corresponding username
export CONTRAIL_REGISTRY=<your registery name>
export CONTRAIL_TEST_REGISTRY=$CONTRAIL_REGISTRY
sed -i '/CONTRAIL_REGISTRY/d' common.env
sed -i '/CONTRAIL_TEST_REGISTRY/d' common.env

export SB_BRANCH=v5.1
make containers
# v5.1 is not available for deployers
export SB_BRANCH=master
make deployers
  • No labels

4 Comments

  1. We probably need some baseline requirements for this.  Does it require a specific OS or have particular dependencies?

  2. tried to capture some more details in comments.
    Added a reference link to contrail-dev-env README file

  3. Prabhjot Singh Sethi: after "make containers" do you see 2 different tags? I see "queens-r5.1" and "r5.1". If you do see "queens-r5.1", why is it there? If you do not see "queens-r5.1", any idea why I have it?

  4. yes Edward Ting we do see two different tags, but pointing to same image.
    This comes from src/review.opencontrail.org/Juniper/contrail-container-builder/containers/build.sh line 82
    where the default value queens comes from src/review.opencontrail.org/Juniper/contrail-container-builder/parse-env.sh line 41