Merge "Provide support for neutron dev mode in kolla"

This commit is contained in:
Zuul 2019-05-16 11:00:24 +00:00 committed by Gerrit Code Review
commit 042f2a0406
4 changed files with 37 additions and 10 deletions

View File

@ -12,6 +12,7 @@ neutron_services:
- "{{ node_config_directory }}/neutron-server/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/neutron-server/:{{ 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 ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_server_dimensions }}" dimensions: "{{ neutron_server_dimensions }}"
haproxy: haproxy:
neutron_server: neutron_server:
@ -54,6 +55,7 @@ neutron_services:
- "/lib/modules:/lib/modules:ro" - "/lib/modules:/lib/modules:ro"
- "/run:/run:shared" - "/run:/run:shared"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_openvswitch_agent_dimensions }}" dimensions: "{{ neutron_openvswitch_agent_dimensions }}"
neutron-openvswitch-agent-xenapi: neutron-openvswitch-agent-xenapi:
container_name: "neutron_openvswitch_agent_xenapi" container_name: "neutron_openvswitch_agent_xenapi"
@ -70,6 +72,7 @@ neutron_services:
- "/lib/modules:/lib/modules:ro" - "/lib/modules:/lib/modules:ro"
- "/run:/run:shared" - "/run:/run:shared"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_openvswitch_agent_xenapi_dimensions }}" dimensions: "{{ neutron_openvswitch_agent_xenapi_dimensions }}"
neutron-linuxbridge-agent: neutron-linuxbridge-agent:
container_name: "neutron_linuxbridge_agent" container_name: "neutron_linuxbridge_agent"
@ -94,6 +97,7 @@ neutron_services:
- "/lib/modules:/lib/modules:ro" - "/lib/modules:/lib/modules:ro"
- "/run:/run:shared" - "/run:/run:shared"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_linuxbridge_agent_dimensions }}" dimensions: "{{ neutron_linuxbridge_agent_dimensions }}"
neutron-dhcp-agent: neutron-dhcp-agent:
container_name: "neutron_dhcp_agent" container_name: "neutron_dhcp_agent"
@ -108,6 +112,7 @@ neutron_services:
- "/run/:/run/:shared" - "/run/:/run/:shared"
- "neutron_metadata_socket:/var/lib/neutron/kolla/" - "neutron_metadata_socket:/var/lib/neutron/kolla/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_dhcp_agent_dimensions }}" dimensions: "{{ neutron_dhcp_agent_dimensions }}"
neutron-l3-agent: neutron-l3-agent:
container_name: "neutron_l3_agent" container_name: "neutron_l3_agent"
@ -126,6 +131,7 @@ neutron_services:
- "/run:/run:shared" - "/run:/run:shared"
- "neutron_metadata_socket:/var/lib/neutron/kolla/" - "neutron_metadata_socket:/var/lib/neutron/kolla/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_l3_agent_dimensions }}" dimensions: "{{ neutron_l3_agent_dimensions }}"
neutron-lbaas-agent: neutron-lbaas-agent:
container_name: "neutron_lbaas_agent" container_name: "neutron_lbaas_agent"
@ -151,6 +157,7 @@ neutron_services:
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "/run:/run:shared" - "/run:/run:shared"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_sriov_agent_dimensions }}" dimensions: "{{ neutron_sriov_agent_dimensions }}"
neutron-metadata-agent: neutron-metadata-agent:
container_name: "neutron_metadata_agent" container_name: "neutron_metadata_agent"
@ -168,6 +175,7 @@ neutron_services:
- "/run/:/run/:shared" - "/run/:/run/:shared"
- "neutron_metadata_socket:/var/lib/neutron/kolla/" - "neutron_metadata_socket:/var/lib/neutron/kolla/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_metadata_agent_dimensions }}" dimensions: "{{ neutron_metadata_agent_dimensions }}"
neutron-bgp-dragent: neutron-bgp-dragent:
container_name: "neutron_bgp_dragent" container_name: "neutron_bgp_dragent"
@ -207,6 +215,7 @@ neutron_services:
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "/run:/run:shared" - "/run:/run:shared"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/neutron/neutron:/var/lib/kolla/venv/lib/python2.7/site-packages/neutron' if neutron_dev_mode | bool else '' }}"
dimensions: "{{ neutron_metering_agent_dimensions }}" dimensions: "{{ neutron_metering_agent_dimensions }}"
ironic-neutron-agent: ironic-neutron-agent:
container_name: "ironic_neutron_agent" container_name: "ironic_neutron_agent"
@ -469,3 +478,11 @@ neutron_notification_drivers: "{{ notification_drivers|selectattr('enabled', 'eq
############ ############
onos_url: "127.0.0.1" onos_url: "127.0.0.1"
onos_username: "username" onos_username: "username"
####################
# Kolla
####################
neutron_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
neutron_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
neutron_dev_mode: "{{ kolla_dev_mode }}"
neutron_source_version: "{{ kolla_source_version }}"

View File

@ -16,7 +16,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:
@ -47,7 +47,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:
@ -75,7 +75,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:
@ -103,7 +103,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
with_sequence: "start=1 end={{ num_nova_fake_per_node }}" with_sequence: "start=1 end={{ num_nova_fake_per_node }}"
@ -133,7 +133,7 @@
name: "{{ service.container_name }}" name: "{{ service.container_name }}"
image: "{{ service.image }}" image: "{{ service.image }}"
environment: "{{ service.environment }}" environment: "{{ service.environment }}"
volumes: "{{ service.volumes }}" volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:
@ -160,7 +160,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:
@ -192,7 +192,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:
@ -251,7 +251,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:
@ -278,7 +278,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:
@ -357,7 +357,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 }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
when: when:

View File

@ -0,0 +1,7 @@
---
- name: Cloning neutron source repository for development
git:
repo: "{{ neutron_git_repository }}"
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
update: "{{ neutron_dev_repos_pull }}"
version: "{{ neutron_source_version }}"

View File

@ -2,6 +2,9 @@
- include_tasks: register.yml - include_tasks: register.yml
when: inventory_hostname in groups['neutron-server'] when: inventory_hostname in groups['neutron-server']
- include_tasks: clone.yml
when: neutron_dev_mode | bool
- include_tasks: config.yml - include_tasks: config.yml
- include_tasks: config-neutron-fake.yml - include_tasks: config-neutron-fake.yml