Pimp Your Jenkins Platform With Docker Cyrille Le Clerc, Product Management, CloudBees @cyrilleleclerc
/me ● Product Manager at CloudBees ● In charge of alliances and Docker ● Dev → DevOps ● 15 years of consulting before joining CloudBees ● Open Source:
/you ● Dev? Ops? DevOps? ● Docker? Adopt? Evaluate? ● Jenkins? CloudBees? ● Cloud? AWS? Azure? other? ● Docker Orchestration Service? Swarm? Kubernetes? Mesos? AWS ECS?
CloudBees ● Kohsuke Kawaguchi is our CTO ● The Enterprise Jenkins Company ● Enterprise solutions for Jenkins ● “as a Service” and “as a Software”
Jenkins with Docker
Jenkins with Docker
Jenkins with Docker ● Dockerized Jenkins infrastructure ○ Customize build servers with Docker containers ○ Cleanup build environment with ephemeral containers ● Continuous Delivery pipeline for Dockerized Apps
Jenkins Docker Plugins
Docker Plugin ● Slave provider ● Docker commands in build steps ● Nov 2014 Connect to a Docker Host Docker Image <-> Jenkins Label Build / Publish Build Step
Custom Build Environment Plugin ● Run build steps in a Docker Container ● Docker daemon on the slave ● June 2015 Build Environment
Docker Workflow Plugin ● Run workflow steps in a Docker Container ● Build and push images ● Docker daemon on the slave ● June 2015 docker.image('cloudbees/java-build-tools').inside { sh "mvn clean package" } docker.withRegistry('', 'dockerhub-creds') { def myImage = docker.build('me/my-image', '.') myImage.push() }
Docker Build and Publish Plugin ● Build and push from your build ● Docker daemon on the slave ● Nov 2014 Build and Publish Step
Docker Hub Notification Plugin ● Trigger build on Docker registry changes ● May 2015 Docker Hub Notification
More Jenkins Docker Plugins ● Docker Traceability Plugin ○ Jenkins traceability extended to Docker images ● Docker build step plugin ○ Execute Docker commands in build steps (build ○ Nov 2014
Kubernetes Plugin ● Slave provider ● April 2015
Mesos Plugin ● Slave provider ● Nov 2014
Amazon EC2 Container Service Plugin ● Sale Provider ● Sept 2016
Demo time! Dockerized Continuous Delivery Pipeline with Jenkins Jenkins Build Servers on Amazon Container Service
Demo
Demo ● Jenkins workflow to define a CD Pipeline ● Jenkins Docker workflow to ○ Customize the build environment ○ Build and Push Docker images ● Docker Registry to manage Docker images ● Amazon EC2 Container Service to run web apps ● Amazon EC2 Container Service to run slaves
Resources ● Jenkins CD Pipeline script ○ https://gist.github.com/cyrille-leclerc/19b37477897f87b143e2 ● CloudBees Jenkins Platform and Docker ○ https://www.cloudbees.com/continuous-delivery/jenkins-docker ● Source Code ○ https://github.com/cyrille-leclerc/game-of-life
Questions
Pimp your jenkins platform with docker - Devops.com 2015/11

Pimp your jenkins platform with docker - Devops.com 2015/11

  • 1.
    Pimp Your JenkinsPlatform With Docker Cyrille Le Clerc, Product Management, CloudBees @cyrilleleclerc
  • 2.
    /me ● Product Managerat CloudBees ● In charge of alliances and Docker ● Dev → DevOps ● 15 years of consulting before joining CloudBees ● Open Source:
  • 3.
    /you ● Dev? Ops?DevOps? ● Docker? Adopt? Evaluate? ● Jenkins? CloudBees? ● Cloud? AWS? Azure? other? ● Docker Orchestration Service? Swarm? Kubernetes? Mesos? AWS ECS?
  • 4.
    CloudBees ● Kohsuke Kawaguchiis our CTO ● The Enterprise Jenkins Company ● Enterprise solutions for Jenkins ● “as a Service” and “as a Software”
  • 5.
  • 6.
  • 7.
    Jenkins with Docker ●Dockerized Jenkins infrastructure ○ Customize build servers with Docker containers ○ Cleanup build environment with ephemeral containers ● Continuous Delivery pipeline for Dockerized Apps
  • 8.
  • 9.
    Docker Plugin ● Slaveprovider ● Docker commands in build steps ● Nov 2014 Connect to a Docker Host Docker Image <-> Jenkins Label Build / Publish Build Step
  • 10.
    Custom Build EnvironmentPlugin ● Run build steps in a Docker Container ● Docker daemon on the slave ● June 2015 Build Environment
  • 11.
    Docker Workflow Plugin ●Run workflow steps in a Docker Container ● Build and push images ● Docker daemon on the slave ● June 2015 docker.image('cloudbees/java-build-tools').inside { sh "mvn clean package" } docker.withRegistry('', 'dockerhub-creds') { def myImage = docker.build('me/my-image', '.') myImage.push() }
  • 12.
    Docker Build andPublish Plugin ● Build and push from your build ● Docker daemon on the slave ● Nov 2014 Build and Publish Step
  • 13.
    Docker Hub NotificationPlugin ● Trigger build on Docker registry changes ● May 2015 Docker Hub Notification
  • 14.
    More Jenkins DockerPlugins ● Docker Traceability Plugin ○ Jenkins traceability extended to Docker images ● Docker build step plugin ○ Execute Docker commands in build steps (build ○ Nov 2014
  • 15.
    Kubernetes Plugin ● Slaveprovider ● April 2015
  • 16.
    Mesos Plugin ● Slaveprovider ● Nov 2014
  • 17.
    Amazon EC2 ContainerService Plugin ● Sale Provider ● Sept 2016
  • 18.
    Demo time! Dockerized ContinuousDelivery Pipeline with Jenkins Jenkins Build Servers on Amazon Container Service
  • 19.
  • 20.
    Demo ● Jenkins workflowto define a CD Pipeline ● Jenkins Docker workflow to ○ Customize the build environment ○ Build and Push Docker images ● Docker Registry to manage Docker images ● Amazon EC2 Container Service to run web apps ● Amazon EC2 Container Service to run slaves
  • 21.
    Resources ● Jenkins CDPipeline script ○ https://gist.github.com/cyrille-leclerc/19b37477897f87b143e2 ● CloudBees Jenkins Platform and Docker ○ https://www.cloudbees.com/continuous-delivery/jenkins-docker ● Source Code ○ https://github.com/cyrille-leclerc/game-of-life
  • 22.