Hybrid and Multi-Cloud Overlay — Part 3— DevOps, Tools and Scripting

· OVS an open source implementations of virtual switch

· CI/CD tool Jenkins

· shell scripts

· ansible

· terraform

· packer

· Groovy that comes with Jenkins

· Docker

· Ubuntu Virtual machines

Jenkins — multi parallel pipeline

Jenkins — Environment variables — Important ones

Sample code —Jenkins pipeline — Multiple Stages — lock():

lock("ipv6 allocations lock") {
echo "$ipv6_index"
starting_index = ipv6_index
clients.add(ReserveIPv6_address())
}
Jenkins — multi parallel pipeline — skipping stages when hub failed
Jenkins — multi parallel pipeline — dynamically removing the failed stage
Jenkins — multi parallel pipeline — single cloud
Jenkins — multi parallel pipeline — three clouds

Sample code — Declarative pipeline — Parallel build:

   stage('Infrastructure changes') {
when {
branch 'master'
}
failFast true
parallel {
stage('VSphere') {
when {
expression {
env.CLOUD_LIST.contains("vsphere")
}
}
steps {
script {
try {
} catch (exc) {
echo "Caught: " + exc.toString()
unstable("${STAGE_NAME} failed!")
}
}
}
}
}
}

Sample code — Parallel build — Dynamic stages:

    stage('Containers & VMs config') {
steps {
script {
def containers_vm_config_list = [:]
active_cloud_list.split('_').each {
containers_vm_config_list["${it}"] = {
node ('master') {
stage("${it}") {
try {
} catch (exc) {

}
}
}
}
}
parallel containers_vm_config_list
}
}
}
Part 3— Video blog

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store