8. Samsung SmartThings Cloud
• IoT home solution turning your home into a smart home
• Control a number of sensors and home appliances remotely
• Easy automation experiences
• Control with intelligent voice assistant
• Sharing controls with users
• Connect more with Developer Workspace
for developers and manufacturers
9. • Around 100 microservices are running
and thousands of instances are deployed in US, EU, Asia and China
• Adopt OCF (Open Connectivity Foundation, https://openconnectivity.orgs)tandards as
connectivity protocol for home appliances
• SmartThings Hub technology for Zigbee and Zwave compatible devices
• Compatible with 128+ sensors
Samsung SmartThings Cloud
12. IoT-connected
devices
Event pipelin
e
EC2
S3
IoT mobile client Microservice
Microservice
Microservice
ELB/NLB
DynamoDB and
Amazon Aurora KMS
CloudHSM
Lambda/
API GW
Third-party clo
ud
Admin
Amazon Clou
dWatch
Scale-in/out
policy
…..
Microservice
Connect servi
ces
Hub
NLB
Overall Infrastructure
13. MSA Deployment Model on AWS
• Tried to use container technology since the beginning
• Challenges of using containers
Docker Amazon ECS
• It requires a big upfront work to
integrate gracefully Docker
container with existing
build/deployment process
(Gradle/Maven)
• Container orchestrating system—
Kubernetes, Docker Swarm, and
MeSOS—is required for a large
system
• Found the stray signal issue in
initial days of Docker Swarm
• Verify whether your company’s
security audit can embrace a
container solution
• ECS was not available globally
when we started (unavailable in
AP and CN regions)
• Single build and deployment
pipeline that covers all regions
was required
Container orchestrator
EC2 Instance
Container
Service
Container
Service
EC2 instance
Container
Service
Container
Service
è Single service per instance model
14. • Machine image–based deployment
Immutable Infrastructure
App
App Server
Runtime
Library
OS
App
App Server
Runtime
Library
OS
AWS Base
Image Launch
Running Instances
Config/Install
by Ansible
Custom
Image
(Staging/test/
prod)
Build by Jenkins
Install by Ansible
Baked by Packe
r
15. Machine Image–Based Deployment
---
---
---
---
---
---
---
---
App code v3.0
Image build scripts
Infrastructure scripts
Configurations
---
---
---
---
---
---
Code repository
(GitHub/Ansible/Terraform folders)
CI build
Artifact (Jar)
Repository
AMI Repository
EU AWS
VPC
Subnet/ASG
App v3.0/Configuration
App v3.0/Configuration
CD
US AWS
AP AWS
17. • Leveraging lightweight isolation without virtualization
è Fast deployment & isolating security issue within the container
• Solving common problems like installing, removing, upgrading, distributing,
trusting, and managing software
• Complicates dependency issue
è Less dependencies than VM and quicker to create new instances
• Higher portability
MSA with ECS in the Future
18. Container Deployment Pipeline
Build microservice
Build container image
with Dockerfile
Push into ECR
Deploy creating task/s
ervice
with new image
T1 T2 T3 T4 T5 T6
old old old old old old
old old old pendin
g
pendin
g
pendin
g
old old old new new new
pendin
g
pendin
g
pendin
g
new new new
new new new new new new
Code commit
e.g. Min = 50%, Max=100% (in place)
Unit and smoke testing
[Optional]
Use min/max healthy p
ercentage
Integration/acceptance
testing
19. IoT-connected
devices
Event pipelin
e
S3
IoT mobile client
ELB/NLB
DynamoDB & A
mazon Aurora
Manufacturers
Developers
KMS
CloudHSM
Lambda/
API GW
Third-party clo
ud
AdminMicroservice
Microservice
Service
Discovery
Hub
NLB
Future MSA for Enterprise
Containerized
Microservice
Scheduler
20. E L A S T I C C O N T A I N E R S E R V I C E F O R K U B E R N E T E S
(EKS)
NEW!
21. 63%Kubernetes 워크로드는
AWS 에서 운영
—CNCF Survey
https://www.cncf.io/blog/2017/06/28/survey-shows-kubernetes-leading-orchestration-platform/
22. 1 . 바 이 너 리 다 운 로 드 및 설 치 : k o p s , A W S C L I t o o l s , k u b e c t l
2 . I A M 유 저 생 성 “ k o p s ”
3 . “ k o p s ” 유 저 의 관 련 서 비 스 권 한 설 정 ( E C 2 , R o u t e 5 3 , S 3 , I A M , V P C 등 )
4 . A W S 클 라 이 언 트 I A M 유 저 “ k o p s ” 설 정
5 . D N S 를 구 성 하 거 나 , g o s s i p 기 반 클 러 스 터 를 배 포 :
• R o u t e 5 3 을 이 용 하 여 서 브 도 메 인 호 스 팅 가 능
6 . 클 러 스 터 설 정 저 장 을 위 한 S 3 버 킷 설 정 : “ d n i s h i - k o p s - s t o r e ”
7 . “ k o p s 환 경 변 수 ” 설 정
8 . 클 러 스 터 생 성 : ” k o p s c r e a t e c l u s t e r ” 와 “ k o p s v a l i d a t e c l u s t e r ”
35. • 새로운 CNI 플러그인
• K8s 와 VPC 네트워크 통합
• AWS 라우팅 가능한 IP 주소
EKS 네트워크 플러그인
36. • K8s 네트워크 브릿지 구성 – Amazon VPC
• Thin 레이어 – 성능 저하 없음
• Pod IP == ENI 보조 IP
VPC CNI 플러그인
37. CNI 플러그인 과
네이티브 VPC 연동
Pods 는 VPC에서와 같이
Pods 내부에
동일한 VPC 주소를 사용
간편하고 안전한
네트워크 구성
Github 에 공개된 오픈소스
…{ }
38. Nginx Pod
Rails Pod
ENI
Secondary IPs:
10.0.0.1
10.0.0.2
Veth IP: 10.0.0.1
Veth IP: 10.0.0.2
Nginx Pod
Rails Pod
ENI
Veth IP: 10.0.0.20
Veth IP: 10.0.0.22
Secondary IPs:
10.0.0.20
10.0.0.22
ec2.associateaddress()
VPC Subnet – 10.0.0.0/24
Instance 1 Instance 2
40. 네트워크 룰을 이용하여 쿠
버네티스 네트워크의 정책
을 설정
Calico 에서 네트워크 정책
설정 API 를 제공
수백명의 오픈소스 개발자
및 컨트리뷰터의 공동 개발
Tigera 를 통한 유료 기술지
원 서비스 제공
41. 스 테 이 지
분 리
계 정 및 그 룹 등
권 한 에 따 른
네 트 워 크 격 리
세 부 적 인
방 화 벽 옵 션
규 정 준 수
네트워크 정책 등을 이용하여
계정 및 그룹 등의
권한에 따른 네트워크 격리 설정
마이크로 서비스 기반의
어플리케이션의 해킹 시도에 노출 되
지 않도록 보호
개발, 테스트, 운영등 목적에 따른
네트워크를 격리하여 관리
PCI, HIPAA 등
네트워크 보안 등에
관련된 법규 준수
55. 체크포인트
• K8s 를 EC2 에서도 KOPS 를 이용하여 간편하게 설치
• EKS 는 오픈소스 업스트림을 그대로 사용함
• EKS 는 관리형 서비스로 웹콘솔에서 단일 엔드포인트로 관리
• K8s 의 다양한 Add-on 을 이용한 추가 기능도 제공됨
• CNI 나 Tigera 같은 다양한 네트워크 옵션 사용가능
• Fargate 는 EC2 관리가 필요없는 ECS 클러스터 옵션
• EKS 로드맵에는 Fargate 를 클러스터 옵션으로 추가할 예정
56. 본 강연이 끝난 후…
1. Kops 를 이용한 K8s 설치
• https://goo.gl/MfcDY4
• https://goo.gl/5hmNDh
2. EKS 프리뷰 신청 - https://aws.amazon.com/ko/eks/
3. Virginia 에서 Fargate 활용해 보기
4. Introducing Amazon EKS (CON215) -
https://youtu.be/WHTejF3W0s4
5. AWS re:Invent 2017: Deep Dive into Amazon EKS
(CON409) - https://youtu.be/vrYLrx-a_Wg