Provide support for manila dev mode in kolla
Add a possibility to mount sources as volumes to containers, in "more than documentation" way. That will let us to use kolla as a replacement for devstack. Partially implements: blueprint mount-sources Change-Id: I4fe7bf54ad6aaeca75e1b56172a11bb6e00b1539
This commit is contained in:
parent
105671009d
commit
be3dc2f767
@ -11,6 +11,7 @@ manila_services:
|
||||
- "{{ node_config_directory }}/manila-api/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
|
||||
manila-scheduler:
|
||||
container_name: "manila_scheduler"
|
||||
group: "manila-scheduler"
|
||||
@ -20,6 +21,7 @@ manila_services:
|
||||
- "{{ node_config_directory }}/manila-scheduler/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
|
||||
manila-share:
|
||||
container_name: "manila_share"
|
||||
group: "manila-share"
|
||||
@ -31,6 +33,7 @@ manila_services:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/run/:/run/:shared"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
|
||||
manila-data:
|
||||
container_name: "manila_data"
|
||||
group: "manila-data"
|
||||
@ -42,6 +45,7 @@ manila_services:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/run/:/run/:shared"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
|
||||
|
||||
|
||||
#####################
|
||||
@ -123,3 +127,11 @@ manila_backends:
|
||||
- "CIFS"
|
||||
|
||||
manila_enabled_backends: "{{ manila_backends|selectattr('enabled', 'equalto', true)|list }}"
|
||||
|
||||
|
||||
####################
|
||||
# Kolla
|
||||
####################
|
||||
manila_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||
manila_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||
manila_dev_mode: "{{ kolla_dev_mode }}"
|
||||
|
@ -15,6 +15,6 @@
|
||||
BOOTSTRAP:
|
||||
name: "bootstrap_manila"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ manila_api.volumes }}"
|
||||
volumes: "{{ manila_api.volumes|reject('equalto', '')|list }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups[manila_api.group][0] }}"
|
||||
|
6
ansible/roles/manila/tasks/clone.yml
Normal file
6
ansible/roles/manila/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Cloning manila source repository for development
|
||||
git:
|
||||
repo: "{{ manila_git_repository }}"
|
||||
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||
update: "{{ manila_dev_repos_pull }}"
|
@ -13,6 +13,9 @@
|
||||
- (enable_manila_backend_cephfs_native | bool) or (enable_manila_backend_cephfs_nfs | bool)
|
||||
- inventory_hostname in groups['manila-share']
|
||||
|
||||
- include: clone.yml
|
||||
when: manila_dev_mode | bool
|
||||
|
||||
- include: register.yml
|
||||
when: inventory_hostname in groups['manila-api']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user