CI/CD Pipeline mit Gitlab CI und Kubernetes
Johannes M. Scheuermann
r1
Johannes M. Scheuermann
Cloud Platform Engineer @ inovex
〉 Software-Defined Datacenters
〉 Infrastructure Services
〉 High Availability /Scalability / Resilience
〉 Cloud technologies
2
inovex.de/jobs
What about you?
Motivation
Scenario: ToDo Webapp
6
Introduction
● Use Case: Managing Tasks
● HTML/CSS/JS, Golang
● Redis (Master/Slave)
Technologies
7
Gitlab KubernetesDocker
How to build your binary?
Container-based Build Slaves
Gitlab CI
11
Push Code
Pipeline
Push Code Build Artifact Trigger Tests Release Artifact Deploy
12
Pipeline
Commit
Tag
13
Pipeline
Configuration
Quelle: https://gitlab.com/inovex/pa-todo-app-web/blob/master/.gitlab-ci.yml 14
15
Pipeline
Configuration
Quelle: https://gitlab.com/inovex/pa-todo-app-web/blob/master/.gitlab-ci.yml 16
★ Build-Software dependencies
★ Reproducible builds
★ Automated Rollout
★ Rollbacks
★ Isolated feature testing
Typical CI/CD Problems
17
Deploy to Kubernetes
API
Kubernetes Deployment
19
Kubernetes
Gitlab CI
ns: todo-app-staging
Pod v1.1 Pod v1.1
Deploy
mentDeploy v1.2 into staging
ns: todo-app-production
Pod v1.1 Pod v1.1
API
Kubernetes Deployment
20
Kubernetes
Gitlab CI
ns: todo-app-staging
Pod v1.1 Pod v1.1
Pod v1.2
Deploy
mentDeploy v1.2 into staging
ns: todo-app-production
Pod v1.1 Pod v1.1
API
Kubernetes Deployment
21
Kubernetes
Gitlab CI
ns: todo-app-staging
Pod v1.1
Pod v1.2
Deploy
mentDeploy v1.2 into staging
ns: todo-app-production
Pod v1.1 Pod v1.1
API
Kubernetes Deployment
22
Kubernetes
Gitlab CI
ns: todo-app-staging
Pod v1.1
Pod v1.2 Pod v1.2
Deploy
mentDeploy v1.2 into staging
ns: todo-app-production
Pod v1.1 Pod v1.1
API
Kubernetes Deployment
23
Kubernetes
Gitlab CI
ns: todo-app-staging
Pod v1.2 Pod v1.2
Deploy
mentDeploy v1.2 into staging
ns: todo-app-production
Pod v1.1 Pod v1.1
24
Pipeline
Configuration
Quelle: https://gitlab.com/inovex/pa-todo-app-web/blob/master/.gitlab-ci.yml 25
★ Build-Software dependencies
★ Reproducible builds
★ Automated Rollout
★ Rollbacks
★ Isolated feature testing
Typical CI/CD Problems
26
27
Environments
28
Rollback
★ Build-Software dependencies
★ Reproducible builds
★ Automated Rollout
★ Rollbacks
★ Isolated feature testing
Typical CI/CD Problems
29
30
Review Environments
31
Config
★ Build-Software dependencies
★ Reproducible builds
★ Automated Rollout
★ Rollbacks
★ Isolated feature testing
Typical CI/CD Problems
32
Demo Time: Video!
33
youtu.be/Ly_f221O6Fo
Assets & Links
34
gitlab.com/inovex/pa-todo-app-web
Johannes M.
Scheuermann
inovex GmbH
jscheuermann@inovex.de
github.com/johcsheuer inovex.de youtube.com/inovexGmbH
CC BY-NC-ND @johscheuer gitlab.com/inovex
Feedback & Questions:
sayat.me/johscheuer

CI/CD Pipeline mit Gitlab CI und Kubernetes