summaryrefslogtreecommitdiffstats
path: root/jjb/joid
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/joid')
-rw-r--r--jjb/joid/joid-ci-jobs.yml138
-rw-r--r--jjb/joid/joid-deploy.sh133
2 files changed, 58 insertions, 213 deletions
diff --git a/jjb/joid/joid-ci-jobs.yml b/jjb/joid/joid-ci-jobs.yml
index 1c998c9c4..cf4d9cc1c 100644
--- a/jjb/joid/joid-ci-jobs.yml
+++ b/jjb/joid/joid-ci-jobs.yml
@@ -16,10 +16,6 @@
stream: master
branch: '{stream}'
gs-pathname: ''
- brahmaputra: &brahmaputra
- stream: brahmaputra
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
#--------------------------------
# POD, INSTALLER, AND BRANCH MAPPING
#--------------------------------
@@ -32,18 +28,12 @@
- virtual:
slave-label: joid-virtual
<<: *master
- - baremetal:
- slave-label: joid-baremetal
- <<: *brahmaputra
- - virtual:
- slave-label: joid-virtual
- <<: *brahmaputra
#--------------------------------
# None-CI PODs
#--------------------------------
- - orange-pod2:
- slave-label: orange-pod2
- <<: *brahmaputra
+ - orange-pod1:
+ slave-label: orange-pod1
+ <<: *master
- orange-pod2:
slave-label: orange-pod2
<<: *master
@@ -54,11 +44,11 @@
# new scenario descriptions
scenario:
- 'os-nosdn-nofeature-noha':
- auto-trigger-name: 'daily-trigger-disabled'
+ auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-nosdn-nofeature-ha':
auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-nosdn-lxd-ha':
- auto-trigger-name: 'daily-trigger-disabled'
+ auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-nosdn-lxd-noha':
auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger'
- 'os-odl_l2-nofeature-ha':
@@ -223,29 +213,15 @@
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-orange-pod2-master-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-nosdn-nofeature-ha-juniper-pod1-master-trigger'
- triggers:
- - timed: ''
-
-# os-nosdn-nofeature-ha trigger - branch: stable/brahmaputra
-- trigger:
- name: 'joid-os-nosdn-nofeature-ha-baremetal-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-nosdn-nofeature-ha-virtual-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-nofeature-ha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
@@ -259,29 +235,15 @@
triggers:
- timed: ''
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-master-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-juniper-pod1-master-trigger'
- triggers:
- - timed: ''
-
-# os-odl_l2-nofeature-ha trigger - branch: stable/brahmaputra
-- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-baremetal-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-virtual-brahmaputra-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-odl_l2-nofeature-ha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-odl_l2-nofeature-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
@@ -295,6 +257,10 @@
triggers:
- timed: ''
- trigger:
+ name: 'joid-os-onos-nofeature-ha-orange-pod1-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
name: 'joid-os-onos-nofeature-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
@@ -313,45 +279,15 @@
triggers:
- timed: ''
- trigger:
- name: 'joid-os-onos-sfc-ha-orange-pod2-master-trigger'
+ name: 'joid-os-onos-sfc-ha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-onos-sfc-ha-juniper-pod1-master-trigger'
- triggers:
- - timed: ''
-
-# os-onos-nofeature-ha trigger - branch: stable/brahmaputra
-- trigger:
- name: 'joid-os-onos-nofeature-ha-baremetal-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-nofeature-ha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-nofeature-ha-orange-pod2-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-nofeature-ha-juniper-pod1-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-sfc-ha-baremetal-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-sfc-ha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-onos-sfc-ha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-onos-sfc-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-onos-sfc-ha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-onos-sfc-ha-juniper-pod1-master-trigger'
triggers:
- timed: ''
@@ -365,29 +301,15 @@
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-noha-orange-pod2-master-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-nosdn-lxd-noha-juniper-pod1-master-trigger'
- triggers:
- - timed: ''
-
-# os-nosdn-lxd-noha trigger - branch: stable/brahmaputra
-- trigger:
- name: 'joid-os-nosdn-lxd-noha-baremetal-brahmaputra-trigger'
+ name: 'joid-os-nosdn-lxd-noha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-noha-virtual-brahmaputra-trigger'
- triggers:
- - timed: ''
-- trigger:
- name: 'joid-os-nosdn-lxd-noha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-nosdn-lxd-noha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-noha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-nosdn-lxd-noha-juniper-pod1-master-trigger'
triggers:
- timed: ''
@@ -401,6 +323,10 @@
triggers:
- timed: ''
- trigger:
+ name: 'joid-os-nosdn-lxd-ha-orange-pod1-master-trigger'
+ triggers:
+ - timed: ''
+- trigger:
name: 'joid-os-nosdn-lxd-ha-orange-pod2-master-trigger'
triggers:
- timed: ''
@@ -409,20 +335,24 @@
triggers:
- timed: ''
-# os-nosdn-lxd-ha trigger - branch: stable/brahmaputra
+# os-nosdn-nofeature-noha trigger - branch: master
+- trigger:
+ name: 'joid-os-nosdn-nofeature-noha-baremetal-master-trigger'
+ triggers:
+ - timed: '0 4 * * *'
- trigger:
- name: 'joid-os-nosdn-lxd-ha-baremetal-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-noha-virtual-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-ha-virtual-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-noha-orange-pod1-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-ha-orange-pod2-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-noha-orange-pod2-master-trigger'
triggers:
- timed: ''
- trigger:
- name: 'joid-os-nosdn-lxd-ha-juniper-pod1-brahmaputra-trigger'
+ name: 'joid-os-nosdn-nofeature-noha-juniper-pod1-master-trigger'
triggers:
- timed: ''
diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh
index da3676e28..575a5738c 100644
--- a/jjb/joid/joid-deploy.sh
+++ b/jjb/joid/joid-deploy.sh
@@ -10,10 +10,8 @@
set +e
set -o nounset
-PWD_FILENAME="passwords.sh"
-
-##
##
+## Functions
##
function exit_on_error {
RES=$1
@@ -24,50 +22,23 @@ function exit_on_error {
fi
}
-
##
## Create LAB_CONFIG folder if not exists
##
-mkdir -p $LAB_CONFIG
-
-##
-## Override default passwords with local settings if needed
-##
-if [ -e "$LAB_CONFIG/$PWD_FILENAME" ]; then
- echo "------ Load local passwords ------"
- source $LAB_CONFIG/$PWD_FILENAME
-else
- export MAAS_USER=ubuntu
- export MAAS_PASSWORD=ubuntu
- export OS_ADMIN_PASSWORD=openstack
-fi
+mkdir -p $LAB_CONFIG
##
## Set Joid pod config name
##
- # This part will be removed when pod names will be synced between jenkins and joid config
- case $NODE_NAME in
- *virtual*)
- POD=default ;;
- *)
- POD=$NODE_NAME ;;
- esac
- export POD_NAME=${POD/-}
-##
-## Parse Network config
-##
-
-EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-}
-# split EXTERNAL_NETWORK=name;type;first ip;last ip; gateway;network
-IFS=';' read -r -a EXTNET <<< "$EXTERNAL_NETWORK"
-EXTNET_NAME=${EXTNET[0]}
-EXTNET_TYPE=${EXTNET[1]}
-EXTNET_FIP=${EXTNET[2]}
-EXTNET_LIP=${EXTNET[3]}
-EXTNET_GW=${EXTNET[4]}
-EXTNET_NET=${EXTNET[5]}
+case $NODE_NAME in
+ *virtual*)
+ POD=default ;;
+ *)
+ POD=$NODE_NAME ;;
+esac
+export POD_NAME=${POD/-}
##
## Redeploy MAAS or recover the previous config
@@ -77,11 +48,11 @@ cd $WORKSPACE/ci
if [ -e "$LAB_CONFIG/environments.yaml" ] && [ "$MAAS_REINSTALL" == "false" ]; then
echo "------ Recover Juju environment to use MAAS ------"
cp $LAB_CONFIG/environments.yaml .
+ cp $LAB_CONFIG/deployment.yaml .
+ if [ -e $LAB_CONFIG/deployconfig.yaml ]; then
+ cp $LAB_CONFIG/deployconfig.yaml .
+ fi
else
- MAASCONFIG=$WORKSPACE/ci/maas/${POD/-*}/${POD/*-}/deployment.yaml
- echo "------ Set MAAS password ------"
- sed -i -- "s/user: ubuntu/user: $MAAS_USER/" $MAASCONFIG
- sed -i -- "s/password: ubuntu/password: $MAAS_PASSWORD/" $MAASCONFIG
echo "------ Redeploy MAAS ------"
./00-maasdeploy.sh $POD_NAME
exit_on_error $? "MAAS Deploy FAILED"
@@ -117,27 +88,10 @@ fi
if [ "$HA_MODE" == 'noha' ]; then
HA_MODE='nonha'
fi
-SRCBUNDLE="${WORKSPACE}/ci/${SDN_CONTROLLER}/juju-deployer/"
-SRCBUNDLE="${SRCBUNDLE}/ovs-${SDN_CONTROLLER}-${HA_MODE}.yaml"
-
-
-# Modify Bundle
-echo "------ Set openstack password ------"
-sed -i -- "s/admin-password: openstack/admin-password: $OS_ADMIN_PASSWORD/" $SRCBUNDLE
-
-if [ -n "$EXTNET_NAME" ]; then
- echo "------ Set openstack default network ------"
- sed -i -- "s/neutron-external-network: ext_net/neutron-external-network: $EXTNET_NAME/" $SRCBUNDLE
-fi
-
-echo "------ Set ceph disks ------"
-#Find the first line of osd-devices to change the one for ceph, then the other for ceph-osd
-sed -i -- "s@osd-devices: /srv@osd-devices: $CEPH_DISKS@" $SRCBUNDLE
-sed -i -r -- "s/^(\s+osd-reformat: )'no'/\1'$CEPH_REFORMAT'/" $SRCBUNDLE
-# temporary sfc feature is availble only on onos and trusty
-if [ "$NFV_FEATURES" == 'sfc' ] && [ "$SDN_CONTROLLER" == 'onos' ];then
- UBUNTU_DISTRO=trusty
+# Add extra to features
+if [ "$EXTRA" != "" ];then
+ NFV_FEATURES="${NFV_FEATURES}_${EXTRA}"
fi
##
@@ -156,17 +110,6 @@ exit_on_error $? "Main deploy FAILED"
JOID_ADMIN_OPENRC=$LAB_CONFIG/admin-openrc
echo "------ Create OpenRC file [$JOID_ADMIN_OPENRC] ------"
-# get Keystone ip
-case "$HA_MODE" in
- "ha")
- KEYSTONE=$(cat bundles.yaml |shyaml get-value openstack-phase1.services.keystone.options.vip)
- ;;
- *)
- KEYSTONE=$(juju status keystone |grep public-address|sed -- 's/.*\: //')
- ;;
-esac
-
-
# get controller IP
case "$SDN_CONTROLLER" in
"odl")
@@ -181,22 +124,12 @@ case "$SDN_CONTROLLER" in
esac
SDN_PASSWORD='admin'
-# export the openrc file
-cat << EOF > $JOID_ADMIN_OPENRC
-export OS_USERNAME=admin
-export OS_PASSWORD=$OS_ADMIN_PASSWORD
-export OS_TENANT_NAME=admin
-export OS_AUTH_URL=http://$KEYSTONE:35357/v2.0
-export OS_REGION_NAME=RegionOne
-export OS_ENDPOINT_TYPE='adminURL'
-export CINDER_ENDPOINT_TYPE='adminURL'
-export GLANCE_ENDPOINT_TYPE='adminURL'
-export KEYSTONE_ENDPOINT_TYPE='adminURL'
-export NEUTRON_ENDPOINT_TYPE='adminURL'
-export NOVA_ENDPOINT_TYPE='adminURL'
+# export the openrc file by getting the one generated by joid and add SDN
+# controller for Functest
+cp ./cloud/admin-openrc $JOID_ADMIN_OPENRC
+cat << EOF >> $JOID_ADMIN_OPENRC
export SDN_CONTROLLER=$SDN_CONTROLLER_IP
export SDN_PASSWORD=$SDN_PASSWORD
-export OS_INTERFACE=admin
EOF
##
@@ -205,28 +138,10 @@ EOF
echo "------ Backup Juju environment ------"
cp environments.yaml $LAB_CONFIG/
-
-##
-## Basic test to return a realistic result to jenkins
-##
-
-echo "------ Do basic test ------"
-source $JOID_ADMIN_OPENRC
-curl -i -sw '%{http_code}' -H "Content-Type: application/json" -d "
-{ \"auth\": {
- \"identity\": {
- \"methods\": [\"password\"],
- \"password\": {
- \"user\": {
- \"name\": \"admin\",
- \"domain\": { \"id\": \"default\" },
- \"password\": \"$OS_ADMIN_PASSWORD\"
- }
- }
- }
- }
-}" http://$KEYSTONE:5000/v3/auth/tokens |grep "HTTP/1.1 20" 2>&1 >/dev/null;
-exit_on_error $? "Deploy FAILED to auth to openstack"
+cp deployment.yaml $LAB_CONFIG/
+if [ -e deployconfig.yaml ]; then
+ cp deployconfig.yaml $LAB_CONFIG
+fi
##
## Exit success