This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
joid:ci_integration [2016/01/14 14:24] David Blaisonneau |
joid:ci_integration [2016/01/26 14:21] (current) David Blaisonneau [Jenkins defaults] |
||
---|---|---|---|
Line 24: | Line 24: | ||
Now you can launch jenkins | Now you can launch jenkins | ||
- | |||
===== Jenkins parameters ===== | ===== Jenkins parameters ===== | ||
Line 30: | Line 29: | ||
Jenkins fixes those parameters: | Jenkins fixes those parameters: | ||
- | ====Projects default==== | + | ====Jenkins defaults==== |
<code> | <code> | ||
- | TO BE COMPLETED | + | # Slave name on Jenkins |
- | </code> | + | export SLAVE_NAME=orange-fr-pod2 |
+ | export NODE_NAME=$SLAVE_NAME | ||
- | ==== Pod defaults==== | + | # Git URL to use on this Jenkins Slave |
+ | export GIT_BASE=https://gerrit.opnfv.org/gerrit/$PROJECT | ||
- | None today, but CEPH options may be set here. | + | # Project Name |
- | ===== Cleanup steps ===== | + | export PROJECT=joid |
- | The cleanup is done at each deploy in the script | + | # Place of jenkins workspace |
+ | export WORKSPACE=$HOME/workspace/joid-deploy-<scenario>/ | ||
+ | # in case of local script testing | ||
+ | export WORKSPACE=$HOME/joid/ | ||
- | ===== HOW TO ===== | + | </code> |
- | ==== Run CI deploy script without jenkins ==== | ||
+ | ====Projects default==== | ||
+ | The file containing installer defaults is **releng/jjb/opnfv/installer-params.yml** | ||
+ | <code> | ||
# IP of the installer (Not used for Joid) | # IP of the installer (Not used for Joid) | ||
export INSTALLER_IP=192.168.Y.Y | export INSTALLER_IP=192.168.Y.Y | ||
Line 65: | Line 71: | ||
# extrastuff=(none) | # extrastuff=(none) | ||
# Optional field - Not used today | # Optional field - Not used today | ||
- | export DEPLOY_SCENARIO=os-nosdn-nofeature-ha | + | export DEPLOY_SCENARIO=none |
# OpenStack release (kilo|liberty) | # OpenStack release (kilo|liberty) | ||
Line 71: | Line 77: | ||
# External network to create (name;type;first ip;last ip; gateway;network) | # External network to create (name;type;first ip;last ip; gateway;network) | ||
- | export EXTERNAL_NETWORK=ext-net;flat;161.105.231.2;161.105.231.62;161.105.231.1;161.105.231.0/26 | + | export EXTERNAL_NETWORK="ext-net;flat;192.168.0.2;192.168.0.253;192.168.0.1;192.168.0.0/24" |
# Disks to use by ceph by default (space separated list) | # Disks to use by ceph by default (space separated list) | ||
Line 77: | Line 83: | ||
# Disks to use by ceph by controllers (empty if same as CEPH_DISKS) | # Disks to use by ceph by controllers (empty if same as CEPH_DISKS) | ||
- | export CEPH_DISKS_CONTROLLERS=/srv | + | export CEPH_DISKS_CONTROLLERS="" |
# Local lab config and Openstack openrc location | # Local lab config and Openstack openrc location | ||
Line 87: | Line 93: | ||
# Reinstall MAAS and Bootstrap before deploy [true/false] | # Reinstall MAAS and Bootstrap before deploy [true/false] | ||
export MAAS_REINSTALL=false | export MAAS_REINSTALL=false | ||
+ | </code> | ||
- | # Slave name on Jenkins | + | ==== Pod defaults==== |
- | export SLAVE_NAME=orange-fr-pod2 | + | The file containing pod default is **releng/jjb/opnfv/slave-params.yml** |
- | export NODE_NAME=$SLAVE_NAME | + | |
+ | <code> | ||
# Version of the installer to deploy | # Version of the installer to deploy | ||
export INSTALLER_VERSION=latest | export INSTALLER_VERSION=latest | ||
+ | </code> | ||
- | # Git URL to use on this Jenkins Slave | + | Those parameters shall be present in the pod default. |
- | export GIT_BASE=https://gerrit.opnfv.org/gerrit/$PROJECT | + | <code> |
+ | # 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) | ||
+ | export CEPH_DISKS_CONTROLLERS=/srv | ||
+ | </code> | ||
+ | |||
+ | ===== Cleanup steps ===== | ||
+ | |||
+ | The cleanup is done at each deploy in the script | ||
+ | |||
+ | ===== HOW TO ===== | ||
+ | |||
+ | ==== Run CI deploy script without jenkins ==== | ||
+ | |||
+ | * Copy all jenkins parameters (see list 'Jenkins parameters' section) in a file (~/deploy_params.sh) and set them according to your platform (**don't forget to set DEPLOY_SCENARIO value !**) | ||
+ | * Load this file | ||
+ | <code>source ~/deploy_params.sh</code> | ||
+ | * Get the script | ||
+ | <code>wget https://git.opnfv.org/cgit/releng/plain/jjb/joid/joid-deploy.sh | ||
+ | chmod +x joid-deploy.sh</code> | ||
+ | * Run the script | ||
+ | <code>./joid-deploy.sh</code> | ||
==== Add my pod deployed by jenkins ==== | ==== Add my pod deployed by jenkins ==== | ||
- | TO BE CORRECTED | + | - Edit Releng **jjb/joid/joid-ci-jobs.yml** |
- | - Edit Releng jjb/joid/joid.yml to add your node to pod list in the project section | + | - to add your node to pod list in the project section |
- | - Add your pod description in jjb/opnfv/pod-params.yml | + | - to add your trigger macro at the end of the file |
- | - Setup (or not) your local config file, as described in "Set specific pod parameters". If no. check your NODE_NAME is formated like this: <POD_DATA_CENTER>-<POD_NAME> as set in joid/ci/maas subfolders | + | - Add your pod description in **jjb/opnfv/slave-params.yml** |
+ | - Setup (or not) your local config file, as described in "Set specific pod parameters". | ||
+ | - 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/joid-deploy.sh** | ||
- Ask jenkins to deploy :) | - Ask jenkins to deploy :) | ||
Line 114: | Line 147: | ||
mkdir ~/joid_config | mkdir ~/joid_config | ||
cat << EOF > ~/joid_config/config.sh | cat << EOF > ~/joid_config/config.sh | ||
- | |||
- | ### Set Pod name | ||
- | export POD_DC=orange | ||
- | export POD_NUM=pod2 | ||
- | # This must be the same name as the one configured in joid deployment files | ||
- | export POD_NAME=\$POD_DC\$POD_NUM | ||
- | |||
- | ### Reinstall MAAS at each jenkins deploy | ||
- | export MAAS_REINSTALL=true | ||
- | |||
### Set passwords | ### Set passwords | ||
export MAAS_USER=ubuntu | export MAAS_USER=ubuntu | ||
export MAAS_PASSWORD=ubuntu | export MAAS_PASSWORD=ubuntu | ||
export OS_ADMIN_PASSWORD=openstack | export OS_ADMIN_PASSWORD=openstack | ||
- | |||
- | ### Set CEPH parameters | ||
- | # disks to use by ceph (comma separated list) | ||
- | export CEPH_DISKS=/dev/sdb,/dev/sdc | ||
- | # format or not disk before using ceph (must be done the first time) | ||
- | export CEPH_REFORMAT=false | ||
- | |||
EOF | EOF | ||
</code> | </code> |