[openstack days korea 2016] track1 - 카카오는 오픈스택 기반으로 어떻게 5000vm을...

39
“ 카카오는 오픈스택 기반으로 5000VM을 어떻게 운영하고 있을까? ” 하 현 (Raymon.ha) [email protected]

Upload: openstack-korea-community

Post on 07-Jan-2017

24.836 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

“ 카카오는 오픈스택 기반으로5000VM을 어떻게 운영하고 있을까? ”

하 현 (Raymon.ha)[email protected]

Page 2: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

하 현 ( Raymon.ha )

클라우드 엔지니어2012년 1월부터 현재까지 약 4년 간 오픈스택 기반 클라우드플랫폼 개발 및 운영틈틈이, OpenStack Bug report, Fix, Blueprint Contribution 활동

前) LG CNS 클라우드플랫폼팀

- Swift 기반 오브젝트 스토리지 서비스 구축- 오픈스택 기반 Private/Public Cloud 개발/운영

現) 카카오 클라우드컴퓨팅셀(Cloud Computing Cell) 소속

- Cinder backend Storage CEPH 구축 및 운영- 오픈스택 기반 Private Cloud 개발/운영- 가장 최근에는 Juno 버전을 Kilo버전으로 업그레이드 진행중

발표자 소개

Page 3: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

1. Intro

Page 4: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Requirements

개발자曰: 원래 이런건 다 되는거 아닌가요?

- 빠른 개발 주기, Time to market이 중요함

- 많은 서비스 런칭

- 개발자가 원할때 빠르게 서버 제공

- 인프라의 이슈로 개발이 늦어져서는 안됨

- 서버나 네트워크는 잘 모르겠다. 알아서 해주면 좋겠다.

출처) kakaocorp.com 서비스 등록 기준

Page 5: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Kakao Private Cloud

Legacy Operation vs Cloud Operation

How to Develop + Operation with OpenStack

DevOps Style Management

이런 이야기를 하려고 합니다

Page 6: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

2. Current Status

Page 7: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Current Usage

(2015년 12월 기준)

Created : 약 2900 VMDeleted : 약 2000 VMRunning : 약 900 VM

평균 매 8분마다 1개 VM 이 생성되거나 삭제됨

Compute Node: 약 700대

VM : 약 5000대

Ceph : 약 200TB

출처) 카카오 infra portal

Keystone tenants : 약 1000개Keystone users : 약 1300 명

Page 8: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

사용량 예측

현재 추세대로라면,

2016년 말 VM 수 약 1만대 규모로 증가* 3개월 단위로 물리머신 100대 신규 증설

Page 9: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

OpenStack Global Survey

출처) Openstack Survey, 2015 (https://www.openstack.org/assets/survey/Public-User-Survey-Report.pdf)

How many physical compute nodes to OpenStack clouds have?

How many instances in an OpenStack deployment?

10,000 to 99,9997%

Page 10: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

3. Overview of Kakao Private Cloud

Page 11: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Kakao Private Cloud

오픈스택 기반의 카카오 Private Cloud

Krane : Crane [krein] : 명사 [기계] 기중기, 크레인 (Kakao + Crane)

Spec :OS: ubuntu 14.04OpenStack version: stable/juno (2014.2.4)Hypervisor: only KVMProject: nova, glance, cinder, neutron, keystone, horizon, trove, heat

Page 12: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

OpenStack Upgrade History

Folsom2012. 11

Grizzly2013. 4

Havana2013. 10

Icehouse2014. 4

Juno2014. 10

Kilo2015. 4

Liberty2015. 10

Icehouse2014. 5

Ubuntu 14.042014. 11

Juno2015. 4

Kilo2016. 2 (진행중)

Havana2014. 1

Grizzly2013. 8

(… Test Lab)

Page 13: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

KaKao Krane – Openstack 아키텍처

Global Controller - shared

Region : busan_v1

horizon keystone

Swift-API

nova

nova-compute

Compute Node

nova-compute

Compute Node

nova-compute

Compute Node

Load Balancer

Ceph Ceph

Kage

neutron-agents neutron-agents neutron-agents

rabbitmqDB

rabbitmq

Region : seoul_v1

rabbitmq

Region : seoul_v2

rabbitmq

Load Balancer Load BalancerLoad Balancer

glance

cinder DB DBDB

Inhouse-sso

사내 DNS

neutron

heat

trove

nova

glance

neutron

heat

trove

nova

glance

cinder

neutron

heat

trove

Page 14: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Global Controller - shared

Region : busan_v1

horizon keystone

Swift-API

nova

nova-compute

Compute Node

nova-compute

Compute Node

nova-compute

Compute Node

Load Balancer

Ceph Ceph

Kage

neutron-agents neutron-agents neutron-agents

rabbitmqDB

rabbitmq

Region : seoul_v1

rabbitmq

Region : seoul_v2

rabbitmq

Load Balancer Load BalancerLoad Balancer

glance

cinder DB DBDB

Inhouse-sso

사내 DNS

neutron

heat

trove

nova

glance

neutron

heat

trove

nova

glance

cinder

neutron

heat

trove

KaKao Krane – Openstack 아키텍처

Page 15: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Global Controller - shared

Region : busan_v1

horizon keystone

Swift-API

nova

nova-compute

Compute Node

nova-compute

Compute Node

nova-compute

Compute Node

Load Balancer

Ceph Ceph

Kage

neutron-agents neutron-agents neutron-agents

rabbitmqDB

rabbitmq

Region : seoul_v1

rabbitmq

Region : seoul_v2

rabbitmq

Load Balancer Load BalancerLoad Balancer

glance

cinder DB DBDB

Inhouse-sso

사내 DNS

neutron

heat

trove

nova

glance

neutron

heat

trove

nova

glance

cinder

neutron

heat

trove

KaKao Krane – Openstack 아키텍처

Page 16: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Global Controller - shared

Region : busan_v1

horizon keystone

Swift-API

nova

nova-compute

Compute Node

nova-compute

Compute Node

nova-compute

Compute Node

Load Balancer

Ceph Ceph

Kage

neutron-agents neutron-agents neutron-agents

rabbitmqDB

rabbitmq

Region : seoul_v1

rabbitmq

Region : seoul_v2

rabbitmq

Load Balancer Load BalancerLoad Balancer

glance

cinder DB DBDB

Inhouse-sso

사내 DNS

neutron

heat

trove

nova

glance

neutron

heat

trove

nova

glance

cinder

neutron

heat

trove

KaKao Krane – Openstack 아키텍처

Page 17: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Global Controller - shared

Region : busan_v1

horizon keystone

Swift-API

nova

nova-compute

Compute Node

nova-compute

Compute Node

nova-compute

Compute Node

Load Balancer

Ceph Ceph

Kage

neutron-agents neutron-agents neutron-agents

rabbitmqDB

rabbitmq

Region : seoul_v1

rabbitmq

Region : seoul_v2

rabbitmq

Load Balancer Load BalancerLoad Balancer

glance

cinder DB DBDB

Inhouse-sso

사내 DNS

neutron

heat

trove

nova

glance

neutron

heat

trove

nova

glance

cinder

neutron

heat

trove

KaKao Krane – Openstack 아키텍처

Page 18: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

“2명”

카카오 클라우드컴퓨팅셀 헬게이트 오픈스택 운영 인원

raymon.haal.l

Page 19: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

포기할 순…

Page 20: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

“ Automation “= reduce operation cost

Page 21: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

But, as you know, OpenStack Automation is “Really hard work”

https://www.openstack.org/summit/tokyo-2015/videos/presentation/ntt-communications-automate-deployment-and-benchmark-for-your-openstack-with-chef-cobbler-and-rally (1분 30초)

*100

Page 22: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Why?

Complex system of many components and OSS

OpenStack is fast moving

테스트 환경 vs 서비스 환경

하드웨어 자동화

레거시 시스템

OpenStack is one of the system within IDC

Page 23: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

4. Develop & Operation

Page 24: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

User/Project

Inhouse sso plugin 모듈 개발- 카카오 사내 인증 시스템 사용자 인증을 거쳐 자동으로 OpenStack keystone user 생성

프로젝트는 개별 사용자가 직접 생성- 신규 생성 및 기존 프로젝트 참여

[identity]driver = kakao.openstack.keystone.inhouse_sso_auth.Identity

auto_create_user = truedefault_project = demomember_role = Memberemail_postfix = @kakaocorp.comsystem_users = admin,nova,quantum,neutron,cinder,glance,

heat,ceilometer,swift,docker-registry,heat_domain_admin,sahara

keystone.conf

Page 25: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Domk

OpenStack 내에서 생성된 VM의 hostname을 사내 DNS 서비스에 도메인 네임 등록하도록 자동화오픈스택의 Designate 프로젝트와 유사한 기능 구현

Page 26: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

운영 tool

http://stacktach.9rum.cc/

OpenStack Error Alert

RabbitMQ queue count 모니터링

Notification 모니터링

VM 생성 갯수 모니터링

자원 여유량 모니터링

Page 27: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Pool

Compute node 를 Resource Pool 로 관리

Production Pool

발주

투입

Compute nodes

Standby

Physical host

HW 검수OS 셋팅

Openstack 설치Service

Compute nodes

L 기준으로 node 증설Pool 부족 시, 신규 발주

Page 28: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Continuous Integration/

Continuous Deployment

그 시작은,

Kfield

(started by andrew.kong)

Page 29: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

5. Kfield

Page 30: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

What is Kfield?

OpenStack Build, Test, Deploy 자동화

개발자 개별 개발 환경 배포에 사용

Production 배포에 사용

Chef cookbooks + ansible playbooks

내부 OpenStack mirrored repo를 통해 OpenStack code 배포

Page 31: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Kfield details

kvm

Libvirt

LB DB/MQ compute02 swiftVagrant up

GitHub

Openstack mirror repo

Dev#1, individual test node

Kfield

git clone

/home/kfieldcompute02controller

copy

Page 32: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Kfield DemoRunning time: 약 6분

Page 33: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Develop Process

Kfield Your git repo

Github

1. fork

Your local dev

2. Git clone

Kfield/master Your/master

Your/master

3. branch feature/CCC-001

Your/feature/CCC-001

Your/feature/CCC-001

4. Develop any featureRun unit test

5. Git commit

jenkins

Fail?

Succes?

Github

Code Review

7. Pull Request

Good?

Bad?

Request Fix

6. BuildTest

8. Merge

Page 34: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

CI/CD pipline develop to production

Staging ProductionDevelop

Build

Chef-server

Web hook

Commit DeployUpload

Deploy

OpenStack mirror repo

Version Control

Kfield

Run Test

Slave

Clone

Page 35: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

5. 앞으로는 . . .

Page 36: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

우리의 Cloud는?

VM, Network 와 같은 구현물(implementation)에 최우선을 둠

OpenStack 서비스에 문제가 있어도 VM, Network와 같은구현물에는 영향을 끼치면 안됨

API 기반 (= programmable)

인스턴스는 휘발성

절대 죽지않는 시스템?시스템이 죽더라도 서비스가 유지되는 아키텍처

Reduce process, remove complexity

Page 37: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Self-Service Concept

출처) Charlie.choe, CCC

Monitoring/Alerting/Logging System

Monitoring/Alerting/Logging System

CMDB

Page 38: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

“졸라리헤엄치고있어. 산다는게그런거다. 장난 아냐 임마 ”

"백조가아주 물위에선폼나고우아하게 떠있지. 근데 너 물속은 어떤지알아?”

(영화 넘버3. 한석규 대사)

Page 39: [OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?

Q & A