Make etherpad configuration more generic for multiple hosts

This switches us to running the services against the etherpad group. We
also define vars in a group_vars file rather than a host specific
file. This allows us to switch testing over to etherpad99 to decouple it
from our production hostnames.

A followup change will add a new etherpad production server that will be
deployed alongside the existing one. This refactor makes that a bit
simpler.

Change-Id: I838ad31eb74a3abfd02bbfa77c9c2d007d57a3d4
This commit is contained in:
Clark Boylan 2023-04-03 14:56:17 -07:00
parent 19352a6944
commit ed1c7c94a3
10 changed files with 10 additions and 11 deletions

View File

@ -19,7 +19,7 @@ At a Glance
* https://opendev.org/opendev/system-config
* :git_file:`playbooks/roles/etherpad`
* :git_file:`playbooks/service-etherpad.yaml`
* :git_file:`inventory/service/host_vars/etherpad01.opendev.org.yaml`
* :git_file:`inventory/service/group_vars/etherpad.yaml`
:Projects:
* https://etherpad.org/
* https://github.com/ether/etherpad-lite

View File

@ -1,8 +1,8 @@
etherpad_vhost_name: etherpad.opendev.org
letsencrypt_certs:
etherpad01-opendev-org-main:
etherpad-opendev-org-main:
- etherpad.opendev.org
- etherpad01.opendev.org
- '{{ inventory_hostname }}'
- etherpad.openstack.org
etherpad_redirect_vhost: etherpad.openstack.org
borg_backup_excludes_extra:

View File

@ -55,7 +55,7 @@ groups:
- adns*.opendev.org
- ns*.opendev.org
eavesdrop: eavesdrop[0-9]*.opendev.org
etherpad: etherpad[0-9]*.open*.org
etherpad: etherpad[0-9]*.opendev.org
gitea:
- gitea[0-9]*.opendev.org
gitea-lb:

View File

@ -244,7 +244,7 @@
- name: letsencrypt updated nb01-test-main
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated etherpad01-opendev-org-main
- name: letsencrypt updated etherpad-opendev-org-main
include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml
- name: letsencrypt updated keycloak01-opendev-org-main

View File

@ -1,4 +1,4 @@
- hosts: "etherpad01.opendev.org:!disabled"
- hosts: "etherpad:!disabled"
name: "Base: configure etherpad"
roles:
- iptables

View File

@ -139,7 +139,7 @@
- group_vars/zuul-scheduler.yaml
- group_vars/zuul-web.yaml
- host_vars/codesearch01.opendev.org.yaml
- host_vars/etherpad01.opendev.org.yaml
- host_vars/etherpad99.opendev.org.yaml
- host_vars/letsencrypt01.opendev.org.yaml
- host_vars/letsencrypt02.opendev.org.yaml
- host_vars/lists.openstack.org.yaml

View File

@ -13,7 +13,7 @@
# under the License.
testinfra_hosts = ['etherpad01.opendev.org']
testinfra_hosts = ['etherpad99.opendev.org']
def test_etherpad_listening(host):

View File

@ -188,8 +188,7 @@
files:
- inventory/base
- playbooks/service-etherpad.yaml
- inventory/service/host_vars/etherpad01.opendev.org.yaml
- inventory/service/group_vars/etherpad
- inventory/service/group_vars/etherpad.yaml
- playbooks/roles/install-docker/
- playbooks/roles/pip3/
- playbooks/roles/etherpad

View File

@ -651,7 +651,7 @@
nodeset:
nodes:
- <<: *bridge_node_x86
- name: etherpad01.opendev.org
- name: etherpad99.opendev.org
label: ubuntu-bionic
groups:
- <<: *bastion_group