From f1e31ed1692c070455ef7ee7490778bb2bc82757 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:22 -0400 Subject: [PATCH] Add additional API configuration --- group_vars/default/pvc.yml | 3 ++ roles/pvc/defaults/main.yml | 3 ++ roles/pvc/templates/pvc/pvc-api.yaml.j2 | 37 +++++++++++++++++++++++++ roles/pvc/templates/pvc/pvcd.yaml.j2 | 6 ++-- 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/group_vars/default/pvc.yml b/group_vars/default/pvc.yml index ad251ca..c825316 100644 --- a/group_vars/default/pvc.yml +++ b/group_vars/default/pvc.yml @@ -30,6 +30,9 @@ pvc_ceph_storage_secret_uuid: "" # Use uuidgen to generate pvc_dns_database_name: "pvcdns" pvc_dns_database_user: "pvcdns" pvc_dns_database_password: "" # Use pwgen to generate +pvc_prov_database_name: "pvcprov" +pvc_prov_database_user: "pvcprov" +pvc_prov_database_password: "" # Use pwgen to generate pvc_replication_database_user: "replicator" pvc_replication_database_password: "" # Use pwgen to generate pvc_superuser_database_user: "postgres" diff --git a/roles/pvc/defaults/main.yml b/roles/pvc/defaults/main.yml index 0c0dc59..71d778b 100644 --- a/roles/pvc/defaults/main.yml +++ b/roles/pvc/defaults/main.yml @@ -6,6 +6,9 @@ ceph_storage_secret_uuid: "" pvc_dns_database_name: "pvcdns" pvc_dns_database_user: "pvcdns" pvc_dns_database_password: "PVCdnsPassw0rd" +pvc_prov_database_name: "pvcprov" +pvc_prov_database_user: "pvcprov" +pvc_prov_database_password: "PVCprovPassw0rd" # Coordinators pvc_nodes: - hostname: "pvc1" diff --git a/roles/pvc/templates/pvc/pvc-api.yaml.j2 b/roles/pvc/templates/pvc/pvc-api.yaml.j2 index 2d5f61e..c84bcd1 100644 --- a/roles/pvc/templates/pvc/pvc-api.yaml.j2 +++ b/roles/pvc/templates/pvc/pvc-api.yaml.j2 @@ -33,3 +33,40 @@ pvc: cert_file: "/etc/pvc/api-cert.pem" # key_file: SSL certificate key file key_file: "/etc/pvc/api-key.pem" + # provisioner: Configuration of the Provisioner API listener + provisioner: + # database: Backend database configuration + database: + # host: PostgreSQL hostname, usually 'localhost' + host: localhost + # port: PostgreSQL port, invariably '5432' + port: 5432 + # name: PostgreSQL database name, invariably 'pvcprov' + name: {{ pvc_prov_database_name }} + # user: PostgreSQL username, invariable 'pvcprov' + user: {{ pvc_prov_database_user }} + # pass: PostgreSQL user password, randomly generated + pass: {{ pvc_prov_database_password }} + # queue: Celery backend queue using the PVC Zookeeper cluster + queue: + # host: Redis hostname, usually 'localhost' + host: localhost + # port: Redis port, invariably '6279' + port: 6379 + # path: Redis queue path, invariably '/0' + path: /0 + # ceph_cluster: Information about the Ceph storage cluster + ceph_cluster: + # storage_hosts: The list of hosts that the Ceph monitors are valid on; if empty (the default), + # uses the list of coordinators + storage_hosts: +{% for node in pvc_nodes if node.is_coordinator %} + - {{ node.hostname }} +{% endfor %} + # storage_domain: The storage domain name, concatenated with the coordinators list names + # to form monitor access strings + storage_domain: {{ pvc_storage_domain }} + # ceph_monitor_port: The port that the Ceph monitor on each coordinator listens on + ceph_monitor_port: 6789 + # ceph_storage_secret_uuid: Libvirt secret UUID for Ceph storage access + ceph_storage_secret_uuid: {{ pvc_ceph_storage_secret_uuid }} diff --git a/roles/pvc/templates/pvc/pvcd.yaml.j2 b/roles/pvc/templates/pvc/pvcd.yaml.j2 index b85cb63..452aca7 100644 --- a/roles/pvc/templates/pvc/pvcd.yaml.j2 +++ b/roles/pvc/templates/pvc/pvcd.yaml.j2 @@ -34,9 +34,9 @@ pvc: database: host: localhost port: 5432 - name: pvcdns - user: pvcdns - pass: PVCdnsPassw0rd + name: {{ pvc_dns_database_name }} + user: {{ pvc_dns_database_user }} + pass: {{ pvc_dns_database_password }} system: intervals: keepalive_interval: 5