1dec175241
This change converts the existing NIC templates to jinja2 in order to dynamically render the ports and networks according to the network_data.yaml. If networks are added to the network_data.yaml file, parameters will be added to all NIC templates. The YAML files (as output from jinja with the default network_data.yaml) are present as an example. The roles in roles_data.yaml are used to produce NIC configs for the standard and custom composable roles. In order to keep the ordering of NICs the same in the multiple-nics templates, the order of networks was changed in the network_data.yaml file. This is reflected in the network templates, and in some of the files that is the only change. The roles and roles_data.yaml were modified to include a legacy name for the NIC config templates for the built-in roles Controller, Compute, Object Storage, Block Storage, Ceph Storage, Compute-DPDK, and Networker roles. There will now be a file produced with the legacy name, but also one produced with the <role>-role.j2.yaml format (along with environment files to help use the new filenames). Note this change also fixes some typos as well as a number of templates that had VLANs with device: entries which were ignored. Closes-Bug: 1737041 Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35 Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
71 lines
2.3 KiB
YAML
71 lines
2.3 KiB
YAML
heat_template_version: queens
|
|
description: >
|
|
Software Config to drive os-net-config for a simple bridge configured with a
|
|
static IP address for the ctlplane network.
|
|
parameters:
|
|
ControlPlaneIp:
|
|
default: ''
|
|
description: IP address/subnet on the ctlplane network
|
|
type: string
|
|
{%- for network in networks %}
|
|
{{network.name}}IpSubnet:
|
|
default: ''
|
|
description: IP address/subnet on the {{network.name_lower}} network
|
|
type: string
|
|
{%- endfor %}
|
|
ControlPlaneSubnetCidr: # Override this via parameter_defaults
|
|
default: '24'
|
|
description: The subnet CIDR of the control plane network.
|
|
type: string
|
|
ControlPlaneDefaultRoute: # Override this via parameter_defaults
|
|
description: The default route of the control plane network.
|
|
type: string
|
|
DnsServers: # Override this via parameter_defaults
|
|
default: []
|
|
description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
|
|
type: comma_delimited_list
|
|
EC2MetadataIp: # Override this via parameter_defaults
|
|
description: The IP address of the EC2 metadata server.
|
|
type: string
|
|
resources:
|
|
OsNetConfigImpl:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: script
|
|
config:
|
|
str_replace:
|
|
template:
|
|
get_file: network/scripts/run-os-net-config.sh
|
|
params:
|
|
$network_config:
|
|
network_config:
|
|
- type: ovs_bridge
|
|
name: bridge_name
|
|
use_dhcp: false
|
|
dns_servers:
|
|
get_param: DnsServers
|
|
addresses:
|
|
- ip_netmask:
|
|
list_join:
|
|
- /
|
|
- - get_param: ControlPlaneIp
|
|
- get_param: ControlPlaneSubnetCidr
|
|
routes:
|
|
- ip_netmask: 169.254.169.254/32
|
|
next_hop:
|
|
get_param: EC2MetadataIp
|
|
- default: true
|
|
next_hop:
|
|
get_param: ControlPlaneDefaultRoute
|
|
members:
|
|
- type: interface
|
|
name: interface_name
|
|
# force the MAC address of the bridge to this interface
|
|
primary: true
|
|
outputs:
|
|
OS::stack_id:
|
|
description: The OsNetConfigImpl resource.
|
|
value:
|
|
get_resource: OsNetConfigImpl
|
|
|