Born out of frustration with current Ruby deployment practices.
Capistrano is a workhorse, but if you combine it with rvm and bundler, you're in for a treat.
git-deploy works pretty well, but it's still not seamless and you end up having to work around it too often for my taste.
heroku solves the deployment process bang on.
This command-line utility brings the same heroku-style deploys convenience to a regular VPS, {cloud-provider} instance or even bare metal (if you're that hard core).
At GoSquared, we use this utility to deploy Ruby, PHP and node.js applications. Here's a Ruby app being deployed:
$ git clone git://github.com/gerhard/deliver.git ~/.deliver
$ echo 'export PATH="$HOME/.deliver/bin:$PATH"' >> ~/.bash_profile
# if using zsh
$ echo 'export PATH="$HOME/.deliver/bin:$PATH"' >> ~/.zshrc
$ . ~/.bash_profile
# if using zsh
$ . ~/.zshrc
There are no fancy generators, you will need to create a .deliver
file
manually in the app's root folder that you want delivering. Yes, your
observation is correct, there's no Loudfile
faux
pas.
Before you can create a .deliver
file, you will need to read about the
supported strategies.
From the root of your project, run:
$ deliver
Deliver will use the ruby strategy by default. If you want to use a different
one, define it in your .deliver
file.
To see a list of available strategies:
$ deliver -s
# the more verbose version of the above
$ deliver --strategies
Read more about deliver strategies
-v, --version | current version |
---|---|
-s, --strategies | supported strategies |
-V, --verbose | doesn't suppress the output of commands |
-D, --debug | shows the entire code as it is being run |
The utility has just enough to solve our deployment woes. It's still missing a few important features which will be added as the need arises. In no particular order:
gh-pages deploysDONE- multiple apps in a single repository
- revise the
PORT
option with something more scalable - multi-server deploys
- don't run the full deploy if nothing has changed
- Post deploy hooks:
- Campfire
- Graphite
- rbenv integration (not a priority for me personally)
- better error handling (particularly when remote tasks fail)
- system-wide foreman supporting both node.js & Ruby apps (anything else, fork away)
(The MIT license)
Copyright (c) Gerhard Lazu
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.