Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple Sinatra app for one-click Capistrano deployments

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 caproot
Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 public
Octocat-spinner-32 state
Octocat-spinner-32 views
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.mkd
Octocat-spinner-32 clickistrano.rb
Octocat-spinner-32 config.ru
README.mkd

Clickistrano

Clickistrano is a simple Sinatra app for performing Capistrano deployments using a simple web interface. Clickistrano might be useful for you if:

  • You have members of your team who need to run deployments, but don't keep a copy of your source checked out (e.g. product managers, QA engineers).
  • You deploy using environment tasks (e.g. cap qa deploy)
  • You use Github or your own private server for source control hosting.

Installation and Configuration

Clickistrano isn't currently published as a gem, since I see little advantage in doing so. Just pick a good directory for the server, and check it out:

$ git clone http://github.com/outoftime/clickistrano.git

Clickistrano is configured with a config.yml file in the root directory. It requires the following keys:

adapter
Either "github" or "local"
account
The github account that hosts your repository (GitHub adapter only)
repository
The name of the repository on github, or the path to the local git repo
token
Your github API token. Go to the 'account' screen on GitHub to get this (GitHub adapter only)
environment
The environment you want to deploy to (i.e., cap <environment> deploy)
cap
Path to the cap executable on your system

If you're running this on a new machine, you will need to add the machine's SSH public key to your deployment environment.

Running it

To start clickistrano as a daemon, run the following from the clickistrano directory:

$ thin start -R config.ru -d

There is also a sample init script in example/clickistrano.sh

Dependencies (all available on Gemcutter)

  • capistrano
  • escape
  • json
  • open4
  • rack
  • sinatra
  • thin
  • grit (local adapter only)

How it works

When you access the front page (by default, localhost:4567 - see the Sinatra docs for how to change that), you are presented with a simple form asking for the git branch to deploy from. When the form is submitted, Clickistrano downloads the Capfile and config/deploy.rb files from the specified branch of your repository on GitHub, and then forks a process that runs the deployment. The web interface redirects to a page showing the deployment status and a live-updating view of the deployment log.

Contributors

Feel free to contact me with questions.

This is free software

This software is released in the public domain, and may be distributed and modified with no restrictions. The author relinquishes all copyright on this software to the maximum extent permitted by law.

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.

Something went wrong with that request. Please try again.