Make Heka collect Heat logs
Partially implements: blueprint heka Change-Id: Ie22c4326c6ec2a3426b0c3b8fda4554b1b2541b0
This commit is contained in:
parent
170b493d47
commit
82264ab7d6
@ -6,5 +6,5 @@ filename = "lua_decoders/os_openstack_log.lua"
|
|||||||
type = "LogstreamerInput"
|
type = "LogstreamerInput"
|
||||||
decoder = "openstack_log_decoder"
|
decoder = "openstack_log_decoder"
|
||||||
log_directory = "/var/log/kolla"
|
log_directory = "/var/log/kolla"
|
||||||
file_match = '(?P<Service>nova|glance|keystone|neutron|cinder)/(?P<Program>.*)\.log'
|
file_match = '(?P<Service>nova|glance|keystone|neutron|cinder|heat)/(?P<Program>.*)\.log'
|
||||||
differentiator = ["Service", "_", "Program"]
|
differentiator = ["Service", "_", "Program"]
|
||||||
|
@ -7,15 +7,6 @@ $KLogPermitNonKernelFacility on
|
|||||||
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||||
$RepeatedMsgReduction on
|
$RepeatedMsgReduction on
|
||||||
|
|
||||||
$template HeatAPIFile,"/var/log/heat/heat-api.log"
|
|
||||||
:syslogtag,contains,"heat-api" ?HeatAPIFile
|
|
||||||
|
|
||||||
$template HeatAPICfnFile,"/var/log/heat/heat-api-cfn.log"
|
|
||||||
:syslogtag,contains,"heat-api-cfn" ?HeatAPICfnFile
|
|
||||||
|
|
||||||
$template HeatEngineFile,"/var/log/heat/heat-engine.log"
|
|
||||||
:syslogtag,contains,"heat-engine" ?HeatEngineFile
|
|
||||||
|
|
||||||
$template MuranoEngineFile,"/var/log/murano/murano-engine.log"
|
$template MuranoEngineFile,"/var/log/murano/murano-engine.log"
|
||||||
:syslogtag,contains,"murano-engine" ?MuranoEngineFile
|
:syslogtag,contains,"murano-engine" ?MuranoEngineFile
|
||||||
|
|
||||||
|
@ -53,7 +53,9 @@
|
|||||||
labels:
|
labels:
|
||||||
BOOTSTRAP:
|
BOOTSTRAP:
|
||||||
name: "bootstrap_heat"
|
name: "bootstrap_heat"
|
||||||
volumes: "{{ node_config_directory }}/heat-api/:{{ container_config_directory }}/:ro"
|
volumes:
|
||||||
|
- "{{ node_config_directory }}/heat-api/:{{ container_config_directory }}/:ro"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
run_once: True
|
run_once: True
|
||||||
delegate_to: "{{ groups['heat-api'][0] }}"
|
delegate_to: "{{ groups['heat-api'][0] }}"
|
||||||
when: database_created
|
when: database_created
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
name: "heat_api"
|
name: "heat_api"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/heat-api/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/heat-api/:{{ container_config_directory }}/:ro"
|
||||||
- "rsyslog_socket:/var/lib/kolla/rsyslog/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
when: inventory_hostname in groups['heat-api']
|
when: inventory_hostname in groups['heat-api']
|
||||||
|
|
||||||
- name: Starting heat-api-cfn container
|
- name: Starting heat-api-cfn container
|
||||||
@ -18,7 +18,7 @@
|
|||||||
name: "heat_api_cfn"
|
name: "heat_api_cfn"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/heat-api-cfn/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/heat-api-cfn/:{{ container_config_directory }}/:ro"
|
||||||
- "rsyslog_socket:/var/lib/kolla/rsyslog/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
when: inventory_hostname in groups['heat-api-cfn']
|
when: inventory_hostname in groups['heat-api-cfn']
|
||||||
|
|
||||||
- name: Starting heat-engine container
|
- name: Starting heat-engine container
|
||||||
@ -29,5 +29,5 @@
|
|||||||
name: "heat_engine"
|
name: "heat_engine"
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/heat-engine/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/heat-engine/:{{ container_config_directory }}/:ro"
|
||||||
- "rsyslog_socket:/var/lib/kolla/rsyslog/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
when: inventory_hostname in groups['heat-engine']
|
when: inventory_hostname in groups['heat-engine']
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
debug = {{ heat_logging_debug }}
|
debug = {{ heat_logging_debug }}
|
||||||
|
|
||||||
|
log_dir = /var/log/kolla/heat
|
||||||
|
|
||||||
heat_watch_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }}
|
heat_watch_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }}
|
||||||
heat_metadata_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }}
|
heat_metadata_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }}
|
||||||
heat_waitcondition_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }}/v1/waitcondition
|
heat_waitcondition_server_url = {{ public_protocol }}://{{ kolla_external_address }}:{{ heat_api_cfn_port }}/v1/waitcondition
|
||||||
@ -14,9 +16,6 @@ notification_driver = noop
|
|||||||
deferred_auth_method = trusts
|
deferred_auth_method = trusts
|
||||||
trusts_delegated_role = heat_stack_owner
|
trusts_delegated_role = heat_stack_owner
|
||||||
|
|
||||||
syslog_log_facility=LOG_LOCAL0
|
|
||||||
use_syslog=yes
|
|
||||||
|
|
||||||
[oslo_messaging_rabbit]
|
[oslo_messaging_rabbit]
|
||||||
rabbit_userid = {{ rabbitmq_user }}
|
rabbit_userid = {{ rabbitmq_user }}
|
||||||
rabbit_password = {{ rabbitmq_password }}
|
rabbit_password = {{ rabbitmq_password }}
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ! -d "/var/log/kolla/heat" ]]; then
|
||||||
|
mkdir -p /var/log/kolla/heat
|
||||||
|
fi
|
||||||
|
if [[ $(stat -c %a /var/log/kolla/heat) != "755" ]]; then
|
||||||
|
chmod 755 /var/log/kolla/heat
|
||||||
|
fi
|
||||||
|
|
||||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||||
|
@ -21,10 +21,13 @@ ADD heat-base-archive /heat-base-source
|
|||||||
RUN ln -s heat-base-source/* heat \
|
RUN ln -s heat-base-source/* heat \
|
||||||
&& useradd --user-group heat \
|
&& useradd --user-group heat \
|
||||||
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /heat \
|
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /heat \
|
||||||
&& mkdir -p /etc/heat /var/log/heat /home/heat \
|
&& mkdir -p /etc/heat /home/heat \
|
||||||
&& cp -r /heat/etc/heat/* /etc/heat/ \
|
&& cp -r /heat/etc/heat/* /etc/heat/ \
|
||||||
&& chown -R heat: /etc/heat /var/log/heat /home/heat
|
&& chown -R heat: /etc/heat /home/heat
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
RUN usermod -a -G kolla heat
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||||
|
|
||||||
|
RUN usermod -a -G kolla heat \
|
||||||
|
&& chmod 755 /usr/local/bin/kolla_extend_start
|
||||||
|
8
docker/heat/heat-base/extend_start.sh
Normal file
8
docker/heat/heat-base/extend_start.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ! -d "/var/log/kolla/heat" ]]; then
|
||||||
|
mkdir -p /var/log/kolla/heat
|
||||||
|
fi
|
||||||
|
if [[ $(stat -c %a /var/log/kolla/heat) != "755" ]]; then
|
||||||
|
chmod 755 /var/log/kolla/heat
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user