diff options
author | varac <varacanero@zeromail.org> | 2013-03-12 14:33:24 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-03-12 14:33:24 +0100 |
commit | 3633f137c99a4fcb647cb098ee01704ff3f7554c (patch) | |
tree | 7e7a2334149f12f42725b4d9a549034a18142b8b /puppet/modules/site_couchdb/manifests | |
parent | 0ffc583488ee044be30ea5bf7fae751505419a9b (diff) | |
parent | 01941d905a71a2088ec080703f4e5430dec7a2ec (diff) |
Merge branch 'feature/bigcouch' into develop
Conflicts:
provider_base/services/couchdb.json
Diffstat (limited to 'puppet/modules/site_couchdb/manifests')
-rw-r--r-- | puppet/modules/site_couchdb/manifests/configure.pp | 27 | ||||
-rw-r--r-- | puppet/modules/site_couchdb/manifests/init.pp | 20 |
2 files changed, 10 insertions, 37 deletions
diff --git a/puppet/modules/site_couchdb/manifests/configure.pp b/puppet/modules/site_couchdb/manifests/configure.pp deleted file mode 100644 index 333511b5..00000000 --- a/puppet/modules/site_couchdb/manifests/configure.pp +++ /dev/null @@ -1,27 +0,0 @@ -class site_couchdb::configure { - - file { '/etc/init.d/couchdb': - source => 'puppet:///modules/site_couchdb/couchdb', - mode => '0755', - owner => 'root', - group => 'root', - } - - file { '/etc/couchdb/local.d/admin.ini': - content => "[admins] -admin = $site_couchdb::couchdb_admin_pw -", - mode => '0600', - owner => 'couchdb', - group => 'couchdb', - notify => Service[couchdb] - } - - - exec { '/etc/init.d/couchdb restart; sleep 6': - path => ['/bin', '/usr/bin',], - subscribe => File['/etc/couchdb/local.d/admin.ini', - '/etc/couchdb/local.ini'], - refreshonly => true - } -} diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp index 9ecde5e6..419e4122 100644 --- a/puppet/modules/site_couchdb/manifests/init.pp +++ b/puppet/modules/site_couchdb/manifests/init.pp @@ -1,6 +1,5 @@ -class site_couchdb { +class site_couchdb ( $bigcouch = false ) { tag 'leap_service' - include couchdb $x509 = hiera('x509') $key = $x509['key'] @@ -16,21 +15,22 @@ class site_couchdb { $couchdb_ca_daemon = $couchdb_users['ca_daemon'] $couchdb_ca_daemon_user = $couchdb_ca_daemon['username'] $couchdb_ca_daemon_pw = $couchdb_ca_daemon['password'] + $bigcouch_config = $couchdb_config['bigcouch'] + $bigcouch_cookie = $bigcouch_config['cookie'] - Package ['couchdb'] - -> File['/etc/init.d/couchdb'] - -> File['/etc/couchdb/local.ini'] - -> File['/etc/couchdb/local.d/admin.ini'] - -> File['/etc/couchdb/couchdb.netrc'] + class {'couchdb': + bigcouch => $bigcouch, + admin_pw => $couchdb_admin_pw, + bigcouch_cookie => $bigcouch_cookie + } + + Service ['couchdb'] -> Couchdb::Create_db['users'] -> Couchdb::Create_db['client_certificates'] -> Couchdb::Add_user[$couchdb_webapp_user] -> Couchdb::Add_user[$couchdb_ca_daemon_user] -> Site_couchdb::Apache_ssl_proxy['apache_ssl_proxy'] - include site_couchdb::configure - include couchdb::deploy_config - site_couchdb::apache_ssl_proxy { 'apache_ssl_proxy': key => $key, cert => $cert |