From 68933ab92a06906c4a6e6a0b1c304648a61229dd Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Thu, 24 Aug 2017 20:29:57 +0200 Subject: [PATCH] Add tacker dev mode Add support for tacker development in kolla Change-Id: If9b7326c080fa3fec6f8ff269d3159f742a9b591 --- ansible/roles/tacker/defaults/main.yml | 9 +++++++++ ansible/roles/tacker/tasks/clone.yml | 6 ++++++ ansible/roles/tacker/tasks/deploy.yml | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 ansible/roles/tacker/tasks/clone.yml diff --git a/ansible/roles/tacker/defaults/main.yml b/ansible/roles/tacker/defaults/main.yml index 891f7cd037..742b736351 100644 --- a/ansible/roles/tacker/defaults/main.yml +++ b/ansible/roles/tacker/defaults/main.yml @@ -9,6 +9,7 @@ tacker_services: image: "{{ tacker_server_image_full }}" volumes: - "{{ node_config_directory }}/tacker-server/:{{ container_config_directory }}/:ro" + - "{{ 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/" tacker-conductor: @@ -18,6 +19,7 @@ tacker_services: image: "{{ tacker_conductor_image_full }}" volumes: - "{{ node_config_directory }}/tacker-conductor/:{{ container_config_directory }}/:ro" + - "{{ 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/" @@ -54,3 +56,10 @@ tacker_logging_debug: "{{ openstack_logging_debug }}" tacker_keystone_user: "tacker" openstack_tacker_auth: "{{ openstack_auth }}" + +################### +# Kolla +#################### +tacker_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}" +tacker_dev_repos_pull: "{{ kolla_dev_repos_pull }}" +tacker_dev_mode: "{{ kolla_dev_mode }}" diff --git a/ansible/roles/tacker/tasks/clone.yml b/ansible/roles/tacker/tasks/clone.yml new file mode 100644 index 0000000000..0f724ae0a9 --- /dev/null +++ b/ansible/roles/tacker/tasks/clone.yml @@ -0,0 +1,6 @@ +--- +- name: Cloning source repositories for development + git: + repo: "{{ tacker_git_repository }}" + dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" + update: "{{ tacker_dev_repos_pull }}" diff --git a/ansible/roles/tacker/tasks/deploy.yml b/ansible/roles/tacker/tasks/deploy.yml index 0b9233a0ae..382792cae1 100644 --- a/ansible/roles/tacker/tasks/deploy.yml +++ b/ansible/roles/tacker/tasks/deploy.yml @@ -6,6 +6,12 @@ when: inventory_hostname in groups['tacker-server'] or inventory_hostname in groups['tacker-conductor'] +- include: clone.yml + when: + - tacker_dev_mode | bool + - inventory_hostname in groups['tacker-server'] or + inventory_hostname in groups['tacker-conductor'] + - include: bootstrap.yml when: inventory_hostname in groups['tacker-server']