Den*_*boy 11 amazon-web-services amazon-elastic-beanstalk ebcli
我想eb deploy
在一个干净的环境中制作一个。它告诉我我首先需要执行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) us-east-2 : US East (Ohio)
14) ca-central-1 : Canada (Central)
15) eu-west-2 : EU (London)
(default is 3):
Run Code Online (Sandbox Code Playgroud)
如您所见,设置需要手动说明。如何自动执行此设置?
我试过
$ export AWS_ACCESS_KEY_ID="xxx"
$ export AWS_SECRET_ACCESS_KEY="xxx"
$ export AWS_DEFAULT_REGION="xxx"
$ eb init
Run Code Online (Sandbox Code Playgroud)
但是再次有必要选择地区等(如上)?
如何.aws
在没有手动交互的情况下自动生成eb 部署,只有命令?
编辑 我试过:
init --region eu-west-1 应用名
这已经让我更进一步了,但现在我收到了:
Select the default environment.
You can change this later by typing "eb use [environment_name]".
1) app-dev
2) app-uat
Run Code Online (Sandbox Code Playgroud)
如何在我的eb init
命令中自动执行此设置?
pro*_*fan 10
- 我想
eb deploy
在一个干净的环境中制作一个。它告诉我我首先需要执行 eb init。
Looks like you've solved this problem, but I'll clarify anyway: The EBCLI requires that the present working directory be rooted at an eb init
-ed application. The EBCLI looks for a .elasticbeanstalk/config.yml
directory to determine whether the PWD has been eb init
-ed. Almost all eb
operations require the PWD to have been init
-ed with a Beanstalk application.
- EDIT I tried:
eb init --region eu-west-1 appname ...
You're almost there. In order to suppress the interactive mode, which is what you are trying to do, you need to pass the --platform
flag. I can clearly see how inconvenient this is, but what you need is:
eb init --region eu-west-1 --platform <platform-name> appname
Where <platform-name>
is the name of the language your app is in. Passing the --platform
argument suppresses the interactive mode according to the documentation.
Once that is done, you can execute:
eb use <environment name>
followed by eb deploy
, or just
eb deploy <environment-name>
归档时间: |
|
查看次数: |
5145 次 |
最近记录: |