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

Cleanup can be on Juju only or also on the jumphost (destroying MAAS and Bootstrap VM) So we can split that step in 2 templates:

[joid-clean] Juju destroy environmnet

cd ~/joid/ci
./clean.sh

To enhance for 'juju not deployed' case

[joid-destroy-vm] Destroy MAAS and Bootstrap VM

virsh...

To be completed

Build

No build needed

Install

Installation can be automatically done following those steps:

  1. [joid-clean] see previous section
  2. [joid-destroy-vm] see previous section
  3. [joid-gitupdate] fetch the last version of joid
  4. [joid-configure] load local pod parameters (local login/passwords) and load jenkins parameters (ha mode, sdn controller, open stack release)
  5. [joid-prepare] prepare infra by installing maas and juju
  6. [joid-deploy] deploy joid
  7. [joid-adminrc] prepare adminrc for other jenkins jobs (functest…)

All those steps can be done in one jenkins template

  1. [joid-daily-full] this template is also destroying MAAS and Bootstrap VM
  2. [joid-daily] this one is not destroying MAAS and Bootstrap VM (no [joid-destroy-vm] and [joid-prepare])

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.1449075912.txt.gz · Last modified: 2015/12/02 17:05 by David Blaisonneau