From 85c01e9f500ebb24cb5c485ca27a144f883d0edc Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 24 Oct 2013 15:20:39 -0700 Subject: [PATCH] Update git.o.o configs for better rolling reboots * modules/openstack_project/manifests/git.pp: Give the haproxy stats socket admin level permissions. Make the socket owned by user root and group root with mode of 0600. This is necessary to provide instructions to enable and disable backend servers through the stats socket. Also, install socat on this server so that commands can be given through the stats socket. * modules/openstack_project/manifests/git.pp: Enable git-daemon service so that it starts running at boot. Change-Id: Ic38114bdbd9fd1e9ab711e636deaadb15f9c7fe3 --- modules/cgit/manifests/init.pp | 2 +- modules/openstack_project/manifests/git.pp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/cgit/manifests/init.pp b/modules/cgit/manifests/init.pp index 06f0e75b65..ef16d8f1c0 100644 --- a/modules/cgit/manifests/init.pp +++ b/modules/cgit/manifests/init.pp @@ -34,7 +34,6 @@ class cgit( 'cgit', 'git-daemon', 'highlight', - 'socat', ]: ensure => present, } @@ -171,6 +170,7 @@ class cgit( service { 'git-daemon': ensure => running, + enable => true, subscribe => File['/etc/init.d/git-daemon'], } diff --git a/modules/openstack_project/manifests/git.pp b/modules/openstack_project/manifests/git.pp index cf2520b35d..27b4c65caa 100644 --- a/modules/openstack_project/manifests/git.pp +++ b/modules/openstack_project/manifests/git.pp @@ -29,6 +29,10 @@ class openstack_project::git ( mode => 'enforcing' } + package { 'socat': + ensure => present, + } + class { 'haproxy': enable => true, global_options => { @@ -39,7 +43,7 @@ class openstack_project::git ( 'user' => 'haproxy', 'group' => 'haproxy', 'daemon' => '', - 'stats' => 'socket /var/lib/haproxy/stats' + 'stats' => 'socket /var/lib/haproxy/stats user root group root mode 0600 level admin' }, } # The three listen defines here are what the world will hit.