From 0f0031d16e96a626b883074da566444045a86e90 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 10 Aug 2018 09:58:42 -0700 Subject: [PATCH] Add digit support to etherpad servers Looking at upgrading etherpad servers to Xenial and realize that we haven't "digitized" them yet. Lets get that in first so that the new instances we boot can be etherpad01 and etherpad-dev01. Change-Id: I700a1d018ab37436f11b2d883d79c82db7f1d6b1 --- inventory/groups.yaml | 3 ++- manifests/site.pp | 10 +++++++--- modules/openstack_project/manifests/etherpad.pp | 4 +++- modules/openstack_project/manifests/etherpad_dev.pp | 4 +++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/inventory/groups.yaml b/inventory/groups.yaml index bde8b6cbaf..8cb9f1ecde 100644 --- a/inventory/groups.yaml +++ b/inventory/groups.yaml @@ -12,7 +12,8 @@ groups: eavesdrop: inventory_hostname.startswith('eavesdrop') elasticsearch: inventory_hostname is match('elasticsearch0[1-7]\.openstack\.org') ethercalc: inventory_hostname.startswith('ethercalc') - etherpad: inventory_hostname.startswith('etherpad') + etherpad: inventory_hostname is match('etherpad\d*\.openstack\.org') + etherpad-dev: inventory_hostname is match('etherpad-dev\d*\.openstack\.org') files: inventory_hostname.startswith('files') firehose: inventory_hostname.startswith('firehose') futureparser: > diff --git a/manifests/site.pp b/manifests/site.pp index 2cb46db8d1..fe201eaa7c 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -305,9 +305,11 @@ node /^ethercalc\d+\.openstack\.org$/ { # Node-OS: trusty # Node-OS: xenial node /^etherpad\d*\.openstack\.org$/ { + $group = "etherpad" class { 'openstack_project::server': } class { 'openstack_project::etherpad': + vhost_name => 'etherpad.openstack.org', ssl_cert_file_contents => hiera('etherpad_ssl_cert_file_contents'), ssl_key_file_contents => hiera('etherpad_ssl_key_file_contents'), ssl_chain_file_contents => hiera('etherpad_ssl_chain_file_contents'), @@ -320,12 +322,14 @@ node /^etherpad\d*\.openstack\.org$/ { # Node-OS: trusty # Node-OS: xenial node /^etherpad-dev\d*\.openstack\.org$/ { + $group = "etherpad-dev" class { 'openstack_project::server': } class { 'openstack_project::etherpad_dev': - mysql_host => hiera('etherpad-dev_db_host', 'localhost'), - mysql_user => hiera('etherpad-dev_db_user', 'username'), - mysql_password => hiera('etherpad-dev_db_password'), + vhost_name => 'etherpad-dev.openstack.org', + mysql_host => hiera('etherpad-dev_db_host', 'localhost'), + mysql_user => hiera('etherpad-dev_db_user', 'username'), + mysql_password => hiera('etherpad-dev_db_password'), } } diff --git a/modules/openstack_project/manifests/etherpad.pp b/modules/openstack_project/manifests/etherpad.pp index ad875a094e..acbe7b1bf8 100644 --- a/modules/openstack_project/manifests/etherpad.pp +++ b/modules/openstack_project/manifests/etherpad.pp @@ -8,7 +8,8 @@ class openstack_project::etherpad ( $ssl_chain_file_contents = '', $mysql_host = 'localhost', $mysql_user = 'eplite', - $mysql_db_name = 'etherpad-lite' + $mysql_db_name = 'etherpad-lite', + $vhost_name = $::fqdn, ) { class { 'etherpad_lite': ep_ensure => 'latest', @@ -17,6 +18,7 @@ class openstack_project::etherpad ( } class { 'etherpad_lite::apache': + vhost_name => $vhost_name, ssl_cert_file => $ssl_cert_file, ssl_key_file => $ssl_key_file, ssl_chain_file => $ssl_chain_file, diff --git a/modules/openstack_project/manifests/etherpad_dev.pp b/modules/openstack_project/manifests/etherpad_dev.pp index abdd1aef54..07769720b1 100644 --- a/modules/openstack_project/manifests/etherpad_dev.pp +++ b/modules/openstack_project/manifests/etherpad_dev.pp @@ -2,7 +2,8 @@ class openstack_project::etherpad_dev ( $mysql_password, $mysql_host = 'localhost', $mysql_user = 'eplite', - $mysql_db_name = 'etherpad-lite' + $mysql_db_name = 'etherpad-lite', + $vhost_name = $::fqdn, ) { class { 'etherpad_lite': ep_ensure => 'latest', @@ -10,6 +11,7 @@ class openstack_project::etherpad_dev ( } class { 'etherpad_lite::apache': + vhost_name => $vhost_name, ssl_cert_file => '/etc/ssl/certs/ssl-cert-snakeoil.pem', ssl_key_file => '/etc/ssl/private/ssl-cert-snakeoil.key', ssl_chain_file => '',