dev mode: Add support for aodh
Provide support fot kolla dev mode in aodh. When 'kolla_dev_mode' or 'aodh_dev_mode' variables are enabled, source code of aodh project is cloned and bindmounted. Partially implements: blueprint mount-sources Co-Authored-By: wu.chunyang <wu.chunyang@99cloud.net> Change-Id: I1235013ab2ff887c4311126cbff7367775f66347
This commit is contained in:
parent
ed9854248f
commit
0025aac92e
@ -12,6 +12,7 @@ aodh_services:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "aodh:/var/lib/aodh/"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/aodh/aodh:/var/lib/kolla/venv/lib/python2.7/site-packages/aodh' if aodh_dev_mode | bool else '' }}"
|
||||
aodh-evaluator:
|
||||
container_name: aodh_evaluator
|
||||
group: aodh-evaluator
|
||||
@ -21,6 +22,7 @@ aodh_services:
|
||||
- "{{ node_config_directory }}/aodh-evaluator/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/aodh/aodh:/var/lib/kolla/venv/lib/python2.7/site-packages/aodh' if aodh_dev_mode | bool else '' }}"
|
||||
aodh-listener:
|
||||
container_name: aodh_listener
|
||||
group: aodh-listener
|
||||
@ -30,6 +32,7 @@ aodh_services:
|
||||
- "{{ node_config_directory }}/aodh-listener/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/aodh/aodh:/var/lib/kolla/venv/lib/python2.7/site-packages/aodh' if aodh_dev_mode | bool else '' }}"
|
||||
aodh-notifier:
|
||||
container_name: aodh_notifier
|
||||
group: aodh-notifier
|
||||
@ -39,6 +42,7 @@ aodh_services:
|
||||
- "{{ node_config_directory }}/aodh-notifier/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/aodh/aodh:/var/lib/kolla/venv/lib/python2.7/site-packages/aodh' if aodh_dev_mode | bool else '' }}"
|
||||
|
||||
|
||||
####################
|
||||
@ -83,3 +87,11 @@ aodh_logging_debug: "{{ openstack_logging_debug }}"
|
||||
aodh_keystone_user: "aodh"
|
||||
|
||||
openstack_aodh_auth: "{{ openstack_auth }}"
|
||||
|
||||
|
||||
####################
|
||||
# Kolla
|
||||
####################
|
||||
aodh_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||
aodh_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||
aodh_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:
|
||||
- action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
@ -36,7 +36,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||
when:
|
||||
- action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
@ -59,7 +59,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||
when:
|
||||
- action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
@ -82,7 +82,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||
when:
|
||||
- action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
|
@ -14,6 +14,6 @@
|
||||
BOOTSTRAP:
|
||||
name: "bootstrap_aodh"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ aodh_api.volumes }}"
|
||||
volumes: "{{ aodh_api.volumes|reject('equalto', '')|list }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups[aodh_api.group][0] }}"
|
||||
|
6
ansible/roles/aodh/tasks/clone.yml
Normal file
6
ansible/roles/aodh/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Cloning aodh source repository for development
|
||||
git:
|
||||
repo: "{{ aodh_git_repository }}"
|
||||
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||
update: "{{ aodh_dev_repos_pull }}"
|
@ -109,7 +109,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_aodh_containers
|
||||
when:
|
||||
- action != "config"
|
||||
|
@ -8,6 +8,9 @@
|
||||
inventory_hostname in groups['aodh-listener'] or
|
||||
inventory_hostname in groups['aodh-notifier']
|
||||
|
||||
- include: clone.yml
|
||||
when: aodh_dev_mode | bool
|
||||
|
||||
- include: bootstrap.yml
|
||||
when: inventory_hostname in groups['aodh-api']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user