絶賛追記中
version 0.2
phases:
build
pre_build:
- npm run build
commands:
- mvn clean build
post_build:
- mvn package
artifacts:
files:
- 'target/MyApp-1.0-SNAPSHOT.war*'
name: MyApp-$(date +%Y-%m-%d)
Pattern | サーバA | サーバB | サーバC | サーバD | サーバE | サーバF | |
Linear | 10分後 Ver3→Ver4 | 20分後 Ver3→Ver4 | 30分後 Ver3→Ver4 | 40分後 Ver3→Ver4 | 50分後 Ver3→Ver4 | 60分後 Ver3→Ver4 | 徐々にデプロイ |
Canary | 10分後 Ver3→Ver4 | 60分後 Ver3→Ver4 | お試しでちょっとデプロイして、あと一気に | ||||
All at once | Ver3→Ver4 | 一気に入れ替え | |||||
Immutable | Ver3(廃止) | 新しいサーバ群を作成してアプリをデプロイ。現用のサーバ群は廃止 |
Pattern | サーバA | サーバB | サーバC | サーバD | サーバE | サーバF | |
Blue/Green | Ver3 | Ver2→4 (リクエスト送信先をこっちに切り替え) | サーバ群をグループに2つ分けて使い回す。 古いバージョンを入れ替えてリクエスト送信先を切り替え | ||||
Rolling | Ver1→4 (リクエスト送信先をこっちに切り替え) | Ver2 | Ver3 | サーバ群をグループに分けて使い回す。 最古のバージョン入れ替えてリクエスト送信先を切り替え |
version: 0.0
os: linux
files:
- source: /
destination: /var/www/html/WordPress
hooks:
BeforeInstall:
- location: scripts/install_dependencies.sh
timeout: 300
runas: root
AfterInstall:
- location: scripts/change_permissions.sh
timeout: 300
runas: root
ApplicationStart:
- location: scripts/start_server.sh
- location: scripts/create_test_db.sh
timeout: 300
runas: root
ApplicationStop:
- location: scripts/stop_server.sh
timeout: 300
runas: root
AWSTemplateFormatVersion: "2010-09-09"
Description: A sample template
Resources:
MyEC2Instance: #An inline comment
Type: "AWS::EC2::Instance"
Properties:
ImageId: "ami-0ff8a91507f77f867" #Another comment -- This is a Linux AMI
InstanceType: t2.micro
KeyName: testkey
BlockDeviceMappings:
-
DeviceName: /dev/sdm
Ebs:
VolumeType: io1
Iops: 200
DeleteOnTermination: false
VolumeSize: 20
Parameters:
AmazonLinuxAMIID:
Type: AWS::SSM...
Default: /aws/service/ami-amazon-linux-latest/amazn-ami-hvm-x86_64-gp2
Resources:
EC2Instance:
...
Properties:
....
ImageId: !Ref AmazonLinuxAMIID # 参照
....
Parameters:
EnvType:
Type: String
Default: test
AllowedValues:
- product
- test
Conditions:
CreateProdResources: !Equals [ !Ref EnvType, product ]
Resources:
...
MountPoint
Type: "AWS::EC2::VolumeAttachment"
Condition: CreateProdResources
....
AWS Lambda | コンピューティング |
Amazon API Gateway | REST/WebSocket? |
AWS AppSync? | GraphQL |
Amazon S3 | Strage |
Amazon Dynamo DB | RDB (NoSQL) |
Amazon SNS | Message Notification |
Amazon SQS | Message Queue |
AWS Step Function | Workflow |
Amazon Kinesis | Data Analysis (Streaming) |
Amazon Athena | Data Analysis (Statistics) |
Amazon Fargate | Container Orchestration |
Amazon Aurora | RDB (compatible with MySQL/PostgreSQL) |
Amazon Cognito | Authentication |