Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for...

14
SERVERLESS CI/CD WITH OPENSHIFT PIPELINES © Computacenter 2019 1

Transcript of Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for...

Page 1: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

SERVERLESS CI/CD WITH OPENSHIFTPIPELINES

© Computacenter 20191

Page 2: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

© Computacenter 20193

WARUM SERVERLESS CI/CD?

CURRENT CHALLENGES OF CI/CD TOOLING

… not cloud native

… big management overhead

… brittle configuration

… lead to instability

… too many choices

… too few guidelines

https://jenkins.io/blog/2018/08/31/shifting-gears/

Page 3: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

OPENSHIFTPIPELINES

© Computacenter 20194

Page 4: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

OPENSHIFT PIPELINES

© Computacenter 20195

TEKTON

Started as part of the knative build component

Split in 2018

Builds on Kubernetes CRDs

Governed by the Continuous Delivery FoundationContributions from Google, Red Hat, Cloudbees, IBM, Pivotal and many more

Page 5: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

© Computacenter 20196

OPENSHIFT PIPELINES

CONCEPTS

Tasks vs TaskRuns

Pipelines vs PipelineRuns

Portable across platforms

Fo ressources such as

repositories or images

implementations

can easily be swapped

(e.g. buildah vs kaniko)

Every command is run in

a containerKubernetes CRD / YAML

Page 6: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

© Computacenter 20197

OPENSHIFT PIPELINES

CONCEPTS

Page 7: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

Steps

- Run commands in a container

- Kubernets container spec

- Env vars

- Config maps

- Secrets

- Part of Task CRD

© Computacenter 20198

OPENSHIFT PIPELINES

CONCEPTS

Page 8: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

Tasks

- A list of steps run sequentially

- Inputs

- Outputs

- Parameterized

- Can run independent of pipelines

© Computacenter 20199

OPENSHIFT PIPELINES

CONCEPTS

Page 9: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

OPENSHIFT PIPELINES

© Computacenter 201910

Pipeline

- Combine multiple tasks

- Define a running order

- Inputs

- Outputs

- Parameterized

- Links tasks inputs and outputs

CONCEPTS

Page 10: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

PipelineResource

- Inputs and Outputs

- git repository

- container image

- Pull requests (GitHub)

- Cluster

- Storage

- CloudEvent

- Decoupled from pipeline definition

- Reusable across pipelines

© Computacenter 201911

OPENSHIFT PIPELINES

CONCEPTS

Page 11: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

TaskRun and PipelineRun

- Runtime CRDs

- Reference tasks and pipelines

- Define inputs, outputs and parameters

© Computacenter 201912

OPENSHIFT PIPELINES

CONCEPTS

Page 12: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

Catalog of reusable Tasks like

- Image build: buildah, kaniko, jib, buildpacks…

- Source-To-Image: Java, Python, Go, Ruby…

Soon: Shared pipelines

https://github.com/openshift/pipelines-catalog

https://github.com/tektoncd/catalog

© Computacenter 201913

OPENSHIFT PIPELINE

TASK CATALOG

Page 13: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

© Computacenter 201914

OPENSHIFT PIPELINES

DEMO

Page 14: Serverless CI/CD with OpenShift Pipelines · + support for sidecar containers (e.g. mockup apis for testing) + portable across clusters + shared tasks / pipelines - Limited eco system

OPENSHIFT PIPELINES

© Computacenter 201915

+ container-native, no plugin management

+ Very efficient build – test – deploy pipelines

+ support for sidecar containers (e.g. mockup apis for testing)

+ portable across clusters

+ shared tasks / pipelines

- Limited eco system (e.g. currently only support for git asSCM)

- No easy integration with bugtrackers like Jira / Bugzilla

- No notification system

- No Pause / Resume functionality

- No control loops / limited implementation of conditions

STATE OF PLAY / ROADMAP

On the road…Metrics (implemented in Tekton 0.8)

DAG pipelines

Workflow features (Pause/Resume, timeouts, notifications…)

Trigger

Further SCM integration (Linting, issue tracking, integration testing…)