rsyslog container
First container from logging stack Change-Id: I8c8b6743e22a38969cb8a741f3176c5aed24f549 Implements: bp logging-container
This commit is contained in:
parent
539862aeb0
commit
1dfa9c79f9
17
docker/logging/rsyslog/Dockerfile.j2
Executable file
17
docker/logging/rsyslog/Dockerfile.j2
Executable 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"]
|
11
docker/logging/rsyslog/config-external.sh
Executable file
11
docker/logging/rsyslog/config-external.sh
Executable 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
14
docker/logging/rsyslog/start.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user