Getting CI/CD pipelines to work on Kubernetes is a tricky endeavor, especially if you are looking for a Cloud Native CI/CD solution.
KubeCI is an open source Continuous Delivery system built on Drone for Kubernetes. A simple YAML configuration file is used to the define and execute pipelines inside Kubernetes Pods.
We will talk about why CI/CD pipelines are painful today. We will do some live coding, and show you how KubeCI can make a CI/CD deployment on Kubernetes simple. The audience will get insights about why we build KubeCI and how we want to extend it in the future.
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
KubeCI - Cloud Native Continuous Delivery for Kubernetes
1. Click to edit place and date
Name of presentation
Subtitle of presentation | presentator
KubeCI
Cloud Native Continuous Delivery
Tobias Schneck - @toschneck
Loodse
Frankfurt
3. Sebastian Scheele
Headquarter in
in Hamburg, Germany
Founders
Awards
> 25 employees
world wide
Founded in
2016
Julian Hansert
Cloud native
and container
technologies
Software
development
K8s certified
Multi & Hybrid Cloud
Container Engine Partners
Silver Member
& Training Partner
GCP & Training
Partner
15. Multi Machine Pipelines
● Chain together multiple pipelines
● Multi-machine fan-in and fan-out
● Multi-operating system and multi-architecture builds
● Replaces matrix builds
16. Multi Machine Pipelines
What does it look like?
---
pipeline:
name: backend
steps:
- name: build
image: golang
commands:
- go build
- go test
...
---
depends_on: [ backend, frontend ]
pipeline:
name: notify
steps:
- name: slack
image: plugins/slack
---
pipeline:
name: frontend
steps:
- name: build
image: node
commands:
- npm install
- npm test
...
17. Jsonnet
● Generate config data (YAML)
● For really big pipelines
● Share config across projects with imports
{
pipeline: {
local go = 'golang:1.10.3',
'test': drone.step.new(go, group='build', commands=[
'cd api',
'make test',
]),
'build': drone.step.new(go, group='build', commands=[
'cd api',
'make build',
]),
...
}
}
pipeline:
test:
image: golang:1.10.3
group: go
commands:
- cd api
- make test
build:
image: golang:1.10.3
group: go
commands:
- cd api
- make build
...
$ drone jsonnet
19. Kubernetes Runtime
● Needs Kubernetes 1.10+
● Implements the same interface as the Docker runtime
● Takes a kubeconfig to connect to Kubernetes
● Talks to the Kubernetes apiserver
● Schedules
○ Services
○ Pods
○ Persistent Volumes (local volume)
DRONE_KUBERNETES=true
DRONE_KUBERNETES_KUBECONFIG=/home/user/.kube/config
DRONE_KUBERNETES_NAMESPACE=drone
20. Kubernetes Runtime Execution Concept
Kubernetes Cluster
Node affinity
Drone CI Server
local-storage
Step 0
git clone
Drone Agent
source code
Step 1
go test
Step 2
go build
Step 3
docker build & push
Step 4
Kubectl create pod
21. Kubernetes Runtime Execution Concept
Kubernetes Cluster
Node affinity
Drone CI Server
local-storage
Step 0
git clone
Drone Agent
source code
Step 1
go test
Step 2
go build
Step 3
docker build & push
Step 4
Kubectl create pod
22. Kubernetes Runtime Improvements
● At the moment we pick a random machine
○ Use NodeAffinity
● Building Docker containers on Kubernetes
○ Needs privileges
● No way to reference secrets
● No way to reference configmaps
Expect a lot of fixes and improvements!
28. Plugins
What are your needs?
What CI/CD challenges for Kubernetes do you have?
Tell us!
29. Matthias Loib - @metalmatze
POC Lead of KubeCI
Brad Rydzewski - @bradrydzewski
Creator of Drone
Chris Bargmann - @chrisbargmann
Support on KubeCI plugins
Stefan Schimanski - @the_sttts
Brainstorming at FOSDEM
Jason Murray - @chaosaffe
Initial hacking sessions
Acknowledgements