AWS弹性Beanstalk部署到多个应用程序 [英] AWS Elastic Beanstalk deploy to multiple applications

查看:274
本文介绍了AWS弹性Beanstalk部署到多个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图描述我的情况:

拥有多个AWS帐户,凭证位于〜/ .aws / credential
要打开其他帐户,我输入:

Have multiple AWS account, credentials is located under ~/.aws/credential To swich to other account I'm typing:

eb init -i --profile name

现在要将代码部署到帐户,我必须每次都切换到其他acc。如何组织 .ebextensions 有可能部署到10 AWS acc而不切换配置文件?

Now to deploy code to accounts I must every time switch to other acc. How I can organize .ebextensions to have possibility to deploy to 10 AWS acc without switching between profiles ?

推荐答案

每次都不需要执行 eb init 。您可以使用参数部署 eb deploy --profile profile_name

You don't need to do eb init every time. You can deploy with arguments, eb deploy --profile profile_name.

如果您设置.elasticbeanstalk / config文件

If you setup your .elasticbeanstalk/config file something like this you can have different profiles and branches for different environments without using arguments.

branch-defaults:
  develop:
    environment: env-develop
    profile: eb-profile
  master:
    environment: env-master
    profile: eb-profile2
global:
  application_name: env_name
  default_ec2_keyname: key_name
  default_platform: Python 2.7
  default_region: ap-southeast-1
  sc: git

我还没有尝试过这个,但是如果调用 eb deploy environment_name --profile eb-profile3 链接到其他地方应该在其中部署您的分支和全局特定设置(配置文件覆盖)。

I haven't tried this, but if you call eb deploy environment_name --profile eb-profile3 that is linked to somewhere else it should deploy there with your branch and global specific settings (profile overriden).

eb部署<环境名称> ; 覆盖环境名称。
http://docs.aws.amazon.com /elasticbeanstalk/latest/dg/eb3-deploy.html

我只看过这个简要,但也许这可以帮助你。
http://docs.aws.amazon.com /elasticbeanstalk/latest/dg/ebcli-compose.html

I have only read this briefly, but maybe this can help you as well. http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebcli-compose.html

这篇关于AWS弹性Beanstalk部署到多个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆