Automating CI/CD Pipeline with GitLab and
Docker Containers for Java Applications
...but to SHOW this in ACTION
We are NOT here to TALK...
• 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
Topology
Repo https://github.com/jelastic/docker-gitlab
Customization
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
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
Import JPS https://github.com/jelastic/docker-gitlab/jelastic.jps
1
2
Wait about 10-15 min
Copy your “root” password and “Open in browser”
502 is OK, wait for the finish of the first run (~ 3 min)
Sign in as the “root”
Press “New project”
“Personal Access Token” is required
“Personal Access Token” is required
GitHub > Account Settings > Personal Tokens > New
Copy it! You will not see it again
Import from GitHub > “Access Token” is required
Import selected projects
Review the imported projects
Create CI pipeline > Add a runner + add .gitlab-ci.yml
Go to “Admin Area”
Checking runners > Open “Runners”
Type of executors
Add more “Runners” via Jelastic Dashboard
1
2
New runners are automatically registered
Checking container registry > Select project > Registry
Create or edit .gitlab-ci.yml
Example of .gitlab-ci.yml
Review the running pipelines
Check status of the stages
Check the output logs
Successfully completed!
Example of complex deployment pipeline
Pipeline with automatic and manual triggers
Live Demo
Questions
Follow @jelastic and @siruslan

Automating CICD Pipeline with GitLab and Docker Containers for Java Applications