Merge "dev mode: Add support for Watcher"
This commit is contained in:
commit
29a6a61d97
@ -10,6 +10,7 @@ watcher_services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/watcher-api/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/watcher-api/:{{ container_config_directory }}/:ro"
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
|
- "{{ kolla_dev_repos_directory ~ '/watcher/watcher:/var/lib/kolla/venv/lib/python2.7/site-packages/watcher' if watcher_dev_mode | bool else '' }}"
|
||||||
- "kolla_logs:/var/log/kolla/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
watcher-applier:
|
watcher-applier:
|
||||||
container_name: watcher_applier
|
container_name: watcher_applier
|
||||||
@ -19,6 +20,7 @@ watcher_services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/watcher-applier/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/watcher-applier/:{{ container_config_directory }}/:ro"
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
|
- "{{ kolla_dev_repos_directory ~ '/watcher/watcher:/var/lib/kolla/venv/lib/python2.7/site-packages/watcher' if watcher_dev_mode | bool else '' }}"
|
||||||
- "kolla_logs:/var/log/kolla/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
watcher-engine:
|
watcher-engine:
|
||||||
container_name: watcher_engine
|
container_name: watcher_engine
|
||||||
@ -28,6 +30,7 @@ watcher_services:
|
|||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/watcher-engine/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/watcher-engine/:{{ container_config_directory }}/:ro"
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
|
- "{{ kolla_dev_repos_directory ~ '/watcher/watcher:/var/lib/kolla/venv/lib/python2.7/site-packages/watcher' if watcher_dev_mode | bool else '' }}"
|
||||||
- "kolla_logs:/var/log/kolla/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
|
|
||||||
|
|
||||||
@ -69,3 +72,11 @@ watcher_logging_debug: "{{ openstack_logging_debug }}"
|
|||||||
watcher_keystone_user: "watcher"
|
watcher_keystone_user: "watcher"
|
||||||
|
|
||||||
openstack_watcher_auth: "{{ openstack_auth }}"
|
openstack_watcher_auth: "{{ openstack_auth }}"
|
||||||
|
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Kolla
|
||||||
|
####################
|
||||||
|
watcher_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||||
|
watcher_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||||
|
watcher_dev_mode: "{{ kolla_dev_mode }}"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
common_options: "{{ docker_common_options }}"
|
common_options: "{{ docker_common_options }}"
|
||||||
name: "{{ service.container_name }}"
|
name: "{{ service.container_name }}"
|
||||||
image: "{{ service.image }}"
|
image: "{{ service.image }}"
|
||||||
volumes: "{{ service.volumes }}"
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
@ -37,7 +37,7 @@
|
|||||||
common_options: "{{ docker_common_options }}"
|
common_options: "{{ docker_common_options }}"
|
||||||
name: "{{ service.container_name }}"
|
name: "{{ service.container_name }}"
|
||||||
image: "{{ service.image }}"
|
image: "{{ service.image }}"
|
||||||
volumes: "{{ service.volumes }}"
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
@ -61,7 +61,7 @@
|
|||||||
common_options: "{{ docker_common_options }}"
|
common_options: "{{ docker_common_options }}"
|
||||||
name: "{{ service.container_name }}"
|
name: "{{ service.container_name }}"
|
||||||
image: "{{ service.image }}"
|
image: "{{ service.image }}"
|
||||||
volumes: "{{ service.volumes }}"
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
- inventory_hostname in groups[service.group]
|
- inventory_hostname in groups[service.group]
|
||||||
|
@ -15,6 +15,6 @@
|
|||||||
BOOTSTRAP:
|
BOOTSTRAP:
|
||||||
name: "bootstrap_watcher"
|
name: "bootstrap_watcher"
|
||||||
restart_policy: "never"
|
restart_policy: "never"
|
||||||
volumes: "{{ watcher_api.volumes }}"
|
volumes: "{{ watcher_api.volumes|reject('equalto', '')|list }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
delegate_to: "{{ groups[watcher_api.group][0] }}"
|
delegate_to: "{{ groups[watcher_api.group][0] }}"
|
||||||
|
6
ansible/roles/watcher/tasks/clone.yml
Normal file
6
ansible/roles/watcher/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: Cloning watcher source repository for development
|
||||||
|
git:
|
||||||
|
repo: "{{ watcher_git_repository }}"
|
||||||
|
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||||
|
update: "{{ watcher_dev_repos_pull }}"
|
@ -88,7 +88,7 @@
|
|||||||
common_options: "{{ docker_common_options }}"
|
common_options: "{{ docker_common_options }}"
|
||||||
name: "{{ item.value.container_name }}"
|
name: "{{ item.value.container_name }}"
|
||||||
image: "{{ item.value.image }}"
|
image: "{{ item.value.image }}"
|
||||||
volumes: "{{ item.value.volumes }}"
|
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
|
||||||
register: check_watcher_containers
|
register: check_watcher_containers
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
inventory_hostname in groups['watcher-engine'] or
|
inventory_hostname in groups['watcher-engine'] or
|
||||||
inventory_hostname in groups['watcher-applier']
|
inventory_hostname in groups['watcher-applier']
|
||||||
|
|
||||||
|
- include: clone.yml
|
||||||
|
when: watcher_dev_mode | bool
|
||||||
|
|
||||||
- include: bootstrap.yml
|
- include: bootstrap.yml
|
||||||
when: inventory_hostname in groups['watcher-api']
|
when: inventory_hostname in groups['watcher-api']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user