#Opsicle, an OpsWorks CLI A gem bringing the glory of OpsWorks to your command line.
Add this line to your project's Gemfile:
For Ruby >=2.1.0
gem 'opsicle'
gem 'curses'
For Ruby <2.1.0, 1.9.3
gem 'opsicle'
(Alternatively, gem 'opsicle'; gem 'curses' unless RUBY_VERSION < "2.1.0"
)
Why the extra curses
gem for Ruby 2.1.0+?
Opsicle uses curses.
Ruby's library to interface with curses was removed from stdlib in Ruby 2.1.0.
The new curses gem is not backwards compatible, so in an effort to keep this gem
friendly with all current Ruby versions we don't list it as a dependency in Opsicle's gemspec - doing so would cause
errors for Ruby 1.9.3 users.
Ruby >=2.1.0 will likely be enforced sometime in 2014; certainly by February 2015.
# your_app_root/.opsicle
staging:
stack_id: opsworks-stack-id
app_id: opsworks-app-id
production:
stack_id: opsworks-stack-id
app_id: opsworks-app-id
# ~/.fog
staging:
aws_access_key_id: YOUR_AWS_ACCESS_KEY
aws_secret_access_key: YOUR_AWS_SECRET_ACCESS_KEY
production:
aws_access_key_id: YOUR_AWS_ACCESS_KEY
aws_secret_access_key: YOUR_AWS_SECRET_ACCESS_KEY
Run opsicle help
for a full list of commands and their uses.
Some common commands:
# Run a basic deploy for the current app
opsicle deploy staging
# Run the deploy for production
opsicle deploy production
You may also use -m or --monitor
to open the Opsicle Stack Monitor, or
-b or --browser
to open the OpsWorks deployments screen for that app when deploying.
# SSH to a server instance in the given environment stack
opsicle ssh staging
# Set your user SSH key (PUBLIC KEY) for OpsWorks
opsicle ssh-key staging <key-file>
# Launch the Opsicle Stack Monitor for the given environment stack
opsicle monitor staging
Opsicle accepts a --verbose
flag or the VERBOSE environment variable to show additional information as commands are run.
Opsicle accepts a DEBUG environment variable to show additional logging such as stack traces for failed commands.