adding basic network isolation
[apex.git] / build / nics / compute.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config to configure multiple interfaces
5   for the compute role.
6
7 parameters:
8   ControlPlaneIp:
9     default: ''
10     description: IP address/subnet on the ctlplane network
11     type: string
12   ExternalIpSubnet:
13     default: ''
14     description: IP address/subnet on the external network
15     type: string
16   InternalApiIpSubnet:
17     default: ''
18     description: IP address/subnet on the internal API network
19     type: string
20   StorageIpSubnet:
21     default: ''
22     description: IP address/subnet on the storage network
23     type: string
24   StorageMgmtIpSubnet:
25     default: ''
26     description: IP address/subnet on the storage mgmt network
27     type: string
28   TenantIpSubnet:
29     default: ''
30     description: IP address/subnet on the tenant network
31     type: string
32   InternalApiNetworkVlanID:
33     default: 20
34     description: Vlan ID for the internal_api network traffic.
35     type: number
36   StorageNetworkVlanID:
37     default: 30
38     description: Vlan ID for the storage network traffic.
39     type: number
40   TenantNetworkVlanID:
41     default: 50
42     description: Vlan ID for the tenant network traffic.
43     type: number
44   ControlPlaneSubnetCidr: # Override this via parameter_defaults
45     default: '24'
46     description: The subnet CIDR of the control plane network.
47     type: string
48   ControlPlaneDefaultRoute: # Override this via parameter_defaults
49     description: The subnet CIDR of the control plane network.
50     type: string
51   DnsServers: # Override this via parameter_defaults
52     default: []
53     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
54     type: json
55   EC2MetadataIp: # Override this via parameter_defaults
56     description: The IP address of the EC2 metadata server.
57     type: string
58
59 resources:
60   OsNetConfigImpl:
61     type: OS::Heat::StructuredConfig
62     properties:
63       group: os-apply-config
64       config:
65         os_net_config:
66           network_config:
67             -
68               type: interface
69               name: nic1
70               use_dhcp: false
71               dns_servers: {get_param: DnsServers}
72               addresses:
73                 -
74                   ip_netmask:
75                     list_join:
76                       - '/'
77                       - - {get_param: ControlPlaneIp}
78                         - {get_param: ControlPlaneSubnetCidr}
79               routes:
80                 -
81                   ip_netmask: 169.254.169.254/32
82                   next_hop: {get_param: EC2MetadataIp}
83
84 outputs:
85   OS::stack_id:
86     description: The OsNetConfigImpl resource.
87     value: {get_resource: OsNetConfigImpl}