Mina

Mina lets you build and run scripts to manage your app deployments on servers via SSH.

$ gem install mina $ mina

Really bloody fast

Mina works really fast because it’s a deploy Bash script generator. It generates an entire procedure as a Bash script and runs it remotely in the server.

$ mina deploy --verbose -----> Creating the build path $ mkdir tmp/build-128293482394 -----> Cloning the Git repository $ git clone https://github.com/nadarei/flipstack.git . -n --recursive Cloning... done. -----> Installing gem dependencies using Bundler $ bundle install --without development:test Using i18n (0.6.0) Using multi_json (1.0.4) ... Your bundle is complete! It was installed to ./vendor/bundle -----> Moving to releases/4 $ mv "./tmp/build-128293482394" "releases/4" -----> Symlinking to current $ ln -nfs releases/4 current -----> Launching $ cd releases/4 $ sudo service nginx restart -----> Done. Deployed v4

Compare this to the likes of Vlad or Capistrano, where each command is ran separately on their own SSH sessions. Mina only creates one SSH session per deploy, minimizing the SSH connection overhead.

See the deploying guide for more information.

Incredibly customizable

All your settings are stored in a Ruby file config/deploy.rb.

# config/deploy.rb require 'mina/git' require 'mina/bundler' set :domain, 'your.server.com' set :user, 'flipstack' set :repository, 'flipstack' task :deploy do deploy do # Preparations here invoke :'git:clone' invoke :'bundle:install' end end task :restart do queue 'sudo service restart apache' end

In this file, you will define tasks that queue up commands to be ran remotely via SSH.

Mina is built on Rake. Mina configuration files are simply Rake files.

See About deploy.rb for more information on configuration.

More features