ci/cd the future of cloud nativefiles.informatandm.com/uploads/2019/5/apr_18_dan_lorenc...@tektoncd...

37
@tektoncd The Future of Cloud Native CI/CD Dan Lorenc Staff Soſtware Engineer, Google

Upload: others

Post on 30-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

The Future of Cloud Native CI/CD

Dan LorencStaff Software Engineer, Google

Page 2: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Hello!

Dan LorencStaff Software Engineer @ Google Cloud

Page 3: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Audience Poll

Page 4: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Kubernetes / Cloud Native / Containers

CI/CD

Cloud Native for CI/CD

Tekton + Architecture

What is?

Tekton Demos

DEMOS

Tekton Roadmaps

Takeaways

What’s ahead

CDF

CD.Foundation

Agenda

Page 5: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

What is Cloud Native?

● Microservices in containers

● Dynamically orchestrated

● Optimized resource utilization

Page 6: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

● Platform for managing containers

● Tell Kubernetes how to deploy your services and it does it

● Abstracts away the underlying cloud

● Cloud agnostic

What is kubernetes?

Page 7: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Cloud Native: Containers + Kubernetes

Microservices in containers Images / Containers

Dynamically orchestrated

Optimized resource utilizationKubernetes

Page 8: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

What is CI/CD?Continuous Integration & Delivery

Page 9: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Cloud Native CI/CDThe good

Containers Reproducible and reusable

Dynamic orchestration Increased reliability

Serverless resource utilization Reduced cost

Conformant APIs Portability

Page 10: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Cloud Native and CI/CD The challenges

● Same old problems in a different form

○ Images instead of binaries

○ Clusters / many environments

● Some things more challenging

○ Microservices instead of monoliths

● Many deployment targets

● Confusing terminology

Page 11: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Page 12: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Core CI/CD components

Page 13: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Page 14: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Tekton: History

2018 2019

Knative build

Tekton Pipelines

Knative build-pipelines Tekton ++

Page 15: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Composable

Tekton: Vision

Declarative

Reproducible Cloud Native

Page 16: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Tekton: Who

● Contributors from:○ Google○ CloudBees○ Red Hat○ IBM○ … and more!

● New contributor friendly!● github.com/tektoncd

Page 17: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Page 18: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Tekton Pipelines:the parts

CRDs

Extending Kubernetes with custom types

Controllers act on Resources

= CI/CD platform on Kubernetes

Page 19: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Custom Resource DefinitionsHey kubernetes! Please create this cat for me.

Sorry, I only speak yaml.

Ah right. kubectl create -f mycat.yaml

Hmm, I don't know about the type "Cat".

Cat's have paws, they're fluffy, they have claws...

Now we're talking. Ah, that's what a "Cat" is.

Here's my cat: kubectl create -f mycat.yaml

YAML!

Ahhh! kubectl create -f cat-definition.yaml

OK, I'll keep that over here next to the Pods and Services.

Page 20: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Custom Resource ControllersHey kubernetes! Do you have any cats?

Nope, no cats.

Hey kubernetes! How about now?

Nope, still none.

How about now?

OK, just got a cat, it's here:

Thanks, I'll do some cat stuff with it.

Dude… This is Kubernetes. I'll tell you when I get one.

OK, thanks!

You do you.

Page 21: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

CRD StandardsHey kubernetes! Do you have any cats?

Sure, I have k8s.io/cat, whizzbang.com/cat, mypets.info/cat, foobar.com/cat, google.com/cat,...

Whoa, what's the difference?

k8s.io/cat has paws and fur, whizzbang.com/cat has a tail and color,...

Can I have them all?

No, they don't get along with each other

EXPLOSION

Page 22: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Step

● Kubernetes container spec

● Container image with all the info you need to run it

- name: run-ko image: gcr.io/tekton-releases/ko-ci env: - name: KO_DOCKER_REPO value: gcr.io/my-registry - name: GOPATH value: /workspace/go command: - /bin/sh args: - -c - ko resolve -f my-src > release.yam volumeMounts: - name: gcp-secret mountPath: /secret

Page 23: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Task CRD

● New CRD

● Sequence of steps

● Run in sequential order

● Run on the same k8s node

Page 24: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Pipeline CRD

● Express Tasks order

○ Sequentially

○ Concurrently

○ (Graph)

● Execute Tasks on different nodes

● Typed inputs and outputs

Page 25: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Tekton Pipelines: example

Page 26: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Tekton Pipelines: example

Page 27: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Runtime CRDs

● Instances of Pipeline/Task:

○ PipelineRun

○ TaskRun

○ PipelineResource

● Runtime info like image registry,git repo, etc.

Page 28: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Tekton Pipelines : the good parts

Page 29: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Tekton Pipelines: usage

Page 30: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

Tekton Pipelines : architecture

Page 31: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

@tektoncd

DEMO

Tasks/TaskRunsPipelines/PipelineRunsTask Interchange-ability

Page 32: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

A Neutral Home for the Next Generationof Continuous Delivery Collaboration

The CDF

Page 33: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

Initial Projects

Page 34: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

Premier Members General & End User Members

Page 35: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

Join the community building the future of Continuous Deliveryhttps://cd.foundation@CDeliveryFdn

Page 36: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

Roadmap

● CDF○ KubeCon Barcelona summit on May 20○ Industry standard CICD "levels" for security and

compliance● Tekton

○ Shared Catalog!○ More features in Pipelines:

■ Event triggering■ Conditional execution■ PullRequest/SCM support■ And more!

○ More projects, with Pipelines at the core!

@tektoncd

Page 37: CI/CD The Future of Cloud Nativefiles.informatandm.com/uploads/2019/5/Apr_18_Dan_Lorenc...@tektoncd Cloud Native CI/CD The good Containers Reproducible and reusable Dynamic orchestration

Takeaways

Interested in contributing?Integrating?

CONTRIBUTING guide at github.com/tektoncd/pipeline/

End user? jenkins-x.iogithub.com/triggermesh/aktionWatch this space!

@tektoncd