From 3cea68f12cd954282a824936922f58768aef5042 Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Fri, 13 Oct 2017 00:52:55 +0200 Subject: [PATCH] Deploy Ceph Luminous and add support for CephMgr service The upgrade of Ceph to Luminous requires a new daemon, ceph-mgr, to be deployed with every ceph-mon. This submission adds support for the deployment of ceph-mgr via ceph-ansible. Change-Id: I4226233d02b70980c6b53518ae2d511b653ce2de Depends-On: I3645c6c3f68fcefc93fa8699796ba8892aa946c8 Implements: blueprint ceph-luminous --- .../scenario001-multinode-containers.yaml | 4 ++ .../scenario004-multinode-containers.yaml | 4 ++ .../deployed-server-roles-data.yaml | 1 + docker/services/ceph-ansible/ceph-base.yaml | 7 +- docker/services/ceph-ansible/ceph-mgr.yaml | 66 +++++++++++++++++++ environments/ceph-ansible/ceph-ansible.yaml | 1 + overcloud-resource-registry-puppet.j2.yaml | 1 + roles/Controller.yaml | 1 + roles/ControllerOpenstack.yaml | 1 + roles_data.yaml | 1 + 10 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 docker/services/ceph-ansible/ceph-mgr.yaml diff --git a/ci/environments/scenario001-multinode-containers.yaml b/ci/environments/scenario001-multinode-containers.yaml index 9533819391..d5395da1ca 100644 --- a/ci/environments/scenario001-multinode-containers.yaml +++ b/ci/environments/scenario001-multinode-containers.yaml @@ -1,6 +1,7 @@ resource_registry: OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml + OS::TripleO::Services::CephMgr: ../../docker/services/ceph-ansible/ceph-mgr.yaml OS::TripleO::Services::CephMon: ../../docker/services/ceph-ansible/ceph-mon.yaml OS::TripleO::Services::CephOSD: ../../docker/services/ceph-ansible/ceph-osd.yaml OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml @@ -79,6 +80,7 @@ parameter_defaults: - OS::TripleO::Services::GnocchiMetricd - OS::TripleO::Services::GnocchiStatsd - OS::TripleO::Services::PankoApi + - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon - OS::TripleO::Services::CephOSD - OS::TripleO::Services::CephClient @@ -103,6 +105,8 @@ parameter_defaults: # This makes the job twice as fast ceilometer::agent::polling::polling_interval: 15 Debug: true + #TODO(gfidente): remove when the new default is in tripleo-common + DockerCephDaemonImage: docker.io/ceph/daemon:tag-build-master-luminous-centos-7 CephAnsibleDisksConfig: devices: - /dev/loop3 diff --git a/ci/environments/scenario004-multinode-containers.yaml b/ci/environments/scenario004-multinode-containers.yaml index cc7a497991..6605f0f10f 100644 --- a/ci/environments/scenario004-multinode-containers.yaml +++ b/ci/environments/scenario004-multinode-containers.yaml @@ -1,6 +1,7 @@ resource_registry: OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml + OS::TripleO::Services::CephMgr: ../../docker/services/ceph-ansible/ceph-mgr.yaml OS::TripleO::Services::CephMon: ../../docker/services/ceph-ansible/ceph-mon.yaml OS::TripleO::Services::CephOSD: ../../docker/services/ceph-ansible/ceph-osd.yaml OS::TripleO::Services::CephMds: ../../docker/services/ceph-ansible/ceph-mds.yaml @@ -39,6 +40,7 @@ resource_registry: parameter_defaults: ControllerServices: - OS::TripleO::Services::CephMds + - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon - OS::TripleO::Services::CephOSD - OS::TripleO::Services::CephRgw @@ -92,6 +94,8 @@ parameter_defaults: nova::compute::libvirt::services::libvirt_virt_type: qemu nova::compute::libvirt::libvirt_virt_type: qemu Debug: true + #TODO(gfidente): remove when the new default is in tripleo-common + DockerCephDaemonImage: docker.io/ceph/daemon:tag-build-master-luminous-centos-7 CephAnsibleDisksConfig: devices: - /dev/loop3 diff --git a/deployed-server/deployed-server-roles-data.yaml b/deployed-server/deployed-server-roles-data.yaml index 65307de754..eff73f1e58 100644 --- a/deployed-server/deployed-server-roles-data.yaml +++ b/deployed-server/deployed-server-roles-data.yaml @@ -46,6 +46,7 @@ - OS::TripleO::Services::CeilometerAgentNotification - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephMds + - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw diff --git a/docker/services/ceph-ansible/ceph-base.yaml b/docker/services/ceph-ansible/ceph-base.yaml index bceeade9c5..08ec41e886 100644 --- a/docker/services/ceph-ansible/ceph-base.yaml +++ b/docker/services/ceph-ansible/ceph-base.yaml @@ -49,7 +49,7 @@ parameters: CephAnsibleUpgradePlaybook: type: string description: Path to the ceph-ansible playbook to execute on upgrade - default: /usr/share/ceph-ansible/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml + default: /usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml CephAnsibleExtraConfig: type: json description: Extra vars for the ceph-ansible playbook @@ -205,7 +205,7 @@ outputs: ireallymeanit: 'yes' fsid: { get_param: CephClusterFSID } docker: true - ceph_release: jewel + ceph_release: luminous ceph_docker_registry: {get_attr: [DockerImageUrlParts, value, host]} ceph_docker_image: {get_attr: [DockerImageUrlParts, value, image]} ceph_docker_image_tag: {get_attr: [DockerImageUrlParts, value, image_tag]} @@ -242,6 +242,7 @@ outputs: - - client - {get_param: CephClientUserName} key: {get_param: CephClientKey} + mgr_cap: "allow *" mon_cap: "allow r" osd_cap: str_replace: @@ -264,6 +265,7 @@ outputs: - - client - {get_param: ManilaCephFSNativeCephFSAuthId} key: {get_param: CephManilaClientKey} + mgr_cap: "allow *" mon_cap: 'allow r, allow command \\\"auth del\\\", allow command \\\"auth caps\\\", allow command \\\"auth get\\\", allow command \\\"auth get-or-create\\\"' mds_cap: "allow *" osd_cap: "allow rw" @@ -274,6 +276,7 @@ outputs: - - client - {get_param: CephRgwClientName} key: {get_param: CephRgwKey} + mgr_cap: "allow *" mon_cap: "allow rw" osd_cap: "allow rwx" mode: "0644" diff --git a/docker/services/ceph-ansible/ceph-mgr.yaml b/docker/services/ceph-ansible/ceph-mgr.yaml new file mode 100644 index 0000000000..47a34c449d --- /dev/null +++ b/docker/services/ceph-ansible/ceph-mgr.yaml @@ -0,0 +1,66 @@ +heat_template_version: pike + +description: > + Ceph Manager 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. This + mapping overrides those in ServiceNetMapDefaults. + type: json + DefaultPasswords: + default: {} + 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 + +resources: + CephBase: + type: ./ceph-base.yaml + properties: + ServiceData: {get_param: ServiceData} + ServiceNetMap: {get_param: ServiceNetMap} + DefaultPasswords: {get_param: DefaultPasswords} + EndpointMap: {get_param: EndpointMap} + RoleName: {get_param: RoleName} + RoleParameters: {get_param: RoleParameters} + +outputs: + role_data: + description: Role data for the Ceph Manager service. + value: + service_name: ceph_mgr + upgrade_tasks: [] + puppet_config: + config_image: '' + config_volume: '' + step_config: '' + docker_config: {} + workflow_tasks: {get_attr: [CephBase, role_data, workflow_tasks]} + config_settings: + map_merge: + - tripleo.ceph_mgr.firewall_rules: + '113 ceph_mgr': + dport: + - '6800-7300' + - ceph_mgr_ansible_vars: + map_merge: + - {get_attr: [CephBase, role_data, config_settings, ceph_common_ansible_vars]} + - {} diff --git a/environments/ceph-ansible/ceph-ansible.yaml b/environments/ceph-ansible/ceph-ansible.yaml index 2c25828c63..950f95813e 100644 --- a/environments/ceph-ansible/ceph-ansible.yaml +++ b/environments/ceph-ansible/ceph-ansible.yaml @@ -1,4 +1,5 @@ resource_registry: + OS::TripleO::Services::CephMgr: ../../docker/services/ceph-ansible/ceph-mgr.yaml OS::TripleO::Services::CephMon: ../../docker/services/ceph-ansible/ceph-mon.yaml OS::TripleO::Services::CephOSD: ../../docker/services/ceph-ansible/ceph-osd.yaml OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index 73462e6b0b..09b85c9132 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -116,6 +116,7 @@ resource_registry: OS::TripleO::Services::Apache: puppet/services/apache.yaml OS::TripleO::Services::CACerts: puppet/services/ca-certs.yaml OS::TripleO::Services::CephMds: OS::Heat::None + OS::TripleO::Services::CephMgr: OS::Heat::None OS::TripleO::Services::CephMon: OS::Heat::None OS::TripleO::Services::CephRbdMirror: OS::Heat::None OS::TripleO::Services::CephRgw: OS::Heat::None diff --git a/roles/Controller.yaml b/roles/Controller.yaml index 90c8fe8c85..dac6d42374 100644 --- a/roles/Controller.yaml +++ b/roles/Controller.yaml @@ -35,6 +35,7 @@ - OS::TripleO::Services::CeilometerAgentNotification - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephMds + - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw diff --git a/roles/ControllerOpenstack.yaml b/roles/ControllerOpenstack.yaml index b23a0c8102..96a97373ab 100644 --- a/roles/ControllerOpenstack.yaml +++ b/roles/ControllerOpenstack.yaml @@ -29,6 +29,7 @@ - OS::TripleO::Services::CeilometerAgentNotification - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephMds + - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw diff --git a/roles_data.yaml b/roles_data.yaml index e8979b25b5..de11f2d26b 100644 --- a/roles_data.yaml +++ b/roles_data.yaml @@ -38,6 +38,7 @@ - OS::TripleO::Services::CeilometerAgentNotification - OS::TripleO::Services::CephExternal - OS::TripleO::Services::CephMds + - OS::TripleO::Services::CephMgr - OS::TripleO::Services::CephMon - OS::TripleO::Services::CephRbdMirror - OS::TripleO::Services::CephRgw