0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Create Amazon Elastic Beanstalk apps and deploy versions from the command line
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

AWS Elastic Beanstalk automation. A work in progress.

Prerequisites

  • Ruby 1.9

Installation

gem install beanstalkify

Create a file called credentials.yml, with the following format:

access_key_id: A98KJHBLABLABLA
secret_access_key: dkuU90kmySuperSecretKey
region: us-east-1

Running

beanstalkify -k credentials.yml -a app-version.zip -s "64bit Amazon Linux running Node.js" -e env [-n my-awesome-app] [-c config.yml]

Should do the following

  • Connect to aws using the credentials in credentials.yml
  • Publish app-version.zip to s3
  • Ensure that a beanstalk application called 'app' exists, and add a version called 'version', linked to the archive in that s3 bucket
  • Ensure that the environment app-env exists (with optional settings overrides in config.yml - see below), running the specified stack.
  • Deploy the provided version of the application into app-env
  • Report progress. When complete report the URL where the app can be hit (note: this will be the URL of the ELB).

Settings overrides

An example config.yml:

-
    namespace: 'aws:autoscaling:asg'
    option_name: Availability Zones
    value: Any 2
-
    namespace: 'aws:autoscaling:launchconfiguration'
    option_name: InstanceType
    value: m1.small
-
    namespace: 'aws:autoscaling:launchconfiguration'
    option_name: EC2KeyName
    value: MyAwesomeEC2-dev

Running the somewhat useless tests

bundle exec rspec test

TODO

  • Tests around error handling
  • Provide some blue-green deployment integrated with health checks, using the swap_environment_cnames feature of the AWS SDK.