Merge "Add networking-baremetal configuration"
This commit is contained in:
commit
80b8d2da25
@ -464,6 +464,7 @@ enable_hyperv: "no"
|
||||
enable_influxdb: "{{ enable_monasca | bool }}"
|
||||
enable_ironic: "no"
|
||||
enable_ironic_ipxe: "no"
|
||||
enable_ironic_neutron_agent: "{{ enable_neutron | bool and enable_ironic | bool }}"
|
||||
enable_ironic_pxe_uefi: "no"
|
||||
enable_iscsid: "{{ (enable_cinder | bool and enable_cinder_backend_iscsi | bool) or enable_ironic | bool }}"
|
||||
enable_karbor: "no"
|
||||
|
@ -311,6 +311,9 @@ neutron
|
||||
[neutron-infoblox-ipam-agent:children]
|
||||
neutron
|
||||
|
||||
[ironic-neutron-agent:children]
|
||||
neutron
|
||||
|
||||
# Ceph
|
||||
[ceph-mds:children]
|
||||
ceph
|
||||
|
@ -330,6 +330,9 @@ neutron
|
||||
[neutron-infoblox-ipam-agent:children]
|
||||
neutron
|
||||
|
||||
[ironic-neutron-agent:children]
|
||||
neutron
|
||||
|
||||
# Ceph
|
||||
[ceph-mds:children]
|
||||
ceph
|
||||
|
@ -169,6 +169,17 @@ neutron_services:
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "/run:/run:shared"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
ironic-neutron-agent:
|
||||
container_name: "ironic_neutron_agent"
|
||||
image: "{{ ironic_neutron_agent_image_full }}"
|
||||
privileged: False
|
||||
enabled: "{{ enable_ironic_neutron_agent | bool }}"
|
||||
group: "ironic-neutron-agent"
|
||||
host_in_groups: "{{ inventory_hostname in groups['ironic-neutron-agent'] }}"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/ironic-neutron-agent/:{{ container_config_directory }}/:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
- "kolla_logs:/var/log/kolla/"
|
||||
|
||||
|
||||
####################
|
||||
@ -225,6 +236,10 @@ neutron_infoblox_ipam_agent_image: "{{ docker_registry ~ '/' if docker_registry
|
||||
neutron_infoblox_ipam_agent_tag: "{{ neutron_tag }}"
|
||||
neutron_infoblox_ipam_agent_image_full: "{{ neutron_infoblox_ipam_agent_image }}:{{ neutron_infoblox_ipam_agent_tag }}"
|
||||
|
||||
ironic_neutron_agent_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ neutron_install_type }}-ironic-neutron-agent"
|
||||
ironic_neutron_agent_tag: "{{ neutron_tag }}"
|
||||
ironic_neutron_agent_image_full: "{{ ironic_neutron_agent_image }}:{{ ironic_neutron_agent_tag }}"
|
||||
|
||||
####################
|
||||
# OpenStack
|
||||
####################
|
||||
|
@ -330,3 +330,27 @@
|
||||
- config_json | changed
|
||||
or neutron_conf | changed
|
||||
or neutron_ml2_conf | changed
|
||||
|
||||
- name: Restart ironic-neutron-agent container
|
||||
vars:
|
||||
service_name: "ironic-neutron-agent"
|
||||
service: "{{ neutron_services[service_name] }}"
|
||||
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ironic_neutron_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
become: true
|
||||
kolla_docker:
|
||||
action: "recreate_or_restart_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
name: "{{ service.container_name }}"
|
||||
image: "{{ service.image }}"
|
||||
volumes: "{{ service.volumes }}"
|
||||
privileged: "{{ service.privileged | default(False) }}"
|
||||
when:
|
||||
- action != "config"
|
||||
- service.enabled | bool
|
||||
- service.host_in_groups | bool
|
||||
- config_json | changed
|
||||
or neutron_conf | changed
|
||||
or ironic_neutron_agent_ini | changed
|
||||
|
@ -50,6 +50,7 @@
|
||||
vars:
|
||||
service_name: "{{ item.key }}"
|
||||
services_need_neutron_conf:
|
||||
- "ironic-neutron-agent"
|
||||
- "neutron-dhcp-agent"
|
||||
- "neutron-l3-agent"
|
||||
- "neutron-linuxbridge-agent"
|
||||
@ -305,6 +306,24 @@
|
||||
notify:
|
||||
- "Restart {{ service_name }} container"
|
||||
|
||||
- name: Copying over ironic_neutron_agent.ini
|
||||
become: true
|
||||
vars:
|
||||
service_name: "ironic-neutron-agent"
|
||||
ironic_neutron_agent: "{{ neutron_services[service_name] }}"
|
||||
merge_configs:
|
||||
sources:
|
||||
- "{{ role_path }}/templates/ironic_neutron_agent.ini.j2"
|
||||
- "{{ node_custom_config }}/neutron/ironic_neutron_agent.ini"
|
||||
dest: "{{ node_config_directory }}/{{ service_name }}/ironic_neutron_agent.ini"
|
||||
mode: "0660"
|
||||
register: ironic_neutron_agent_ini
|
||||
when:
|
||||
- ironic_neutron_agent.enabled | bool
|
||||
- ironic_neutron_agent.host_in_groups | bool
|
||||
notify:
|
||||
- "Restart {{ service_name }} container"
|
||||
|
||||
- name: Copying over bgp_dragent.ini
|
||||
become: true
|
||||
vars:
|
||||
|
@ -1,5 +1,4 @@
|
||||
---
|
||||
# enforce ironic usage only with openvswitch
|
||||
- include: ironic-check.yml
|
||||
|
||||
- include: register.yml
|
||||
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
# TODO(SamYaple): run verification checks at start of playbook
|
||||
- fail: msg="neutron_plugin_agent must use openvswitch with Ironic"
|
||||
- fail: msg="Ironic must be enabled when using networking-baremetal/ironic-neutron-agent"
|
||||
when:
|
||||
- enable_ironic | bool
|
||||
- neutron_plugin_agent != "openvswitch"
|
||||
- enable_ironic_neutron_agent | bool
|
||||
- not (enable_ironic | bool)
|
||||
|
29
ansible/roles/neutron/templates/ironic-neutron-agent.json.j2
Normal file
29
ansible/roles/neutron/templates/ironic-neutron-agent.json.j2
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"command": "ironic-neutron-agent --config-dir /etc/neutron --config-file /etc/neutron/plugins/ml2/ironic_neutron_agent.ini --log-file /var/log/kolla/neutron/ironic_neutron_agent.log",
|
||||
"config_files": [
|
||||
{
|
||||
"source": "{{ container_config_directory }}/neutron.conf",
|
||||
"dest": "/etc/neutron/neutron.conf",
|
||||
"owner": "neutron",
|
||||
"perm": "0600"
|
||||
},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/ironic_neutron_agent.ini",
|
||||
"dest": "/etc/neutron/plugins/ml2/ironic_neutron_agent.ini",
|
||||
"owner": "neutron",
|
||||
"perm": "0600"
|
||||
}
|
||||
],
|
||||
"permissions": [
|
||||
{
|
||||
"path": "/var/log/kolla/neutron",
|
||||
"owner": "neutron:neutron",
|
||||
"recurse": true
|
||||
},
|
||||
{
|
||||
"path": "/var/lib/neutron/kolla",
|
||||
"owner": "neutron:neutron",
|
||||
"recurse": true
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
[ironic]
|
||||
auth_url = {{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ keystone_admin_port }}
|
||||
auth_type = password
|
||||
project_domain_id = {{ default_project_domain_id }}
|
||||
user_domain_id = {{ default_user_domain_id }}
|
||||
project_name = service
|
||||
username = {{ neutron_keystone_user }}
|
||||
password = {{ neutron_keystone_password }}
|
||||
os_endpoint_type = internalURL
|
@ -10,7 +10,7 @@ mechanism_drivers = openvswitch,hyperv
|
||||
{% elif enable_onos | bool %}
|
||||
mechanism_drivers = onos_ml2
|
||||
{% else %}
|
||||
mechanism_drivers = openvswitch,l2population
|
||||
mechanism_drivers = openvswitch,{% if enable_ironic_neutron_agent | bool %}baremetal,{% endif %}l2population
|
||||
{% endif %}
|
||||
{% elif neutron_plugin_agent == "linuxbridge" %}
|
||||
mechanism_drivers = linuxbridge,l2population
|
||||
|
@ -1,7 +1,4 @@
|
||||
---
|
||||
# enforce ironic usage only with openvswitch
|
||||
- include: ironic-check.yml
|
||||
|
||||
- include: config.yml
|
||||
|
||||
- name: Flush Handlers
|
||||
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
# TODO(SamYaple): run verification checks at start of playbook
|
||||
- fail: msg="neutron_plugin_agent must use openvswitch with Ironic"
|
||||
when:
|
||||
- enable_ironic | bool
|
||||
- neutron_plugin_agent != "openvswitch"
|
@ -404,6 +404,7 @@
|
||||
- neutron-dhcp-agent
|
||||
- neutron-l3-agent
|
||||
- neutron-lbaas-agent
|
||||
- ironic-neutron-agent
|
||||
- neutron-metadata-agent
|
||||
- compute
|
||||
- manila-share
|
||||
|
@ -221,6 +221,7 @@ kolla_internal_vip_address: "10.10.10.254"
|
||||
#enable_influxdb: "no"
|
||||
#enable_ironic: "no"
|
||||
#enable_ironic_ipxe: "no"
|
||||
#enable_ironic_neutron_agent: "no"
|
||||
#enable_ironic_pxe_uefi: "no"
|
||||
#enable_kafka: "no"
|
||||
#enable_karbor: "no"
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- Add support for configuration of the Ironic Neutron Agent, and the Neutron
|
||||
networking-baremetal ML2 plugin.
|
@ -300,6 +300,9 @@ neutron
|
||||
[neutron-infoblox-ipam-agent:children]
|
||||
neutron
|
||||
|
||||
[ironic-neutron-agent:children]
|
||||
neutron
|
||||
|
||||
# Ceph
|
||||
[ceph-mds:children]
|
||||
ceph
|
||||
|
Loading…
Reference in New Issue
Block a user