Inploy is a Rails plugin to deploy applications in a easier way. You can use Inploy from a remote machine or from the local machine, too. It’s integrated with Git, Rake and intended to do most of the common work, so you don’t need to.
Actually, Inploy has four rake tasks:
- inploy:remote:setup
- connects to a list of servers
- clones a git repository
- runs inploy:local:setup
- inploy:remote:update (alias: inploy:up)
- connects to a list of servers
- runs inploy:local:update
- inploy:local:setup
- copies config/.sample files to config/
- creates directory tmp/pids
- executes init.sh file case it exists
- installs gems
- migrates the database for the production environment
- cleans the cache in public/cache
- cleans cached assets in public/assets if jammit is installed
- parses less files if more:parse tasks exists
- package the assets if asset:packager:build_all task exists
- touch tmp/restart.txt
- inploy:local:update
- pulls the repository
- installs gems
- migrates the database for the production environment
- cleans the cache directories (default public/cache)
- parses less files if more:parse tasks exists
- package the assets if asset:packager:build_all task exists
- touch tmp/restart.txt
You can skip some steps when running a task, just add “skip_steps” into your rake command line or add “skip_steps” to your deploy.rb to always skip those steps (see “CONFIGURATION” for details).
Currently the steps available to skip are:
- install_gems: skip rake gems:install
- migrate_database: skip rake db:migrate
- clear_cache: skip removing cache directories
- Usage (params are comma separated):
rake inploy:remote:update skip_steps=install_gems,migrate_database
As a plugin:
script/plugin install git://github.com/dcrec1/inploy.git
As a gem:
sudo gem install inploy
Please remember that when used as a gem, Inploy should be available in the deploy servers.
Create a config/deploy.rb file and configure it something like this:
deploy.application = "signal"
deploy.repository = 'git://github.com/dcrec1/signal.git'
deploy.user = 'dcrec1'
deploy.hosts = ['hooters', 'geni']
deploy.path = '/opt'
# OPTIONALS
deploy.ssh_opts = '-A' # default empty
deploy.branch = 'production' # default master
deploy.sudo = true # default false
deploy.cache_dirs = ['public/cache', 'tmp/cache'] # default ['public/cache']
# Use this if you want to skip some steps on update and setup
# Available options: install_gems, migrate_database, clear_cache
# This feature is also available on command line
# eg. rake inploy:update:remote skip_steps=install_gems
deploy.skip_steps = ['install_gems', 'clear_cache'] #default none
(The MIT License)
Copyright © 2009
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
‘Software’), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.