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