Building the remote pod for MCORD
Change-Id: Ie374ed5b769202d7d311986abebfd430d51d1b45
diff --git a/Jenkinsfile-mcord-remote-build b/Jenkinsfile-mcord-remote-build
index d6b1b6c..7582e76 100644
--- a/Jenkinsfile-mcord-remote-build
+++ b/Jenkinsfile-mcord-remote-build
@@ -18,7 +18,6 @@
stage ("Parse deployment configuration file") {
sh returnStdout: true, script: "rm -rf helm-charts helm-repo-tools ${configBaseDir}"
sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/helm-repo-tools"
- sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/helm-charts"
sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/${configBaseDir}"
deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
}
@@ -80,33 +79,12 @@
}
}
- stage('Install etcd-cluster') {
- timeout(10) {
- sh returnStdout: true, script: """
- export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
- helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --version 0.8.3 -n etcd-operator stable/etcd-operator
- helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --set etcdNodePort=32379 cord/etcd-cluster
- """
- }
- timeout(10) {
- waitUntil {
- etcd_running = sh returnStdout: true, script: """
- export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
- kubectl get pods | grep etcd | grep -i running | grep 1/1 | wc -l
- """
- return etcd_running.toInteger() == 6
- }
- }
- }
-
stage("Install M-CORD Control Plane Services") {
sh returnStdout: true, script: """
export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
helm install -n mcord-control-plane --namespace epc -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml cord/mcord-control-plane
"""
- }
- stage('Check M-CORD Control Plane available') {
timeout(20) {
control_plane = sh returnStdout: true, script: """
export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
@@ -117,110 +95,6 @@
}
}
- // stage('Install CORD Kafka') {
- // timeout(10) {
- // sh returnStdout: true, script: """
- // export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
- // helm install --version 0.8.8 --set configurationOverrides."offsets\\.topic\\.replication\\.factor"=1 --set configurationOverrides."log\\.retention\\.hours"=4 --set configurationOverrides."log\\.message\\.timestamp\\.type"="LogAppendTime" --set replicas=1 --set persistence.enabled=false --set zookeeper.replicaCount=1 --set zookeeper.persistence.enabled=false -n cord-kafka incubator/kafka
- // """
- // }
- // timeout(10) {
- // waitUntil {
- // kafka_instances_running = sh returnStdout: true, script: """
- // export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
- // kubectl get pods | grep cord-kafka | grep -i running | grep 1/1 | wc -l
- // """
- // return kafka_instances_running.toInteger() == 2
- // }
- // }
- // }
- // stage('Install Logging Infrastructure') {
- // timeout(10) {
- // sh returnStdout: true, script: """
- // export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
- // helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml --set elasticsearch.cluster.env.MINIMUM_MASTER_NODES="1" --set elasticsearch.client.replicas=1 --set elasticsearch.master.replicas=2 --set elasticsearch.master.persistence.enabled=false --set elasticsearch.data.replicas=1 --set elasticsearch.data.persistence.enabled=false -n logging cord/logging
- // helm-repo-tools/wait_for_pods.sh
- // """
- // }
- // }
- // stage('Install Monitoring Infrastructure') {
- // timeout(10) {
- // sh returnStdout: true, script: """
- // export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
- // helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n nem-monitoring cord/nem-monitoring
- // helm-repo-tools/wait_for_pods.sh
- // """
- // }
- // }
- // stage('Install ONOS') {
- // timeout(10) {
- // sh returnStdout: true, script: """
- // export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
- // helm install -n onos -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml cord/onos
- // """
- // }
- // timeout(10) {
- // waitUntil {
- // onos_completed = sh returnStdout: true, script: """
- // export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
- // kubectl get pods | grep -i onos | grep -i running | grep 2/2 | wc -l
- // """
- // return onos_completed.toInteger() == 1
- // }
- // }
- // }
- // stage('Install xos-core') {
- // timeout(10) {
- // sh returnStdout: true, script: """
- // export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
- // helm install -f $WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.yml -n xos-core cord/xos-core
- // """
- // }
- // timeout(10) {
- // waitUntil {
- // xos_core_completed = sh returnStdout: true, script: """
- // export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf &&
- // kubectl get pods | grep -i xos | grep -i running | grep 1/1 | wc -l
- // """
- // return xos_core_completed.toInteger() == 6
- // }
- // }
- // }
-
- if ( params.configurePod ) {
- dir ("${configBaseDir}/${configToscaDir}/att-workflow") {
- stage('Configure R-CORD - Fabric and whitelist') {
- timeout(1) {
- waitUntil {
- out_fabric = sh returnStdout: true, script: """
- curl -s -H "xos-username:admin@opencord.org" -H "xos-password:letmein" -X POST --data-binary @${configFileName}-fabric.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
- """
- return out_fabric.toInteger() == 1
- }
- }
- }
- stage('Configure R-CORD - Subscriber') {
- timeout(1) {
- waitUntil {
- out_subscriber = sh returnStdout: true, script: """
- curl -s -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-subscriber.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
- """
- return out_subscriber.toInteger() == 1
- }
- }
- }
- stage('Configure R-CORD - OLT') {
- timeout(1) {
- waitUntil {
- out_olt = sh returnStdout: true, script: """
- curl -H 'xos-username:admin@opencord.org' -H 'xos-password:letmein' -X POST --data-binary @${configFileName}-olt.yaml http://${deployment_config.nodes[0].ip}:30007/run | grep -i "created models" | wc -l
- """
- return out_olt.toInteger() == 1
- }
- }
- }
- }
- }
currentBuild.result = 'SUCCESS'
} catch (err) {
currentBuild.result = 'FAILURE'