Merge "dev mode: Add support for congress"
This commit is contained in:
commit
4ed0573172
@ -11,6 +11,7 @@ congress_services:
|
||||
- "{{ node_config_directory }}/congress-api/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/congress/congress:/var/lib/kolla/venv/lib/python2.7/site-packages/congress' if congress_dev_mode | bool else '' }}"
|
||||
congress-policy-engine:
|
||||
container_name: congress_policy_engine
|
||||
group: congress-policy-engine
|
||||
@ -20,6 +21,7 @@ congress_services:
|
||||
- "{{ node_config_directory }}/congress-policy-engine/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/congress/congress:/var/lib/kolla/venv/lib/python2.7/site-packages/congress' if congress_dev_mode | bool else '' }}"
|
||||
congress-datasource:
|
||||
container_name: congress_datasource
|
||||
group: congress-datasource
|
||||
@ -29,6 +31,7 @@ congress_services:
|
||||
- "{{ node_config_directory }}/congress-datasource/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/congress/congress:/var/lib/kolla/venv/lib/python2.7/site-packages/congress' if congress_dev_mode | bool else '' }}"
|
||||
|
||||
|
||||
####################
|
||||
@ -70,3 +73,11 @@ congress_logging_debug: "{{ openstack_logging_debug }}"
|
||||
congress_keystone_user: "congress"
|
||||
|
||||
openstack_congress_auth: "{{ openstack_auth }}"
|
||||
|
||||
|
||||
####################
|
||||
# Kolla
|
||||
####################
|
||||
congress_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||
congress_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||
congress_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]
|
||||
|
@ -15,6 +15,6 @@
|
||||
BOOTSTRAP:
|
||||
name: "bootstrap_congress"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ congress_api.volumes }}"
|
||||
volumes: "{{ congress_api.volumes|reject('equalto', '')|list }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups[congress_api.group][0] }}"
|
||||
|
6
ansible/roles/congress/tasks/clone.yml
Normal file
6
ansible/roles/congress/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Cloning congress source repository for development
|
||||
git:
|
||||
repo: "{{ congress_git_repository }}"
|
||||
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||
update: "{{ congress_dev_repos_pull }}"
|
@ -84,7 +84,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_congress_containers
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
|
@ -7,6 +7,9 @@
|
||||
inventory_hostname in groups['congress-policy-engine'] or
|
||||
inventory_hostname in groups['congress-datasource']
|
||||
|
||||
- include: clone.yml
|
||||
when: congress_dev_mode | bool
|
||||
|
||||
- include: bootstrap.yml
|
||||
when: inventory_hostname in groups['congress-api']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user