In this blog I am going to provide a demo of a really cool new feature that comes in OpenShift 3.3 as a technology preview called “Build Pipelines”. Everyone wants to achieve better code promotion automation, which is generally referred to as "being agile" and moving to “Continuous Deployment, Delivery, and Integration". I know from experience this was very difficult in the world of virtual machines and bare metal servers, but thanks to container orchestration technologies you will see (in the video below) that times have changed and it’s not so hard anymore.
The OpenShift team has added tighter integration with Jenkins and the build pipeline plugin. Essentially this is enabling developers (via self-service) to: code, version, build, deploy and test in an automated fashion. In this video we will utilize a simple php application that was forked from Veer Muchandi from Red Hat. We are using GitHub and the OpenShift Container Platform to automate the build and deployment pipeline.
Check out the video here or below in the blog.
Here are some links and details on what you need to make this happen in your OpenShift Container Platform 3.3 (or OpenShift Origin 1.3) environment. Since this feature is a technology preview you need to perform the following steps:
Add this code to /etc/origin/master/master-config.yaml (extentionScript and the line below)
assetConfig: logoutURL: "" masterPublicURL: https://ose.dev.arctiq.ca:8443 publicURL: https://ose.dev.arctiq.ca:8443/console/ extensionScripts: - /etc/origin/master/tech-preview.js servingInfo:
Create the following file: /etc/origin/master/techpreview.js
# cat techpreview.js window.OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.pipelines= true;
Add the Jenkins pipeline config to the end of master-config.yaml
jenkinsPipelineConfig: autoProvisionEnabled: true parameters: null serviceName: jenkins templateName: jenkins-ephemeral templateNamespace: openshift
Restart the Master Service (Single Master Configuration)
systemctl restart atomic-openshift-master
Here are the GitHub pages you will need to try for yourself:
Pipeline Example - https://github.com/kylearctiq/pipeline-example
PHP Sample Application - https://github.com/kylearctiq/bgdemo
In an upcoming blog we will detail a more advanced configuration which will extend our pipeline configuration and utilize our CICD project to deploy to a separate "Development" project and then promote to a separate "Testing" project.
If you want to discuss building pipelines in more detail, or need help getting your OpenShift pipeline up and running, click the link below and //take the first step.