Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Software factory scalable with Jenkins on Docker

Software factory scalable with Jenkins on Docker

Laurent Grangeau

February 23, 2017
Tweet

More Decks by Laurent Grangeau

Other Decks in Technology

Transcript

  1. Software factory scalable with Jenkins on Docker Or how to

    transform a support team to an innovative team
  2. I am Laurent Grangeau I love to automate things and

    run apps at scale. You can find me at @laurentgrangeau Hello!
  3. Banking overview Old code There is lots of legacy code.

    Generally, the code base is > 5 years old. Monolithic softwares As softwares were designed Years ago, there is little microservices, and no 12factor principles. No agile process Mostly waterfall process, ITIL compliant. Regulation Banks can’t do what they want. There is a lot of regulation and audits. Releases are manual Generally, release is a manual process with service interruption. Obsolete infrastructures There are still mainframe computers or specialized appliances like Sparc machines.
  4. Why ? ◉ Faster time to market => Competitive advantage

    ◉ Better quality of product => Higher customer satisfaction ◉ Processes optimized => Reduced total cost of ownership
  5. Platform Backlog grooming Development interface Source code management Continuous integration

    Testing Libraries repository Deployment automation Metrology Infrastructure as code
  6.  400+ applications transformed  Reduce TTM from months to

    2 weeks  Reduce deploy time from months to minutes
  7. Problems ◉ How to install plugins ? ◉ How to

    upgrade instances ? ◉ What to do when SF is down ? ◉ How to manage every configuration ? ◉ How to manage slaves ?
  8. Slaves management rhel6.5 + JDK6 + maven 2 rhel6.5 +

    JDK7 + maven 3 rhel7.2 + JDK7 + maven 2 rhel7.2 + JDK7 + maven 3 jobs I need rhel7.2 + JDK8 + maven 3
  9. Platform Metrology Backlog grooming Development interface Source code management Continuous

    integration Testing Libraries repository Deployment automation
  10. What we wanted ? ◉ Empower developers ◉ Relieve build

    team ◉ Move fast ◉ Teams had to own their stack
  11. Jenkins ◉ Creation of Jenkins images ◉ One Jenkins update

    center ◉ One Jenkins master – Connection to JUC – Only the necessary plugins ◉ All teams can create their own master ◉ Leverage on plugins
  12. Jenkins ◉ Docker Workflow – provides first-class support for Jenkins

    Pipeline to build real world CD pipelines for containerized applications using Jenkins and Docker ◉ Build and Publish – builds projects from a Dockerfile and pushes a tested and proven gold image to Docker Hub ◉ Docker Hub Notification – triggers downstream jobs when a tagged container is pushed to Docker Hub ◉ Docker Traceability – identifies which build pushed a particular container that is running in production and displays that on the Jenkins builds page ◉ Docker Slaves – uses Docker containers as standardized build environments shared between Jenkins masters to improve isolation and elasticity ◉ Docker Custom Build Environment – specifies customized build environments as Docker containers
  13. Docker slaves ◉ Two main images – One master –

    One builder ◉ No more « matrix from hell », « slaves management »
  14. Builder image FROM openjdk:8-jdk ARG MAVEN_VERSION=3.3.9 ARG USER_HOME_DIR="/root" RUN mkdir

    -p /usr/share/maven /usr/share/maven/ref \ && curl -fsSL http://apache.osuosl.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz \ | tar -xzC /usr/share/maven --strip-components=1 \ && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn ENV MAVEN_HOME /usr/share/maven ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" COPY mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh COPY settings-docker.xml /usr/share/maven/ref/ VOLUME "$USER_HOME_DIR/.m2" ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"] CMD ["mvn"]
  15.  Developers are empowered  Jenkins can be updated with

    minimal impact  Build team can innovate again  No more slaves management or matrix from hell  Enable 1000+ jobs