7. 7
Elastic Beanstalk vs. Do It Yourself
On-instance configuration
Your code
HTTP Server
Application Server
Language Interpreter
Operating System
Host
8. 8
On-instance configuration
Your code
HTTP Server
Application Server
Language Interpreter
Operating System
Host
アプリケーションの開発
”だけ”にフォーカス
Elastic Beanstalkにお任せ!
Elastic Beanstalk vs. Do It Yourself
9. 9
• あらかじめ定義されたインフラストラクチャ
• Single instance (開発環境, ローコスト)
• Load balancing, Auto Scaling (本番環境)
• Web Tier と Worker Tier
• リソースのプロビジョニング
• Load Balancer
• Auto Scaling group
• Security groups
• Database (optional)
• ユニークなドメイン名の提供
• 例) yourapp.elasticbeanstalk.com
Infrastructure stack
Elastic Beanstalk vs. Do It Yourself
17. 17
サンプルアプリケーションのデプロイ
• eb initのプロンプト: リージョンの選択
Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-southeast-1 : Asia Pacific (Singapore)
7) ap-southeast-2 : Asia Pacific (Sydney)
8) ap-northeast-1 : Asia Pacific (Tokyo)
9) sa-east-1 : South America (Sao Paulo)
10) cn-north-1 : China (Beijing)
(default is 3):
18. 18
サンプルアプリケーションのデプロイ
• eb initのプロンプト: アプリ名/スタック/SSH/Keypair
Enter Application Name
(default is "eb-node-express-sample"):
It appears you are using Node.js. Is this correct?
(y/n): y
Do you want to set up SSH for your instances?
(y/n): y
Select a keypair.
1) oregon
2) [ Create new KeyPair ]
(default is 2): 1
20. 20
サンプルアプリケーションのデプロイ
• eb createのプロンプト: Environment/CNAME/Deploy
Enter Environment Name
(default is eb-node-express-sample):
Enter DNS CNAME prefix
(default is eb-node-express-sample):
Creating application version archive "5529".
Uploading eb-node-express-sample/5529.zip to S3. This
may take a while.
Upload Complete.
Environment details for: eb-node-express-sample
Application name: eb-node-express-sample
Region: us-west-2
Deployed Version: 5529
Environment ID: e-ufxx79fmkc
75. 75
Elastic BeanstalkのDockerサポート
• ローカルでのDockerコンテナの実行
– EB CLI
$ eb local run
• 開発時に便利なコマンド群
$ eb local status
$ eb local open
$ eb local logs
$ eb local run
Creating elasticbeanstalk_phpapp_1...
Creating elasticbeanstalk_nginxproxy_1...
Attaching to elasticbeanstalk_phpapp_1, elasticbeanstalk_nginxproxy_1
phpapp_1 | [23-Apr-2015 23:24:25] NOTICE: fpm is running, pid 1
phpapp_1 | [23-Apr-2015 23:24:25] NOTICE: ready to handle connections
82. 82
ユーザー事例: Royal Caribbean Cruises Ltd.
• Scaling Your Web Applications with AWS Elastic Beanstalk
http://www.slideshare.net/AmazonWebServices/dvo201-scaling-your-web-applications-with-aws-elastic-beanstalk
https://www.youtube.com/watch?v=nkj0GXgaRv8
86. 86
ユーザー事例: SONY
• Building At-Scale Services with AWS Elastic Beanstalk
https://www.youtube.com/watch?v=gA_m_4ikTgg
http://www.slideshare.net/AmazonWebServices/dvo312-sony-building-atscale-services-with-aws-elastic-beanstalk
87. 87
• Infrastructure as Code を実践
– Shinya Kawaguchiさん
• “Especially Elastic Beanstalk configuration files are
very useful and powerful to customize environment,
so we are utilizing them in our system”
ユーザー事例: SONY