rsyslog container

First container from logging stack

Change-Id: I8c8b6743e22a38969cb8a741f3176c5aed24f549
Implements: bp logging-container
This commit is contained in:
inc0 2015-08-20 12:34:32 +02:00
parent 539862aeb0
commit 1dfa9c79f9
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