diff options
-rw-r--r-- | provider_base/services/couchdb.json | 3 | ||||
-rw-r--r-- | provider_base/services/webapp.json | 7 | ||||
-rw-r--r-- | puppet/modules/site_webapp/manifests/couchdb.pp | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/provider_base/services/couchdb.json b/provider_base/services/couchdb.json index c3502c6b..0c407316 100644 --- a/provider_base/services/couchdb.json +++ b/provider_base/services/couchdb.json @@ -3,6 +3,9 @@ "x509": { "use": true }, + "stunnel": { + "couch_server": "= stunnel_server(couch.port)" + }, "couch": { "port": 5984, "bigcouch": { diff --git a/provider_base/services/webapp.json b/provider_base/services/webapp.json index 69c015a6..895aa6e3 100644 --- a/provider_base/services/webapp.json +++ b/provider_base/services/webapp.json @@ -1,7 +1,6 @@ { "webapp": { "modules": ["user", "billing", "help"], - "couchdb_hosts": "= hostnames nodes[:services => :couchdb][:local => local]", "couchdb_admin_user": "= global.services[:couchdb].couch.users[:admin]", "couchdb_webapp_user": "= global.services[:couchdb].couch.users[:webapp]", "favicon": "= file_path 'branding/favicon.ico'", @@ -14,6 +13,12 @@ "allow_anonymous_certs": "= global.provider.service.allow_anonymous", "secret_token": "= secret :webapp_secret_token" }, + "stunnel": { + "couch_client": "= stunnel_client(nodes_like_me[:services => :couchdb], global.services[:couchdb].couch.port)" + }, + "haproxy": { + "local_ports": "= stunnel.couch_client.field(:accept_port)" + }, "definition_files": { "provider": "= file :provider_json_template", "eip_service": "= file :eip_service_json_template" diff --git a/puppet/modules/site_webapp/manifests/couchdb.pp b/puppet/modules/site_webapp/manifests/couchdb.pp index e89880fe..ef61aeb6 100644 --- a/puppet/modules/site_webapp/manifests/couchdb.pp +++ b/puppet/modules/site_webapp/manifests/couchdb.pp @@ -5,7 +5,6 @@ class site_webapp::couchdb { $cert = $x509['cert'] $ca = $x509['ca_cert'] $webapp = hiera('webapp') - $couchdb_hosts = $webapp['couchdb_hosts'] # haproxy listener on port localhost:4096, see site_webapp::haproxy $couchdb_host = 'localhost' $couchdb_port = '4096' |