No commit activity in last 3 years
No release in over 3 years
Introduces deployment lock using consul KVS.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0

Runtime

 Project Readme

Capistrano::ConsulKvLock

Introduces deployment lock using consul KVS

Detail

Using this plugin, capistrano just puts consul KVS a lock value, then the deployment is prohibitted in another host for the lock value is released.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-consul_kv_lock'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-consul_kv_lock

Activate in Capfile:

require 'capistrano/consul_kv_lock'

Usage

Settings

# Consul API URL that the operator uses as KVS.
set :consul_url,      -> { 'http://localhost:8500' }

# A key name for locking deploy.
set :consul_lock_key, -> { 'deployment/locked' }

Force unlock

Delete the KVS lock value.

$ curl -X DELETE ${your_consul_host}:8500/v1/kv/deployment/locked

Contributing

  1. Fork it ( https://github.com/udzura/capistrano-consul_kv_lock/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request