Merge "dev mode: Add support for senlin"

This commit is contained in:
Zuul 2018-05-16 07:20:25 +00:00 committed by Gerrit Code Review
commit e303c74e68
6 changed files with 23 additions and 4 deletions

View File

@ -11,6 +11,7 @@ senlin_services:
- "{{ node_config_directory }}/senlin-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/senlin/senlin:/var/lib/kolla/venv/lib/python2.7/site-packages/senlin' if senlin_dev_mode | bool else '' }}"
senlin-engine:
container_name: senlin_engine
group: senlin-engine
@ -20,6 +21,7 @@ senlin_services:
- "{{ node_config_directory }}/senlin-engine/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/senlin/senlin:/var/lib/kolla/venv/lib/python2.7/site-packages/senlin' if senlin_dev_mode | bool else '' }}"
####################
# Database
@ -56,3 +58,11 @@ senlin_logging_debug: "{{ openstack_logging_debug }}"
senlin_keystone_user: "senlin"
openstack_senlin_auth: "{{ openstack_auth }}"
####################
# Kolla
####################
senlin_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
senlin_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
senlin_dev_mode: "{{ kolla_dev_mode }}"

View File

@ -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:
- kolla_action != "config"
- inventory_hostname in groups[service.group]
@ -35,7 +35,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]

View File

@ -14,6 +14,6 @@
BOOTSTRAP:
name: "bootstrap_senlin"
restart_policy: "never"
volumes: "{{ senlin_api.volumes }}"
volumes: "{{ senlin_api.volumes|reject('equalto', '')|list }}"
run_once: True
delegate_to: "{{ groups[senlin_api.group][0] }}"

View File

@ -0,0 +1,6 @@
---
- name: Cloning senlin source repository for development
git:
repo: "{{ senlin_git_repository }}"
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
update: "{{ senlin_dev_repos_pull }}"

View File

@ -88,7 +88,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_senlin_containers
when:
- kolla_action != "config"

View File

@ -6,6 +6,9 @@
when: inventory_hostname in groups['senlin-api'] or
inventory_hostname in groups['senlin-engine']
- include: clone.yml
when: senlin_dev_mode | bool
- include: bootstrap.yml
when: inventory_hostname in groups['senlin-api']