Merge "dev mode: Add support for Zun"
This commit is contained in:
commit
c6967c8b1f
@ -10,6 +10,7 @@ zun_services:
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/zun-api/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ kolla_dev_repos_directory ~ '/zun/zun:/var/lib/kolla/venv/lib/python2.7/site-packages/zun' if zun_dev_mode | bool else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
zun-compute:
|
||||
container_name: zun_compute
|
||||
@ -21,6 +22,7 @@ zun_services:
|
||||
- "{{ node_config_directory }}/zun-compute/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/zun/zun:/var/lib/kolla/venv/lib/python2.7/site-packages/zun' if zun_dev_mode | bool else '' }}"
|
||||
- "/run:/run:shared"
|
||||
- "/usr/lib/docker:/usr/lib/docker"
|
||||
|
||||
@ -59,3 +61,11 @@ zun_logging_debug: "{{ openstack_logging_debug }}"
|
||||
zun_keystone_user: "zun"
|
||||
|
||||
openstack_zun_auth: "{{ openstack_auth }}"
|
||||
|
||||
|
||||
####################
|
||||
# Kolla
|
||||
####################
|
||||
zun_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||
zun_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||
zun_dev_mode: "{{ kolla_dev_mode }}"
|
||||
|
@ -13,7 +13,7 @@
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
privileged: "{{ service.privileged | default(False) }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
||||
when:
|
||||
- action != "config"
|
||||
- inventory_hostname in groups[service.group]
|
||||
@ -38,7 +38,7 @@
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
privileged: "{{ service.privileged | default(False) }}"
|
||||
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_zun"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ zun_api.volumes }}"
|
||||
volumes: "{{ zun_api.volumes|reject('equalto', '')|list }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups[zun_api.group][0] }}"
|
||||
|
6
ansible/roles/zun/tasks/clone.yml
Normal file
6
ansible/roles/zun/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Cloning zun source repository for development
|
||||
git:
|
||||
repo: "{{ zun_git_repository }}"
|
||||
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||
update: "{{ zun_dev_repos_pull }}"
|
@ -101,7 +101,7 @@
|
||||
name: "{{ item.value.container_name }}"
|
||||
image: "{{ item.value.image }}"
|
||||
privileged: "{{ item.value.privileged | default(False) }}"
|
||||
volumes: "{{ item.value.volumes }}"
|
||||
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
|
||||
register: check_zun_containers
|
||||
when:
|
||||
- action != "config"
|
||||
|
@ -6,6 +6,9 @@
|
||||
when: inventory_hostname in groups['zun-api'] or
|
||||
inventory_hostname in groups['zun-compute']
|
||||
|
||||
- include: clone.yml
|
||||
when: zun_dev_mode | bool
|
||||
|
||||
- include: bootstrap.yml
|
||||
when: inventory_hostname in groups['zun-api']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user