Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
allow deploy user to enable/disable maintenance mode
Browse files Browse the repository at this point in the history
dwradcliffe committed May 27, 2015
1 parent 43c7c5d commit ef518ab
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -253,7 +253,7 @@ GRAPH
rubygems-backups (0.0.21)
chef-vault (>= 0.0.0)
rubygems-ruby (>= 0.0.0)
rubygems-balancer (0.0.54)
rubygems-balancer (0.0.56)
chef-vault (>= 0.0.0)
datadog (>= 0.0.0)
logrotate (>= 0.0.0)
2 changes: 1 addition & 1 deletion cookbooks/rubygems-balancer/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name 'rubygems-balancer'

version '0.0.54'
version '0.0.56'

depends 'chef-vault'
depends 'datadog'
1 change: 1 addition & 0 deletions cookbooks/rubygems-balancer/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@

include_recipe 'nginx'

include_recipe 'rubygems-people::deploy'
include_recipe 'rubygems-balancer::logging'
include_recipe 'rubygems-balancer::ssl'
include_recipe 'rubygems-balancer::geoip'
9 changes: 9 additions & 0 deletions cookbooks/rubygems-balancer/recipes/maintenance.rb
Original file line number Diff line number Diff line change
@@ -17,3 +17,12 @@
action :create
recursive true
end

sudo 'deploy-maintenance' do
user 'deploy'
nopasswd true
commands [
'/bin/ln -s /etc/nginx/maintenance.html /var/www/rubygems/maintenance.html',
'/bin/rm /var/www/rubygems/maintenance.html'
]
end

0 comments on commit ef518ab

Please sign in to comment.