Add support of octavia dev mod
Similarly to other OpenStack services octavia should support kolla dev mod for debugging. Change-Id: I81b79dc0a4c5e40a67af7120a4109dfe11098a97
This commit is contained in:
parent
e2acee87ee
commit
36b93dd6e2
@ -90,21 +90,25 @@ octavia_api_default_volumes:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ '/etc/timezone:/etc/timezone:ro' if kolla_base_distro in ['debian', 'ubuntu'] else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/octavia/octavia:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/octavia' }}"
|
||||
octavia_health_manager_default_volumes:
|
||||
- "{{ node_config_directory }}/octavia-health-manager/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ '/etc/timezone:/etc/timezone:ro' if kolla_base_distro in ['debian', 'ubuntu'] else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/octavia/octavia:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/octavia' if octavia_dev_mode | bool else '' }}"
|
||||
octavia_housekeeping_default_volumes:
|
||||
- "{{ node_config_directory }}/octavia-housekeeping/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ '/etc/timezone:/etc/timezone:ro' if kolla_base_distro in ['debian', 'ubuntu'] else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/octavia/octavia:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/octavia' if octavia_dev_mode | bool else '' }}"
|
||||
octavia_worker_default_volumes:
|
||||
- "{{ node_config_directory }}/octavia-worker/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "{{ '/etc/timezone:/etc/timezone:ro' if kolla_base_distro in ['debian', 'ubuntu'] else '' }}"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
- "{{ kolla_dev_repos_directory ~ '/octavia/octavia:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/octavia' if octavia_dev_mode | bool else '' }}"
|
||||
|
||||
octavia_extra_volumes: "{{ default_extra_volumes }}"
|
||||
octavia_api_extra_volumes: "{{ octavia_extra_volumes }}"
|
||||
@ -146,3 +150,11 @@ octavia_ks_users:
|
||||
user: "{{ octavia_keystone_user }}"
|
||||
password: "{{ octavia_keystone_password }}"
|
||||
role: "admin"
|
||||
|
||||
####################
|
||||
# Kolla
|
||||
####################
|
||||
octavia_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||
octavia_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||
octavia_dev_mode: "{{ kolla_dev_mode }}"
|
||||
octavia_source_version: "{{ kolla_source_version }}"
|
||||
|
@ -9,7 +9,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
@ -24,7 +24,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
@ -39,7 +39,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
@ -54,7 +54,7 @@
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
volumes: "{{ service.volumes | reject('equalto', '') | list }}"
|
||||
dimensions: "{{ service.dimensions }}"
|
||||
when:
|
||||
- kolla_action != "config"
|
||||
|
@ -15,6 +15,6 @@
|
||||
BOOTSTRAP:
|
||||
name: "bootstrap_octavia"
|
||||
restart_policy: no
|
||||
volumes: "{{ octavia_api.volumes }}"
|
||||
volumes: "{{ octavia_api.volumes | reject('equalto', '') | list }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups[octavia_api.group][0] }}"
|
||||
|
8
ansible/roles/octavia/tasks/clone.yml
Normal file
8
ansible/roles/octavia/tasks/clone.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Cloning octavia source repository for development
|
||||
become: true
|
||||
git:
|
||||
repo: "{{ octavia_git_repository }}"
|
||||
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||
update: "{{ octavia_dev_repos_pull }}"
|
||||
version: "{{ octavia_source_version }}"
|
@ -8,6 +8,9 @@
|
||||
inventory_hostname in groups['octavia-housekeeping'] or
|
||||
inventory_hostname in groups['octavia-worker']
|
||||
|
||||
- include_tasks: clone.yml
|
||||
when: octavia_dev_mode | bool
|
||||
|
||||
- include_tasks: bootstrap.yml
|
||||
when: inventory_hostname in groups['octavia-api']
|
||||
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
add support of octavia dev mod.
|
Loading…
Reference in New Issue
Block a user