diff --git a/puppet/services/memcached.yaml b/deployment/memcached/memcached-container-puppet.yaml similarity index 63% rename from puppet/services/memcached.yaml rename to deployment/memcached/memcached-container-puppet.yaml index 6189477182..b8c60e1aa9 100644 --- a/puppet/services/memcached.yaml +++ b/deployment/memcached/memcached-container-puppet.yaml @@ -1,9 +1,20 @@ heat_template_version: rocky description: > - Memcached service configured with Puppet + OpenStack containerized Memcached services parameters: + DockerMemcachedImage: + description: image + type: string + DockerMemcachedConfigImage: + description: The container image to use for the memcached config_volume + type: string + EndpointMap: + default: {} + description: Mapping of service endpoint -> protocol. Typically set + via parameter_defaults in the resource registry. + type: json ServiceData: default: {} description: Dictionary packing service data @@ -25,11 +36,6 @@ parameters: 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 MemcachedMaxMemory: default: '50%' description: The maximum amount of memory for memcached to be configured @@ -64,9 +70,14 @@ conditions: - equals: [{get_param: MemcachedDebug}, 'true'] - equals: [{get_param: MemcachedDebug}, 'True'] +resources: + + ContainersCommon: + type: ../../docker/services/containers-common.yaml + outputs: role_data: - description: Role data for the Memcached role. + description: Role data for the Memcached API role. value: service_name: memcached monitoring_subscription: {get_param: MonitoringSubscriptionMemcached} @@ -115,8 +126,7 @@ outputs: - memcached_network_unset - "%{hiera('memcached_network')}" - {get_param: MemcachedIpSubnet} - step_config: | - include ::tripleo::profile::base::memcached + memcached::logstdout: true service_config_settings: collectd: tripleo.collectd.plugins.memcached: @@ -125,3 +135,61 @@ outputs: local: host: "%{hiera('memcached::listen_ip')}" port: 11211 + # BEGIN DOCKER SETTINGS + puppet_config: + config_volume: 'memcached' + puppet_tags: 'file' + step_config: | + include ::tripleo::profile::base::memcached + config_image: {get_param: DockerMemcachedConfigImage} + kolla_config: {} + docker_config: + step_1: + memcached: + start_order: 0 + image: {get_param: DockerMemcachedImage} + net: host + privileged: false + restart: always + healthcheck: + test: /openstack/healthcheck + volumes: + list_concat: + - {get_attr: [ContainersCommon, volumes]} + - + - /var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro + command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS'] + host_prep_tasks: + - name: memcached logs readme + copy: + dest: /var/log/memcached-readme.txt + content: | + Memcached container logs to stdout/stderr only. + ignore_errors: true + upgrade_tasks: [] + post_upgrade_tasks: + - when: step|int == 1 + import_role: + name: tripleo-docker-rm + vars: + containers_to_rm: + - memcached + fast_forward_upgrade_tasks: + - when: + - step|int == 0 + - release == 'ocata' + block: + - name: Check if memcached is deployed + command: systemctl is-enabled --quiet memcached + tags: common + ignore_errors: True + register: memcached_enabled_result + - name: memcached_enabled + set_fact: + memcached_enabled: "{{ memcached_enabled_result.rc == 0 }}" + - name: Stop and disable memcached service + when: + - step|int == 2 + - release == 'ocata' + - memcached_enabled|bool + service: name=memcached state=stopped enabled=no diff --git a/docker/services/memcached.yaml b/docker/services/memcached.yaml deleted file mode 100644 index e1666de3cc..0000000000 --- a/docker/services/memcached.yaml +++ /dev/null @@ -1,122 +0,0 @@ -heat_template_version: rocky - -description: > - OpenStack containerized Memcached services - -parameters: - DockerMemcachedImage: - description: image - type: string - DockerMemcachedConfigImage: - description: The container image to use for the memcached config_volume - type: string - EndpointMap: - default: {} - description: Mapping of service endpoint -> protocol. Typically set - via parameter_defaults in the resource registry. - type: json - 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 - -resources: - - ContainersCommon: - type: ./containers-common.yaml - - MemcachedBase: - type: ../../puppet/services/memcached.yaml - properties: - EndpointMap: {get_param: EndpointMap} - ServiceData: {get_param: ServiceData} - ServiceNetMap: {get_param: ServiceNetMap} - DefaultPasswords: {get_param: DefaultPasswords} - RoleName: {get_param: RoleName} - RoleParameters: {get_param: RoleParameters} - -outputs: - role_data: - description: Role data for the Memcached API role. - value: - service_name: {get_attr: [MemcachedBase, role_data, service_name]} - config_settings: - map_merge: - - {get_attr: [MemcachedBase, role_data, config_settings]} - - memcached::logstdout: true - service_config_settings: {get_attr: [MemcachedBase, role_data, service_config_settings]} - # BEGIN DOCKER SETTINGS - puppet_config: - config_volume: 'memcached' - puppet_tags: 'file' - step_config: - get_attr: [MemcachedBase, role_data, step_config] - config_image: {get_param: DockerMemcachedConfigImage} - kolla_config: {} - docker_config: - step_1: - memcached: - start_order: 0 - image: {get_param: DockerMemcachedImage} - net: host - privileged: false - restart: always - healthcheck: - test: /openstack/healthcheck - volumes: - list_concat: - - {get_attr: [ContainersCommon, volumes]} - - - - /var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro - command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS'] - host_prep_tasks: - - name: memcached logs readme - copy: - dest: /var/log/memcached-readme.txt - content: | - Memcached container logs to stdout/stderr only. - ignore_errors: true - upgrade_tasks: [] - post_upgrade_tasks: - - when: step|int == 1 - import_role: - name: tripleo-docker-rm - vars: - containers_to_rm: - - memcached - fast_forward_upgrade_tasks: - - when: - - step|int == 0 - - release == 'ocata' - block: - - name: Check if memcached is deployed - command: systemctl is-enabled --quiet memcached - tags: common - ignore_errors: True - register: memcached_enabled_result - - name: memcached_enabled - set_fact: - memcached_enabled: "{{ memcached_enabled_result.rc == 0 }}" - - name: Stop and disable memcached service - when: - - step|int == 2 - - release == 'ocata' - - memcached_enabled|bool - service: name=memcached state=stopped enabled=no diff --git a/environments/baremetal-services.yaml b/environments/baremetal-services.yaml index 05ff6d17c7..bac4a6affb 100644 --- a/environments/baremetal-services.yaml +++ b/environments/baremetal-services.yaml @@ -27,7 +27,7 @@ resource_registry: OS::TripleO::Services::Horizon: ../puppet/services/horizon.yaml OS::TripleO::Services::Iscsid: ../puppet/services/iscsid.yaml OS::TripleO::Services::Keystone: ../puppet/services/keystone.yaml - OS::TripleO::Services::Memcached: ../puppet/services/memcached.yaml + OS::TripleO::Services::Memcached: ../deployment/memcached/memcached-container-puppet.yaml OS::TripleO::Services::Multipathd: OS::Heat::None OS::TripleO::Services::MySQL: ../puppet/services/database/mysql.yaml OS::TripleO::Services::NeutronApi: ../puppet/services/neutron-api.yaml diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index e03c2e759a..6221b19edf 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -182,7 +182,7 @@ resource_registry: OS::TripleO::Services::HAProxyInternalTLS: OS::Heat::None OS::TripleO::Services::Iscsid: docker/services/iscsid.yaml OS::TripleO::Services::Keepalived: deployment/keepalived/keepalived-container-puppet.yaml - OS::TripleO::Services::Memcached: docker/services/memcached.yaml + OS::TripleO::Services::Memcached: deployment/memcached/memcached-container-puppet.yaml OS::TripleO::Services::SaharaApi: OS::Heat::None OS::TripleO::Services::SaharaEngine: OS::Heat::None OS::TripleO::Services::TripleoUI: OS::Heat::None diff --git a/releasenotes/notes/drop-baremetal-memcached-6cbdfd80bef14a41.yaml b/releasenotes/notes/drop-baremetal-memcached-6cbdfd80bef14a41.yaml new file mode 100644 index 0000000000..3b2a00b420 --- /dev/null +++ b/releasenotes/notes/drop-baremetal-memcached-6cbdfd80bef14a41.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Installing memcached services on baremetal is no longer supported.