Continuous Delivery and GitOps on OpenShift
Continuous Delivery and GitOps on OpenShift
and GitOps
on OpenShift
Christian Hernandez
Technical Marketing Manager
1
DevOps is the key to meet the
insatiable demand for delivering quality
applications rapidly
2
Continuous Integration(CI) & Continuous Delivery (CD)
A key DevOps principle for automation, consistency and reliability
Continuous Integration
Continuous Delivery
3
What is GitOps?
An developer-centric approach to Continuous Delivery and infrastructure operation
4
GitOps Workflow
a declarative approach to application delivery
CD
A A A
5
Why GitOps?
6
The GitOps Application Delivery Model
CI
Source Image
Git Repository Registry
7
The GitOps Application Delivery Model
CI
Source Image
Git Repository Registry
Pull Request
CD
Push
Config
Kubernetes
Git Repository Pull
8
The GitOps Application Delivery Model
CI
Source Image
Git Repository Registry
Pull Request
CD
Push
Config
Kubernetes
Git Repository Pull
Monitor
Detect
Deploy
drift
Take
action
9
Continuous Integration & Continuous Delivery
Ecosystem
Integrations
10
The GitOps Application Delivery Model on OpenShift
OpenShift Builds
OpenShift Pipelines
Source Image
Git Repository Registry
Pull Request
Push
Config
Kubernetes
Git Repository Pull
OpenShift GitOps
11
OpenShift Builds
Automate building container images
using Kubernetes tools
12
GENERAL DISTRIBUTION
OpenShift Builds
13
GENERAL DISTRIBUTION
OpenShift Builds
○ Kaniko
Application image
○ ...more
Build tools
image
● Create lean application images
● Extend with your own build tools
● Based on Shipwright open-source project
14
GENERAL DISTRIBUTION
OpenShift Builds
15
OpenShift Pipelines
Kubernetes-native on-demand delivery
pipelines
16
OPENSHIFT PIPELINES GENERAL DISTRIBUTION
17
OPENSHIFT PIPELINES GENERAL DISTRIBUTION
Require IT Ops for CI engine maintenance Pipeline as a service with no Ops overhead
Plugins shared across CI engine Pipelines fully isolated from each other
Plugin dependencies with undefined update cycles Everything lifecycled as container images
18
OPENSHIFT PIPELINES GENERAL DISTRIBUTION
OpenShift Pipelines
Cloud-native pipelines taking Pipelines run and scale Kubernetes RBAC and Granular control over
advantage of Kubernetes on-demand in isolated security model ensures pipeline execution details
execution and , operational containers, with repeatable security consistently across on Kubernetes, to support
model and concepts and predictable outcomes pipelines and workloads your exact requirements
19
Powered by
OPENSHIFT PIPELINES
OpenShift Pipelines
20
OPENSHIFT PIPELINES
Tekton Concepts
Pipeline
Task
step step
Task
step step
step
step
step
21
OPENSHIFT PIPELINES
22
OPENSHIFT PIPELINES
kind: Task
● Performs a specific task metadata:
● List of steps
name: buildah
spec:
● Reusable steps:
- name: build
image: quay.io/buildah/stable:latest
command: ["buildah"]
args: ["bud", ".", "-t", "$(params.IMAGE)"]
- name: push
image: quay.io/buildah/stable:latest
script: |
buildah push $(params.IMAGE) docker://$(params.IMAGE)
23
Tekton Hub
Search, discover and
install Tekton Tasks
24
OPENSHIFT PIPELINES
kind: Pipeline
metadata:
name: deploy-dev
● A graph of Tasks: concurrent & sequential spec:
params:
● Tasks run on different nodes - name: IMAGE_TAG
tasks:
- name: git
● Task execution logic taskRef: git
○ Conditional
name: git-clone
params: [...]
26
OPENSHIFT GITOPS
OpenShift GitOps
27
Powered by
OPENSHIFT GITOPS
Argo CD
28
OPENSHIFT GITOPS
App A App B
Auth
OpenShift
NS NS
Registry
Networking
NS NS
Storage
Install Operators
NS NS
Namespaces
... App A App B
OpenShift OpenShift
A central Argo CD pushes Git A cluster-scope Argo CD pulls cluster An application scoped Argo CD pulls
repository content to remote service configurations into into the application deployment and
OpenShift and Kubernetes clusters OpenShift cluster configurations into app namespaces
29
GitOps Application Manager CLI
$ kam bootstrap
$ kam environment add stage
30
GitOps Application Manager CLI
$ kam bootstrap
Webhook Push
Tekton Pipelines Image
Push source Registry
code
Pull
Dev Environment
Prod Environment
31
Optional section marker or title
Thank you
Red Hat is the world’s leading provider of enterprise
open source software solutions. Award-winning support,
training, and consulting services make Red Hat a trusted
adviser to the Fortune 500.
linkedin.com/company/red-hat facebook.com/redhatinc
youtube.com/user/RedHatVideos twitter.com/RedHat
32