Browse Source

Use kolla tools for memcached configuration

This change updates the memcached service to leverage the kolla
configuration to configure and launch the memcached service. This is the
same pattern we use for the other services.

Related-Bug: #1871734
Change-Id: Ib0bfc3e9009357f0aed28c0a10b927c5ca2e53a7
(cherry picked from commit 71e9b806b4)
changes/56/719056/1
Alex Schultz 3 months ago
parent
commit
cf3c03ebde
1 changed files with 27 additions and 3 deletions
  1. +27
    -3
      deployment/memcached/memcached-container-puppet.yaml

+ 27
- 3
deployment/memcached/memcached-container-puppet.yaml View File

@@ -138,6 +138,7 @@ outputs:
dport: 11211
proto: 'tcp'
source: {get_param: MemcachedIpSubnet}
memcached::logfile: '/var/log/memcached/memcached.log'
service_config_settings:
collectd:
tripleo.collectd.plugins.memcached:
@@ -153,7 +154,18 @@ outputs:
step_config: |
include ::tripleo::profile::base::memcached
config_image: {get_param: ContainerMemcachedConfigImage}
kolla_config: {}
kolla_config:
/var/lib/kolla/config_files/memcached.json:
command: bash -c $* -- eval source /etc/sysconfig/memcached; exec /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
permissions:
- path: /var/log/memcached
owner: memcached:memcached
recurse: true
docker_config:
step_1:
memcached:
@@ -168,8 +180,20 @@ outputs:
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']
- /var/lib/kolla/config_files/memcached.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/memcached:/var/lib/kolla/config_files/src:rw,z
- /var/log/containers/memcached:/var/log/memcached:rw
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
mode: "{{ item.mode }}"
with_items:
- { 'path': /var/log/containers/memcached, 'setype': container_file_t, 'mode': '0750' }
upgrade_tasks: []
external_upgrade_tasks:
- when:


Loading…
Cancel
Save