From: Fatih Degirmenci Date: Tue, 23 Apr 2019 15:54:19 +0000 (+0200) Subject: Configure jobs for baremetal deployments X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=aaf958440c8721300e03ed5e6b88d488b6e63fad;p=infra%2Fcicd.git Configure jobs for baremetal deployments Change-Id: Ie4a05e35c5109543fced915ef57ef678104d0624 --- diff --git a/jjb/cloud-infra/cloud-infra-deploy.sh b/jjb/cloud-infra/cloud-infra-deploy.sh index a73f3f667..51ae5a30a 100644 --- a/jjb/cloud-infra/cloud-infra-deploy.sh +++ b/jjb/cloud-infra/cloud-infra-deploy.sh @@ -32,8 +32,21 @@ set -o pipefail # infra/swconfig so it needs to be handled here in order to ensure $WORKSPACE contains # the actual engine repo clone. This will be added later on. +# PDF and IDF are determined based on the deployment type +# If DEPLOY_TYPE is virtual, we always use nordix-vpod1 PDF and IDF. +# If DEPLOY_TYPE is baremetal, we use variable NODE_NAME injected by Jenkins to the job +# in order to set PDF and IDF for the POD the job is running against. + +if [[ $DEPLOY_TYPE == "baremetal" ]]; then + PDF="https://gerrit.nordix.org/gitweb?p=infra/hwconfig.git;a=blob_plain;f=pods/${NODE_NAME}-pdf.yml" + IDF="https://gerrit.nordix.org/gitweb?p=infra/hwconfig.git;a=blob_plain;f=pods/${NODE_NAME}-idf.yml" +else + PDF="https://gerrit.nordix.org/gitweb?p=infra/hwconfig.git;a=blob_plain;f=pods/nordix-vpod1-pdf.yml" + IDF="https://gerrit.nordix.org/gitweb?p=infra/hwconfig.git;a=blob_plain;f=pods/nordix-vpod1-idf.yml" +fi + # execute cloud engine deploy.sh script cd $WORKSPACE -./engine/deploy.sh +./engine/deploy.sh -d kubespray -s $DEPLOY_SCENARIO -p $PDF -i $IDF -c # vim: set ts=2 sw=2 expandtab: diff --git a/jjb/cloud-infra/cloud-infra-periodic-engine.yaml b/jjb/cloud-infra/cloud-infra-periodic-engine.yaml index 2291089ae..cbd866eda 100644 --- a/jjb/cloud-infra/cloud-infra-periodic-engine.yaml +++ b/jjb/cloud-infra/cloud-infra-periodic-engine.yaml @@ -60,7 +60,10 @@ dib_os_element: 'centos-minimal' type: - - virtual + - virtual: + slave-label: 'vpod-deploy-city' + - baremetal: + slave-label: 'baremetal-deploy' phase: - deploy @@ -93,6 +96,10 @@ name: DISTRIBUTION default: '{distribution}' description: 'Distribution to use for configuring target nodes (networking etc.)' + - string: + name: DEPLOY_TYPE + default: '{type}' + description: 'Type of the deployment' - string: name: USE_PREBUILT_DEPLOYMENT_IMAGE default: 'true' @@ -160,6 +167,7 @@ current-parameters: true predefined-parameters: | DISTRIBUTION=$DISTRIBUTION + DEPLOY_TYPE=$DEPLOY_TYPE USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT DIB_OS_RELEASE=$DIB_OS_RELEASE @@ -178,6 +186,7 @@ current-parameters: true predefined-parameters: | DISTRIBUTION=$DISTRIBUTION + DEPLOY_TYPE=$DEPLOY_TYPE DEPLOY_SCENARIO=$DEPLOY_SCENARIO TEST_SUITE=$TEST_SUITE CLEANUP=$CLEANUP @@ -192,6 +201,7 @@ current-parameters: true predefined-parameters: | DISTRIBUTION=$DISTRIBUTION + DEPLOY_TYPE=$DEPLOY_TYPE DEPLOY_SCENARIO=$DEPLOY_SCENARIO TEST_SUITE=$TEST_SUITE CLEANUP=$CLEANUP @@ -217,6 +227,10 @@ name: DISTRIBUTION default: 'ubuntu18' description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.' + - string: + name: DEPLOY_TYPE + default: 'virtual' + description: 'Type of the deployment. Overriden by upstream job.' - string: name: USE_PREBUILT_DEPLOYMENT_IMAGE default: 'false' diff --git a/jjb/cloud-infra/cloud-infra-verify-engine.yaml b/jjb/cloud-infra/cloud-infra-verify-engine.yaml index 57d26085b..e7f768195 100644 --- a/jjb/cloud-infra/cloud-infra-verify-engine.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-engine.yaml @@ -99,6 +99,10 @@ name: DISTRIBUTION default: '{distribution}' description: 'Distribution to use for configuring target nodes (networking etc.)' + - string: + name: DEPLOY_TYPE + default: '{type}' + description: 'Type of the deployment' - string: name: USE_PREBUILT_DEPLOYMENT_IMAGE default: 'true' @@ -169,10 +173,12 @@ current-parameters: true predefined-parameters: | DISTRIBUTION=$DISTRIBUTION + DEPLOY_TYPE=$DEPLOY_TYPE USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT DIB_OS_RELEASE=$DIB_OS_RELEASE DIB_OS_ELEMENT=$DIB_OS_ELEMENT + DEPLOY_SCENARIO=$DEPLOY_SCENARIO CLEANUP=$CLEANUP GERRIT_PROJECT=$GERRIT_PROJECT GERRIT_BRANCH=$GERRIT_BRANCH @@ -190,6 +196,7 @@ current-parameters: true predefined-parameters: | DISTRIBUTION=$DISTRIBUTION + DEPLOY_TYPE=$DEPLOY_TYPE USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT DIB_OS_RELEASE=$DIB_OS_RELEASE @@ -224,6 +231,10 @@ name: DISTRIBUTION default: 'ubuntu18' description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.' + - string: + name: DEPLOY_TYPE + default: 'virtual' + description: 'Type of the deployment. Overriden by upstream job.' - string: name: USE_PREBUILT_DEPLOYMENT_IMAGE default: 'false' diff --git a/jjb/cloud-infra/cloud-infra-verify-testfw.yaml b/jjb/cloud-infra/cloud-infra-verify-testfw.yaml index fbad9e8b2..ba7880fd3 100644 --- a/jjb/cloud-infra/cloud-infra-verify-testfw.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-testfw.yaml @@ -93,6 +93,10 @@ name: DISTRIBUTION default: '{distribution}' description: 'Distribution to use for configuring target nodes (networking etc.)' + - string: + name: DEPLOY_TYPE + default: '{type}' + description: 'Type of the deployment' - string: name: DEPLOY_SCENARIO default: 'k8-calico-nofeature' @@ -163,6 +167,7 @@ current-parameters: true predefined-parameters: | DISTRIBUTION=$DISTRIBUTION + DEPLOY_TYPE=$DEPLOY_TYPE DEPLOY_SCENARIO=$DEPLOY_SCENARIO TEST_SUITE=$TEST_SUITE CLEANUP=$CLEANUP @@ -193,6 +198,10 @@ name: DISTRIBUTION default: 'ubuntu18' description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.' + - string: + name: DEPLOY_TYPE + default: 'virtual' + description: 'Type of the deployment. Overriden by upstream job.' - string: name: DEPLOY_SCENARIO default: 'k8-calico-nofeature'