diff --git a/ansible/roles/bifrost/tasks/bootstrap.yml b/ansible/roles/bifrost/tasks/bootstrap.yml index f31839082e..8f841d98ee 100644 --- a/ansible/roles/bifrost/tasks/bootstrap.yml +++ b/ansible/roles/bifrost/tasks/bootstrap.yml @@ -1,4 +1,14 @@ --- +- name: Ensure log directories exist + command: > + docker exec bifrost_deploy + bash -c 'mkdir -p /var/log/kolla/ironic && + chown ironic:ironic /var/log/kolla/ironic && + mkdir -p /var/log/kolla/ironic-inspector && + chown ironic:ironic /var/log/kolla/ironic-inspector && + mkdir -p /var/log/kolla/nginx && + chown nginx:nginx /var/log/kolla/nginx' + - name: Bootstrap bifrost (this may take several minutes) command: > docker exec bifrost_deploy diff --git a/ansible/roles/bifrost/tasks/start.yml b/ansible/roles/bifrost/tasks/start.yml index 58b247b665..717f419284 100644 --- a/ansible/roles/bifrost/tasks/start.yml +++ b/ansible/roles/bifrost/tasks/start.yml @@ -10,3 +10,4 @@ - "{{ node_config_directory }}/bifrost/:/etc/bifrost:ro" - "/etc/localtime:/etc/localtime:ro" - "/dev:/dev" + - "kolla_logs:/var/log/kolla/" diff --git a/ansible/roles/bifrost/templates/bifrost.yml.j2 b/ansible/roles/bifrost/templates/bifrost.yml.j2 index 224d11a08a..aab83e5502 100644 --- a/ansible/roles/bifrost/templates/bifrost.yml.j2 +++ b/ansible/roles/bifrost/templates/bifrost.yml.j2 @@ -1,3 +1,13 @@ +--- +# Ironic log directory. +ironic_log_dir: "/var/log/kolla/ironic" + +# Ironic inspector log directory. +inspector_log_dir: "/var/log/kolla/ironic-inspector" + +# Nginx log directory. +nginx_log_dir: "/var/log/kolla/nginx" + mysql_service_name: mysql ansible_python_interpreter: /var/lib/kolla/venv/bin/python network_interface: "{{ bifrost_network_interface }}" diff --git a/releasenotes/notes/bifrost-persistent-logs-889cb58bf0f22c18.yaml b/releasenotes/notes/bifrost-persistent-logs-889cb58bf0f22c18.yaml new file mode 100644 index 0000000000..d943ab2889 --- /dev/null +++ b/releasenotes/notes/bifrost-persistent-logs-889cb58bf0f22c18.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Adds a ``kolla_logs`` Docker volume for storing logs generated by services + running in the ``bifrost_deploy`` container on the deployment host. These + logs are not currently processed by fluentd.