diff --git a/ansible/roles/murano/defaults/main.yml b/ansible/roles/murano/defaults/main.yml index 6bc4484b19..c7cba5c083 100644 --- a/ansible/roles/murano/defaults/main.yml +++ b/ansible/roles/murano/defaults/main.yml @@ -36,3 +36,11 @@ murano_logging_debug: "{{ openstack_logging_debug }}" murano_keystone_user: "murano" openstack_murano_auth: "{{ openstack_auth }}" + + +#################### +# Kolla +#################### +murano_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}" +murano_dev_repos_pull: "{{ kolla_dev_repos_pull }}" +murano_dev_mode: "{{ kolla_dev_mode }}" diff --git a/ansible/roles/murano/tasks/clone.yml b/ansible/roles/murano/tasks/clone.yml new file mode 100644 index 0000000000..6c470004d5 --- /dev/null +++ b/ansible/roles/murano/tasks/clone.yml @@ -0,0 +1,6 @@ +--- +- name: Cloning source repositories for development + git: + repo: "{{ murano_git_repository }}" + dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}" + update: "{{ murano_dev_repos_pull }}" diff --git a/ansible/roles/murano/tasks/deploy.yml b/ansible/roles/murano/tasks/deploy.yml index 13d6447329..1b29da72f8 100644 --- a/ansible/roles/murano/tasks/deploy.yml +++ b/ansible/roles/murano/tasks/deploy.yml @@ -6,6 +6,12 @@ when: inventory_hostname in groups['murano-api'] or inventory_hostname in groups['murano-engine'] +- include: clone.yml + when: + - murano_dev_mode | bool + - inventory_hostname in groups['murano-api'] or + inventory_hostname in groups['murano-engine'] + - include: bootstrap.yml when: inventory_hostname in groups['murano-api'] diff --git a/ansible/roles/murano/tasks/start.yml b/ansible/roles/murano/tasks/start.yml index cd798cac13..fbf9f6297a 100644 --- a/ansible/roles/murano/tasks/start.yml +++ b/ansible/roles/murano/tasks/start.yml @@ -7,6 +7,7 @@ name: "murano_engine" volumes: - "{{ node_config_directory }}/murano-engine/:{{ container_config_directory }}/:ro" + - "{{ kolla_dev_repos_directory ~ '/murano/murano:/var/lib/kolla/venv/lib/python2.7/site-packages/murano' if murano_dev_mode | bool else '' }}" - "/etc/localtime:/etc/localtime:ro" - "kolla_logs:/var/log/kolla/" when: inventory_hostname in groups['murano-engine'] @@ -19,6 +20,7 @@ name: "murano_api" volumes: - "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro" + - "{{ kolla_dev_repos_directory ~ '/murano/murano:/var/lib/kolla/venv/lib/python2.7/site-packages/murano' if murano_dev_mode | bool else '' }}" - "/etc/localtime:/etc/localtime:ro" - "kolla_logs:/var/log/kolla/" when: inventory_hostname in groups['murano-api']