Dolphin
TODO: Write a gem description
Installation
Add this line to your application's Gemfile:
gem 'dolphin'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dolphin
Rails generator
Run generator from your Rails application:
$ bin/rails g dolphin:install
This will create an executable script as bin/dolphin.
Configuration
Edit the bin/dolphin script generated as above to adjust settings. Please refer to detailed comments inside the script. Minimum config would require the following:
# settings require user input
# -----------------------------
# name of this application
@application = 'best_app'
# on server, the user account for deploying
@user = 'deploy'
# location of git repository
@github = "[email protected]:nengxu/dolphin.git"
# which ruby, for chruby
@ruby_version = 'ruby-2.0.0-p195'
case @env
when 'qa'
@servers = [
'qa01.best_app.com',
'qa02.best_app.com',
]
when 'production'
@servers = [
'prod01.best_app.com',
'prod02.best_app.com',
]
else # @env == 'alpha'
# list of servers for this environment
@servers = [
'dev01.best_app.com',
'dev02.best_app.com',
]
# customized branch, default is the same as @env
@branch = 'master'
end
Usage
Show top level command modules:
$ bin/dolphin
Show subcommands under one module:
$ bin/dolphin deploy
$ bin/dolphin git
$ bin/dolphin lock
$ bin/dolphin nginx
$ bin/dolphin puma
$ bin/dolphin setup
Execute a subcommand, for example, normal deployment:
$ bin/dolphin deploy go -e production
Related gems
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request