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" - "{{ node_config_directory }}/senlin-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/" - "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: senlin-engine:
container_name: senlin_engine container_name: senlin_engine
group: senlin-engine group: senlin-engine
@ -20,6 +21,7 @@ senlin_services:
- "{{ node_config_directory }}/senlin-engine/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/senlin-engine/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/" - "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 # Database
@ -56,3 +58,11 @@ senlin_logging_debug: "{{ openstack_logging_debug }}"
senlin_keystone_user: "senlin" senlin_keystone_user: "senlin"
openstack_senlin_auth: "{{ openstack_auth }}" 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 }}" 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]
@ -35,7 +35,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]

View File

@ -14,6 +14,6 @@
BOOTSTRAP: BOOTSTRAP:
name: "bootstrap_senlin" name: "bootstrap_senlin"
restart_policy: "never" restart_policy: "never"
volumes: "{{ senlin_api.volumes }}" volumes: "{{ senlin_api.volumes|reject('equalto', '')|list }}"
run_once: True run_once: True
delegate_to: "{{ groups[senlin_api.group][0] }}" 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 }}" 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_senlin_containers register: check_senlin_containers
when: when:
- kolla_action != "config" - kolla_action != "config"

View File

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