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.

Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins

JavaLand 2017 presentation

Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins

  1. 1. Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins_ Dennis Schulte, Marcel Birkner codecentric AG
  2. 2. 2
  3. 3. Our Project Experience 3
  4. 4. Our experiences using Docker_ 4 Build/Test/Deployment Infrastructure Getting Started with Docker JBoss / Java EE Standardization, Conformity, Compliance (Security) Dashboard Microservices, Lightweight, Technology Flexibility Greenfield Enterprise Speed, Flexibility, Duplicated Environments 20 % Learning / using new technologies
  5. 5. Our experiences using Docker_ 5 Build/Test/Deployment Infrastructure Getting Started with Docker JBoss / Java EE Standardization, Conformity, Compliance (Security) Dashboard Microservices, Lightweight, Technology Flexibility Greenfield Enterprise Speed, Flexibility, Duplicated Environments 20 % Learning / using new technologies
  6. 6. JBoss / Java EE_ CI/CD Pipeline Jenkins GitLab SonarQube Nexus SeleniumHub Backend DB2 ERP LDAP IMS Applications JBoss EE JBoss EEJBoss EE JBoss EE JBoss EE JBoss EE JBoss EEJBoss EE JBoss EE JBoss EE JBoss EE JBoss EEJBoss EE JBoss EE JBoss EE JBoss EE JBoss EEJBoss EE JBoss EE JBoss EE Platform VMWareVagrant
  7. 7. Our experiences using Docker_ 7 Build/Test/Deployment Infrastructure Getting Started with Docker JBoss / Java EE Standardization, Conformity, Compliance (Security) Dashboard Microservices, Lightweight, Technology Flexibility Greenfield Enterprise Speed, Flexibility, Duplicated Environments 20 % Learning / using new technologies
  8. 8. Platform CI/CD Pipeline Jenkins GitHub EE SonarQube Nexus SeleniumHub Backend JIRA WordPress Xing IMS OpenStack Dashboard_ Application ReactJS Spring Boot Cassandra Spring Boot AngularJS Scala Postgres Spring Boot Static HTML NodeJS SpringBatch Keycloak Neo4J JBoss EE NginxReactJS
  9. 9. Our experiences using Docker_ 9 Build/Test/Deployment Infrastructure Getting Started with Docker JBoss / Java EE Standardization, Conformity, Compliance (Security) Dashboard Microservices, Lightweight, Technology Flexibility Greenfield Enterprise Speed, Flexibility, Duplicated Environments 20 % Learning / using new technologies
  10. 10. Greenfield Enterprise_ Application ReactJS Spring Boot DB2 SpringBatch PostgresNginx HSQL SpringBatch SpringBatch SpringBatch SpringBatch SpringBatch SpringBatch SpringBatch Spring Boot Spring Boot Admin Platform OpenStack Backend WebServices Oracle SAP LDAP Vagrant VMWare CI/CD Pipeline Jenkins GitHub EE SonarQube Nexus SeleniumHub
  11. 11. INFRASTRUCTURE AS CODE 11
  12. 12. 12 WRITE, PLAN, AND CREATE INFRASTRUCTURE AS CODE
  13. 13. 13 OpenStack AWS VMWare Platform Compute Instances Compute Instances Compute Instances Compute Instances JBoss EE Spring Boot ReactJS Neo4j Infrastructure Automation_
  14. 14. Terraform :: Define Region & SSH Key Pair_ 14
  15. 15. Terraform :: Define Security Group_ 15
  16. 16. Terraform :: Define Resource_ 16
  17. 17. Terraform :: Roll out_ •terraform plan •terraform apply 17
  18. 18. 18 APP DEPLOYMENT, CONFIGURATION MANAGEMENTAND ORCHESTRATION
  19. 19. Ansible :: CD Infrastructure Provisioning_ •ansible-playbook site.yml 19 CI/CD Pipeline Jenkins GitLab SonarQube Nexus SeleniumHub
  20. 20. Ansible :: Jenkins Role (directory listing)_ 20
  21. 21. Ansible :: Jenkins Role (Ansible Task Excerpt)_ 21
  22. 22. Ansible :: Application Provisioning_ •ansible-playbook site.yml 22 Application ReactJS Spring Boot Postgres
  23. 23. Ansible :: Spring Boot Role (excerpt)_ 23
  24. 24. Ansible :: Application Deployment_ •ansible-playbook deploy-example-application.yml
 --extra-vars "version=1.0.0" •ansible-playbook undeploy-example-application.yml 24 ReactJS Spring Boot Postgres
  25. 25. 25 Ansible :: Infrastructure Repository :: Inventory & Playbooks_ Ansible Playbooks & Settings {Environment specific settings {
  26. 26. Continuous Delivery using Docker 26
  27. 27. Software Development Process_ 27 Developer GitLab Jenkins SonarQube Nexus Build and Release SeleniumHub Docker Registry Deployment Jenkins GitLab Staging Spring Boot Test Spring Boot Prod Spring Boot Dev Spring Boot
  28. 28. Live Demo 28
  29. 29. 29 Jenkins :: Docker Images Build Jobs_
  30. 30. 30 Jenkins :: Example App Build & Deploy Jobs_
  31. 31. 31 Jenkins :: Application Deployment Job_
  32. 32. 32 Jenkins :: Example Spring Boot Application_
  33. 33. Demo End 33
  34. 34. Docker :: Image Hierarchy_ 34 centos:7 jre:8jdk:8 jenkins-master:LTS example-application: 1.0.0 nexus:LTS sonarqube:LTS example-application: 1.0.0 example-application: 1.0.0 example-application: 1.0.0 example-application: 1.0.0
  35. 35. Docker :: JRE & Example Application Dockerfile_ 35 jre:8 example-application: 1.0.0
  36. 36. Docker :: Image Hierarchy :: JBoss Migration_ rhel:7.2 jre:8jdk:8 jenkins-master:LTS eap:6.4nexus:LTS sonarqube:LTS jboss-application: 1.0.0 jboss-application: 1.1.0 jboss-application: 1.2.0
  37. 37. Docker :: EAP Dockerfile_ 37 eap:6.4
  38. 38. Docker :: JBoss Dockerfile_ 38 jboss-application:1.0.0
  39. 39. Best Practices 39
  40. 40. •Everything is in version control •Use Ansible inventory for environment specific information •Use Ansible Vault for secure storage for passwords •Generate Jenkins Jobs automatically via Job DSL • GitLab REST API •One Click Release & Deployments Best practices_ 40 Automate Everything
  41. 41. •All application run in Docker container •Environment independent Docker images •Use latest OS version (recent Kernel) •Use fixed Docker / Ansible versions •Have a clone of every system for testing new versions • incl. CI/CD Pipeline •Create User / Group (uid/gid) per Application Type • required for volume mount permissions •Do not run Docker Container under root! Docker_ 41 Stable Docker Setup
  42. 42. 42
  43. 43. •Company Proxies • HTTPs / Man-in-the-Middle •Self-signed Certificates (HTTPs) •Freedom to spin up servers using Terraform •Automate network configuration •Keynote • Jean-Jacques van Oosten: "Do not compromise!" Enterprise Environments_ 43 Typical problems
  44. 44. 44
  45. 45. “Thanks for your attention.” 45 Marcel Birkner, Software-Consultant codecentric AG Hochstraße 11 42697 Solingen, Deutschland marcel.birkner@codecentric.de www.codecentric.de blog.codecentric.de marcelbirkner Senior IT-Consultant codecentric AG Hochstraße 11 42697 Solingen, Deutschland dennis.schulte@codecentric.de www.codecentric.de blog.codecentric.de denschu Dennis Schulte,

×