User Tools

Site Tools


Propositions for Joid integration in CI


Jenkins install

Jump host preparation

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

  • applications must be installed
    • git
    • bridge-utils
    • vlan
  • The network must also be set to host 3 bridges (TO BE DISCUSSED)
    • brAdm
    • brData
    • brStorage

All those pre-requisits can be managed by Master MAAS.

Now you can launch jenkins

Jenkins parameters

Jenkins fixes those parameters:

Jenkins defaults

# Slave name on Jenkins	
export SLAVE_NAME=orange-fr-pod2

# Git URL to use on this Jenkins Slave

# Project Name
export PROJECT=joid

# Place of jenkins workspace
export WORKSPACE=$HOME/workspace/joid-deploy-<scenario>/
# in case of local script testing
export WORKSPACE=$HOME/joid/

Projects default

The file containing installer defaults is releng/jjb/opnfv/installer-params.yml

# IP of the installer (Not used for Joid)
export INSTALLER_IP=192.168.Y.Y

# Installer used for deploying OPNFV on this POD
export INSTALLER_TYPE=joid

# Scenario to deploy and test
# Based on scenario naming we can get joid options
# naming convention:
#    os-<controller>-<nfvfeature>-<mode>[-<extrastuff>]
# With parameters:
#    controller=(nosdn|odl_l3|odl_l2|onos|ocl)
#       No odl_l3 today
#    nfvfeature=(kvm|ovs|dpdk|nofeature)
#       '_' list separated.
#    mode=(ha|noha)
#    extrastuff=(none)
#       Optional field - Not used today

# OpenStack release (kilo|liberty)	
export OS_RELEASE=liberty

# External network to create (name;type;first ip;last ip; gateway;network)	
export EXTERNAL_NETWORK="ext-net;flat;;;;"

# Disks to use by ceph by default (space separated list)	
export CEPH_DISKS=/srv

# Disks to use by ceph by controllers (empty if same as CEPH_DISKS)	

# Local lab config and Openstack openrc location	
export LAB_CONFIG=$HOME/joid_config

# Format or not disk before using ceph [true/false] (must be done the first time)	
export CEPH_REFORMAT=false

# Reinstall MAAS and Bootstrap before deploy [true/false]	
export MAAS_REINSTALL=false

Pod defaults

The file containing pod default is releng/jjb/opnfv/slave-params.yml

# Version of the installer to deploy
export INSTALLER_VERSION=latest	

Those parameters shall be present in the pod default.

# Disks to use by ceph by default (space separated list)	
export CEPH_DISKS=/srv

# Disks to use by ceph by controllers (empty if same as CEPH_DISKS)	

Cleanup steps

The cleanup is done at each deploy in the script


Run CI deploy script without jenkins

  • Copy all jenkins parameters (see list 'Jenkins parameters' section) in a file (~/ and set them according to your platform (don't forget to set DEPLOY_SCENARIO value !)
  • Load this file
source ~/
  • Get the script
chmod +x
  • Run the script

Add my pod deployed by jenkins

  1. Edit Releng jjb/joid/joid-ci-jobs.yml
    1. to add your node to pod list in the project section
    2. to add your trigger macro at the end of the file
  2. Add your pod description in jjb/opnfv/slave-params.yml
  3. Setup (or not) your local config file, as described in "Set specific pod parameters".
  4. If your $POD_NAME is not formated like this: <POD_DATA_CENTER>-<POD_ID> as set in joid/ci/maas/<POD_DATA_CENTER>/<POD_ID> subfolders, please modify section "Set Joid pod config name" in releng/jjb/joid/
  5. Ask jenkins to deploy :)

Set specific pod parameters

The pod admin can set a few parameters

sudo -s jenkins
mkdir ~/joid_config
cat << EOF > ~/joid_config/
### Set passwords
export MAAS_USER=ubuntu
export MAAS_PASSWORD=ubuntu
export OS_ADMIN_PASSWORD=openstack

Deploy or not MAAS at each time

Testing MAAS deploy is not the core of CI tests, so to gain time, MAAS reinstall can be disabled by setting local parameter MAAS_REINSTALL=false. Juju will be cleaned and all nodes managed will return in ready mode.

joid/ci_integration.txt · Last modified: 2016/01/26 14:21 by David Blaisonneau