Replace config-external - memcached
Change-Id: I83094d1fc98c79c74d6c9fdc68aa224ae4a6d672 Partially-Implements: blueprint replace-config-external
This commit is contained in:
parent
4d5186473e
commit
9b18d2d28b
@ -5,7 +5,7 @@
|
||||
state: "directory"
|
||||
recurse: "yes"
|
||||
|
||||
- name: Copying over config(s)
|
||||
- name: Copying over memcached JSON configuration file
|
||||
template:
|
||||
src: "memcached.conf.j2"
|
||||
dest: "{{ node_config_directory }}/memcached/memcached.conf"
|
||||
src: "memcached.json.j2"
|
||||
dest: "{{ node_config_directory }}/memcached/config.json"
|
||||
|
@ -13,7 +13,7 @@
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: memcached
|
||||
image: "{{ memcached_image_full }}"
|
||||
volumes: "{{ node_config_directory }}/memcached/:/opt/kolla/memcached/:ro"
|
||||
volumes: "{{ node_config_directory }}/memcached/:/opt/kolla/config_files/:ro"
|
||||
env:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
when: inventory_hostname in groups['memcached']
|
||||
|
@ -1 +0,0 @@
|
||||
OPTIONS="-l {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} -p {{ memcached_port }}"
|
5
ansible/roles/memcached/templates/memcached.json.j2
Normal file
5
ansible/roles/memcached/templates/memcached.json.j2
Normal file
@ -0,0 +1,5 @@
|
||||
{% set memcache_user = 'memcache' if kolla_base_distro in ['ubuntu', 'debian'] else 'memcached' %}
|
||||
{
|
||||
"command": "/usr/bin/memcached -u {{ memcache_user }} -vv -l {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} -p {{ memcached_port }}",
|
||||
"config_files": []
|
||||
}
|
@ -2,21 +2,11 @@
|
||||
|
||||
set -o errexit
|
||||
|
||||
if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \
|
||||
"${KOLLA_BASE_DISTRO}" == "debian" ]]; then
|
||||
CMD="/usr/bin/memcached"
|
||||
ARGS="-u memcache -vv"
|
||||
else
|
||||
CMD="/usr/bin/memcached"
|
||||
ARGS="-u memcached -vv"
|
||||
fi
|
||||
|
||||
# Loading common functions.
|
||||
source /opt/kolla/kolla-common.sh
|
||||
|
||||
# Execute config strategy
|
||||
set_configs
|
||||
# Generate run command
|
||||
python /opt/kolla/set_configs.py
|
||||
CMD=$(cat /run_command)
|
||||
|
||||
source /etc/memcached.conf
|
||||
|
||||
exec $CMD $ARGS $OPTIONS
|
||||
exec $CMD
|
||||
|
Loading…
Reference in New Issue
Block a user