如何将应用程序从circleCI部署到aws eb

时间:2017-03-13 11:12:41

标签: amazon-web-services continuous-integration elastic-beanstalk aws-cli circleci

目前我有一个circle.yml,它看起来像:

   dependencies:
     pre:
- rvm install 2.3.3
- sudo pip install -U pip setuptools
- sudo apt-get install python-dev
- sudo pip install awsebcli
- gem install bundler
- bundle install

  general:
   branches:
        only:
         - st5-ci

  deployment:
    production:
    branch: xt5-ci
commands:
  - eb init
  - eb deploy --profile default

然而,eb init命令永远停滞不前,并且没有前进,如果我尝试在没有init的情况下运行yml,eb部署失败。

我是aws工具和cli的新手,有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

eb init在位置创建文件 - ./elasticbeanstalk/config.yml。也许您可以尝试手动添加它,看看它是否有效。

它的内容就像 -

branch-defaults:
  develop:
    environment: yourdevelopbranch
deploy:
  artifact: build/yourartifact.war
global:
  application_name: your-application-name
  default_ec2_keyname: ec2-key-pair-name
  default_platform: 64bit Amazon Linux 2015.03 v1.4.3 running Ruby 2.2 (Puma)
  default_region: us-east-1
  profile: eb-cli
  sc: git

eb init需要一些输入。看 - http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-init.html

OR

你可以尝试eb init --profile profilename。因此,对于默认配置文件,它将eb init --profile default