Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Spinnaker 파트 1

2,595 views

Published on

1. Spinnaker에 대하여
2. 배포 전략
3. Spinnaker에서의 배포 과정
4. Packer와 Spinnaker (Ansible 포함)
5. 실무에서 Spinnaker 적용기
6. 테스트 배포 시연
7. Code Deploy/Code Pipeline과 
Spinnaker 비교
8. Container 서비스와 Spinnaker (매우 짧게..)
9. Spinnaker 사용을 통해 느낀 장/단점
10. Q&A

Published in: Software
  • Login to see the comments

Spinnaker 파트 1

  1. 1. 
 Spinnaker (steven.hj.shim@gmail.com)
  2. 2. ( ...) 
 Spinnaker (steven.hj.shim@gmail.com)
  3. 3. 1. Spinnaker 2. 3. Spinnaker 4. Packer Spinnaker (Ansible ) 5. Spinnaker 6. 7. Code Deploy/Code Pipeline 
 Spinnaker 8. Container Spinnaker ( ..) 9. Spinnaker / 10. Q&A
  4. 4. 1. Spinnaker
  5. 5. Spinnaker • Multi-cloud Continuous Delivery • Netflix Opensource 
 (Apache 2.0)
  6. 6. Spinnaker 

  7. 7. Spinnaker Architecture Overview 10 Micro Services
  8. 8. Micro Service • Deck: Spinnker Console UI • Gate: API Gateway • Orca: Spinnaker Pipeline , Spinnaker • Clouddriver: Spinnaker Cloud Provider API • Front50: Application, Pipeline, Project • Rosco: Bakery (Packer ) • Igor: Jenkins CI • Fiat: • Halyard: Configuration
  9. 9. Multi-Cloud • AWS • Kubernetes • Google Cloud Platform (App Engine, Compute Engine) • Microsoft Azure • Openstack • DC/OS • Oracle Cloud
  10. 10. Continuous Delivery • Continuous Integration(CI) (Jenkins) • Machine Image (AMI) • Packer 
 Configuration Management(CM) • Canary / Red / Black • Pipeline
  11. 11. Pipeline • Pipeline Spinnaker • Pipeline
  12. 12. Pipeline • Pipeline Spinnaker • Pipeline
  13. 13. Server Group • Server Group Instance 
 (ex. AWS Auto Scaling Group) • Server Group (Scale-in/out) • Server Group Load Balancer Traffic • Server Group Rollback
  14. 14. Server Group Server Group
  15. 15. Cluster • Group of Server Group • Server Group • 1) Cluster 2 1 Server Group 
 2) Cluster 2 Public Cloud 1 Server Group 
 3) Cluster 3 Server Group(Dev/Stage/ Production )
  16. 16. Cluster
  17. 17. 2. Deploy
  18. 18. Deploy • Inplace • All at once • Rolling Update • Replace • Canary • Red / Black
  19. 19. V1 LB User Traffic V2 V1 Server Group V1 Deploy - All at once V2V2
  20. 20. V1 LB User Traffic V2 V1 Server Group V1 Deploy - All at once V2 V2
  21. 21. V1 LB User Traffic V2 V1 Server Group V1 Deploy - Rolling Update V2V2
  22. 22. V1 LB User Traffic V2 V1 Server Group V1 Deploy - Rolling Update V2 V2
  23. 23. V1 LB User Traffic V1 Server Group V1 Deploy - Canary V3V3V3V2
  24. 24. V1 LB User Traffic V1 Server Group V1 Deploy - Canary V3V3V3 V2
  25. 25. V1 LB User Traffic V1 Server Group V1 Deploy - Canary V3V3V3
  26. 26. V1 LB User Traffic V1 Server Group V1 Deploy - Canary V3V3 V3
  27. 27. V1 LB User Traffic V1 Server Group V1 Deploy - Red / Black V3 V3V3
  28. 28. V1 LB User Traffic V1 Server Group V1 Deploy - Red / Black V3 V3 V3
  29. 29. LB User Traffic Server Group Deploy - Red / Black V3 V3 V3
  30. 30. Spinnaker • Spinnaker • Spinnaker Machine Image 
 Canary, Red/Black • Red/Black Public Cloud •
  31. 31. Red/Black • EC2 Maintenance • EC2 Maintenance
  32. 32. 3. Spinnaker 
 
 (Pipeline )
  33. 33. Pipeline • Pipeline Stage 
 (Bake Stage, Destroy Server Group Stage, Jenkins Stage, etc) • Stage • Stage ,
  34. 34. Pipeline ( ) Jenkin 1. Jenkins 2. Source 3. Build / Packaging 4. Save to Storage V2
  35. 35. Pipeline ( ) Jenkin 1. Jenkins 2. Source 3. Build / Packaging 4. Save to Storage V2
  36. 36. Pipeline ( ) Bake V2 Jenkin
  37. 37. Pipeline ( ) Bake V2 1. Rosco Packer Jenkin
  38. 38. Pipeline ( ) Bake V2 1. Rosco Packer Jenkin 2. EC2 EC2
  39. 39. Pipeline ( ) Bake V2 1. Rosco Packer Jenkin 3. CM 2. EC2 EC2
  40. 40. Pipeline ( ) Bake V2 1. Rosco Packer Jenkin 3. CM 3-1. Binary 
 (CM ) 2. EC2 EC2
  41. 41. Pipeline ( ) Bake V2 1. Rosco Packer Jenkin 3. CM 3-1. Binary 
 (CM ) 2. EC2 EC2 4. AMI
  42. 42. Pipeline ( ) Bake V2 1. Rosco Packer Jenkin 3. CM 3-1. Binary 
 (CM ) 2. EC2 4. AMI 5. EC2 Terminate
  43. 43. Pipeline ( ) Bake V2 1. Rosco Packer Jenkin 3. CM 3-1. Binary 
 (CM ) 2. EC2 4. AMI 5. EC2 Terminate
  44. 44. Pipeline ( ) BakeJenkin Deploy
 Canary V1 V2 V1 V1 ASG-v1 ASG-v2 V2 ELB 1. ASG AMI EC2
  45. 45. Pipeline ( ) BakeJenkin Deploy
 Canary V1 V2 V1 V1 ASG-v1 ASG-v2 V2 ELB 1. ASG AMI EC2
  46. 46. Pipeline ( ) BakeJenkin Deploy
 Canary V1 V2 V1 V1 ASG-v1 ASG-v2 V2 ELB 1. ASG AMI EC2
  47. 47. Pipeline ( ) BakeJenkin Deploy
 Canary Manual
 Judgement Resize
 ServerGroup V1 V1 V1 ASG-v1 ASG-v2 V2 ELB V2 V2 1. 
 2. ASG 
 ASG
  48. 48. Pipeline ( ) BakeJenkin Deploy
 Canary Manual
 Judgement Resize
 ServerGroup V1 V1 V1 ASG-v1 ASG-v2 V2 ELB V2 V2 1. 
 2. ASG 
 ASG
  49. 49. Pipeline ( ) BakeJenkin Deploy
 Canary Manual
 Judgement Resize
 ServerGroup V1 V1 V1 ASG-v1 ASG-v2 V2 ELB V2 V2 Disable
 ServerGroup ELB
  50. 50. Pipeline ( ) BakeJenkin Deploy
 Canary Manual
 Judgement Resize
 ServerGroup V1 V1 V1 ASG-v1 ASG-v2 V2 ELB V2 V2 Disable
 ServerGroup Wait
 N Hours Destroy
 ServerGroup , Server Group
  51. 51. Pipeline ( ) BakeJenkin Deploy
 Canary Manual
 Judgement Resize
 ServerGroup ASG-v1 ASG-v2 V2 ELB V2 V2 Disable
 ServerGroup Wait
 N Hours Resize Server Group Server Group Instance 0
  52. 52. 4. Packer Spinnaker
  53. 53. AMI .. • AMI -> AMI EC2 • EC2 -> EC2 / 
 (VPC, Security Group, ENI/EIP, AMI, EBS, Instance Type, 
 Key Pair, etc…)
  54. 54. Spinnaker Packer ? • (VPC, Security Group, Key Pair, etc) • Builder • VPC • Instance Type • AMI • EBS • EIP • Tag Tagging •
  55. 55. Spinnaker Packer ? • Provisioner • CM Tool (Ansible, Chef, Puppet, Shell, etc) • Guest OS • EC2 AMI
  56. 56. Bake Packer Bake V2 1. Rosco Packer Jenkin 3. CM 3-1. Binary 
 (CM ) 2. EC2 EC2 4. AMI 5. EC2 Terminate
  57. 57. Packer
  58. 58. Packer {{user `parameter_key`}}

  59. 59. Spinnaker Packer Parameter • Packer Parameter Key/Value 
 Spinnaker Bake , Extended Attributes
  60. 60. Packer Ansible Playbook Spinnaker Packer Parameter 
 Ansible
  61. 61. Ansible • OS Ansible • YAML • Agentless (SSH )
  62. 62. Ansible • Ansible Playbook Play role • Role Task Templete / handler • Task Ansible
  63. 63. Ansible Roles Playbooks Playbook Role Tomcat Install 
 Playbook
  64. 64. Ansible Tomcat Install 
 Playbook Tomcat Install Role Tomcat Install Task Templete Java Install Role Java Install Task Templete Scouter Server 
 Install Playbook ScouterServer
 Install Role Scouter Install Task Templete Role Playbook
  65. 65. Ansible Task • file, template, unarchive, get_url, yum, apt-get • when clause / Handler /
  66. 66. 5. Spinnaker
  67. 67. 2016 ... • AWS Code . • Public Cloud ? • Spinnaker !!
  68. 68. 2016 ... • . • Spinnaker reference • Spinnaker Document • !! • ... .. ....
  69. 69. Spinnaker 1) 
 CentOS6.x ...
 CentOS ...
 Spinnaker Ubuntu )
 - Ubuntu ..
 - Ansible
  70. 70. Spinnaker 2) 
 Spinnaker ?
 .
 (Spinnaker ...) )
 - Okta SAML Login 
 - Okta
  71. 71. Spinnaker 3) 
 Spinnaker Stage 
 (Pipeline Hosts ,
 QA Static Contents , ...) )
 - Custom Stage / Script
  72. 72. Spinnaker 4) 
 Ops ?
 Spinnaker Ops .
 
 )
 - Dev Ops Communication Cost ...
 - …
 - Spinnaker 
 - Spinnaker Ops 
 - Spinnaker Dev (DevOps )
  73. 73. Spinnaker 5) 
 AMI Bake Zabbix . )
 - Zabbix Monitoring Hostname Naming Rule
  74. 74. Spinnaker 6) 
 . )
 - AMI .
 - AMI .
 - Pure CentOS -> -> -> 
 -
  75. 75. Spinnaker Pure CentOS AMI Pipeline Bake , LDAP , , 
 Ansible Script .
  76. 76. Spinnaker Pure CentOS 
 AMI 
 AMI ,
 OS , Agent 
 ( - ) Java , Tomcat , Apache 
 
 (ex. Backoffice OS) 
 AMI Binary AMI 
 3 Spinnaker
  77. 77. Spinnaker 6) 
 Rollback . Rollback .
 - Server Group Destroy 
 
 )
 - Server Server Group 
 -
  78. 78. Spinnaker Server Group Instance , Rollback 
 , Instance Running Server Group Instance .
  79. 79. Spinnaker Server Auto Scaling Group , Rollback .
 (ASG Group Resize -> Enable )
  80. 80. Spinnaker 7) 
 Spinnaker Learning Curve 
 * Script stage Script 
 * Pipeline Expression 
 * Document 
 
 )
 - … Slack(Spinnaker)
  81. 81. 6. Code Deploy
 /Code Pipeline Spinnaker
  82. 82. AWS Code Pipeline • Code Pipeline • Code Pipeline Stage Pipeline Stage Source Github, CodeCommit, S3 Build Jenkins, CodeBuild, Solano CI Test Jenkins, Apika Load Test, CodeBuild, BlazeMeter, Ghost Inspector UI Test, Runscope Deploy ECS, CloudFormation, CodeDeploy, Elastic Beanstalk Invoke AWS Lambda Approval AWS SNS
  83. 83. Code Pipeline vs Spinnaker
 (Code Pipeline ) Code Pipeline Stage Spinnaker Stage Source Source Pipeline ( ) Pipeline Automated Trigger Build Jenkins, CodeBuild, 
 Solano CI Jenkins 
 
 Script Stage / Custom Stage Test Test Script Stage / Webhook Stage Deploy CloudFormation, 
 CodeDeploy, 
 Elastic Beanstalk, ECS Multicloud VM 
 (Google App Engine PaaS,
 Kubernetes ) Invoke AWS Lambda Script Stage / Webhook Stage Approval AWS SNS Spinnaker Console * Script Stage Jenkins
  84. 84. Code Pipeline vs Spinnaker
 (Spinnaker ) Spinnaker AWS CodePipeline Stage 22 Stage 
 Custom Stage 
 ( : writing a new stage site:spinnaker.io) 6 Stage Stage Custom Action 
 ( : Create and Add a Custom Action in AWS CodePipeline) Deploy - Server Group 
 - Machine Image - Code Deploy 
 - Cloud Formation 
 Pipeline/ Stage Pipeline 
 Lambda Multi Cloud Instance AWS
  85. 85. AWS Code Pipeline Stage • Pipeline Spinnaker Stage • Stage , • Stage
  86. 86. AWS Code Pipeline Stage • Pipeline Spinnaker Stage • Stage , • Stage
  87. 87. Spinnaker Pipeline Stage • Stage • ,
  88. 88. Source Source SVC 
 SVC Trigger SVC Trigger Trigger 
 SVC Build (Jenkins) Code Pipeline: Source Stage Spinnaker: Pipeline Configuration
  89. 89. Build Code Pipeline: Build Stage Spinnaker: Jenkins Stage CodeBuld / Jenkins / CI Jenkins 
 Jenkins CI Script Stage 
 or Custom Stage
  90. 90. Deploy (1) Code Deploy: Application Spinnaker: Deploy Stage Code Deploy 
 In-place , Blue/Green Deploy Stage Server Group
  91. 91. Deploy (2) Code Deploy: Agent Spinnaker: Bake Stage Code Deploy Agent 
 Guest OS Custom Script Bake Packer(Provisioner) 
 Custom Script -> AMI
  92. 92. Invoke Code Pipeline: Invoke Stage Spinnaker: Script Stage Lambda Deploy Stage Server Group
  93. 93. 7. Spinnaker 

  94. 94. • Spinnaker Sample . • https://www.spinnaker.io/guides/tutorials/videos/#welcome-to- spinnaker-feature-overview-2m-46s
  95. 95. 8. Container Service 
 Spinnaker ( ..)
  96. 96. Container Service Spinnaker • Spinnaker Multi Cloud Container Multi Environment Deployment Tool • VM Spinnaker Machine Image 
 VM • Container/Orchestration Infra 
 Container • Spinnaker Container/Orchestration Service 
 (Docker v2 Registry, Kubenetes, DC/OS)
  97. 97. 9. Spinnaker 
 /
  98. 98. Spinnaker / • • 
 UI Visualization • 
 Packer / CM Tool / CI Tool Continuous Delivery • 
 Multi Cloud VM Spinnaker • Deploy & Rollback
  99. 99. Spinnaker / • • 
 ( hal command line tool ) • Learning Curve 
 Packer / CM Tool / CI Tool / Public Cloud • 
 (Spinnaker r4.xlarge ...)
  100. 100. Q & A
  101. 101. Thank you
  102. 102. • Pivotal Spinnaker 
 https://www.youtube.com/watch?v=zdE0c5-DJlc • Spinnaker Custom Stage 
 https://blog.spinnaker.io/custom-spinnaker-stages-with-preconfigured- webhooks-84c5b5dae861 • Spinnaker 
 https://www.spinnaker.io/reference/architecture/ • Packer https://www.packer.io/ • Spinnaker 
 https://blog.spinnaker.io/exposing-spinnaker-to-end-users-4808bc936698 • Armory - Spinnaker 
 http://www.armory.io/ • Google Cloud Platform Blog 
 https://cloudplatform.googleblog.com/2017/02/guest-post-multi-cloud-continuous-delivery- using-Spinnaker-at-Waze.html

×