Make keystone api network hiera composable
[apex-tripleo-heat-templates.git] / net-config-bond.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   Software Config to drive os-net-config with 2 bonded nics on a bridge.
5
6 parameters:
7   BondInterfaceOvsOptions:
8     default: ''
9     description: |
10       The ovs_options string for the bond interface. Set things like
11       lacp=active and/or bond_mode=balance-slb using this option.
12     type: string
13     constraints:
14       - allowed_pattern: "^((?!balance.tcp).)*$"
15         description: |
16           The balance-tcp bond mode is known to cause packet loss and
17           should not be used in BondInterfaceOvsOptions.
18   ControlPlaneIp:
19     default: ''
20     description: IP address/subnet on the ctlplane network
21     type: string
22   ExternalIpSubnet:
23     default: ''
24     description: IP address/subnet on the external network
25     type: string
26   InternalApiIpSubnet:
27     default: ''
28     description: IP address/subnet on the internal API network
29     type: string
30   StorageIpSubnet:
31     default: ''
32     description: IP address/subnet on the storage network
33     type: string
34   StorageMgmtIpSubnet:
35     default: ''
36     description: IP address/subnet on the storage mgmt network
37     type: string
38   TenantIpSubnet:
39     default: ''
40     description: IP address/subnet on the tenant network
41     type: string
42   ManagementIpSubnet:
43     default: ''
44     description: IP address/subnet on the management network
45     type: string
46
47 resources:
48   OsNetConfigImpl:
49     type: OS::Heat::StructuredConfig
50     properties:
51       group: os-apply-config
52       config:
53         os_net_config:
54           network_config:
55             -
56               type: ovs_bridge
57               name: {get_input: bridge_name}
58               use_dhcp: true
59               # Can't do this yet: https://bugs.launchpad.net/heat/+bug/1344284
60               #ovs_extra:
61               #  - list_join:
62               #    - ' '
63               #    - - br-set-external-id
64               #      - {get_input: bridge_name}
65               #      - bridge-id
66               #      - {get_input: bridge_name}
67               members:
68                 -
69                   type: ovs_bond
70                   name: bond1
71                   use_dhcp: true
72                   ovs_options: {get_param: BondInterfaceOvsOptions}
73                   members:
74                     # os-net-config translates nic1 => em1 (for example)
75                     -
76                       type: interface
77                       name: nic1
78                     -
79                       type: interface
80                       name: nic2
81
82 outputs:
83   OS::stack_id:
84     description: The OsNetConfigImpl resource.
85     value: {get_resource: OsNetConfigImpl}