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

42b0fc8c087272a69e98ad71bb5052df?s=128

Laurent Grangeau

February 23, 2017
Tweet

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. Overview of softwares in bank industries

  4. 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.
  5. Fintechs are taking market shares… It’s time to react !

    BANKS FINTECHS
  6. Continuous Delivery program

  7. Be like the GAFA Be faster, bring more business value,

    reduce maintenance costs
  8. Why ? ◉ Faster time to market => Competitive advantage

    ◉ Better quality of product => Higher customer satisfaction ◉ Processes optimized => Reduced total cost of ownership
  9. One team, everything automated Continuous improvement, faster time-to-market, faster resolution

    of problems, more stable environment
  10. Platform Backlog grooming Development interface Source code management Continuous integration

    Testing Libraries repository Deployment automation Metrology Infrastructure as code
  11. New Jenkins instance Tickets

  12.  400+ applications transformed  Reduce TTM from months to

    2 weeks  Reduce deploy time from months to minutes
  13. But wait !... Problems have arised

  14. 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 ?
  15. 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
  16. Problems Tickets

  17. Problems

  18. PaaS program

  19. Docker to the rescue Leverage on Docker platform

  20. Platform Metrology Backlog grooming Development interface Source code management Continuous

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

    team ◉ Move fast ◉ Teams had to own their stack
  22. Jenkins

  23. 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
  24. 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
  25. Docker slaves ◉ Two main images – One master –

    One builder ◉ No more « matrix from hell », « slaves management »
  26. Groovy !

  27. New pipeline

  28. Builder image

  29. 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"]
  30. Conclusion

  31.  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
  32. Any questions ? You can find me at • @laurentgrangeau

    • laurent.grangeau@gmail.com Thanks!
  33. None