Merge "Provide support for nova dev mode in kolla"
This commit is contained in:
commit
e29f5c84d9
@ -21,6 +21,7 @@ nova_services:
|
|||||||
- "{{ nova_instance_datadir_volume }}:/var/lib/nova/"
|
- "{{ nova_instance_datadir_volume }}:/var/lib/nova/"
|
||||||
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
|
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
|
||||||
- "nova_libvirt_qemu:/etc/libvirt/qemu"
|
- "nova_libvirt_qemu:/etc/libvirt/qemu"
|
||||||
|
- "{{ kolla_dev_repos_directory ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_libvirt_dimensions }}"
|
dimensions: "{{ nova_libvirt_dimensions }}"
|
||||||
nova-ssh:
|
nova-ssh:
|
||||||
container_name: "nova_ssh"
|
container_name: "nova_ssh"
|
||||||
@ -33,6 +34,7 @@ nova_services:
|
|||||||
- "kolla_logs:/var/log/kolla"
|
- "kolla_logs:/var/log/kolla"
|
||||||
- "{{ nova_instance_datadir_volume }}:/var/lib/nova"
|
- "{{ nova_instance_datadir_volume }}:/var/lib/nova"
|
||||||
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
|
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
|
||||||
|
- "{{ kolla_dev_repos_directory ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_ssh_dimensions }}"
|
dimensions: "{{ nova_ssh_dimensions }}"
|
||||||
placement-api:
|
placement-api:
|
||||||
container_name: "placement_api"
|
container_name: "placement_api"
|
||||||
@ -43,6 +45,7 @@ nova_services:
|
|||||||
- "{{ node_config_directory }}/placement-api/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/placement-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 ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ placement_api_dimensions }}"
|
dimensions: "{{ placement_api_dimensions }}"
|
||||||
nova-api:
|
nova-api:
|
||||||
container_name: "nova_api"
|
container_name: "nova_api"
|
||||||
@ -55,6 +58,7 @@ nova_services:
|
|||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
- "/lib/modules:/lib/modules:ro"
|
- "/lib/modules:/lib/modules:ro"
|
||||||
- "kolla_logs:/var/log/kolla/"
|
- "kolla_logs:/var/log/kolla/"
|
||||||
|
- "{{ kolla_dev_repos_directory ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_api_dimensions }}"
|
dimensions: "{{ nova_api_dimensions }}"
|
||||||
nova-consoleauth:
|
nova-consoleauth:
|
||||||
container_name: "nova_consoleauth"
|
container_name: "nova_consoleauth"
|
||||||
@ -65,6 +69,7 @@ nova_services:
|
|||||||
- "{{ node_config_directory }}/nova-consoleauth/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/nova-consoleauth/:{{ 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 ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_consoleauth_dimensions }}"
|
dimensions: "{{ nova_consoleauth_dimensions }}"
|
||||||
nova-novncproxy:
|
nova-novncproxy:
|
||||||
container_name: "nova_novncproxy"
|
container_name: "nova_novncproxy"
|
||||||
@ -75,6 +80,7 @@ nova_services:
|
|||||||
- "{{ node_config_directory }}/nova-novncproxy/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/nova-novncproxy/:{{ 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 ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_novncproxy_dimensions }}"
|
dimensions: "{{ nova_novncproxy_dimensions }}"
|
||||||
nova-scheduler:
|
nova-scheduler:
|
||||||
container_name: "nova_scheduler"
|
container_name: "nova_scheduler"
|
||||||
@ -85,6 +91,7 @@ nova_services:
|
|||||||
- "{{ node_config_directory }}/nova-scheduler/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/nova-scheduler/:{{ 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 ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_scheduler_dimensions }}"
|
dimensions: "{{ nova_scheduler_dimensions }}"
|
||||||
nova-spicehtml5proxy:
|
nova-spicehtml5proxy:
|
||||||
container_name: "nova_spicehtml5proxy"
|
container_name: "nova_spicehtml5proxy"
|
||||||
@ -95,6 +102,7 @@ nova_services:
|
|||||||
- "{{ node_config_directory }}/nova-spicehtml5proxy/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/nova-spicehtml5proxy/:{{ 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 ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_spicehtml5proxy_dimensions }}"
|
dimensions: "{{ nova_spicehtml5proxy_dimensions }}"
|
||||||
nova-serialproxy:
|
nova-serialproxy:
|
||||||
container_name: "nova_serialproxy"
|
container_name: "nova_serialproxy"
|
||||||
@ -105,6 +113,7 @@ nova_services:
|
|||||||
- "{{ node_config_directory }}/nova-serialproxy/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/nova-serialproxy/:{{ 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 ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_serialproxy_dimensions }}"
|
dimensions: "{{ nova_serialproxy_dimensions }}"
|
||||||
nova-conductor:
|
nova-conductor:
|
||||||
container_name: "nova_conductor"
|
container_name: "nova_conductor"
|
||||||
@ -115,6 +124,7 @@ nova_services:
|
|||||||
- "{{ node_config_directory }}/nova-conductor/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/nova-conductor/:{{ 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 ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_conductor_dimensions }}"
|
dimensions: "{{ nova_conductor_dimensions }}"
|
||||||
nova-compute:
|
nova-compute:
|
||||||
container_name: "nova_compute"
|
container_name: "nova_compute"
|
||||||
@ -136,6 +146,7 @@ nova_services:
|
|||||||
- "libvirtd:/var/lib/libvirt"
|
- "libvirtd:/var/lib/libvirt"
|
||||||
- "{{ nova_instance_datadir_volume }}:/var/lib/nova/"
|
- "{{ nova_instance_datadir_volume }}:/var/lib/nova/"
|
||||||
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
|
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
|
||||||
|
- "{{ kolla_dev_repos_directory ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_compute_dimensions }}"
|
dimensions: "{{ nova_compute_dimensions }}"
|
||||||
nova-compute-ironic:
|
nova-compute-ironic:
|
||||||
container_name: "nova_compute_ironic"
|
container_name: "nova_compute_ironic"
|
||||||
@ -146,6 +157,7 @@ nova_services:
|
|||||||
- "{{ node_config_directory }}/nova-compute-ironic/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/nova-compute-ironic/:{{ 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 ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}"
|
||||||
dimensions: "{{ nova_compute_ironic_dimensions }}"
|
dimensions: "{{ nova_compute_ironic_dimensions }}"
|
||||||
|
|
||||||
####################
|
####################
|
||||||
@ -298,3 +310,11 @@ nova_enabled_notification_topics: "{{ nova_notification_topics | selectattr('ena
|
|||||||
####################
|
####################
|
||||||
vmware_vcenter_datastore_regex: ".*"
|
vmware_vcenter_datastore_regex: ".*"
|
||||||
ovs_bridge: "nsx-managed"
|
ovs_bridge: "nsx-managed"
|
||||||
|
|
||||||
|
|
||||||
|
####################
|
||||||
|
# Kolla
|
||||||
|
####################
|
||||||
|
nova_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
|
||||||
|
nova_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
|
||||||
|
nova_dev_mode: "{{ kolla_dev_mode }}"
|
||||||
|
@ -156,7 +156,6 @@
|
|||||||
or policy_overwriting.changed | bool
|
or policy_overwriting.changed | bool
|
||||||
or nova_conductor_container.changed | bool
|
or nova_conductor_container.changed | bool
|
||||||
|
|
||||||
|
|
||||||
- name: Restart nova-consoleauth container
|
- name: Restart nova-consoleauth container
|
||||||
vars:
|
vars:
|
||||||
service_name: "nova-consoleauth"
|
service_name: "nova-consoleauth"
|
||||||
|
@ -15,6 +15,6 @@
|
|||||||
BOOTSTRAP:
|
BOOTSTRAP:
|
||||||
name: "bootstrap_nova"
|
name: "bootstrap_nova"
|
||||||
restart_policy: "never"
|
restart_policy: "never"
|
||||||
volumes: "{{ nova_api.volumes }}"
|
volumes: "{{ nova_api.volumes|reject('equalto', '')|list }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
delegate_to: "{{ groups[nova_api.group][0] }}"
|
delegate_to: "{{ groups[nova_api.group][0] }}"
|
||||||
|
6
ansible/roles/nova/tasks/clone.yml
Normal file
6
ansible/roles/nova/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: Cloning nova source repository for development
|
||||||
|
git:
|
||||||
|
repo: "{{ nova_git_repository }}"
|
||||||
|
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
|
||||||
|
update: "{{ nova_dev_repos_pull }}"
|
@ -23,6 +23,9 @@
|
|||||||
- inventory_hostname in groups['compute']
|
- inventory_hostname in groups['compute']
|
||||||
- nova_compute_virt_type == "xenapi"
|
- nova_compute_virt_type == "xenapi"
|
||||||
|
|
||||||
|
- include_tasks: clone.yml
|
||||||
|
when: nova_dev_mode | bool
|
||||||
|
|
||||||
- include_tasks: config.yml
|
- include_tasks: config.yml
|
||||||
|
|
||||||
- include_tasks: config-nova-fake.yml
|
- include_tasks: config-nova-fake.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user