Allow multi-nic-vlans libvirt based deployment
Current config assumed deployments to be based on single-nic, update minimal featureset to support deployment with multiple-nics-vlans network_isolation. Not changing any defaults with that patch, user who want to deploy with multi-nics-vlans can pass -e network_isolation_type=multiple-nics-vlans to quickstart deployment command. Required networks will be auto created and attached to overcloud and undercloud vms to support multi-nic-vlans. By default 6 networks will be created with this config each for ctlplane, Internal, Storage, StorageMgmt, Tenant and External. If want to created different number of networks or with different name can be done by passing extra_networks var like:- extra_networks: - name: data bridge: br-data - name: tenant bridge: br-tenant - name: ovcexternal bridge: br-external Need to use seperate name as used by default_networks. Depends-On: I82013d33c1729619e47b633bddd1580e9efe0b55 Change-Id: Ife4d31ecd9912b424a178cc4bbc0d6de7216e512
This commit is contained in:
parent
bbb8172bfe
commit
f694dad02b
|
@ -38,16 +38,30 @@ network_provision: >-
|
|||
true
|
||||
{%- endif -%}
|
||||
|
||||
nic_environment_file: >-
|
||||
{% if network_isolation_type == 'multiple-nics-vlans' -%}
|
||||
{{ overcloud_templates_path }}/environments/net-multiple-nics-vlans.yaml
|
||||
{%- else -%}
|
||||
{{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml
|
||||
{%- endif -%}
|
||||
|
||||
external_interface: >-
|
||||
{% if network_isolation_type == 'multiple-nics-vlans' -%}
|
||||
eth{{ extra_networks|list|length + 1 }}
|
||||
{%- else -%}
|
||||
eth2
|
||||
{%- endif -%}
|
||||
|
||||
network_data_yaml: "{{ overcloud_templates_path }}/network-data-samples/default-network-isolation.yaml"
|
||||
network_isolation_args: >-
|
||||
{% if not release in ['train','ussuri','victoria'] -%}
|
||||
--networks-file {{ overcloud_templates_path }}/network-data-samples/default-network-isolation.yaml
|
||||
--networks-file {{ network_data_yaml }}
|
||||
-e {{ working_dir }}/overcloud-networks-deployed.yaml
|
||||
-e {{ working_dir }}/overcloud-vips-deployed.yaml
|
||||
{% else %}
|
||||
-e {{ overcloud_templates_path }}/environments/network-isolation.yaml
|
||||
{% endif %}
|
||||
-e {{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml
|
||||
-e {{ nic_environment_file }}
|
||||
-e {{ working_dir }}/network-environment.yaml
|
||||
|
||||
# Tell tripleo about our environment.
|
||||
|
@ -120,8 +134,18 @@ use_os_tempest: true
|
|||
tempest_interface_name: public
|
||||
|
||||
# In order to have a public network with external connectivity, we need to use
|
||||
# flat network type
|
||||
tempest_public_net_provider_type: flat
|
||||
# flat/vlan network type
|
||||
tempest_public_net_provider_type: >-
|
||||
{% if network_isolation_type == 'multiple-nics-vlans' -%}
|
||||
vlan
|
||||
{%- else -%}
|
||||
flat
|
||||
{%- endif -%}
|
||||
|
||||
tempest_public_net_seg_id: >-
|
||||
{% if network_isolation_type == 'multiple-nics-vlans' -%}
|
||||
10
|
||||
{%- endif -%}
|
||||
|
||||
# It is the physical network name through which public network will be created
|
||||
# having connectivity with external world.
|
||||
|
@ -129,7 +153,12 @@ tempest_public_net_physical_name: datacentre
|
|||
|
||||
# Setting the tempest_cidr as it is required while creating public subnet from which
|
||||
# floating IPs gets assigned
|
||||
tempest_cidr: '192.168.24.0/24'
|
||||
tempest_cidr: >-
|
||||
{% if network_isolation_type == 'multiple-nics-vlans' -%}
|
||||
10.0.0.0/24
|
||||
{%- else -%}
|
||||
192.168.24.0/24
|
||||
{%- endif -%}
|
||||
|
||||
tempest_private_net_seg_id: ''
|
||||
|
||||
|
|
|
@ -141,10 +141,9 @@ overcloud_nodes:
|
|||
# nodes unless force_ovc: true is used in network's definition.
|
||||
#
|
||||
external_network_cidr: 192.168.23.0/24
|
||||
networks:
|
||||
default_networks:
|
||||
- name: overcloud
|
||||
bridge: brovc
|
||||
|
||||
- name: external
|
||||
bridge: brext
|
||||
forward_mode: nat
|
||||
|
@ -158,6 +157,25 @@ networks:
|
|||
- 1024
|
||||
- 65535
|
||||
|
||||
extra_networks_count: >-
|
||||
{% if network_isolation_type == 'multiple-nics-vlans' -%}
|
||||
5
|
||||
{%- else -%}
|
||||
0
|
||||
{%- endif %}
|
||||
|
||||
extra_networks: |-
|
||||
{%- set calc_extra_networks = namespace(value=[]) -%}
|
||||
{% if network_isolation_type == 'multiple-nics-vlans' -%}
|
||||
{%- for idx in range(extra_networks_count|int) -%}
|
||||
{%- set nw = [{ "name": "overcloud" + idx|string, "bridge": "brovc" + idx|string }] -%}
|
||||
{%- set calc_extra_networks.value = calc_extra_networks.value + nw -%}
|
||||
{%- endfor -%}
|
||||
{%- endif %}
|
||||
{{ calc_extra_networks.value }}
|
||||
|
||||
networks: "{{ default_networks + extra_networks }}"
|
||||
|
||||
# Enable network isolation with single-nic-vlans for virtualized deployments
|
||||
undercloud_network_cidr: 192.168.24.0/24
|
||||
undercloud_external_network_cidr: >-
|
||||
|
|
Loading…
Reference in New Issue