삼성오픈소스컨퍼런스 오픈소스와devops(aws, gcp, azure, kubernetes, ecs, dc/os, cloud...

39
SOSCON 2018 SAMSUNG OPEN SOURCE CONFERENCE 2018 Cloud 환경기반 서비스의 효율적이고 안정적인 운영을 위한 DevOps 사례 소개 삼성 오픈소스 컨퍼런스 오픈소스DevOps 무선부 | Cloud운영그룹 | 김영욱 18/10/2018

Upload: others

Post on 26-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018SAMSUNG OPEN SOURCE CONFERENCE 2018

Cloud 환경기반 서비스의 효율적이고 안정적인 운영을 위한 DevOps 사례 소개

삼성오픈소스컨퍼런스오픈소스와 DevOps

무선사업부 | Cloud운영그룹 | 김영욱

18/10/2018

Page 2: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018SAMSUNG OPEN SOURCE CONFERENCE 2018

발표자 소개

DevOps 소개

Infrastructure as Code

Immutable Server

Continuous Delivery

01

02

03

04

05

오픈소스와 DevOps

Page 3: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

DevOps, Bixby

TechOps, SmartThings

Architect, MILK Music

Page 4: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 5: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Alerts/Alarm

Get notification from monitor system

Run Book

Check

Check status of application/system

Restart service

If service is unhealthy, try to restart service Create a incident ticket to JIRA

Reboot instance

If service is still going unhealthy after restart, try to make snapshot for inspection

And reboot instance

Terminate instance

Finally, terminate instance to bring new one automatically

Communication

Channel Notification Alert Ticket

Page 6: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Alerts/Alarm

Get notification from monitor system

Run Book

Check

Check status of application/system

Restart service

If service is unhealthy, try to restart service Create a incident ticket to JIRA

Reboot instance

If service is still going unhealthy after restart, try to make snapshot for inspection

And reboot instance

Terminate instance

Finally, terminate instance to bring new one automatically

Communication

Channel Notification Alert Ticket

어떻게?

Page 7: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Immutable Server

Infrastructure as Code

Release Pipeline

Deployment Strategies

• Blue/green deployment

• Canary release

• Rolling update

Cluster Management

Page 8: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Automated Test

Monitor

Log Stream

Communication

Page 9: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018SAMSUNG OPEN SOURCE CONFERENCE 2018

Infrastructure (as) Code

Page 10: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Blueprint Your Infrastructure

Compute Application Storage Security Network Configuration Standards

Build Anything

Provision compute resources in the cloud

Infrastructure Application Stacks HPC

Linux, Windows, Unix

Manage It Simply

Automatically reconfigure everything

Re-provision for disaster recovery

Infrastructure as Code

Application Architecture

Source Code Build Test Release Source Code Configuration Test Deploy

Page 11: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Source: https://www.slideshare.net/OCTOTechnology/introduction-to-devops-28779951

Infrastructure as Code, Why?

Page 12: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

{ 코딩하자 }

Page 13: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

ProvisionedArchitecture

Desired Architecture

TerraformCode

Terraform Plan/Apply

Infrastructure as Code

Version control & Code review

Simulation

Security as Code

One click Disaster Recovery

Page 14: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

└── terraform├── iam│ └── samsung_stg_cn│ ├── app_uimetadata.tf│ ├── bastion.tf│ ├── iam.tf│ ├── nat.tf│ ├── terraform.tfstate│ ├── terraform.tfvars│ └── variables.tf├── s3│ └── preprod_china_cnnorth1│ ├── buckets.tf│ ├── README.txt│ ├── s3.tf│ ├── terraform.tfstate│ ├── terraform.tfvars│ ├── uimetadata.tf│ └── variables.tf├── shard│ └── cn01s_cnnorth1│ ├── apps_rds.tf│ ├── terraform.tfstate│ ├── terraform.tfvars│ ├── uimetadata.tf│ └── variables.tf└── vpc

└── cn01s_cnnorth1├── bastion.tf├── nat.tf├── outputs.tf├── sns.tf├── terraform.tfstate├── terraform.tfvars├── variables.tf└── vpc.tf

Page 15: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Spinnaker

Jenkins

VPC

Terraform codes

Your Infrastructure

Terraform Module Registry

WebServer

ApplicationServer

DatabaseServer

seoulAWS

WebServer

ApplicationServer

DatabaseServer

ohioAWS

WebServer

ApplicationServer

DatabaseServer

singaporeAWS

WebServer

ApplicationServer

DatabaseServer

irelandAWS

Infrastructure BuildingBlocks

Page 16: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 17: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018SAMSUNG OPEN SOURCE CONFERENCE 2018

Immutable Server

Artifact

Machine

Infrastructure

Page 18: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018Immutable Infrastructure

We can replace them with new image in an incident.We don’t need to touch the running server to fix problem.

Page 19: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Source: http://www.oreilly.com/webops-perf/free/immutable-infrastructure.csp

Page 20: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 21: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

JRE

Linux

Your Code

Spring

Log4j

Base AMI

Application AMIs

Packer Template Packer Template

Ansible Roles

Base Base

Ansible Roles

Ready to Deploy

How to Build/Bake Immutable Images

Page 22: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 23: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 24: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018SAMSUNG OPEN SOURCE CONFERENCE 2018

Continuous Delivery

Page 25: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Production-ready software

Fast, automated feedback onthe production readiness ofyour applications every timethere is a change – to code,infrastructure, or configuration

Page 26: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Continuous Delivery Pipeline

Page 27: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Continuous Delivery Pipeline

Page 28: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 29: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Let’s don’t manage the whole mess.

Just use the push button

Page 30: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 31: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 32: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 33: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 34: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Page 35: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Spinnaker Pipeline

Pipelines are the key deployment management construct in Spinnaker. They consist of a sequence of actions, known as stages.

Page 36: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018Spinnaker

Multi-Cloud Continuous Delivery platform for releasing software changes with high velocity and confidence.

Key features• Delivery Pipelines• Deployment Strategies• Cluster Management• Jenkins Integration• Supports Multi Cloud

(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry)

We have experience in utilizing and hosting Spinnaker about 2 years.

Page 37: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018Deployment Strategies (Immutable Infrastructure)

Page 38: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018

Subnet

Subnet

Subnet

Subnet

Subnet

Subnet

Subnet

Subnet

Subnet

Subnet

Subnet

Subnet

VPC

Multi Cloud

VMs

Containers

Serverless

Cloud

Page 39: 삼성오픈소스컨퍼런스 오픈소스와DevOps(AWS, GCP, Azure, Kubernetes, ECS, DC/OS, Cloud Foundry) We have experience in utilizing and hosting Spinnaker about 2 years. Deployment

SOSCON 2018SAMSUNG OPEN SOURCE CONFERENCE 2018

THANK YOU