Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

pranavraja/beanstalkify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Amazon beanstalk automation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages