-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Fabricio Aguiar <[email protected]>
- Loading branch information
Showing
15 changed files
with
697 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
config/samples/nic-config-samples/bonds_vlans/bonds_vlans.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
{% set mtu_list = [ctlplane_mtu] %} | ||
{% for network in nodeset_networks %} | ||
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} | ||
{%- endfor %} | ||
{% set min_viable_mtu = mtu_list | max %} | ||
network_config: | ||
- type: interface | ||
name: nic1 | ||
mtu: {{ ctlplane_mtu }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
routes: {{ ctlplane_host_routes }} | ||
- type: ovs_bridge | ||
name: {{ neutron_physical_bridge_name }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
domain: {{ dns_search_domains }} | ||
members: | ||
- type: ovs_bond | ||
name: bond1 | ||
mtu: {{ min_viable_mtu }} | ||
ovs_options: {{ edpm_bond_interface_ovs_options }} | ||
members: | ||
- type: interface | ||
name: nic2 | ||
mtu: {{ min_viable_mtu }} | ||
primary: true | ||
- type: interface | ||
name: nic3 | ||
mtu: {{ min_viable_mtu }} | ||
{% for network in nodeset_networks %} | ||
- type: vlan | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} | ||
addresses: | ||
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% endfor %} |
55 changes: 55 additions & 0 deletions
55
config/samples/nic-config-samples/bonds_vlans/bonds_vlans_dpdk.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
{% set mtu_list = [ctlplane_mtu] %} | ||
{% for network in nodeset_networks %} | ||
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} | ||
{%- endfor %} | ||
{% set min_viable_mtu = mtu_list | max %} | ||
network_config: | ||
- type: interface | ||
name: nic1 | ||
mtu: {{ ctlplane_mtu }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
routes: {{ ctlplane_host_routes }} | ||
- type: linux_bond | ||
name: bond_api | ||
mtu: {{ min_viable_mtu }} | ||
bonding_options: {{ edpm_bond_interface_ovs_options }} | ||
use_dhcp: false | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
members: | ||
- type: interface | ||
name: nic2 | ||
mtu: {{ min_viable_mtu }} | ||
primary: true | ||
- type: interface | ||
name: nic3 | ||
mtu: {{ min_viable_mtu }} | ||
{% for network in nodeset_networks %} | ||
- type: vlan | ||
device: bond_api | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} | ||
addresses: | ||
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% endfor %} | ||
{# Used as a provider network with external DHCP #} | ||
- type: ovs_user_bridge | ||
name: br-dpdk0 | ||
members: | ||
- type: ovs_dpdk_bond | ||
name: dpdkbond0 | ||
rx_queue: {{ num_dpdk_interface_rx_queues }} | ||
members: | ||
- type: ovs_dpdk_port | ||
name: dpdk0 | ||
members: | ||
- type: interface | ||
name: nic4 | ||
- type: ovs_dpdk_port | ||
name: dpdk1 | ||
members: | ||
- type: interface | ||
name: nic5 |
39 changes: 39 additions & 0 deletions
39
config/samples/nic-config-samples/bonds_vlans/bonds_vlans_storage.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
{% set mtu_list = [ctlplane_mtu] %} | ||
{% for network in nodeset_networks %} | ||
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} | ||
{%- endfor %} | ||
{% set min_viable_mtu = mtu_list | max %} | ||
network_config: | ||
- type: interface | ||
name: nic1 | ||
mtu: {{ ctlplane_mtu }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
routes: {{ ctlplane_host_routes }} | ||
- type: ovs_bridge | ||
name: br-bond | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
domain: {{ dns_search_domains }} | ||
members: | ||
- type: ovs_bond | ||
name: bond1 | ||
mtu: {{ min_viable_mtu }} | ||
ovs_options: {{ edpm_bond_interface_ovs_options }} | ||
members: | ||
- type: interface | ||
name: nic2 | ||
mtu: {{ min_viable_mtu }} | ||
primary: true | ||
- type: interface | ||
name: nic3 | ||
mtu: {{ min_viable_mtu }} | ||
{% for network in nodeset_networks %} | ||
- type: vlan | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} | ||
addresses: | ||
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% endfor %} |
39 changes: 39 additions & 0 deletions
39
config/samples/nic-config-samples/bonds_vlans/controller_no_external.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
{% set mtu_list = [ctlplane_mtu] %} | ||
{% for network in nodeset_networks %} | ||
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} | ||
{%- endfor %} | ||
{% set min_viable_mtu = mtu_list | max %} | ||
network_config: | ||
- type: interface | ||
name: nic1 | ||
mtu: {{ ctlplane_mtu }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
routes: {{ ctlplane_host_routes }} | ||
- type: ovs_bridge | ||
name: {{ neutron_physical_bridge_name }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
domain: {{ dns_search_domains }} | ||
members: | ||
- type: ovs_bond | ||
name: bond1 | ||
mtu: {{ min_viable_mtu }} | ||
ovs_options: {{ edpm_bond_interface_ovs_options }} | ||
members: | ||
- type: interface | ||
name: nic2 | ||
mtu: {{ min_viable_mtu }} | ||
primary: true | ||
- type: interface | ||
name: nic3 | ||
mtu: {{ min_viable_mtu }} | ||
{% for network in nodeset_networks if network != 'external' %} | ||
- type: vlan | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} | ||
addresses: | ||
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% endfor %} |
43 changes: 43 additions & 0 deletions
43
config/samples/nic-config-samples/multiple_nics/multiple_nics.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
network_config: | ||
- type: interface | ||
name: nic1 | ||
mtu: {{ ctlplane_mtu }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
domain: {{ dns_search_domains }} | ||
routes: {{ ctlplane_host_routes }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
{% for network in nodeset_networks %} | ||
{% if network not in ["external", "tenant"] %} | ||
- type: interface | ||
name: nic{{ loop.index +1 }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% elif 'external_bridge' in nodeset_tags|default([]) %} | ||
- type: ovs_bridge | ||
{% if network == 'external' %} | ||
name: {{ neutron_physical_bridge_name }} | ||
{% else %} | ||
name: {{ 'br-' ~ networks_lower[network] }} | ||
{% endif %} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
members: | ||
- type: interface | ||
name: nic{{loop.index + 1}} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
use_dhcp: false | ||
primary: true | ||
{% endif %} | ||
{% endfor %} |
62 changes: 62 additions & 0 deletions
62
config/samples/nic-config-samples/multiple_nics/multiple_nics_dpdk.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
network_config: | ||
- type: interface | ||
name: nic1 | ||
mtu: {{ ctlplane_mtu }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
domain: {{ dns_search_domains }} | ||
routes: {{ ctlplane_host_routes }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
{% set nics_used = [1] %} | ||
{% for network in nodeset_networks %} | ||
{% if network not in ["external", "tenant"] %} | ||
- type: interface | ||
name: nic{{ loop.index +1 }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% elif 'external_bridge' in nodeset_tags|default([]) %} | ||
- type: ovs_bridge | ||
{% if network == 'external' %} | ||
name: {{ neutron_physical_bridge_name }} | ||
{% else %} | ||
name: {{ 'br-' ~ networks_lower[network] }} | ||
{% endif %} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
members: | ||
- type: interface | ||
name: nic{{loop.index + 1}} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
use_dhcp: false | ||
primary: true | ||
{% endif %} | ||
{% set _ = nics_used.append(loop.index) %} | ||
{% endfor %} | ||
- type: ovs_user_bridge | ||
name: br-dpdk0 | ||
members: | ||
- type: ovs_dpdk_bond | ||
name: dpdkbond0 | ||
rx_queue: {{ num_dpdk_interface_rx_queues }} | ||
members: | ||
- type: ovs_dpdk_port | ||
name: dpdk0 | ||
members: | ||
- type: interface | ||
name: nic{{nics_used[-1] + 1}} | ||
- type: ovs_dpdk_port | ||
name: dpdk1 | ||
members: | ||
- type: interface | ||
name: nic{{nics_used[-1] + 2}} |
56 changes: 56 additions & 0 deletions
56
config/samples/nic-config-samples/multiple_nics/multiple_nics_dvr.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
network_config: | ||
- type: interface | ||
name: nic1 | ||
mtu: {{ ctlplane_mtu }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
domain: {{ dns_search_domains }} | ||
routes: {{ ctlplane_host_routes }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
{% for network in nodeset_networks %} | ||
{% if network == 'external' %} | ||
- type: ovs_bridge | ||
name: {{ neutron_physical_bridge_name }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
use_dhcp: false | ||
{% else %} | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% endif %} | ||
members: | ||
- type: interface | ||
name: nic{{ loop.index +1 }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
primary: true | ||
{% if network not in ["external", "tenant"] %} | ||
- type: interface | ||
name: nic{{ loop.index +1 }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% elif network == 'tenant' %} | ||
- type: ovs_bridge | ||
name: {{ 'br-' ~ networks_lower[network] }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
members: | ||
- type: interface | ||
name: nic{{loop.index + 1}} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
use_dhcp: false | ||
primary: true | ||
{% endif %} | ||
{% endfor %} |
50 changes: 50 additions & 0 deletions
50
config/samples/nic-config-samples/multiple_nics_vlans/multiple_nics_vlans.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
network_config: | ||
- type: interface | ||
name: nic1 | ||
mtu: {{ ctlplane_mtu }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
domain: {{ dns_search_domains }} | ||
routes: {{ ctlplane_host_routes }} | ||
use_dhcp: false | ||
addresses: | ||
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} | ||
{% for network in nodeset_networks %} | ||
{% if network not in ["external", "tenant"] %} | ||
- type: interface | ||
name: nic{{ loop.index + 1 }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
use_dhcp: false | ||
- type: vlan | ||
device: nic{{ loop.index + 1 }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% elif 'external_bridge' in nodeset_tags|default([]) %} | ||
- type: ovs_bridge | ||
{% if network == 'external' %} | ||
name: {{ neutron_physical_bridge_name }} | ||
{% else %} | ||
name: {{ 'br-' ~ networks_lower[network] }} | ||
{% endif %} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
dns_servers: {{ ctlplane_dns_nameservers }} | ||
use_dhcp: false | ||
members: | ||
- type: interface | ||
name: nic{{ loop.index + 1 }} | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
use_dhcp: false | ||
primary: true | ||
- type: vlan | ||
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} | ||
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} | ||
addresses: | ||
- ip_netmask: | ||
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} | ||
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} | ||
{% endif %} | ||
{% endfor %} |
Oops, something went wrong.