ターミナルから弾性beanstalkの上でアプリケーションをつくること
必要条件
マスカスカタリーナ
エラスティックBeanstalkアプリケーションを初期化する
プラットフォーム用のDockerを選びます.
$ 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-south-1 : Asia Pacific (Mumbai)
7) ap-southeast-1 : Asia Pacific (Singapore)
8) ap-southeast-2 : Asia Pacific (Sydney)
9) ap-northeast-1 : Asia Pacific (Tokyo)
10) ap-northeast-2 : Asia Pacific (Seoul)
11) sa-east-1 : South America (Sao Paulo)
12) cn-north-1 : China (Beijing)
13) cn-northwest-1 : China (Ningxia)
14) us-east-2 : US East (Ohio)
15) ca-central-1 : Canada (Central)
16) eu-west-2 : EU (London)
17) eu-west-3 : EU (Paris)
18) eu-north-1 : EU (Stockholm)
19) eu-south-1 : EU (Milano)
20) ap-east-1 : Asia Pacific (Hong Kong)
21) me-south-1 : Middle East (Bahrain)
22) af-south-1 : Africa (Cape Town)
(default is 3): 1
Select an application to use
1) eb-https
2) Up
3) [ Create new Application ]
(default is 3):
Enter Application Name
(default is "eb-https2"):
Application eb-https2 has been created.
Select a platform.
1) .NET Core on Linux
2) .NET on Windows Server
3) Docker
4) GlassFish
5) Go
6) Java
7) Node.js
8) PHP
9) Packer
10) Python
11) Ruby
12) Tomcat
(make a selection): 3
Select a platform branch.
1) Docker running on 64bit Amazon Linux 2
2) Multi-container Docker running on 64bit Amazon Linux
3) Docker running on 64bit Amazon Linux
(default is 1): 1
Cannot setup CodeCommit because there is no Source Control setup, continuing with initialization
Do you want to set up SSH for your instances?
(Y/n): n
環境の作成
仮想プライベートクラウドを作成するには- vpcオプションを追加します.
$ eb create --vpc
// press enter
Enter Environment Name
(default is eb-https2-dev):
//press enter
Enter DNS CNAME prefix
(default is eb-https2-dev):
Select a load balancer type
press enter
1) classic
2) application
3) network
(default is 2):
Would you like to enable Spot Fleet requests for this environment?
(y/N): N
Enter the VPC ID: vpc-e3e2079e
Do you want to associate a public IP address? (Y/n): Y
// I entered the same subnets for both the EC2 and ELB subnets.
Enter a comma-separated list of Amazon EC2 subnets: subnet-416eba60, subnet-764a8029
Enter a comma-separated list of Amazon ELB subnets: subnet-416eba60, subnet-764a8029
Do you want the load balancer to be public? (Select no for internal) (Y/n): Y
Enter a comma-separated list of Amazon VPC security groups: sg-01475203460d2c24b
NOTE: The current directory does not contain any source code. Elastic Beanstalk is launching the sample application instead.
Do you want to download the sample application into the current directory?
(Y/n): Y
約10分後、成功した場合は、コンソールに組み込まれた環境が表示されます.
URLにアクセスすると、サンプルページが表示されます.
Y
を選択し、現在のディレクトリにサンプルアプリケーションをダウンロードした場合、フォルダはこのようになります.
$ tree
.
├── Dockerfile
├── Dockerrun.aws.json
├── application.py
└── cron.yaml
0 directories, 4 files
Reference
この問題について(ターミナルから弾性beanstalkの上でアプリケーションをつくること), 我々は、より多くの情報をここで見つけました
https://dev.to/greenteabiscuit/creating-an-app-on-elastic-beanstalk-from-terminal-26i6
テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol
$ 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-south-1 : Asia Pacific (Mumbai)
7) ap-southeast-1 : Asia Pacific (Singapore)
8) ap-southeast-2 : Asia Pacific (Sydney)
9) ap-northeast-1 : Asia Pacific (Tokyo)
10) ap-northeast-2 : Asia Pacific (Seoul)
11) sa-east-1 : South America (Sao Paulo)
12) cn-north-1 : China (Beijing)
13) cn-northwest-1 : China (Ningxia)
14) us-east-2 : US East (Ohio)
15) ca-central-1 : Canada (Central)
16) eu-west-2 : EU (London)
17) eu-west-3 : EU (Paris)
18) eu-north-1 : EU (Stockholm)
19) eu-south-1 : EU (Milano)
20) ap-east-1 : Asia Pacific (Hong Kong)
21) me-south-1 : Middle East (Bahrain)
22) af-south-1 : Africa (Cape Town)
(default is 3): 1
Select an application to use
1) eb-https
2) Up
3) [ Create new Application ]
(default is 3):
Enter Application Name
(default is "eb-https2"):
Application eb-https2 has been created.
Select a platform.
1) .NET Core on Linux
2) .NET on Windows Server
3) Docker
4) GlassFish
5) Go
6) Java
7) Node.js
8) PHP
9) Packer
10) Python
11) Ruby
12) Tomcat
(make a selection): 3
Select a platform branch.
1) Docker running on 64bit Amazon Linux 2
2) Multi-container Docker running on 64bit Amazon Linux
3) Docker running on 64bit Amazon Linux
(default is 1): 1
Cannot setup CodeCommit because there is no Source Control setup, continuing with initialization
Do you want to set up SSH for your instances?
(Y/n): n
仮想プライベートクラウドを作成するには- vpcオプションを追加します.
$ eb create --vpc
// press enter
Enter Environment Name
(default is eb-https2-dev):
//press enter
Enter DNS CNAME prefix
(default is eb-https2-dev):
Select a load balancer type
press enter
1) classic
2) application
3) network
(default is 2):
Would you like to enable Spot Fleet requests for this environment?
(y/N): N
Enter the VPC ID: vpc-e3e2079e
Do you want to associate a public IP address? (Y/n): Y
// I entered the same subnets for both the EC2 and ELB subnets.
Enter a comma-separated list of Amazon EC2 subnets: subnet-416eba60, subnet-764a8029
Enter a comma-separated list of Amazon ELB subnets: subnet-416eba60, subnet-764a8029
Do you want the load balancer to be public? (Select no for internal) (Y/n): Y
Enter a comma-separated list of Amazon VPC security groups: sg-01475203460d2c24b
NOTE: The current directory does not contain any source code. Elastic Beanstalk is launching the sample application instead.
Do you want to download the sample application into the current directory?
(Y/n): Y
約10分後、成功した場合は、コンソールに組み込まれた環境が表示されます.URLにアクセスすると、サンプルページが表示されます.
Y
を選択し、現在のディレクトリにサンプルアプリケーションをダウンロードした場合、フォルダはこのようになります.$ tree
.
├── Dockerfile
├── Dockerrun.aws.json
├── application.py
└── cron.yaml
0 directories, 4 files
Reference
この問題について(ターミナルから弾性beanstalkの上でアプリケーションをつくること), 我々は、より多くの情報をここで見つけました https://dev.to/greenteabiscuit/creating-an-app-on-elastic-beanstalk-from-terminal-26i6テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol