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

kayac/rebi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rebi

Deployment tool for Elasticbeanstalk

Features

  • Switchable + multiple ebextensions folder
  • Switchable + ERB Supported Dockerrun.aws.json
  • Support erb in ebextension config files
  • Support env_file for environment variables
  • Multiple deployment
  • Deploy source code along with updating beanstalk options
  • Hook commands before and after deploy
  • Simple config
  • Simple ssh

Installation

Or install it yourself as:

$ gem install rebi

Usage

Init

$ bundle exec rebi init staging web
# use profile option if you're using aws profile

Yaml config

Default config file is .rebi.yml use -c to switch

app_name: app-name
profile: aws_profile # if use profile, can overwrite this by command option --profile

# if use key/secret credentials(If you dont want to commit credentials to version control system use environment variables instead (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY))
aws_key: aws_key
aws_secret: aws_secret

stages:
  development:
    web:
      name: web01
      env_file: .env.development
      ebextensions: "web-ebextensions"

For other configs(key_name, instance_type, instance_num, service_role,...), please refer sample config

$ bundle exec rebi sample > .rebi.yml

Deploy

# Single deploy
$ bundle exec rebi deploy development web
# Multiple deploy (if development has more than one environments)
$ bundle exec rebi deploy development

Ssh

$ bundle exec rebi ssh development web

Get envronment variables and status

# Running envronment variables
$ bundle exec rebi get_env development
# envronment variables for config
$ bundle exec rebi get_env development --from-config
# Status
$ bundle exec rebi status development

###For more help

$ bundle exec rebi --help

ERB in ebextensions config

Use rebi.env to get environment variables config in .ebextensions config file name must end with .config.erb

# Ex
# .ebextensions/00-envrionments.config.erb
option_settings:
  - option_name: KEY
    value: <%= rebi.env[KEY] %>

Use rebi.opts or rebi.options to get options config in .ebextensions

# Ex
# .ebextensions/00-envrionments.config
option_settings:
  - option_name: KEY
    value: <%= rebi.options.key %>

Contributing

Feel free to fork and request a pull, or submit a ticket https://github.com/kayac/rebi/issues

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages