Merge "dev mode: Add support for trove"
This commit is contained in:
commit
0b70070fc4
@ -11,6 +11,7 @@ trove_services:
|
||||
- "{{ node_config_directory }}/trove-api/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/trove/trove:/var/lib/kolla/venv/lib/python2.7/site-packages/trove' if trove_dev_mode | bool else '' }}"
|
||||
- "trove:/var/lib/trove/"
|
||||
trove-conductor:
|
||||
container_name: trove_conductor
|
||||
@ -21,6 +22,7 @@ trove_services:
|
||||
- "{{ node_config_directory }}/trove-conductor/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/trove/trove:/var/lib/kolla/venv/lib/python2.7/site-packages/trove' if trove_dev_mode | bool else '' }}"
|
||||
- "trove:/var/lib/trove/"
|
||||
trove-taskmanager:
|
||||
container_name: trove_taskmanager
|
||||
@ -31,6 +33,7 @@ trove_services:
|
||||
- "{{ node_config_directory }}/trove-taskmanager/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/trove/trove:/var/lib/kolla/venv/lib/python2.7/site-packages/trove' if trove_dev_mode | bool else '' }}"
|
||||
- "trove:/var/lib/trove/"
|
||||
|
||||
|
||||
@ -73,3 +76,11 @@ trove_logging_debug: "{{ openstack_logging_debug }}"
|
||||
trove_keystone_user: "trove"
|
||||
|
||||
openstack_trove_auth: "{{ openstack_auth }}"
|
||||
|
||||
|
||||
####################
|
||||
# Kolla
|
||||
####################
|
||||
trove_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||
trove_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||
trove_dev_mode: "{{ kolla_dev_mode }}"
|
||||
|
@ -12,7 +12,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
@ -34,7 +34,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
@ -56,7 +56,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
|
@ -15,6 +15,6 @@
|
||||
BOOTSTRAP:
|
||||
name: "bootstrap_trove"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ trove_api.volumes }}"
|
||||
volumes: "{{ trove_api.volumes|reject('equalto', '')|list }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups[trove_api.group][0] }}"
|
||||
|
6
ansible/roles/trove/tasks/clone.yml
Normal file
6
ansible/roles/trove/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Cloning trove source repository for development
|
||||
git:
|
||||
repo: "{{ trove_git_repository }}"
|
||||
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||
update: "{{ trove_dev_repos_pull }}"
|
@ -78,7 +78,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
|
||||
register: check_trove_containers
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
|
@ -7,6 +7,9 @@
|
||||
inventory_hostname in groups['trove-conductor'] or
|
||||
inventory_hostname in groups['trove-taskmanager']
|
||||
|
||||
- include: clone.yml
|
||||
when: trove_dev_mode | bool
|
||||
|
||||
- include: bootstrap.yml
|
||||
when: inventory_hostname in groups['trove-api']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user