Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Automate App Container Delivery with CI/CD and DevOps

Automate App Container Delivery with CI/CD and DevOps

  • Login to see the comments

Automate App Container Delivery with CI/CD and DevOps

  1. 1. Daniel Oh Specialist Solution Architect, AppDev Agile & DevOps CoP Manager @danieloh30 Automate Application Container Delivery with CI/CD and DevOps
  2. 2. How do you to build and Deploy your App Containers?
  3. 3. BUILD AND DEPLOY CONTAINER IMAGES DEPLOY YOUR SOURCE CODE DEPLOY YOUR APP BINARY DEPLOY YOUR CONTAINER IMAGE
  4. 4. DEPLOY YOUR SOURCE CODE
  5. 5. Developers write code using existing development tools such as Maven, NPM, Bower, PIP, Dockerfile and Git and then access the OpenShift Web, CLI or IDE to create an app from the code DEPLOY SOURCE CODE WITH SOURCE-TO-IMAGE (S2I) codeGit Repository CODE DEV
  6. 6. S2I combines source code with a builder image (language and application runtimes) and stores the resulting application image in the image registry DEPLOY SOURCE CODE WITH SOURCE-TO-IMAGE (S2I) codeGit Repository Source-to-Image (S2I) Container Image Image Registry BUILD DEV
  7. 7. OpenShift automates the deployment of application containers across multiple hosts via the Kubernetes. Users can trigger deployments, rollback, configure A/B or other custom deployments DEPLOY SOURCE CODE WITH SOURCE-TO-IMAGE (S2I) codeGit Repository Source-to-Image (S2I) deploy Container Image Image Registry OPSDEV DEPLOY Application Container
  8. 8. DEPLOY YOUR APP BINARY
  9. 9. Developers use the existing build process and tools (e.g. Maven, Gradle, Jenkins, Nexus) to build the app binaries (e.g. JAR, WAR, EAR) and use OpenShift CLI to create an app from the app binaries DEPLOY APP BINARY WITH SOURCE-TO-IMAGE (S2I) Application Binary (e.g. WAR) DEV BUILD APP build Existing Build Process ...
  10. 10. DEPLOY APP BINARY WITH SOURCE-TO-IMAGE (S2I) Application Binary (e.g. WAR) Source-to-Image (S2I) Container Image Image Registry DEV build Existing Build Process BUILD IMAGE S2I combines app binaries (e.g. JAR, WAR, EAR) with a builder image (language and application runtimes) and stores the resulting application image in the image registry
  11. 11. DEPLOY APP BINARY WITH SOURCE-TO-IMAGE (S2I) Application Binary (e.g. WAR) Source-to-Image (S2I) deploy Container Image Image Registry OPSDEV build Existing Build Process DEPLOY Application Container OpenShift automates the deployment of application containers across multiple hosts via the Kubernetes. Users can trigger deployments, rollback, configure A/B or other custom deployments
  12. 12. DEPLOY YOUR DOCKER IMAGE
  13. 13. App images are built using the existing docker image build process. OpenShift automates the deployment of app containers across multiple hosts via the Kubernetes. Users can trigger deployments, rollback, configure A/B, etc DEPLOY DEPLOY DOCKER IMAGE build Application Container deploy Application Image Image Registry OPSDEV BUILD Existing Image Build Process
  14. 14. CONTINUOUS INTEGRATION (CI) CONTINUOUS DELIVERY (CD)
  15. 15. What is CI/CD ● Continuous Integration is the practice of constantly merging development work with a main line of code (e.g. master branch) so that changes can be tested and make sure they work with all other changes. ● Continuous Delivery is the natural extension of Continuous Integration, an approach in which teams ensure that every change to the system is releasable, and release any version with the push of a button. ● Continuous Deployment is the most advanced evolution of continuous delivery and advocates automatic release of every change into production without human intervention after it has been successfully tested and verified in the process. Unit Test Platform Test Deliver to Staging Application Acceptance tests Deploy to Production Post deploy tests Auto Auto Auto AutoManual Unit Test Platform Test Deliver to Staging Application Acceptance tests Deploy to Production Post deploy tests Auto Auto Auto AutoAuto Continuous Delivery Continuous Deployment
  16. 16. CI/CD WITH BUILD AND DEPLOYMENTS BUILDS ● Webhook triggers: build the app image whenever the code changes ● Image trigger: build the app image whenever the base language or app runtime changes ● Build hooks: test the app image before pushing it to an image registry DEPLOYMENTS ● Deployment triggers: redeploy app containers whenever the image changes in the OpenShift integrated image registry or upstream registries
  17. 17. CONTINUOUS DELIVERY WITH CONTAINERS source repository CI/CD engine dev container physical virtual private cloud public cloud
  18. 18. OPENSHIFT LOVES CI/CD JENKINS-AS-A SERVICE ON OPENSHIFT HYBRID JENKINS INFRA WITH OPENSHIFT EXISTING CI/CD DEPLOY TO OPENSHIFT
  19. 19. JENKINS-AS-A-SERVICE ON OPENSHIFT ● Certified Jenkins images with pre-configured plugins ○ Provided out-of-the-box ○ Follows Jenkins 1.x and 2.x LTS versions ● Jenkins S2I Builder for customizing the image ○ Install Plugins ○ Configure Jenkins ○ Configure Build Jobs ● OpenShift plugins to integrate authentication with OpenShift and also CI/CD pipelines ● Dynamically deploys Jenkins slave containers Plugins Jobs Configuration Jenkins (S2I) Custom Jenkins Image Jenkins Image
  20. 20. ● Scale existing Jenkins infrastructure by dynamically provisioning Jenkins slaves on OpenShift ● Use Kubernetes plug-in on existing Jenkin servers HYBRID JENKINS INFRA WITH OPENSHIFT OPENSHIFT APP APPrun job JENKINS SLAVE Run Job JENKINS SLAVE Run Job build JENKINS MASTER deploy
  21. 21. ● Existing CI/CD infrastructure outside OpenShift performs operations against OpenShift ○ OpenShift Pipeline Jenkins Plugin for Jenkins ○ OpenShift CLI for integrating other CI Engines with OpenShift ● Without disrupting existing processes, can be combined with previous alternative EXISTING CI/CD DEPLOY TO OPENSHIFT OPENSHIFT APP EXISTING CI/CD INFRA Jenkins, Bamboo, TeamCity, etc APPbuild deploy S2I Buildrun job
  22. 22. OPENSHIFT PIPELINES ● OpenShift Pipelines allow defining a CI/CD workflow via a Jenkins pipeline which can be started, monitored, and managed similar to other builds ● Dynamic provisioning of Jenkins slaves ● Auto-provisioning of Jenkins server ● OpenShift Pipeline strategies ○ Embedded Jenkinsfile ○ Jenkinsfile from a Git repository apiVersion: v1 kind: BuildConfig metadata: name: app-pipeline spec: strategy: type: JenkinsPipeline jenkinsPipelineStrategy: jenkinsfile: |- node('maven') { stage('build app') { git url: 'https://git/app.git' sh "mvn package" } stage('build image') { sh "oc start-build app --from-file=target/app.jar } stage('deploy') { openshiftDeploy deploymentConfig: 'app' } } Provision a Jenkins slave for running Maven
  23. 23. OpenShift Pipelines in Web Console
  24. 24. APPLICATION IMAGE CONTINUOUS DELIVERY PIPELINE DEV TEAM GIT SERVER ARTIFACT REPOSITORY JENKINS IMAGE BUILD ● S2I build from source code ● S2I build from app binary ● Existing docker container image build process
  25. 25. CONTINUOUS DELIVERY PIPELINE INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER DEVELOPER GIT SERVER ARTIFACT REPOSITORY OPENSHIFT CI/CD PIPELINE (JENKINS) IMAGE BUILD & DEPLOY INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER NON-PROD PRODDEV
  26. 26. INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER CONTINUOUS DELIVERY PIPELINE DEVELOPER GIT SERVER ARTIFACT REPOSITORY OPENSHIFT CI/CD PIPELINE (JENKINS) IMAGE BUILD & DEPLOY INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER PROMOTE TO TEST NON-PROD PRODDEV TEST
  27. 27. INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER CONTINUOUS DELIVERY PIPELINE DEVELOPER GIT SERVER ARTIFACT REPOSITORY OPENSHIFT CI/CD PIPELINE (JENKINS) IMAGE BUILD & DEPLOY INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER PROMOTE TO TEST PROMOTE TO UAT NON-PROD PRODDEV TEST UAT
  28. 28. ServiceNow JIRA Service Desk Zendeks BMC Remedy INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER CONTINUOUS DELIVERY PIPELINE DEVELOPER GIT SERVER ARTIFACT REPOSITORY OPENSHIFT CI/CD PIPELINE (JENKINS) IMAGE BUILD & DEPLOY INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER GO LIVE? PROMOTE TO TEST PROMOTE TO UAT RELEASE MANAGER NON-PROD PROD ☒ ☑ DEV TEST UAT
  29. 29. INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER CONTINUOUS DELIVERY PIPELINE DEVELOPER GIT SERVER ARTIFACT REPOSITORY OPENSHIFT CI/CD PIPELINE (JENKINS) IMAGE BUILD & DEPLOY INTEGRATED IMAGE REGISTRY OPENSHIFT CLUSTER GO LIVE? PROMOTE TO TEST PROMOTE TO UAT PROMOTE TO PROD RELEASE MANAGER NON-PROD PRODDEV TEST UAT ☒ ☑
  30. 30. Daniel Oh Specialist Solution Architect, AppDev Agile & DevOps CoP Manager @danieloh30 THANK YOU

×