Merge "rsyslog container"

This commit is contained in:
Jenkins 2015-09-01 14:54:23 +00:00 committed by Gerrit Code Review
commit d4fc93d883
3 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,17 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
RUN yum -y install \
rsyslog \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
rsyslog \
&& apt-get clean
{% endif %}
COPY config-external.sh /opt/kolla/
COPY start.sh /
CMD ["/start.sh"]

View File

@ -0,0 +1,11 @@
#!/bin/bash
SOURCE="/opt/kolla/rsyslog/rsyslog.conf"
TARGET="/etc/rsyslog.conf"
OWNER="root"
if [[ -f "$SOURCE" ]]; then
rm $TARGET
cp $SOURCE $TARGET
chown ${OWNER}: $TARGET
chmod 0644 $TARGET
fi

14
docker/logging/rsyslog/start.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -o errexit
CMD="/usr/sbin/rsyslogd"
ARGS="-n"
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
exec $CMD $ARGS