User Tools

Site Tools


joid:ci_integration

This is an old revision of the document!


Propositions for Joid integration in CI

Prerequisites

Jump host preparation

The jumphost must be a flavor of Ubuntu The following things must be set on the jumphost before starting any deploy:

  • One extra repo (repository ppa:juju/stable)
  • applications must be installed
    • libvirt-bin
    • git
    • iptables-persistent
    • bridge-utils
    • vlan
  • The network must also be set to host 3 bridges (TO BE DISCUSSED)
    • brAdm
    • brData
    • brStorage
Pod parameters

The pod admin must also set a few parameters

cat << EOF > ~/joid_local_config

export POD_DC=orange
export POD_NUM=pod2
export POD_NAME=$POD_DC$POD_NUM
export MAAS_USER=ubuntu
export MAAS_PASSWORD=ubuntu
export OS_ADMIN_PASSWORD=openstack

EOF
Get initial joid source
cd ~/
git clone http://gerrit.opnfv.org/gerrit/joid.git

Cleanup step

cd ~/joid/ci
./clean.sh

Build

No build needed

Install

Installation can be automatically done following those steps

  1. load local pod parameters (local login/passwords)
  2. load jenkins parameters (ha mode, sdn controller, open stack release)
  3. fetch the last version of joid
  4. prepare infra by installing maas and juju
  5. deploy joid
  6. prepare adminrc for other jenkins jobs

All those step can be set in 1 jenkins macro

load parameters

load local pod parameters and jenkins parameters

source ~/joid_local_config
export JOID_MODE=<ha|nonha|tip>
export JOID_RELEASE=<kilo|liberty>
export JOID_SDN_CONTROLLER=<odl|opencontrail>

fetch the last version of joid

cd ~/
source joid_local_config
rm -rf joid
git clone http://gerrit.opnfv.org/gerrit/joid.git
cd ~/joid/ci

install maas and juju

MAASCONFIG=~/joid/ci/maas/$POD_DC/$POD_NUM/deployment.yaml
sed -i -- 's/user: ubuntu/user: $MAAS_USER/' $MAASCONFIG
sed -i -- 's/password: ubuntu/user: $MAAS_PASSWORD/' $MAASCONFIG
./02-maasdeploy.sh $POD_NAME

Deploy joid

if [ "$JOID_MODE" == 'nonha' ]
    then SRCBUNDLE=~/joid/ci/$JOID_SDN_CONTROLLER/juju-deployer/ovs-$JOID_SDN_CONTROLLER.yaml
    else SRCBUNDLE=~/joid/ci/$JOID_SDN_CONTROLLER/juju-deployer/ovs-$JOID_SDN_CONTROLLER-$JOID_MODE.yaml
    fi
echo $SRCBUNDLE

sed -i -- 's/"admin-password": openstack/"admin-password": $OS_ADMIN_PASSWORD/' $SRCBUNDLE

./deploy.sh -t $JOID_MODE -o $JOID_RELEASE -s $JOID_SDN_CONTROLLER -l $POD_NAME

Set admin-openrc

cat << EOF > ~/admin-openrc
export OS_USERNAME=admin
export OS_PASSWORD=$OS_ADMIN_PASSWORD
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://192.168.2.23:5000/v2.0
export OS_REGION_NAME=Canonical
EOF
joid/ci_integration.1448977430.txt.gz · Last modified: 2015/12/01 13:43 by David Blaisonneau