flatten memcached service configuration
This change combines the previous puppet and docker files into a single file that performs the docker service installation and configuration. With this patch the baremetal version of memcached services has been removed. Depends-On: https://review.rdoproject.org/r/#/c/16994/ Change-Id: Ibb74d9e1673d079a6090efe4215c7ee041fce7d6 Related-Blueprint: services-yaml-flattening
This commit is contained in:
parent
7345963531
commit
7a9d6cbc22
@ -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
|
@ -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
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Installing memcached services on baremetal is no longer supported.
|
Loading…
Reference in New Issue
Block a user