1 of 55

CI/CD in a

Cloud Native World

OSCON 2019

2 of 55

Christie Wilson

Engineer @ Google

Tekton Co-Creator

MY CAT

ME

3 of 55

Cloud Native CI/CD:

Failing Without Fear

4 of 55

Rockstars

Heroes

Ninjas

Janitors

5 of 55

Can’t have success without failure

6 of 55

Cloud Native CI/CD

can make failure easier

7 of 55

What we’re gonna talk about

  1. CI (and CD)
  2. How Cloud Native makes things harder
  3. But it’s worth it: Cloud Native CI
    1. Serverless
    2. Specs and standards
    3. Infrastructure agnostic
    4. Reusable components
    5. Config as code

8 of 55

CI/CD is about making failure safe

9 of 55

What is CI/CD?

10 of 55

What is CI?

Continuous Integration

Literally integrating code together continually

11 of 55

Back in my day

  • Worked on SVN branches for weeks or months
  • Integrated them together
  • No/few tests

12 of 55

Failing was hard!

13 of 55

CI = Assembly Line?

14 of 55

CI = Assembly Line?

15 of 55

We become better creators by failing

16 of 55

Shift Left

Fail earlier!

There WILL be defects

  • Test earlier!
  • Catch failures earlier!

17 of 55

What we’re gonna talk about

  • CI (and CD)
  • How Cloud Native makes things harder
  • But it’s worth it: Cloud Native CI
    • Serverless
    • Specs and standards
    • Infrastructure agnostic
    • Reusable components
    • Config as code

18 of 55

What is Cloud Native?

}

Microservices in containers

Images / Containers

Dynamically orchestrated

Optimized resource utilization

}

Kubernetes

19 of 55

Moar complicated

20 of 55

2008 complexity

21 of 55

Cloud Native complexity

22 of 55

Cloud Native complexity

There is a lot to grok here and it’s constantly changing!

  • Start with a webserver
  • End up with Kubernetes + Istio + Knative + Helm + Spinnaker

23 of 55

What we’re gonna talk about

  • CI (and CD)
  • How Cloud Native makes things harder
  • But it’s worth it: Cloud Native CI
    • Serverless
    • Specs and standards
    • Infrastructure agnostic
    • Reusable components
    • Config as code

24 of 55

Cloud Native CI

(Definition by Christie)

  • Serverless
  • Specs and standards
  • Infrastructure agnostic
  • Reusable components
  • Config as code

25 of 55

What we’re gonna talk about

  • CI (and CD)
  • How Cloud Native makes things harder
  • But it’s worth it: Cloud Native CI
    • Serverless
    • Specs and standards
    • Infrastructure agnostic
    • Reusable components
    • Config as code

26 of 55

Serverless CI

  • Scaling up and down resources as needed
  • You specify what you want to run, freed of the much of responsibility to manage the underlying resources

27 of 55

Serverless CI

  • Don’t need to waste resources
  • No need for monolithic execution

28 of 55

What we’re gonna talk about

  • CI (and CD)
  • How Cloud Native makes things harder
  • But it’s worth it: Cloud Native CI
    • Serverless
    • Specs and standards
    • Infrastructure agnostic
    • Reusable components
    • Config as code

29 of 55

Specs & Standards

Doesn’t have to be perfect, just good enough & widely used

  • Part of what makes k8s so cool is that it’s a spec we can all agree on
  • Using this = composable, reusable, extensible

30 of 55

Specs & Standards

Infinite extensibility!

  • Any k8s resource can be manipulated (e.g. with controllers, admission webhooks)
  • Anything built on k8s can be manipulated with k8s tools

31 of 55

What we’re gonna talk about

  • CI (and CD)
  • How Cloud Native makes things harder
  • But it’s worth it: Cloud Native CI
    • Serverless
    • Specs and standards
    • Infrastructure agnostic
    • Reusable components
    • Config as code

32 of 55

Use your own infra

Infrastructure agnostic

  • A kubernetes deployment is a kubernetes deployment
  • If you can deploy to prod kube, it should be possible to deploy to your kube
  • Use the same config!

33 of 55

Use your own infra

Shift left

  • The sooner you fail the better!
  • Perform testing earlier in your lifecycle
  • Why not do it before the code is pushed!

34 of 55

Use your own infra

Parity

  • Make the complexity of kubernetes worth it!
  • Pre-kube, it was nearly impossible for me to setup a production like environment on my own machine

35 of 55

What we’re gonna talk about

  • CI (and CD)
  • How Cloud Native makes things harder
  • But it’s worth it: Cloud Native CI
    • Serverless
    • Specs and standards
    • Infrastructure agnostic
    • Reusable components
    • Config as code

36 of 55

Reusable components

(Kube types, CRDs…)

37 of 55

Reusable components

Do we need another Slack notification plugin?

  • Write it once, use it again and and again
  • Kubernetes is itself a building block, that enables the creation of more building blocks

38 of 55

What we’re gonna talk about

  • CI (and CD)
  • How Cloud Native makes things harder
  • But it’s worth it: Cloud Native CI
    • Serverless
    • Specs and standards
    • Infrastructure agnostic
    • Reusable components
    • Config as code

39 of 55

Config as Code

(even the yaml)

40 of 55

Learning & Debugging

Fail easily!

  • As our systems get more complicated, we need to be able to learn faster
  • We need to be able to look at what the system are doing

41 of 55

Debugging = Learning

42 of 55

The faster you can learn,

the faster you can deliver value

43 of 55

44 of 55

How do we debug?

  • By poking and prodding the thing
  • Looking at what it’s doing
  • Changing it, seeing what happens

45 of 55

Cloud Native CI

needs to make debugging easy

46 of 55

Config as Code

makes debugging easier

47 of 55

Software development is a practice,

not a performance

Software we think we should be making

Software we actually make

Nailed it!

48 of 55

To get better,

you need to practice

at the edge of your ability

49 of 55

If you’re at the edge,

sometimes you’re gonna fail

50 of 55

Failing is great!

Failing is part of succeeding!

51 of 55

Our CI should make failing easy

52 of 55

Tekton is Cloud Native CI

  • If you liked that, you’re gonna love Tekton!
    • (Unless you don’t like yaml…)
  • Tekton is a Cloud Native CI building block!
  • github.com/tektoncd/pipeline

53 of 55

54 of 55

Sources

55 of 55

Thanks!

Software we think we should be making

Software we actually make

Nailed it!