devops를 위한 aws 서비스 및 개발도구 -김상필 솔루션아키텍트 :: aws 파트너...
TRANSCRIPT
©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
DevOps를위한AWS 서비스및도구소개
김상필 매니저
Enterprise Solutions ArchitectAmazon Web Services Korea
AWS Techshift
목차
• DevOps 및 CICD 개요
• 코드배포자동화
AWS CodeCommit
AWS CodePipeline
AWS CodeDeploy
• 인프라배포자동화
AWS Elastic Beanstalk
AWS OpsWorks
AWS CloudFormation
DevOps
(a clipped compound of "development" and "operations") is a
software development method that stresses
communication, collaboration, integration, automation,
and measurement of cooperation between software
developers and other information-technology (IT)
professionals.https://en.wikipedia.org/wiki/DevOps
DevOps
좀더정리해보면…
빠른 비즈니스환경변화에대응을위한 새로운철학, 문화적인변화, 패러다임의전환
개발팀과 IT 운영팀간더나은소통과협업을위한변화
더욱 향상된 S/W 개발방법
개발팀과 IT운영팀사이에장벽을허무는일
Agile S/W 개발과같은사상이인프라와 IT 운영에적용된것Code
거대한벽
개발팀 IT 운영
Continuous Integration
(CI) is a development practice that requires developers to integrate
code into a shared repository several times a day. Each check-in is
then verified by an automated build, allowing teams to detect
problems early. This process of frequent check-ins followed by
continuous automated build and acceptance testing significantly
reduces wasted effort associated to discovering, isolating and
correcting errors. In addition, it allows the business to quickly adopt
new features and rapidly course correct direction based on changing
business needs.
Version
ControlCI Server
Package
Builder
Commit to
Git/master
Dev
Get /
Pull
Code
Send Build Report to Dev
Stop everything if build failed
Distributed Builds
Run Tests in parallel
Code
Config
Tests
Push
Config
Repo
Continuous Integration
변경된코드가제대로 Build 될것이라는자신감
반복적인변경을통해더욱많고즉각적인피드백수용
S/W 버그에대한빠른탐지
자동화된테스트로전체테스트에대한노력감소
Continuous Integration 으로얻을수있는장점
Continuous Delivery
(CD) is the extension of CI where teams ensure that every change to
the system is releasable and production ready, and that we can
release any version at the push of a button. Continuous Delivery aims
to make releases boring, so we can deliver frequently and get fast
feedback on what end users care about.
http://www.thoughtworks.com/continuous-delivery
Continuous Delivery
Version
ControlCI Server
Package
Builder
Deploy
ServerCommit to
Git/master
Dev
Get /
Pull
Code
AMIs
Send Build Report to Dev
Stop everything if build failed
Distributed Builds
Run Tests in parallel
Staging Env
Test Env
Code
Config
Tests
Prod Env
Push
ConfigInstall
Create
Repo
CloudFormation
Templates for Env
Generate
변경사항을운영환경으로적용하는반복적이고자동화된
프로세스
서비스구축자동화를통해리스크관리및최적화
빌드프로세스중장애를빠르게탐지
A/B 테스트지원또는 “We test customer reactions to features in
production”
어플리케이션에대한폭넓은피드백수용
Continuous Delivery 로얻을수있는장점
SOURCE CODE
REPOSITORY
PROJECT MANAGEMENT
SERVER
CONTINUOUS
INTEGRATION SERVER
DEVELOPER
PICK
TASKS
SUBMIT
CODE
SCHEDULE
BUILD
RECURRENT
BUILDS
CODE
FETCHCODE QUALITY
TESTS
TEST
RESULTS
BUILD OUTPUT
DOCS
BINARIES
& PACKAGES
DEV FACING
NOTIFICATIONS
CLOUDFORMATION
AMIS or CONTAINERS
MonitorProvisionDeployTestBuildCode
Elastic Beanstalk
OpsWorks
Cloud
Watch
Cloud
Formation
Code
Deploy
Code
Commit
Code
Pipeline
서비스개발을편하게도와주는 AWS 코드서비스
AWS CodeCommit - AWS의코드리비전컨트롤서비스
AZ를통한데이터이중화
데이터암호화
AWS IAM과통합
무한확장 (Repo 크기제한없음)
Git 명령을지원하는기존도구와의호환
(Visual Studio, Jenkins, Asana, ZenDesk, Jira, Eclipse, etc.)
git push CodeCommit
Git objects
in Amazon S3
Git index
in Amazon
DynamoDB
Encryption key
in AWS KMS
SSH or HTTPS
Secure, scalable, and managed Git source control
AWS CodePipeline
• 개별설정가능한워크플로우엔진
• 파트너및개별시스템들과통합
• 비주얼에디터및상태확인
Build
1) Build
2) Unit test
1) Deploy
2) UI test
Source Beta Production
1) Deploy
2) Load test
Gamma
1) Deploy region1
2) Deploy region2
3) Deploy region3
Coordinate automated deployments, just like Amazon
AWS CodeDeploy
• 1개에서수천개의인스턴스까지확장
• 다운타임없이구성
• 중앙에서관리및모니터링되는 Deployment
Staging
CodeDeployv1, v2, v3
Production
Dev
Coordinate automated deployments, just like Amazon
Application
revisions
Deployment groups
AWS OpsWorks AWS CloudFormationAWS Elastic Beanstalk
DevOps framework for application lifecycle
management and automation
Templates to deploy & update infrastructure
as code
Automated resource management – web
apps made easy
DIY / On Demand
DIY, on demand resources: EC2, S3, custom AMI’s, etc.
배포및관리
Convenience Control
MonitorProvisionDeployTestBuildCode
Elastic Beanstalk
OpsWorks
Cloud
Watch
Cloud
Formation
Code
Deploy
Code
Commit
Code
Pipeline
인프라배포를편하게도와주는 AWS 관리서비스
AWS Elastic Beanstalk – 손쉬운웹어플리케이션배포
AWS Elastic
Beanstalk
• 어플리케이션레이어중심의 PaaS 서비스
• 확장성있는웹어플리케이션및서비스배포를
위한손쉬운서비스
• Java, .NET, PHP, Node.js, Python, Ruby, Go,
및 Docker
• Apache, Nginx, Passenger 및 IIS.
• 자동관리대상 :
• 부하분산, 상태모니터링
• 오토스케일링, RDS 와통합
• 어플리케이션플랫폼관리, 코드배포
AWS Elastic Beanstalk – 손쉬운웹어플리케이션배포
사용자의입력을기반으로 AWS 서비스를이용하여통합된플랫폼을생성
–웹서버환경예제
Ap
pE
LB
AZ
your-app.elasticbeanstalk.com
Alert
Log
Mon
AWS OpsWorks
• 어플리케이션인프라스터럭쳐관리
• Linux 및 Chef
• 주요구성요소 :
• 스택 (Stacks)
• 레이어 (Layers)
• 인스턴스 (Instances)
• 어플리케이션 (Apps)
AWS
OpsWorks
• Infrastructure as Code
• 버전컨트롤과통합
• JSON 포맷
• 템플릿 (Templates)
• 스택 (Stacks)
• 모든 AWS 자원타입을지원AWS
CloudFormation
AWS CloudFormation
AWS CloudFormation: 어플리케이션스택예제
CloudFront
Distribution
Amazon Route 53 Elastic Load Balancer
S3 BucketWeb ASG
Master
Standby
RR 1
RR 2
RR 3
RR 4
ElastiCache
Cluster
Web
Servers
Web Servers
Elastic Beanstalk
App
App
{
"Description" : "Create an EC2 instance running the Amazon Linux 32 bit AMI.”,
"Parameters" : {
"KeyPair" : {
"Description" : "The EC2 Key Pair to allow SSH access to the instance",
"Type" : "String"
}
},
"Resources" : {
"Ec2Instance" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"KeyName" : { "Ref" : "KeyPair" },
"ImageId" : "ami-75g0061f”,
“InstanceType” : “m1.medium”
}
}
},
"Outputs" : {
"InstanceId" : {
"Description" : "The InstanceId of the newly created EC2 instance",
"Value" : { "Ref" : "Ec2Instance” }
}
}
}
AWS CloudFormation: 어플리케이션스택예제