Contrail network realignement + DPDK enablement
[apex-tripleo-heat-templates.git] / network / config / contrail / contrail-nic-config.yaml
1 heat_template_version: pike
2
3 description: >
4   Software Config to drive os-net-config to configure multiple interfaces
5   for the compute role. This is an example for a Nova compute node using
6   Contrail vrouter and the vhost0 interface.
7
8 parameters:
9   ControlPlaneIp:
10     default: ''
11     description: IP address/subnet on the ctlplane network
12     type: string
13   ExternalIpSubnet:
14     default: ''
15     description: IP address/subnet on the external network
16     type: string
17   InternalApiIpSubnet:
18     default: ''
19     description: IP address/subnet on the internal API network
20     type: string
21   InternalApiDefaultRoute: # Not used by default in this template
22     default: '10.0.0.1'
23     description: The default route of the internal api network.
24     type: string
25   StorageIpSubnet:
26     default: ''
27     description: IP address/subnet on the storage network
28     type: string
29   StorageMgmtIpSubnet:
30     default: ''
31     description: IP address/subnet on the storage mgmt network
32     type: string
33   TenantIpSubnet:
34     default: ''
35     description: IP address/subnet on the tenant network
36     type: string
37   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
38     default: ''
39     description: IP address/subnet on the management network
40     type: string
41   ExternalNetworkVlanID:
42     default: 10
43     description: Vlan ID for the external network traffic.
44     type: number
45   InternalApiNetworkVlanID:
46     default: 20
47     description: Vlan ID for the internal_api network traffic.
48     type: number
49   StorageNetworkVlanID:
50     default: 30
51     description: Vlan ID for the storage network traffic.
52     type: number
53   StorageMgmtNetworkVlanID:
54     default: 40
55     description: Vlan ID for the storage mgmt network traffic.
56     type: number
57   TenantNetworkVlanID:
58     default: 50
59     description: Vlan ID for the tenant network traffic.
60     type: number
61   ManagementNetworkVlanID:
62     default: 60
63     description: Vlan ID for the management network traffic.
64     type: number
65   ControlPlaneSubnetCidr: # Override this via parameter_defaults
66     default: '24'
67     description: The subnet CIDR of the control plane network.
68     type: string
69   ControlPlaneDefaultRoute: # Override this via parameter_defaults
70     description: The default route of the control plane network.
71     type: string
72   ExternalInterfaceDefaultRoute: # Not used by default in this template
73     default: '10.0.0.1'
74     description: The default route of the external network.
75     type: string
76   ManagementInterfaceDefaultRoute: # Commented out by default in this template
77     default: unset
78     description: The default route of the management network.
79     type: string
80   DnsServers: # Override this via parameter_defaults
81     default: []
82     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
83     type: comma_delimited_list
84   EC2MetadataIp: # Override this via parameter_defaults
85     description: The IP address of the EC2 metadata server.
86     type: string
87
88 resources:
89   OsNetConfigImpl:
90     type: OS::Heat::SoftwareConfig
91     properties:
92       group: script
93       config:
94         str_replace:
95           template:
96             get_file: ../../scripts/run-os-net-config.sh
97           params:
98             $network_config:
99               network_config:
100               - type: interface
101                 name: nic1
102                 use_dhcp: false
103                 dns_servers:
104                   get_param: DnsServers
105                 addresses:
106                 - ip_netmask:
107                     list_join:
108                       - '/'
109                       - - get_param: ControlPlaneIp
110                         - get_param: ControlPlaneSubnetCidr
111                 routes:
112                 - ip_netmask: 169.254.169.254/32
113                   next_hop:
114                     get_param: EC2MetadataIp
115               - type: interface
116                 name: nic2
117                 use_dhcp: false
118                 addresses:
119                 - ip_netmask:
120                     get_param: InternalApiIpSubnet
121                 routes:
122                 - default: true
123                   next_hop:
124                     get_param: InternalApiDefaultRoute
125               - type: linux_bridge
126                 name: br0
127                 use_dhcp: false
128                 members:
129                 -  type: interface
130                    name: nic3
131               - type: vlan
132                 vlan_id:
133                   get_param: ManagementNetworkVlanID
134                 device: br0
135                 addresses:
136                 - ip_netmask:
137                     get_param: ManagementIpSubnet
138               - type: vlan
139                 vlan_id:
140                   get_param: ExternalNetworkVlanID
141                 device: br0
142                 addresses:
143                 - ip_netmask:
144                     get_param: ExternalIpSubnet
145               - type: vlan
146                 vlan_id:
147                   get_param: StorageNetworkVlanID
148                 device: br0
149                 addresses:
150                 - ip_netmask:
151                     get_param: StorageIpSubnet
152               - type: vlan
153                 vlan_id:
154                   get_param: StorageMgmtNetworkVlanID
155                 device: br0
156                 addresses:
157                 - ip_netmask:
158                     get_param: StorageMgmtIpSubnet
159
160 outputs:
161   OS::stack_id:
162     description: The OsNetConfigImpl resource.
163     value:
164       get_resource: OsNetConfigImpl