aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Jastrzebski <inc007@gmail.com>2015-09-23 13:40:45 +0200
committerMichal Jastrzebski <inc007@gmail.com>2015-09-24 14:29:14 +0200
commit603bbae0f49f1e05156cae1a377b561938cef233 (patch)
tree296e162c9b222b10668c220b4de52c91cedb4e0c
parenta83d84b383f2e96e17a5a5d38ffc80d7c045e150 (diff)
downloadkolla-603bbae0f49f1e05156cae1a377b561938cef233.tar.gz
kolla-603bbae0f49f1e05156cae1a377b561938cef233.zip
Heat logging to rsyslog
Configure heat to use rsyslog container as logging mechanism Change-Id: I71691bbc7c8cb56758e3597da7f44445a4bf5599 Implements: bp logging-container
-rwxr-xr-xansible/roles/common/templates/rsyslog.conf.j29
-rw-r--r--ansible/roles/heat/tasks/start.yml12
-rw-r--r--ansible/roles/heat/templates/heat.conf.j23
3 files changed, 21 insertions, 3 deletions
diff --git a/ansible/roles/common/templates/rsyslog.conf.j2 b/ansible/roles/common/templates/rsyslog.conf.j2
index d040a1933..61350926a 100755
--- a/ansible/roles/common/templates/rsyslog.conf.j2
+++ b/ansible/roles/common/templates/rsyslog.conf.j2
@@ -33,6 +33,15 @@ $template NovaSchedulerFile,"/var/log/nova/nova-scheduler.log"
$template NovaComputeFile,"/var/log/nova/nova-compute.log"
:syslogtag,contains,"nova-compute" ?NovaComputeFile
+$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 DynFile,"/var/log/syslog.log"
*.* ?DynFile
& ~
diff --git a/ansible/roles/heat/tasks/start.yml b/ansible/roles/heat/tasks/start.yml
index c388f43f3..9ba7a1b28 100644
--- a/ansible/roles/heat/tasks/start.yml
+++ b/ansible/roles/heat/tasks/start.yml
@@ -13,7 +13,9 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: heat_api
image: "{{ heat_api_image_full }}"
- volumes: "{{ node_config_directory }}/heat-api/:/opt/kolla/config_files/:ro"
+ volumes:
+ - "{{ node_config_directory }}/heat-api/:/opt/kolla/config_files/:ro"
+ - "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['heat-api']
@@ -32,7 +34,9 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: heat_api_cfn
image: "{{ heat_api_cfn_image_full }}"
- volumes: "{{ node_config_directory }}/heat-api-cfn/:/opt/kolla/config_files/:ro"
+ volumes:
+ - "{{ node_config_directory }}/heat-api-cfn/:/opt/kolla/config_files/:ro"
+ - "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['heat-api-cfn']
@@ -51,7 +55,9 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: heat_engine
image: "{{ heat_engine_image_full }}"
- volumes: "{{ node_config_directory }}/heat-engine/:/opt/kolla/config_files/:ro"
+ volumes:
+ - "{{ node_config_directory }}/heat-engine/:/opt/kolla/config_files/:ro"
+ - "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['heat-engine']
diff --git a/ansible/roles/heat/templates/heat.conf.j2 b/ansible/roles/heat/templates/heat.conf.j2
index 8615156d7..e074f75ad 100644
--- a/ansible/roles/heat/templates/heat.conf.j2
+++ b/ansible/roles/heat/templates/heat.conf.j2
@@ -11,6 +11,9 @@ rpc_backend = rabbit
notification_driver = noop
deferred_auth_method = password
+syslog_log_facility=LOG_LOCAL0
+use_syslog=yes
+
[oslo_messaging_rabbit]
rabbit_host = {{ kolla_internal_address }}
rabbit_userid = {{ rabbitmq_user }}