Make Heka collect Murano logs
Partially implements: blueprint heka Change-Id: I17fc4b838d6ba8b6fcfc5c08314fef5fac1c7aff
This commit is contained in:
parent
82264ab7d6
commit
1e86308140
@ -6,5 +6,5 @@ filename = "lua_decoders/os_openstack_log.lua"
|
||||
type = "LogstreamerInput"
|
||||
decoder = "openstack_log_decoder"
|
||||
log_directory = "/var/log/kolla"
|
||||
file_match = '(?P<Service>nova|glance|keystone|neutron|cinder|heat)/(?P<Program>.*)\.log'
|
||||
file_match = '(?P<Service>nova|glance|keystone|neutron|cinder|heat|murano)/(?P<Program>.*)\.log'
|
||||
differentiator = ["Service", "_", "Program"]
|
||||
|
@ -7,12 +7,6 @@ $KLogPermitNonKernelFacility on
|
||||
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||
$RepeatedMsgReduction on
|
||||
|
||||
$template MuranoEngineFile,"/var/log/murano/murano-engine.log"
|
||||
:syslogtag,contains,"murano-engine" ?MuranoEngineFile
|
||||
|
||||
$template MuranoApiFile,"/var/log/murano/murano-api.log"
|
||||
:syslogtag,contains,"murano-api" ?MuranoApiFile
|
||||
|
||||
$template MagnumApiFile,"/var/log/magnum/magnum-api.log"
|
||||
:syslogtag,contains,"magnum-api" ?MagnumApiFile
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
BOOTSTRAP:
|
||||
name: "bootstrap_murano"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups['murano-api'][0] }}"
|
||||
|
@ -7,7 +7,7 @@
|
||||
name: "murano_engine"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/murano-engine/:{{ container_config_directory }}/:ro"
|
||||
- "rsyslog_socket:/var/lib/kolla/rsyslog/"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
when: inventory_hostname in groups['murano-engine']
|
||||
|
||||
- name: Starting murano-api container
|
||||
@ -18,5 +18,5 @@
|
||||
name: "murano_api"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro"
|
||||
- "rsyslog_socket:/var/lib/kolla/rsyslog/"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
when: inventory_hostname in groups['murano-api']
|
||||
|
@ -1,9 +1,7 @@
|
||||
[DEFAULT]
|
||||
debug = {{ murano_logging_debug }}
|
||||
|
||||
|
||||
use_syslog = True
|
||||
syslog_log_facility = LOG_LOCAL0
|
||||
log_dir = /var/log/kolla/murano
|
||||
|
||||
{% if service_name == 'murano-api' %}
|
||||
bind_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
|
||||
|
@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/murano" ]]; then
|
||||
mkdir -p /var/log/kolla/murano
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/murano) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/murano
|
||||
fi
|
||||
|
||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
|
@ -20,10 +20,13 @@ ADD murano-base-archive /murano-base-source
|
||||
RUN ln -s murano-base-source/* murano \
|
||||
&& useradd --user-group murano \
|
||||
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /murano \
|
||||
&& mkdir -p /etc/murano /var/log/murano /home/murano \
|
||||
&& mkdir -p /etc/murano /home/murano \
|
||||
&& cp -r /murano/etc/murano/* /etc/murano/ \
|
||||
&& chown -R murano: /etc/murano /var/log/murano /home/murano
|
||||
&& chown -R murano: /etc/murano /home/murano
|
||||
|
||||
{% endif %}
|
||||
|
||||
RUN usermod -a -G kolla murano
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN usermod -a -G kolla murano \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
8
docker/murano/murano-base/extend_start.sh
Normal file
8
docker/murano/murano-base/extend_start.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/murano" ]]; then
|
||||
mkdir -p /var/log/kolla/murano
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/murano) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/murano
|
||||
fi
|
Loading…
Reference in New Issue
Block a user