Convert ipv4 nic-config templates

The ipv4 nic-config templates in tripleo-heat-templates were never
updated to use "group: script" and were still using the deprecated
"group: os-apply-config".

This commit updates the templates. Doing so means they will also work
with the config-download deploy mechanism which only supports the
"group: script" method. This update allows us to move forward with
converting ci jobs that use these templates (such as ovb-ha) to use
config-download.

Change-Id: If3cc2749c070a9e88a33b8b0643aeef8a97dd181
This commit is contained in:
James Slagle 2018-01-04 14:11:38 -05:00
parent c74318381c
commit c3cbce2ba9
5 changed files with 167 additions and 147 deletions

View File

@ -79,39 +79,43 @@ parameters:
resources: resources:
OsNetConfigImpl: OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties: properties:
group: script
config: config:
os_net_config: str_replace:
network_config: template:
- type: interface get_file: ../../../../../network/scripts/run-os-net-config.sh
name: nic1 params:
mtu: 1350 $network_config:
use_dhcp: false network_config:
addresses: - type: interface
- ip_netmask: name: nic1
list_join: mtu: 1350
- / use_dhcp: false
- - {get_param: ControlPlaneIp} addresses:
- {get_param: ControlPlaneSubnetCidr} - ip_netmask:
routes: list_join:
- ip_netmask: 169.254.169.254/32 - /
next_hop: {get_param: EC2MetadataIp} - - {get_param: ControlPlaneIp}
- default: true - {get_param: ControlPlaneSubnetCidr}
next_hop: {get_param: ControlPlaneDefaultRoute} routes:
- type: interface - ip_netmask: 169.254.169.254/32
name: nic4 next_hop: {get_param: EC2MetadataIp}
mtu: 1350 - default: true
use_dhcp: false next_hop: {get_param: ControlPlaneDefaultRoute}
addresses: - type: interface
- ip_netmask: {get_param: StorageIpSubnet} name: nic4
- type: interface mtu: 1350
name: nic5 use_dhcp: false
mtu: 1350 addresses:
use_dhcp: false - ip_netmask: {get_param: StorageIpSubnet}
addresses: - type: interface
- ip_netmask: {get_param: StorageMgmtIpSubnet} name: nic5
group: os-apply-config mtu: 1350
type: OS::Heat::StructuredConfig use_dhcp: false
addresses:
- ip_netmask: {get_param: StorageMgmtIpSubnet}
outputs: outputs:
OS::stack_id: OS::stack_id:

View File

@ -79,12 +79,16 @@ parameters:
resources: resources:
OsNetConfigImpl: OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties: properties:
group: script
config: config:
os_net_config: str_replace:
network_config: [] template:
group: os-apply-config get_file: ../../../../../network/scripts/run-os-net-config.sh
type: OS::Heat::StructuredConfig params:
$network_config:
network_config: []
outputs: outputs:
OS::stack_id: OS::stack_id:

View File

@ -79,56 +79,60 @@ parameters:
resources: resources:
OsNetConfigImpl: OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties: properties:
group: script
config: config:
os_net_config: str_replace:
network_config: template:
- type: interface get_file: ../../../../../network/scripts/run-os-net-config.sh
name: nic1 params:
mtu: 1350 $network_config:
use_dhcp: false network_config:
addresses: - type: interface
- ip_netmask: name: nic1
list_join: mtu: 1350
- / use_dhcp: false
- - {get_param: ControlPlaneIp} addresses:
- {get_param: ControlPlaneSubnetCidr} - ip_netmask:
routes: list_join:
- ip_netmask: 169.254.169.254/32 - /
next_hop: {get_param: EC2MetadataIp} - - {get_param: ControlPlaneIp}
- default: true - {get_param: ControlPlaneSubnetCidr}
next_hop: {get_param: ControlPlaneDefaultRoute} routes:
- type: interface - ip_netmask: 169.254.169.254/32
name: nic3 next_hop: {get_param: EC2MetadataIp}
mtu: 1350 - default: true
use_dhcp: false next_hop: {get_param: ControlPlaneDefaultRoute}
addresses: - type: interface
- ip_netmask: {get_param: InternalApiIpSubnet} name: nic3
- type: interface mtu: 1350
name: nic4 use_dhcp: false
mtu: 1350 addresses:
use_dhcp: false - ip_netmask: {get_param: InternalApiIpSubnet}
addresses: - type: interface
- ip_netmask: {get_param: StorageIpSubnet} name: nic4
- type: ovs_bridge mtu: 1350
name: br-tenant use_dhcp: false
dns_servers: {get_param: DnsServers} addresses:
use_dhcp: false - ip_netmask: {get_param: StorageIpSubnet}
addresses: - type: ovs_bridge
- ip_netmask: {get_param: TenantIpSubnet} name: br-tenant
members: dns_servers: {get_param: DnsServers}
- type: interface use_dhcp: false
name: nic6 addresses:
mtu: 1350 - ip_netmask: {get_param: TenantIpSubnet}
primary: true members:
- type: interface - type: interface
name: nic5 name: nic6
mtu: 1350 mtu: 1350
use_dhcp: false primary: true
addresses: - type: interface
- ip_netmask: {get_param: StorageMgmtIpSubnet} name: nic5
group: os-apply-config mtu: 1350
type: OS::Heat::StructuredConfig use_dhcp: false
addresses:
- ip_netmask: {get_param: StorageMgmtIpSubnet}
outputs: outputs:
OS::stack_id: OS::stack_id:

View File

@ -79,68 +79,72 @@ parameters:
resources: resources:
OsNetConfigImpl: OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties: properties:
group: script
config: config:
os_net_config: str_replace:
network_config: template:
- type: interface get_file: ../../../../../network/scripts/run-os-net-config.sh
name: nic1 params:
mtu: 1350 $network_config:
use_dhcp: false network_config:
addresses: - type: interface
- ip_netmask: name: nic1
list_join: mtu: 1350
- / use_dhcp: false
- - {get_param: ControlPlaneIp} addresses:
- {get_param: ControlPlaneSubnetCidr} - ip_netmask:
routes: list_join:
- ip_netmask: 169.254.169.254/32 - /
next_hop: {get_param: EC2MetadataIp} - - {get_param: ControlPlaneIp}
- type: ovs_bridge - {get_param: ControlPlaneSubnetCidr}
name: br-ex routes:
dns_servers: {get_param: DnsServers} - ip_netmask: 169.254.169.254/32
use_dhcp: false next_hop: {get_param: EC2MetadataIp}
addresses: - type: ovs_bridge
- ip_netmask: {get_param: ExternalIpSubnet} name: br-ex
routes: dns_servers: {get_param: DnsServers}
- ip_netmask: 0.0.0.0/0 use_dhcp: false
next_hop: {get_param: ExternalInterfaceDefaultRoute} addresses:
members: - ip_netmask: {get_param: ExternalIpSubnet}
- type: interface routes:
name: nic2 - ip_netmask: 0.0.0.0/0
mtu: 1350 next_hop: {get_param: ExternalInterfaceDefaultRoute}
primary: true members:
- type: interface - type: interface
name: nic3 name: nic2
mtu: 1350 mtu: 1350
use_dhcp: false primary: true
addresses: - type: interface
- ip_netmask: {get_param: InternalApiIpSubnet} name: nic3
- type: interface mtu: 1350
name: nic4 use_dhcp: false
mtu: 1350 addresses:
use_dhcp: false - ip_netmask: {get_param: InternalApiIpSubnet}
addresses: - type: interface
- ip_netmask: {get_param: StorageIpSubnet} name: nic4
- type: interface mtu: 1350
name: nic5 use_dhcp: false
mtu: 1350 addresses:
use_dhcp: false - ip_netmask: {get_param: StorageIpSubnet}
addresses: - type: interface
- ip_netmask: {get_param: StorageMgmtIpSubnet} name: nic5
- type: ovs_bridge mtu: 1350
name: br-tenant use_dhcp: false
dns_servers: {get_param: DnsServers} addresses:
use_dhcp: false - ip_netmask: {get_param: StorageMgmtIpSubnet}
addresses: - type: ovs_bridge
- ip_netmask: {get_param: TenantIpSubnet} name: br-tenant
members: dns_servers: {get_param: DnsServers}
- type: interface use_dhcp: false
name: nic6 addresses:
mtu: 1350 - ip_netmask: {get_param: TenantIpSubnet}
primary: true members:
group: os-apply-config - type: interface
type: OS::Heat::StructuredConfig name: nic6
mtu: 1350
primary: true
outputs: outputs:
OS::stack_id: OS::stack_id:

View File

@ -79,12 +79,16 @@ parameters:
resources: resources:
OsNetConfigImpl: OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties: properties:
group: script
config: config:
os_net_config: str_replace:
network_config: [] template:
group: os-apply-config get_file: ../../../../../network/scripts/run-os-net-config.sh
type: OS::Heat::StructuredConfig params:
$network_config:
network_config: []
outputs: outputs:
OS::stack_id: OS::stack_id: