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.

Automating CICD Pipeline with GitLab and Docker Containers for Java Applications

1,444 views

Published on

Setting up proper CI/CD pipeline usually appears to be quite a complex and time-consuming task even for an experienced developer, as you need to know how to properly combine all the application components with the required CI/CD interconnection points. Moreover, in the Docker world you have to manage builds of your stack images. But everyone understands the importance of this process to save time, money and efforts, as well as increase the quality. See how to make the required configurations in order to automate and simplify the preparation of environments for all lifecycle stages, perform instant integration of new product versions and make updates without downtimes.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Automating CICD Pipeline with GitLab and Docker Containers for Java Applications

  1. 1. Automating CI/CD Pipeline with GitLab and Docker Containers for Java Applications
  2. 2. ...but to SHOW this in ACTION We are NOT here to TALK...
  3. 3. • CI and CD oriented • simplified code review • powerful turnkey UI • easy to build, ship and run • portability • minimal setup • fast deployment • auto-scaling and HA • superb and intuitive UI • multi-cloud availability Products
  4. 4. Topology
  5. 5. Repo https://github.com/jelastic/docker-gitlab
  6. 6. Customization
  7. 7. What docker-compose.yml does 1. Creates 4 application containers (gitlab, postgress, redis and registry) 2. Configures the required ENV VARS 3. Deploys, interconnects and runs docker images
  8. 8. What jelastic.jps does 1. Creates 2 system containers with pre-installed Docker engine and compose 2. Configures dynamic ENV VARS (tokens, passwords, domain) 3. Mounts shared folders via NFS 4. Generates and configures SSL 5. Deploys GitLab Server and Container Registry via docker-compose.yml 6. Creates and registers one Runner + adds automation for the further scaling
  9. 9. Import JPS https://github.com/jelastic/docker-gitlab/jelastic.jps 1 2
  10. 10. Wait about 10-15 min
  11. 11. Copy your “root” password and “Open in browser”
  12. 12. 502 is OK, wait for the finish of the first run (~ 3 min)
  13. 13. Sign in as the “root”
  14. 14. Press “New project”
  15. 15. “Personal Access Token” is required
  16. 16. “Personal Access Token” is required
  17. 17. GitHub > Account Settings > Personal Tokens > New
  18. 18. Copy it! You will not see it again
  19. 19. Import from GitHub > “Access Token” is required
  20. 20. Import selected projects
  21. 21. Review the imported projects
  22. 22. Create CI pipeline > Add a runner + add .gitlab-ci.yml
  23. 23. Go to “Admin Area”
  24. 24. Checking runners > Open “Runners”
  25. 25. Type of executors
  26. 26. Add more “Runners” via Jelastic Dashboard 1 2
  27. 27. New runners are automatically registered
  28. 28. Checking container registry > Select project > Registry
  29. 29. Create or edit .gitlab-ci.yml
  30. 30. Example of .gitlab-ci.yml
  31. 31. Review the running pipelines
  32. 32. Check status of the stages
  33. 33. Check the output logs
  34. 34. Successfully completed!
  35. 35. Example of complex deployment pipeline
  36. 36. Pipeline with automatic and manual triggers
  37. 37. Live Demo
  38. 38. Questions
  39. 39. Follow @jelastic and @siruslan

×