From 4dc74ac1641a8aa31412fbcf8557bd13638bea1a Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Wed, 12 Jan 2022 17:35:57 +0100 Subject: [PATCH] Add CephIngress resource This change adds the CephIngress resource that can be used on top of CephNfs to deploy the ingress daemon through the orchestrator. Depends-On: I7e337596b653cf635f07a36606e9f673044402a3 Change-Id: Ibd20627a8b110364e13c2bf26848ba6e3a8e4060 --- deployment/cephadm/ceph-ingress.yaml | 72 +++++++++++++++++++ environments/manila-cephfsganesha-config.yaml | 1 + overcloud-resource-registry-puppet.j2.yaml | 2 + roles/CephAll.yaml | 1 + roles/Controller.yaml | 1 + roles/ControllerNovaStandalone.yaml | 1 + roles/ControllerOpenstack.yaml | 1 + roles/ControllerStorageDashboard.yaml | 1 + roles/ControllerStorageNfs.yaml | 1 + roles/HciCephAll.yaml | 1 + roles/Standalone.yaml | 1 + roles_data.yaml | 1 + tools/yaml-validate.py | 3 + 13 files changed, 87 insertions(+) create mode 100644 deployment/cephadm/ceph-ingress.yaml diff --git a/deployment/cephadm/ceph-ingress.yaml b/deployment/cephadm/ceph-ingress.yaml new file mode 100644 index 0000000000..8362f12ed9 --- /dev/null +++ b/deployment/cephadm/ceph-ingress.yaml @@ -0,0 +1,72 @@ +heat_template_version: wallaby + +description: > + Ceph Ingress Daemon service. + +parameters: + ServiceData: + default: {} + description: Dictionary packing service data + type: json + ServiceNetMap: + default: {} + description: Mapping of service_name -> network name. Typically set + via parameter_defaults in the resource registry. Use + parameter_merge_strategies to merge it with the defaults. + type: json + RoleName: + default: '' + description: Role name on which the service is applied + type: string + RoleParameters: + default: {} + description: Parameters specific to the role + type: json + EndpointMap: + default: {} + description: Mapping of service endpoint -> protocol. Typically set + via parameter_defaults in the resource registry. + type: json + KeepalivedContainerImage: + description: Keepalived container image + type: string + HaproxyContainerImage: + description: Haproxy container image + type: string + +resources: + CephBase: + type: ./ceph-base.yaml + properties: + ServiceData: {get_param: ServiceData} + ServiceNetMap: {get_param: ServiceNetMap} + EndpointMap: {get_param: EndpointMap} + RoleName: {get_param: RoleName} + RoleParameters: {get_param: RoleParameters} + +outputs: + role_data: + description: Role data for the Ceph Ingress service. + value: + service_name: ceph_ingress + firewall_rules: + '115 ceph_ingress': + dport: + - '2049' + - '8999' + upgrade_tasks: [] + puppet_config: {} + docker_config: {} + external_deploy_tasks: + list_concat: + - {get_attr: [CephBase, role_data, external_deploy_tasks]} + - - name: ceph_ingress variables + when: step|int == 1 + tags: + - ceph + block: + - name: set cephadm ingress vars + set_fact: + cephadm_ingress: + tripleo_cephadm_keepalived_image: {get_param: KeepalivedContainerImage} + tripleo_cephadm_haproxy_image: {get_param: HaproxyContainerImage} diff --git a/environments/manila-cephfsganesha-config.yaml b/environments/manila-cephfsganesha-config.yaml index 55943cf25b..ba0bc787bc 100644 --- a/environments/manila-cephfsganesha-config.yaml +++ b/environments/manila-cephfsganesha-config.yaml @@ -9,6 +9,7 @@ resource_registry: # ceph-nfs (ganesha) service is installed and configured by cephadm # but it's still managed by pacemaker OS::TripleO::Services::CephNfs: ../deployment/cephadm/ceph-nfs.yaml + OS::TripleO::Services::CephIngress: ../deployment/cephadm/ceph-ingress.yaml parameter_defaults: diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index b76ea22d3d..5b7af1df20 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -120,6 +120,7 @@ resource_registry: OS::TripleO::Services::CephClient: OS::Heat::None OS::TripleO::Services::CephNfs: OS::Heat::None OS::TripleO::Services::CephExternal: OS::Heat::None + OS::TripleO::Services::CephIngress: OS::Heat::None OS::TripleO::Services::CinderApi: deployment/cinder/cinder-api-container-puppet.yaml OS::TripleO::Services::CinderBackup: OS::Heat::None OS::TripleO::Services::CinderScheduler: deployment/cinder/cinder-scheduler-container-puppet.yaml @@ -408,6 +409,7 @@ parameter_defaults: CephClusterNetwork: {{ _service_nets.get('storage_mgmt', 'ctlplane') }} CephDashboardNetwork: {{ _service_nets.get('storage_dashboard', 'ctlplane') }} CephGrafanaNetwork: {{ _service_nets.get('storage', 'ctlplane') }} + CephIngressNetwork: {{ _service_nets.get('storage', 'ctlplane') }} CephMonNetwork: {{ _service_nets.get('storage', 'ctlplane') }} CephRgwNetwork: {{ _service_nets.get('storage', 'ctlplane') }} PublicNetwork: {{ _service_nets.get('external', 'ctlplane') }} diff --git a/roles/CephAll.yaml b/roles/CephAll.yaml index 4861312fbc..58813f7f02 100644 --- a/roles/CephAll.yaml +++ b/roles/CephAll.yaml @@ -21,6 +21,7 @@ - OS::TripleO::Services::BootParams - OS::TripleO::Services::CACerts - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/roles/Controller.yaml b/roles/Controller.yaml index 0876ac9746..0c3efdd5f5 100644 --- a/roles/Controller.yaml +++ b/roles/Controller.yaml @@ -56,6 +56,7 @@ - OS::TripleO::Services::CephClient - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/roles/ControllerNovaStandalone.yaml b/roles/ControllerNovaStandalone.yaml index 67227a17ae..c398073d69 100644 --- a/roles/ControllerNovaStandalone.yaml +++ b/roles/ControllerNovaStandalone.yaml @@ -43,6 +43,7 @@ - OS::TripleO::Services::CephClient - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/roles/ControllerOpenstack.yaml b/roles/ControllerOpenstack.yaml index 75ea072623..04038bc57d 100644 --- a/roles/ControllerOpenstack.yaml +++ b/roles/ControllerOpenstack.yaml @@ -44,6 +44,7 @@ - OS::TripleO::Services::CephClient - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/roles/ControllerStorageDashboard.yaml b/roles/ControllerStorageDashboard.yaml index 5befecc4cb..bc3e101dc0 100644 --- a/roles/ControllerStorageDashboard.yaml +++ b/roles/ControllerStorageDashboard.yaml @@ -54,6 +54,7 @@ - OS::TripleO::Services::CephClient - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/roles/ControllerStorageNfs.yaml b/roles/ControllerStorageNfs.yaml index a034ae92af..899400411c 100644 --- a/roles/ControllerStorageNfs.yaml +++ b/roles/ControllerStorageNfs.yaml @@ -54,6 +54,7 @@ - OS::TripleO::Services::CephClient - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/roles/HciCephAll.yaml b/roles/HciCephAll.yaml index e982b79e58..a10f105049 100644 --- a/roles/HciCephAll.yaml +++ b/roles/HciCephAll.yaml @@ -28,6 +28,7 @@ - OS::TripleO::Services::CephClient - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/roles/Standalone.yaml b/roles/Standalone.yaml index aa56c39e0f..4819baaa42 100644 --- a/roles/Standalone.yaml +++ b/roles/Standalone.yaml @@ -47,6 +47,7 @@ - OS::TripleO::Services::CephClient - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/roles_data.yaml b/roles_data.yaml index 71a0a86924..ac9a93d433 100644 --- a/roles_data.yaml +++ b/roles_data.yaml @@ -59,6 +59,7 @@ - OS::TripleO::Services::CephClient - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephGrafana + - OS::TripleO::Services::CephIngress - OS::TripleO::Services::CephMds - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index 26ae8ef29e..0a4bf5d724 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -378,6 +378,7 @@ def validate_hci_role(hci_role_filename, hci_role_tpl): if role['name'] == 'HciCephAll': hci_role_services = role['ServicesDefault'] hci_role_services.remove('OS::TripleO::Services::CephGrafana') + hci_role_services.remove('OS::TripleO::Services::CephIngress') hci_role_services.remove('OS::TripleO::Services::CephMds') hci_role_services.remove('OS::TripleO::Services::CephMgr') hci_role_services.remove('OS::TripleO::Services::CephMon') @@ -417,6 +418,7 @@ def validate_ceph_role(ceph_role_filename, ceph_role_tpl): if role['name'] == 'CephAll': ceph_role_services = role['ServicesDefault'] ceph_role_services.remove('OS::TripleO::Services::CephGrafana') + ceph_role_services.remove('OS::TripleO::Services::CephIngress') ceph_role_services.remove('OS::TripleO::Services::CephMds') ceph_role_services.remove('OS::TripleO::Services::CephMgr') ceph_role_services.remove('OS::TripleO::Services::CephMon') @@ -450,6 +452,7 @@ def validate_controller_no_ceph_role(filename, tpl): services.append('OS::TripleO::Services::CephMds') services.append('OS::TripleO::Services::CephMgr') services.append('OS::TripleO::Services::CephGrafana') + services.append('OS::TripleO::Services::CephIngress') services.append('OS::TripleO::Services::CephMon') services.append('OS::TripleO::Services::CephNfs') services.append('OS::TripleO::Services::CephRbdMirror')