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

Introduction to Spinnaker Managed Pipeline Templates

Keke
February 18, 2020

Introduction to Spinnaker Managed Pipeline Templates

Hey, brief introduction of Spinnaker Managed Pipeline Templates to enhance your CI/CD quality

Keke

February 18, 2020
Tweet

More Decks by Keke

Other Decks in Technology

Transcript

  1. Introduction to
    Spinnaker
    Pipeline
    Templates
    Presented by
    Keisuke Yamashita
    Merpay SRE
    In team knowledge-share

    View full-size slide

  2. About me
    Keisuke Yamashita(Slack:@keke)
    Hello.
    I'm from new grad Merpay SRE
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  3. Introducing Spinnaker Pipeline Template | KeisukeYamashita
    Outline
    TODAY'S TOPICS
    What's Spinnaker?
    Spinnaker Architecture and how it works
    Spinnaker Managed Pipeline Template(MPT)
    The pros/cons of MPT
    How to create Spinnaker Pipeline Template
    MPT Tips
    1.
    2.
    3.
    4.
    5.
    6.

    View full-size slide

  4. What's Spinnaker?
    IT'S A MICROSERVICE

    View full-size slide

  5. What's Spinnaker
    Spinnaker is an
    open-source, multi-cloud continuous delivery platform that
    helps you release software changes with high velocity and confidence.
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  6. Management
    VISUALIZE
    CLUSTER
    Two features
    Deployment
    CI/CD

    View full-size slide

  7. Management
    VISUALIZE
    CLUSTER
    Two features
    Deployment
    CI/CD
    Today's topic

    View full-size slide

  8. Spinnaker
    Architecture
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  9. Spinnaker Architecture
    spin-gate
    orca clouddriver
    echo
    igor
    front50 rosco fiat
    spin-deck
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  10. Spinnaker Architecture
    spin-gate
    orca clouddriver
    echo
    igor
    front50 rosco fiat
    spin-deck
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  11. Spinnaker Architecture
    spin-gate
    orca clouddriver
    echo
    igor
    front50 rosco fiat
    spin-deck
    Exposed to Internet
    Has Ingress
    Has Ingress
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  12. Spinnaker Architecture
    spin-gate
    orca clouddriver
    echo
    igor
    front50 rosco fiat
    spin-deck
    UI that the developer is using.
    Written in Angular + React.
    You can also extend the UI
    with a customize deck
    WEB UI
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  13. Spinnaker Architecture
    orca clouddriver
    echo
    igor
    front50 rosco fiat
    spin-gate
    spin-deck
    All requests are first handled
    to this API gateway.
    I has logics in here.
    Written by Java.
    API GATEWAY
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  14. Spinnaker Architecture
    clouddriver
    echo
    igor
    front50 rosco fiat
    spin-gate
    spin-deck
    orca
    Manages the pipeline execution's
    consistency even in distributed
    system like Spinnaker on Kubernetes.
    Written in JAVA. Stateless.
    ORCHESTRATION ENGINE
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  15. Spinnaker Architecture
    clouddriver
    echo
    igor
    front50 rosco fiat
    spin-gate
    spin-deck
    orca
    Echo handles the event for sending
    the events and handling the
    webhooks from Github
    MESSAGING BUS
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  16. echo
    front50 rosco fiat
    spin-gate
    orca
    igor
    Spinnaker Architecture
    clouddriver
    spin-deck
    Igor is in charge for handling
    trigger events from Travis or Jenkins
    TRIGGER PIPELINE
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  17. echo
    front50 rosco fiat
    spin-gate
    orca
    igor
    Spinnaker Architecture
    clouddriver
    spin-deck
    Clouddriver calls the cloud
    provider(e.g. Kubernetes, GCE)
    CALL CLOUD PROVIDER
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  18. Spinnaker Architecture
    clouddriver
    echo
    front50 rosco fiat
    spin-gate
    spin-deck
    orca
    igor
    Fiat is a authentication service.
    AUTHENTICATION

    View full-size slide

  19. Spinnaker Architecture
    clouddriver
    echo
    front50 rosco fiat
    spin-gate
    spin-deck
    orca
    igor
    Creats artifacts
    BAKERY

    View full-size slide

  20. echo
    front50 rosco fiat
    spin-gate
    orca
    igor
    Spinnaker Architecture
    clouddriver
    spin-deck
    Responsible for storing metadata & configs
    METADATA STORAGE

    View full-size slide

  21. How it works
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  22. Save a pipeline
    How it works
    1.
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  23. echo
    front50 rosco fiat
    spin-gate
    orca
    igor
    How it works
    clouddriver
    spin-deck
    Save the pipeline
    1.

    View full-size slide

  24. echo
    front50 rosco fiat
    spin-gate
    orca
    igor
    How it works
    clouddriver
    spin-deck
    Save the pipeline
    1.

    View full-size slide

  25. echo
    front50 rosco fiat
    spin-gate
    orca
    igor
    How it works
    clouddriver
    spin-deck
    Save the pipeline
    1.

    View full-size slide

  26. echo
    front50 rosco fiat
    spin-gate
    orca
    igor
    How it works
    clouddriver
    spin-deck
    2. Execute the pipeline
    front50
    Save application config

    View full-size slide

  27. How it works
    2. Execute a pipeline
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  28. echo
    front50 rosco fiat
    spin-gate
    orca
    igor
    How it works
    clouddriver
    spin-deck
    2. Execute the pipeline
    ① Invoke a pipeline exection

    View full-size slide

  29. front50 rosco fiat
    spin-gate
    orca
    How it works
    clouddriver
    spin-deck
    2. Execute the pipeline
    ② Gets application config
    echo
    igor

    View full-size slide

  30. front50 rosco fiat
    spin-gate
    orca
    How it works
    clouddriver
    spin-deck
    2. Execute the pipeline
    ③ Trigger pipeline
    echo
    igor

    View full-size slide

  31. front50 rosco fiat
    spin-gate
    orca
    How it works
    clouddriver
    spin-deck
    2. Execute the pipeline
    ④ Request for k8s
    echo
    igor

    View full-size slide

  32. front50 rosco fiat
    spin-gate
    orca
    ⑤ kubectl apply
    How it works
    clouddriver
    spin-deck
    2. Execute the pipeline
    echo
    igor

    View full-size slide

  33. Spinnaker Managed
    PipelineTemplate(MPT)?

    View full-size slide

  34. Spinnaker Pipeline
    Spinnaker Pipeline defines a deployment pipeline
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  35. Spinnaker Pipeline(JSON)
    Spinnaker Pipeline is defined by JSON
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  36. Spinnaker Pipeline(JSON)
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  37. Spinnaker Pipeline Template
    Pipeline Template
    +
    Pipeline
    =
    {
    "service": "nginx"
    }
    Pipeline variables
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  38. +
    Spinnaker Managed Pipeline Template
    Pipeline Template v1 Pipeline v1
    =
    {
    "service": "nginx"
    }
    Pipeline variables
    Pipeline Template v1
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  39. +
    Spinnaker Managed Pipeline Template
    Pipeline Template v1 Pipeline v1
    =
    {
    "service": "nginx"
    }
    Pipeline variables
    Pipeline Template v1 Pipeline v2
    Automatically updates the pipelines
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  40. +
    Spinnaker Managed Pipeline Template
    Pipeline Template v1 Pipeline v1
    =
    {
    "service": "nginx"
    }
    Pipeline variables
    Pipeline Template v1 Pipeline v2
    Automatically updates the pipelines
    Sync
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  41. Spinnaker Managed Pipeline Template
    In application dashboard(after enabling v2 UI)
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  42. Spinnaker Managed Pipeline Template
    Choose pipeline template
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  43. Spinnaker Managed Pipeline Template
    Configure pipeline variables
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  44. Spinnaker Managed Pipeline Template
    Pipeline make :)
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  45. How to create MPT

    View full-size slide

  46. Spin, Spinnaker CLI tool
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  47. Spin, Spinnaker CLI tool
    Download Spinnaker Pipeline
    $ spin pipeline get \
    --name \
    --application
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  48. Spin, Spinnaker CLI tool
    Create Pipeline Template JSON
    {
    "schema": "v2",
    "application: "",
    "pipeline": ,
    "triggers: "",
    "variables": []
    }
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  49. Spin, Spinnaker CLI tool
    Upload Pipeline Template JSON
    $ spin pipeline-template save \
    --file
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  50. Pros
    MPT
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  51. Pros
    MPT
    Reuseability
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  52. Pros
    REUSABILITY
    Pipeline Template
    Deploy Nginx Pipeline
    {
    "image": "nginx"
    }
    Pipeline variables
    {
    "image": "redis"
    }
    Pipeline variables
    {
    "image": "apache hive"
    }
    Pipeline variables
    Deploy Redis Pipeline
    Deploy Hive Pipeline

    View full-size slide

  53. Pros
    MPT
    Reuseability Immutable
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  54. Pros
    IMMUTABLE Can't change anything :D
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  55. Pros
    MPT
    Reuseability Immutable Managed
    Introducing Spinnaker Pipeline Template | KeisukeYamashita

    View full-size slide

  56. +
    Pipeline Template v1 Pipeline v1
    =
    {
    "service": "nginx"
    }
    Pipeline variables
    Pipeline Template v1 Pipeline v2
    Automatically updates the pipelines
    Sync
    Pros
    MANAGED

    View full-size slide

  57. Pros
    MANAGED
    https://blog.spinnaker.io/managed-delivery-evolving-continuous-delivery-at-netflix-eb74877fb33c

    View full-size slide

  58. Thank you
    Have a nice journey with Spinnaker

    View full-size slide

  59. All pictures are from Upslash
    https://unsplash.com/

    View full-size slide