Upload
amazon-web-services-korea
View
398
Download
0
Embed Size (px)
Citation preview
AWS로스마트하게소프트웨어배포하기
김일호, 솔루션즈아키텍트, 한국아마존웹서비스
~11.6s
Mean time between deployments
(weekday)
~1,079
Max number of deployments in a
single hour
~10,000
Mean number of hosts simultaneously
receiving a deployment
~30,000
Max number of hosts simultaneously
receiving a deployment
DEPLOYMENTS AT AMAZON.COM
Monolithic
Service-Oriented architectureAgilityMicroservice
Better Communication~
Better productivity~
Effectiveness~
Decentralized~
Agility~
Ownership~
Microservice development lifecycle
developers delivery pipelinesservices
releasetestbuild
releasetestbuild
releasetestbuild
releasetestbuild
releasetestbuild
MonitorProvisionDeployTestBuildCode
Elastic Beanstalk
OpsWorks
Cloud
Watch
Cloud
Formation
Code
Deploy
Code
Commit
Code
Pipeline
CodeCommit
Source control in the cloud
Secure Fullymanaged
High availability
Storeanything
AWS CodeCommit
• Use standard Git tools
• Scalability, availability, and durability of Amazon S3
• Encryption at rest with customer-specific keys
• No repo size limit
git pull/push CodeCommit
Git objects inAmazon S3
Git index inAmazon DynamoDB
Encryption keyin AWS KMS
SSH or HTTPS
CodePipeline
AWS CodePipeline
Continuous delivery and release automation, just like Amazon
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 regoin3
AWS CodePipeline
• Continuous Delivery and Release Automation
• Design your own workflow• Source-Code Checking• Building• Testing• Deploying
• Integration with partners and custom plugins
• Configure gates between stages• Time based vs manual approvals
• Visual editor and status monitoring
CodePipeline example
https://blogs.aws.amazon.com/application-management/blog/tag/CodePipeline
CodePipeline example
https://blogs.aws.amazon.com/application-management/blog/tag/CodePipeline
CodeDeploy
CodeDeploy
• Scale from 1 instance to thousands
• Deploy without downtime
• Centralize deployment control and monitoring
Staging
CodeDeployv1, v2, v3
Production
Dev
Applicationrevisions
Deployment groups
Step 1: Package your application (with an AppSpec file)
version: 0.0
os: linux
files:
- source: chef/
destination: /etc/chef/codedeploy
- source: target/hello.war
destination: /var/lib/tomcat6/webapps
hooks:
ApplicationStop:
- location: deploy_hooks/stop-tomcat.sh
BeforeInstall:
- location: deploy_hooks/install-chef.sh
AfterInstall:
- location: deploy_hooks/librarian-install.sh
ApplicationStart:
- location: deploy_hooks/chef-solo.sh
ValidateService:
- location: deploy_hooks/verify_service.sh
Step 1: Package your application (with an AppSpec file)
version: 0.0
os: linux
files:
- source: chef/
destination: /etc/chef/codedeploy
- source: target/hello.war
destination: /var/lib/tomcat6/webapps
hooks:
ApplicationStop:
- location: deploy_hooks/stop-tomcat.sh
BeforeInstall:
- location: deploy_hooks/install-chef.sh
AfterInstall:
- location: deploy_hooks/librarian-install.sh
ApplicationStart:
- location: deploy_hooks/chef-solo.sh
ValidateService:
- location: deploy_hooks/verify_service.sh
Step 1: Package your application (with an AppSpec file)
version: 0.0
os: linux
files:
- source: chef/
destination: /etc/chef/codedeploy
- source: target/hello.war
destination: /var/lib/tomcat6/webapps
hooks:
ApplicationStop:
- location: deploy_hooks/stop-tomcat.sh
BeforeInstall:
- location: deploy_hooks/install-chef.sh
AfterInstall:
- location: deploy_hooks/librarian-install.sh
ApplicationStart:
- location: deploy_hooks/chef-solo.sh
ValidateService:
- location: deploy_hooks/verify_service.sh
Step 2: Set up your target environments
Agent Agent Agent
Staging
Agent Agent
Agent Agent
Agent
Agent
Production
Deployment groupDeployment group
Group instances by:
• Auto Scaling group
• Amazon EC2 tag
• On-premises tag
Step 3: Deploy
aws deploy create-deployment \
--application-name MyApp \
--deployment-group-name TargetGroup \
--s3-location bucket=MyBucket,key=MyApp.zip
AWS CLI & SDKsAWS ConsoleCI / CD PartnersGitHub
Deployment config – Choose speed
v2 v2 v2 v2 v2 v2 v2 v2All-at-onceMin. healthy hosts = 0
v2 v2 v2 v2 v1 v1 v1 v1Half-at-a-timeMin. healthy hosts = 50%
v2 v2 v1 v1 v1 v1 v1 v1[Custom]Min. healthy hosts = 75%
v2 v1 v1 v1 v1 v1 v1 v1One-at-a-timeMin. healthy hosts = 99%
Rolling update – Deploy without downtime
v1v1 v1
Load Balancer
Rolling update – Deploy without downtime
v1v2 v1
Load Balancer
Rolling update – Deploy without downtime
v2v2 v1
Load Balancer
Rolling update – Deploy without downtime
v2v2v2
Load Balancer
Rolling update – Deploy without downtime
v2v2 v2
Load Balancer
Health tracking – Catch deployment problems
v2v2 v2
Load Balancer
Health tracking – Catch deployment problems
v3 v2 v2Stop
Load Balancer
Health tracking – Catch deployment problems
v2v2 v2
Load Balancer
Rollback
Health tracking – Catch deployment problems
v2v2 v2
Load Balancer
Amazon
S3
Pro
d -
subnet
Web
serve
r
App
serve
r
Amazon
RDS
ELB
Production
Dev
-subnet
Auto Scaling group
Web
serve
r
Auto Scaling group
App
serve
r
Amazon
RDS
ELB
Development
Test -
subnet
Web
serve
r
App
serve
r
Amazon
RDS
ELB
Test
CodePipleline CodeDeployCodeCommit
Services- Highly available CloudWatch alarm
CloudTrail
CloudFormation
Elastic
Beanstalk
Online Labs & Training
Gain confidence and hands-on experience with AWS.
Watch free Instructional Videos and explore Self-Paced Labs
Instructor Led Classes
Learn how to design, deploy and operate highly available, cost-
effective and secure applications on AWS in courses led by qualified
AWS instructors
Validate your technical expertise with AWS and use practice exams to help you
prepare for AWS Certification
AWS Certification
More info at http://aws.amazon.com/training
Thank You for Attending AWS Innovate
We hope you found it interesting! Do provide us with your feedback for the session and complete the feedback form.
Let us know your thoughts of today’s event and how we can improve the event experience for you in the future.