1 heat_template_version: ocata
4 Software Config to drive os-net-config for a simple bridge configured
5 with a static IP address for the ctlplane network.
10 description: IP address/subnet on the ctlplane network
14 description: IP address/subnet on the external network
18 description: IP address/subnet on the internal API network
22 description: IP address/subnet on the storage network
26 description: IP address/subnet on the storage mgmt network
30 description: IP address/subnet on the tenant network
34 description: IP address/subnet on the management network
36 ControlPlaneSubnetCidr: # Override this via parameter_defaults
38 description: The subnet CIDR of the control plane network.
42 description: The mtu of the OvS bridge
48 type: OS::Heat::SoftwareConfig
56 function network_config_hook {
57 primary_private_ip=$(cat /etc/nodepool/primary_node_private)
58 sed -i "s/primary_private_ip/$primary_private_ip/" /etc/os-net-config/config.json
59 subnode_private_ip=$(cat /etc/nodepool/node_private)
60 sed -i "s/subnode_private_ip/$subnode_private_ip/" /etc/os-net-config/config.json
61 # We start with an arbitrarily high vni key so that we don't
62 # overlap with Neutron created values. These will also match the
63 # values that we've been using previously from the devstack-gate
66 subnode_index=$(grep -n $(cat /etc/nodepool/node_private) /etc/nodepool/sub_nodes_private | cut -d: -f1)
67 let vni+=$subnode_index
68 sed -i "s/vni/$vni/" /etc/os-net-config/config.json
69 export interface_name="br-ex_$primary_private_ip"
70 # Until we are fully migrated to os-net-config we need to clean
71 # up the old bridge first created by devstack-gate
72 ovs-vsctl del-br br-ex
78 get_file: ../../network/scripts/run-os-net-config.sh
85 get_param: OvSBridgeMtu
91 - - get_param: ControlPlaneIp
92 - get_param: ControlPlaneSubnetCidr
113 description: The OsNetConfigImpl resource.
114 value: {get_resource: OsNetConfigImpl}