Add additional step before deploy contrail.

* Added step with deploy keepalived and rabbitMQ
before deploy opencontrail for k8s env templates.

Change-Id: I16a52d1e3ac39ab892aa3c3d2031a73159f06992
diff --git a/cloud-deploy-pipeline.groovy b/cloud-deploy-pipeline.groovy
index 2ceba6d..d105d9f 100644
--- a/cloud-deploy-pipeline.groovy
+++ b/cloud-deploy-pipeline.groovy
@@ -216,6 +216,7 @@
 
             // install k8s
             if (common.checkContains('STACK_INSTALL', 'k8s')) {
+
                 stage('Install Kubernetes infra') {
                     if (STACK_TYPE == 'aws') {
                         // configure kubernetes_control_address - save loadbalancer
@@ -223,7 +224,6 @@
                         print(kubernetes_control_address)
                         salt.runSaltProcessStep(saltMaster, 'I@salt:master', 'reclass.cluster_meta_set', ['kubernetes_control_address', kubernetes_control_address], null, true)
                     }
-
                     // ensure certificates are generated properly
                     salt.runSaltProcessStep(saltMaster, '*', 'saltutil.refresh_pillar', [], null, true)
                     salt.enforceState(saltMaster, '*', ['salt.minion.cert'], true)
@@ -231,6 +231,14 @@
                     orchestrate.installKubernetesInfra(saltMaster)
                 }
 
+                if (common.checkContains('STACK_INSTALL', 'contrail')) {
+                    stage('Install Contrail for Kubernetes') {
+                        orchestrate.installContrailNetwork(saltMaster)
+                        orchestrate.installContrailCompute(saltMaster)
+                        orchestrate.installKubernetesContrailCompute(saltMaster)
+                    }
+                }
+
                 stage('Install Kubernetes control') {
 
                     orchestrate.installKubernetesControl(saltMaster)
@@ -253,13 +261,6 @@
                         orchestrate.installKubernetesCompute(saltMaster)
                     }
                 }
-
-                if (common.checkContains('STACK_INSTALL', 'contrail')) {
-                    stage('Install Contrail for Kubernetes') {
-                        orchestrate.installContrailNetwork(saltMaster)
-                        orchestrate.installContrailCompute(saltMaster)
-                    }
-                }
             }
 
             // install openstack
diff --git a/lab-pipeline.groovy b/lab-pipeline.groovy
index 0313d4d..84f5dcf 100644
--- a/lab-pipeline.groovy
+++ b/lab-pipeline.groovy
@@ -178,6 +178,11 @@
             // install k8s
             if (common.checkContains('STACK_INSTALL', 'k8s')) {
 
+                // install infra libs for k8s
+                stage('Install Kubernetes infra') {
+                    orchestrate.installKubernetesInfra(saltMaster)
+                }
+
                 // If k8s install with contrail network manager then contrail need to be install first
                 if (common.checkContains('STACK_INSTALL', 'contrail')) {
                     stage('Install Contrail for Kubernetes') {
@@ -187,10 +192,6 @@
                     }
                 }
 
-                stage('Install Kubernetes infra') {
-                    orchestrate.installKubernetesInfra(saltMaster)
-                }
-
                 stage('Install Kubernetes control') {
                     orchestrate.installKubernetesControl(saltMaster)
                 }