-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdev-install_net_config.yaml.j2
80 lines (80 loc) · 1.97 KB
/
dev-install_net_config.yaml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#vi:syntax=yaml
---
network_config:
- type: ovs_bridge
name: br-ex
use_dhcp: true
mtu: {{ public_mtu }}
ovs_extra:
- br-set-external-id br-ex bridge-id br-ex
members:
- type: interface
name: {{ network_info.public_ipv4.interface }}
primary: true
mtu: {{ public_mtu }}
{% if public_default_route %}
routes:
- default: true
next_hop: {{ network_info.public_ipv4.gateway }}
{% endif %}
{% if network_config is defined %}
{{ network_config | to_nice_yaml }}
{% else %}
- type: ovs_bridge
name: br-ctlplane
use_dhcp: false
ovs_extra:
- br-set-external-id br-ctlplane bridge-id br-ctlplane
addresses:
- ip_netmask: {{ local_ip }}/{{ control_plane_prefix }}
members:
- type: interface
name: dummy0
nm_controlled: true
mtu: {{ dcn_az is defined | ternary(ctlplane_mtu, public_mtu) }}
{% for ip in tunnel_remote_ips %}
- type: ovs_tunnel
name: "tun-ctlplane-{{ ip | to_uuid }}"
tunnel_type: vxlan
ovs_options:
- remote_ip={{ ip }}
- key=100
{% endfor %}
- type: ovs_bridge
name: br-hostonly
use_dhcp: false
ovs_extra:
- br-set-external-id br-hostonly bridge-id br-hostonly
addresses:
- ip_netmask: {{ hostonly_gateway }}/32
- ip_netmask: {{ hostonly_v6_gateway }}/64
routes:
- destination: {{ hostonly_cidr }}
nexthop: {{ hostonly_gateway }}
members:
{% for ip in tunnel_remote_ips %}
- type: ovs_tunnel
name: "tun-hostonly-{{ ip | to_uuid }}"
tunnel_type: vxlan
ovs_options:
- remote_ip={{ ip }}
- key=101
{% endfor %}
- type: interface
name: dummy1
nm_controlled: true
mtu: {{ dcn_az is defined | ternary(hostonly_mtu, public_mtu) }}
{% if sriov_interface is defined %}
- type: sriov_pf
name: {{ sriov_interface }}
numvfs: {{ sriov_nic_numvfs | mandatory }}
mtu: 9000
use_dhcp: false
defroute: false
nm_controlled: true
hotplug: true
promisc: false
addresses:
- ip_netmask: {{ hostonly_sriov_gateway }}/{{ hostonly_sriov_prefix }}
{% endif %}
{% endif %}