From b96ade3cf01009d822f85744efee523127f2674c Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Tue, 24 Sep 2019 12:57:58 +0200 Subject: [PATCH] [train] Add required Tacker Conductor config and docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tacker requires config for storing CSAR vnf packages. This patch adds it as well as relevant docs. Only one Tacker Conductor is deployed by default due to lack of a shared filesystem. Change-Id: Iad391f35105e79fa9319502256528990915df9b7 Co-authored-by: Radosław Piliszek Closes-Bug: #1845142 --- ansible/roles/tacker/defaults/main.yml | 6 ++++++ ansible/roles/tacker/tasks/check-containers.yml | 2 +- ansible/roles/tacker/tasks/config.yml | 8 ++++---- ansible/roles/tacker/tasks/pull.yml | 2 +- .../roles/tacker/templates/tacker-conductor.json.j2 | 10 ++++++++++ .../reference/orchestration-and-nfv/tacker-guide.rst | 7 +++++++ releasenotes/notes/tacker-train-3f3094b68fdf358e.yaml | 9 +++++++++ 7 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/tacker-train-3f3094b68fdf358e.yaml diff --git a/ansible/roles/tacker/defaults/main.yml b/ansible/roles/tacker/defaults/main.yml index 0b0a2c5330..0493a7c380 100644 --- a/ansible/roles/tacker/defaults/main.yml +++ b/ansible/roles/tacker/defaults/main.yml @@ -5,6 +5,7 @@ tacker_services: tacker-server: container_name: "tacker_server" group: "tacker-server" + host_in_groups: "{{ inventory_hostname in groups['tacker-server'] }}" enabled: true image: "{{ tacker_server_image_full }}" volumes: "{{ tacker_server_default_volumes + tacker_server_extra_volumes }}" @@ -23,6 +24,7 @@ tacker_services: tacker-conductor: container_name: "tacker_conductor" group: "tacker-conductor" + host_in_groups: "{{ inventory_hostname in tacker_conductor_hosts }}" enabled: true image: "{{ tacker_conductor_image_full }}" volumes: "{{ tacker_conductor_default_volumes + tacker_conductor_extra_volumes }}" @@ -62,11 +64,15 @@ tacker_conductor_default_volumes: - "{{ kolla_dev_repos_directory ~ '/tacker/tacker:/var/lib/kolla/venv/lib/python2.7/site-packages/tacker' if tacker_dev_mode | bool else '' }}" - "/etc/localtime:/etc/localtime:ro" - "kolla_logs:/var/log/kolla/" + - "kolla_tacker_vnfpackages:/var/lib/tacker/vnfpackages/" + - "kolla_tacker_csar_files:/var/lib/tacker/csar_files/" tacker_extra_volumes: "{{ default_extra_volumes }}" tacker_server_extra_volumes: "{{ tacker_extra_volumes }}" tacker_conductor_extra_volumes: "{{ tacker_extra_volumes }}" +tacker_conductor_hosts: "{{ [groups['tacker-conductor']|first] }}" + #################### # OpenStack #################### diff --git a/ansible/roles/tacker/tasks/check-containers.yml b/ansible/roles/tacker/tasks/check-containers.yml index 0155ba0761..e3313bd9b2 100644 --- a/ansible/roles/tacker/tasks/check-containers.yml +++ b/ansible/roles/tacker/tasks/check-containers.yml @@ -8,7 +8,7 @@ volumes: "{{ item.value.volumes|reject('equalto', '')|list }}" dimensions: "{{ item.value.dimensions }}" when: - - inventory_hostname in groups[item.value.group] + - item.value.host_in_groups | bool - item.value.enabled | bool with_dict: "{{ tacker_services }}" notify: diff --git a/ansible/roles/tacker/tasks/config.yml b/ansible/roles/tacker/tasks/config.yml index 09c35fa543..4c34fe74a4 100644 --- a/ansible/roles/tacker/tasks/config.yml +++ b/ansible/roles/tacker/tasks/config.yml @@ -8,7 +8,7 @@ mode: "0770" become: true when: - - inventory_hostname in groups[item.value.group] + - item.value.host_in_groups | bool - item.value.enabled | bool with_dict: "{{ tacker_services }}" @@ -37,7 +37,7 @@ become: true with_dict: "{{ tacker_services }}" when: - - inventory_hostname in groups[item.value.group] + - item.value.host_in_groups | bool - item.value.enabled notify: - Restart {{ item.key }} container @@ -57,7 +57,7 @@ become: true with_dict: "{{ tacker_services }}" when: - - inventory_hostname in groups[item.value.group] + - item.value.host_in_groups | bool - item.value.enabled | bool notify: - Restart {{ item.key }} container @@ -69,7 +69,7 @@ mode: "0660" become: true when: - - inventory_hostname in groups[item.value.group] + - item.value.host_in_groups | bool - item.value.enabled | bool - tacker_policy_file is defined with_dict: "{{ tacker_services }}" diff --git a/ansible/roles/tacker/tasks/pull.yml b/ansible/roles/tacker/tasks/pull.yml index bffc3f909e..15b4483b9b 100644 --- a/ansible/roles/tacker/tasks/pull.yml +++ b/ansible/roles/tacker/tasks/pull.yml @@ -6,6 +6,6 @@ common_options: "{{ docker_common_options }}" image: "{{ item.value.image }}" when: - - inventory_hostname in groups[item.value.group] + - item.value.host_in_groups | bool - item.value.enabled | bool with_dict: "{{ tacker_services }}" diff --git a/ansible/roles/tacker/templates/tacker-conductor.json.j2 b/ansible/roles/tacker/templates/tacker-conductor.json.j2 index be013e638f..42060c4c3c 100644 --- a/ansible/roles/tacker/templates/tacker-conductor.json.j2 +++ b/ansible/roles/tacker/templates/tacker-conductor.json.j2 @@ -19,6 +19,16 @@ "path": "/var/log/kolla/tacker", "owner": "tacker:tacker", "recurse": true + }, + { + "path": "/var/lib/tacker/vnfpackages", + "owner": "tacker:tacker", + "recurse": true + }, + { + "path": "/var/lib/tacker/csar_files", + "owner": "tacker:tacker", + "recurse": true } ] } diff --git a/doc/source/reference/orchestration-and-nfv/tacker-guide.rst b/doc/source/reference/orchestration-and-nfv/tacker-guide.rst index 5a611c707a..18f0fa028f 100644 --- a/doc/source/reference/orchestration-and-nfv/tacker-guide.rst +++ b/doc/source/reference/orchestration-and-nfv/tacker-guide.rst @@ -62,6 +62,13 @@ In order to enable them, you need to edit the file and any request made to a different tacker-server will fail with a similar error as ``No such file or directory /etc/tacker/vim/fernet_keys`` +.. warning:: + + In Train, Tacker Conductor started using local filesystem to store VNF + packages and CSAR files. + Kolla Ansible provides no shared filesystem capabilities, hence only + one instance of Tacker Conductor is deployed. + Deploy tacker and related services. .. code-block:: console diff --git a/releasenotes/notes/tacker-train-3f3094b68fdf358e.yaml b/releasenotes/notes/tacker-train-3f3094b68fdf358e.yaml new file mode 100644 index 0000000000..d0aec78cf1 --- /dev/null +++ b/releasenotes/notes/tacker-train-3f3094b68fdf358e.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + In Train, Tacker Conductor started using local filesystem to store VNF + packages and CSAR files. + Kolla Ansible provides no shared filesystem capabilities, hence only + one instance of Tacker Conductor is deployed. + Previous multinode deployments must manually remove all Tacker Conductors + before proceeding with upgrade.