Merge "drop root on memcached"

This commit is contained in:
Jenkins 2015-11-14 17:11:23 +00:00 committed by Gerrit Code Review
commit fb06344aee
2 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,4 @@
{% 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 }}",
"command": "/usr/bin/memcached -vv -l {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} -p {{ memcached_port }}",
"config_files": []
}

View File

@ -3,14 +3,20 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set user = 'memcached' %}
RUN yum -y install memcached \
&& yum clean all
&& yum clean all \
&& usermod -a -G kolla {{ user }}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set user = 'memcache' %}
RUN apt-get install -y --no-install-recommends memcached \
&& apt-get clean
&& apt-get clean \
&& usermod -a -G kolla {{ user }}
{% endif %}
{{ include_footer }}
USER {{ user }}