Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dr. Kube und der Helm - Anatomie einer CD-Pipeline

Dr. Kube und der Helm - Anatomie einer CD-Pipeline

Nicolas Byl

August 20, 2019
Tweet

More Decks by Nicolas Byl

Other Decks in Technology

Transcript

  1. 1

    View Slide

  2. 2

    View Slide

  3. 3
    Über 7 Stages must
    du gehen…
    3
    https://pxhere.com/de/photo/630731

    View Slide

  4. 4
    4
    Code
    Integration
    Test
    Manual
    Test
    Production
    master

    View Slide

  5. 5
    5
    Code
    Integration
    Test
    Manual
    Test
    Production
    master
    Integration
    Test
    Review
    Integration
    Test
    Review
    features/4711
    features/1337

    View Slide

  6. 6
    6
    Code
    Integration
    Test
    Manual
    Test
    Production
    master
    Integration
    Test
    Review
    Integration
    Test
    Review
    features/4711
    features/1337
    Local
    Development

    View Slide

  7. 7
    STEP 0: Local
    Development
    7
    https://pxhere.com/de/photo/

    View Slide

  8. 8
    Optimize for fast roundtrips
    1
    A lot of innovation in the last year
    Old guard: skaffold, draft
    New kids on the block: tilt, garden, …
    2
    3
    4
    8
    8
    https://pxhere.com/de/photo/764622

    View Slide

  9. 9
    STEP 1: Build
    9
    https://pxhere.com/de/photo/1087298

    View Slide

  10. 10
    Fresh environment on every build
    1
    Scalable infrastructure
    Use resources as you go
    Parallel Builds
    2
    3
    4
    10
    1
    0
    https://pxhere.com/de/photo/755423

    View Slide

  11. 11
    Possible solution: Docker-in-Docker (still need
    priviledged access to the linux kernel)
    1
    Evaluate alternative builders: kaniko, jib
    Mitigation: Split clusters between development and
    other stages
    Caveat: If building in cluster, look at serviceaccount,
    too!
    2
    3
    4
    11
    1
    1
    https://pxhere.com/de/photo/864475
    https://pxhere.com/de/photo/833821

    View Slide

  12. 12
    Step 2: Integration
    Test
    1
    2
    https://pxhere.com/de/photo/1358702

    View Slide

  13. 13
    Deploy new instance of application and dependencies
    1
    Run black-box tests
    Evaluate application in production-like environment
    Destroy after test
    2
    3
    4
    13
    1
    3
    https://pxhere.com/de/photo/1040863

    View Slide

  14. • Package manager for Kubernetes
    • Templating for needed Kubernetes
    objects
    • Manage dependencies
    • Rollout history
    • Now a CNCF incubator project
    • https://helm.sh
    14

    View Slide

  15. • Create generic deployment
    descriptions
    • Replace configurable values with
    variables
    • Full power of go string templates
    15

    View Slide

  16. • Keep track of rollouts:
    • Charts
    • Values
    • User
    • …
    • History
    • Rollback
    16

    View Slide

  17. • Reference other charts
    • Atomic installation
    17

    View Slide

  18. • Helm Hub
    • Lua Templates
    • Tiller-less Helm
    18

    View Slide

  19. 19
    Step 3: Review
    Application
    1
    9
    https://pxhere.com/de/photo/1445109

    View Slide

  20. 20
    Deploy new instance of application and dependencies
    1
    Manuel test of specific features of a branch
    Separated environment for product owners and testers
    Destroy after merge of branch
    2
    3
    4
    20
    2
    0
    https://pxhere.com/de/photo/1040863

    View Slide

  21. 21
    Step 4: Production
    2
    1
    https://pxhere.com/de/photo/506968

    View Slide

  22. 22
    [email protected]
    22
    http://www.twitter.com/NicolasByl

    View Slide