Merge "dev mode: Add support for vitrage"
This commit is contained in:
commit
5b9a3f8f89
@ -10,6 +10,7 @@ vitrage_services:
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/vitrage-api/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ kolla_dev_repos_directory ~ '/vitrage/vitrage:/var/lib/kolla/venv/lib/python2.7/site-packages/vitrage' if vitrage_dev_mode | bool else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
vitrage-collector:
|
||||
container_name: vitrage_collector
|
||||
@ -19,6 +20,7 @@ vitrage_services:
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/vitrage-collector/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ kolla_dev_repos_directory ~ '/vitrage/vitrage:/var/lib/kolla/venv/lib/python2.7/site-packages/vitrage' if vitrage_dev_mode | bool else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
vitrage-notifier:
|
||||
container_name: vitrage_notifier
|
||||
@ -28,6 +30,7 @@ vitrage_services:
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/vitrage-notifier/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ kolla_dev_repos_directory ~ '/vitrage/vitrage:/var/lib/kolla/venv/lib/python2.7/site-packages/vitrage' if vitrage_dev_mode | bool else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
vitrage-graph:
|
||||
container_name: vitrage_graph
|
||||
@ -37,6 +40,7 @@ vitrage_services:
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/vitrage-graph/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ kolla_dev_repos_directory ~ '/vitrage/vitrage:/var/lib/kolla/venv/lib/python2.7/site-packages/vitrage' if vitrage_dev_mode | bool else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
vitrage-ml:
|
||||
container_name: vitrage_ml
|
||||
@ -46,6 +50,7 @@ vitrage_services:
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/vitrage-ml/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ kolla_dev_repos_directory ~ '/vitrage/vitrage:/var/lib/kolla/venv/lib/python2.7/site-packages/vitrage' if vitrage_dev_mode | bool else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
|
||||
####################
|
||||
@ -127,3 +132,11 @@ vitrage_datasource:
|
||||
enabled: "no"
|
||||
|
||||
vitrage_datasources: "{{ vitrage_datasource | selectattr('enabled', 'equalto', true) | list }}"
|
||||
|
||||
|
||||
####################
|
||||
# Kolla
|
||||
####################
|
||||
vitrage_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||
vitrage_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||
vitrage_dev_mode: "{{ kolla_dev_mode }}"
|
||||
|
@ -13,7 +13,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]
|
||||
@ -37,7 +37,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]
|
||||
@ -61,7 +61,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]
|
||||
@ -85,7 +85,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]
|
||||
@ -109,7 +109,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_vitrage"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ vitrage_api.volumes }}"
|
||||
volumes: "{{ vitrage_api.volumes | reject('equalto', '') | list }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups[vitrage_api.group][0] }}"
|
||||
|
6
ansible/roles/vitrage/tasks/clone.yml
Normal file
6
ansible/roles/vitrage/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Cloning vitrage source repository for development
|
||||
git:
|
||||
repo: "{{ vitrage_git_repository }}"
|
||||
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||
update: "{{ vitrage_dev_repos_pull }}"
|
@ -110,7 +110,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_vitrage_containers
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
|
@ -9,6 +9,9 @@
|
||||
inventory_hostname in groups['vitrage-notifier'] or
|
||||
inventory_hostname in groups['vitrage-collector']
|
||||
|
||||
- include: clone.yml
|
||||
when: vitrage_dev_mode | bool
|
||||
|
||||
- include: bootstrap.yml
|
||||
when: inventory_hostname in groups['vitrage-api']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user