aizu.cloud 第一回 aws cliハンズオン
TRANSCRIPT
第一回 AWS CLI ハンズオン(2016/9/17 開催 )
AIZU.cloud とは?• 特定プラットフォームに的を絞らず、 Cloud 技術のキャッチアップをおこなう勉強会。 AWS CLI,
GCP CLI のハンズオンや、クラウドオーケストレーションのハンズオンなどおこなっていく予定。
レシピ項目 テキスト 時間IAM ユーザ登録 http://docs.fabo.io/aws/cli/iam/001_iamuser.html 10 分環境構築 http://docs.fabo.io/aws/cli/install/001_install.html 20 分AWS Configure http://docs.fabo.io/aws/cli/configure/001_setting.html 10 分
VPC の構築
http://docs.fabo.io/aws/cli/vpc/001_permission.htmlhttp://docs.fabo.io/aws/cli/vpc/002_create_vpc.htmlhttp://docs.fabo.io/aws/cli/vpc/003_describe_vpc.htmlhttp://docs.fabo.io/aws/cli/vpc/004_create_tag.htmlhttp://docs.fabo.io/aws/cli/vpc/005_describe_availability_zone.htmlhttp://docs.fabo.io/aws/cli/vpc/006_create_subnet.htmlhttp://docs.fabo.io/aws/cli/vpc/007_create_subnet_tag.htmlhttp://docs.fabo.io/aws/cli/vpc/008_create_gateway.htmlhttp://docs.fabo.io/aws/cli/vpc/009_add_gateway_tag.htmlhttp://docs.fabo.io/aws/cli/vpc/010_vpc_gateway.htmlhttp://docs.fabo.io/aws/cli/vpc/011_modify_route_table.htmlhttp://docs.fabo.io/aws/cli/vpc/012_create_route_table_tag.htmlhttp://docs.fabo.io/aws/cli/vpc/013_add_rule.htmlhttp://docs.fabo.io/aws/cli/vpc/014_associate_subnet.html
60 分
EC2 の作成
http://docs.fabo.io/aws/cli/ec2/001_permission.htmlhttp://docs.fabo.io/aws/cli/ec2/002_create_security.htmlhttp://docs.fabo.io/aws/cli/ec2/003_add_security_tag.htmlhttp://docs.fabo.io/aws/cli/ec2/004_add_inbound.htmlhttp://docs.fabo.io/aws/cli/ec2/005_search_ami.htmlhttp://docs.fabo.io/aws/cli/ec2/006_key_pair.htmlhttp://docs.fabo.io/aws/cli/ec2/007_create_instance.htmlhttp://docs.fabo.io/aws/cli/ec2/008_create_instance_tag.htmlhttp://docs.fabo.io/aws/cli/ec2/009_get_instance_ip.htmlhttp://docs.fabo.io/aws/cli/ec2/010_login_ec2.htmlhttp://docs.fabo.io/aws/cli/ec2/011_userdata.htmlhttp://docs.fabo.io/aws/cli/ec2/012_describe.html
60 分
削除 (EC2)http://docs.fabo.io/aws/cli/ec2/013_delete_instance.htmlhttp://docs.fabo.io/aws/cli/ec2/014_delete_key_pair.htmlhttp://docs.fabo.io/aws/cli/ec2/015_del_inbound.htmlhttp://docs.fabo.io/aws/cli/ec2/016_delete_security.html
5 分
削除 (VPC)http://docs.fabo.io/aws/cli/vpc/015_delete_subnet.htmlhttp://docs.fabo.io/aws/cli/vpc/016_delete_route.htmlhttp://docs.fabo.io/aws/cli/vpc/017_delete_gateway.htmlhttp://docs.fabo.io/aws/cli/vpc/018_delete_vpc.html
5 分
テキストhttp://docs.fabo.io/aws/cli/
https://github.com/FaBoPlatform/AWSCLIDocs
Gitbook
Github
テキストの誤記や改善要望があったら Github に Issue か Pull request ください。
ハンズオンの到達点• Shell Script で、 LAMP の Web サーバを AWS 上に自動生成する。
VPC の構築
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
RouterInternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
igw-######## 0.0.0.0/0
つくるもの
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
Route Table
Router
002 VPC の作成http://docs.fabo.io/aws/cli/vpc/002_create_vpc.html
RouteTable も同時に生成される
regionap-northeast-1
VPC172.16.0.0/16
Availability zone A
Availability zone B
Availability zone C
Route Table
Router
005 Availability Zone を調べるhttp://docs.fabo.io/aws/cli/vpc/005_describe_availability_zone.html
GatewayId DestinationCidrBlock
local 172.16.0.0/16
regionap-northeast-1
VPC172.16.0.0/16
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
Router
006 Subnet の作成http://docs.fabo.io/aws/cli/vpc/006_create_subnet.html
GatewayId DestinationCidrBlock
local 172.16.0.0/16
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
Router
008 Internet Gateway の作成http://docs.fabo.io/aws/cli/vpc/008_create_gateway.html
InternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
Router
010 Internet Gateway と VPC を関連付けるhttp://docs.fabo.io/aws/cli/vpc/010_vpc_gateway.html
InternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
Router
013 Route Table にルーティングルールを追加http://docs.fabo.io/aws/cli/vpc/013_add_rule.html
InternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
igw-######## 0.0.0.0/0
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
Router
014 Route Table を Subnet に関連づけるhttp://docs.fabo.io/aws/cli/vpc/014_associate_subnet.html
InternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
igw-######## 0.0.0.0/0
EC2 インスタンス
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
RouterInternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
igw-######## 0.0.0.0/0
Security Group
つくるもの
Security Group(Inbound)
Type Protocol Port 送信元telnet TCP 23 0.0.0.0/0
HTTP TCP 80 0.0.0.0/0
EC2Instance
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
RouterInternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
igw-######## 0.0.0.0/0
Security Group
002 Security Group の作成http://docs.fabo.io/aws/cli/ec2/002_create_security.html
タイププロトコルポート範囲送信元telnet (23)
TCP (6)23
0.0.0.0/0HTTP (80)
TCP (6)80
0.0.0.0/0
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
RouterInternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
igw-######## 0.0.0.0/0
Security Group
004 Security Group に Inbound を追加http://docs.fabo.io/aws/cli/ec2/002_create_security.html
Security Group(InBound)Type Protocol Port 送信元telnet TCP 23 0.0.0.0/0
HTTP TCP 80 0.0.0.0/0
Availability zone A
Availability zone B
Availability zone C
subnet172.16.1.0/24
Route Table
RouterInternetGateway
Internet
regionap-northeast-1
VPC172.16.0.0/16
GatewayId DestinationCidrBlock
local 172.16.0.0/16
igw-######## 0.0.0.0/0
Security Group
007 インスタンスを生成するhttp://docs.fabo.io/aws/cli/ec2/007_create_instance.html
Security Group(Inbound)
Type Protocol Port 送信元telnet TCP 23 0.0.0.0/0
HTTP TCP 80 0.0.0.0/0
EC2Instance