dev mode: Add support for keystone

Provide support fot kolla dev mode in Keystone. When
'kolla_dev_mode' or 'keystone_dev_mode' variables are
enabled, source code of Keystone project is cloned
and bindmounted.

Partially implements: blueprint mount-sources

Change-Id: Ie4cf401ecd9a507e739a53dfdf16f65292ab57e5
This commit is contained in:
Michal Rostecki 2018-01-04 12:15:17 +01:00 committed by Eduardo Gonzalez
parent 9ad180bbdb
commit 307d324f36
3 changed files with 19 additions and 0 deletions

View File

@ -10,6 +10,7 @@ keystone_services:
volumes: volumes:
- "{{ node_config_directory }}/keystone/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/keystone/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "{{ kolla_dev_repos_directory ~ '/keystone/keystone:/var/lib/kolla/venv/lib/python2.7/site-packages/keystone' if keystone_dev_mode | bool else '' }}"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{% if keystone_token_provider == 'fernet' %}keystone_fernet_tokens:/etc/keystone/fernet-keys{% endif %}" - "{% if keystone_token_provider == 'fernet' %}keystone_fernet_tokens:/etc/keystone/fernet-keys{% endif %}"
keystone-ssh: keystone-ssh:
@ -74,3 +75,11 @@ keystone_ssh_image_full: "{{ keystone_ssh_image }}:{{ keystone_ssh_tag }}"
keystone_logging_debug: "{{ openstack_logging_debug }}" keystone_logging_debug: "{{ openstack_logging_debug }}"
openstack_keystone_auth: "{{ openstack_auth }}" openstack_keystone_auth: "{{ openstack_auth }}"
####################
# Kolla
####################
keystone_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
keystone_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
keystone_dev_mode: "{{ kolla_dev_mode }}"

View File

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

View File

@ -1,6 +1,10 @@
--- ---
- include: config.yml - include: config.yml
- include: clone.yml
when:
- keystone_dev_mode | bool
- include: bootstrap.yml - include: bootstrap.yml
- name: Flush handlers - name: Flush handlers