Configure jobs for baremetal deployments 33/1033/3
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 23 Apr 2019 15:54:19 +0000 (17:54 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 23 Apr 2019 16:41:47 +0000 (18:41 +0200)
Change-Id: Ie4a05e35c5109543fced915ef57ef678104d0624

jjb/cloud-infra/cloud-infra-deploy.sh
jjb/cloud-infra/cloud-infra-periodic-engine.yaml
jjb/cloud-infra/cloud-infra-verify-engine.yaml
jjb/cloud-infra/cloud-infra-verify-testfw.yaml

index a73f3f66717b4b0b6e85129979b0e7ed9ca99bac..51ae5a30a5eec118f2f5d46c7c22f175c946fc48 100644 (file)
@@ -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:
index 2291089ae414cd27f46f3536242d68dc05ac766f..cbd866eda8b64779eb02f3a8cf8ed0928815717a 100644 (file)
           dib_os_element: 'centos-minimal'
 
     type:
-      - virtual
+      - virtual:
+          slave-label: 'vpod-deploy-city'
+      - baremetal:
+          slave-label: 'baremetal-deploy'
 
     phase:
       - deploy
           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'
               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
               current-parameters: true
               predefined-parameters: |
                 DISTRIBUTION=$DISTRIBUTION
+                DEPLOY_TYPE=$DEPLOY_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 TEST_SUITE=$TEST_SUITE
                 CLEANUP=$CLEANUP
               current-parameters: true
               predefined-parameters: |
                 DISTRIBUTION=$DISTRIBUTION
+                DEPLOY_TYPE=$DEPLOY_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 TEST_SUITE=$TEST_SUITE
                 CLEANUP=$CLEANUP
           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'
index 57d26085b438b7febb791903ebe0cddd17bfba56..e7f768195f6addebb748e1c90d95f40b9d79f810 100644 (file)
           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'
               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
               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
           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'
index fbad9e8b2dcbb45187eb4f321f89d181dae7394b..ba7880fd3e1be82dc993e2666cf9954e77402ed7 100644 (file)
           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'
               current-parameters: true
               predefined-parameters: |
                 DISTRIBUTION=$DISTRIBUTION
+                DEPLOY_TYPE=$DEPLOY_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 TEST_SUITE=$TEST_SUITE
                 CLEANUP=$CLEANUP
           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'