Make NetworkConfigWithAnsible parameter non-role specific

This changes the parameter to non-role specific and by default
true. The dependant python-tripleoclient patch adds a check
to ensure that we only allow usage of old heat nic congigs with
'NetworkConfigWithAnsible: false'.

Change-Id: Ie37bdfe64eb1b33afe326161fc6f99601addb7b5
This commit is contained in:
Rabi Mishra 2020-10-15 10:24:02 +05:30
parent a81ce0b931
commit e9e0eb3d97
28 changed files with 18 additions and 73 deletions

View File

@ -3,9 +3,7 @@ resource_registry:
parameter_defaults:
ControllerNetworkConfigTemplate: 'templates/ci/multinode.j2'
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/ci/multinode.j2'
ComputeNetworkConfigWithAnsible: true
ControllerServices:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::ContainerImagePrepare

View File

@ -1,16 +1,10 @@
parameter_defaults:
ControllerNetworkConfigTemplate: 'templates/ci/multiple_nics_ipv6.j2'
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/ci/multiple_nics_ipv6.j2'
ComputeNetworkConfigWithAnsible: true
BlockStorageNetworkConfigTemplate: 'templates/ci/multiple_nics_ipv6.j2'
BlockStorageNetworkConfigWithAnsible: true
CellControllerNetworkConfigTemplate: 'templates/ci/multiple_nics_ipv6.j2'
CellControllerNetworkConfigWithAnsible: true
ObjectStorageNetworkConfigTemplate: 'templates/ci/multiple_nics_ipv6.j2'
ObjectStorageNetworkConfigWithAnsible: true
CephStorageNetworkConfigTemplate: 'templates/ci/multiple_nics_ipv6.j2'
CephStorageNetworkConfigWithAnsible: true
ExternalNetCidr: 2001:db8:fd00:1000::/64
ExternalAllocationPools: [{"start": "2001:db8:fd00:1000::10", "end": "2001:db8:fd00:1000:ffff:ffff:ffff:fffe"}]
ExternalInterfaceDefaultRoute: 2001:db8:fd00:1000::1

View File

@ -1,16 +1,10 @@
parameter_defaults:
ControllerNetworkConfigTemplate: 'templates/ci/multiple_nics.j2'
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/ci/multiple_nics.j2'
ComputeNetworkConfigWithAnsible: true
BlockStorageNetworkConfigTemplate: 'templates/ci/multiple_nics.j2'
BlockStorageNetworkConfigWithAnsible: true
CellControllerNetworkConfigTemplate: 'templates/ci/multiple_nics.j2'
CellControllerNetworkConfigWithAnsible: true
ObjectStorageNetworkConfigTemplate: 'templates/ci/multiple_nics.j2'
ObjectStorageNetworkConfigWithAnsible: true
CephStorageNetworkConfigTemplate: 'templates/ci/multiple_nics.j2'
CephStorageNetworkConfigWithAnsible: true
ExternalNetCidr: 10.0.0.0/24
ExternalAllocationPools: [{"start": "10.0.0.10", "end": "10.0.0.50"}]
ExternalInterfaceDefaultRoute: 10.0.0.1

View File

@ -1,16 +1,10 @@
parameter_defaults:
ControllerNetworkConfigTemplate: 'templates/ci/public_bond.j2'
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/ci/public_bond.j2'
ComputeNetworkConfigWithAnsible: true
BlockStorageNetworkConfigTemplate: 'templates/ci/public_bond.j2'
BlockStorageNetworkConfigWithAnsible: true
CellControllerNetworkConfigTemplate: 'templates/ci/public_bond.j2'
CellControllerNetworkConfigWithAnsible: true
ObjectStorageNetworkConfigTemplate: 'templates/ci/public_bond.j2'
ObjectStorageNetworkConfigWithAnsible: true
CephStorageNetworkConfigTemplate: 'templates/ci/public_bond.j2'
CephStorageNetworkConfigWithAnsible: true
ExternalNetCidr: 10.0.0.0/24
ExternalAllocationPools: [{"start": "10.0.0.10", "end": "10.0.0.50"}]
ExternalInterfaceDefaultRoute: 10.0.0.1

View File

@ -1,8 +1,6 @@
parameter_defaults:
ControllerNetworkConfigTemplate: 'templates/ci/multinode.j2'
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/ci/multinode.j2'
ComputeNetworkConfigWithAnsible: true
ControllerServices:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::ContainerImagePrepare

View File

@ -29,9 +29,7 @@ resource_registry:
parameter_defaults:
ControllerNetworkConfigTemplate: 'templates/ci/multinode.j2'
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/ci/multinode.j2'
ComputeNetworkConfigWithAnsible: true
ControllerServices:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::Clustercheck

View File

@ -24,9 +24,7 @@ resource_registry:
OS::TripleO::Services::BlockStorageCinderVolume: OS::Heat::None
parameter_defaults:
ControllerNetworkConfigTemplate: 'templates/ci/multinode.j2'
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/ci/multinode.j2'
ComputeNetworkConfigWithAnsible: true
ControllerServices:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::Clustercheck

View File

@ -26,9 +26,7 @@ resource_registry:
parameter_defaults:
ControllerNetworkConfigTemplate: 'templates/ci/multinode.j2'
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/ci/multinode.j2'
ComputeNetworkConfigWithAnsible: true
ControllerServices:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::Clustercheck

View File

@ -50,8 +50,6 @@ controllers, and the net_config_static.j2 template could be used for computes
by specifying:
parameter_defaults:
ControllerNetworkConfigWithAnsible: true
ComputeNetworkConfigWithAnsible: true
ControlleNetworkConfigTemplate: 'templates/net_config_static_bridge.j2'
ComputeNetworkConfigTemplate: 'templates/net_config_static.j2'

View File

@ -11,5 +11,4 @@ parameter_defaults:
EnablePackageInstall: True
{% for role in roles %}
{{role.name}}NetworkConfigTemplate: 'templates/net_config_static_bridge.j2'
{{role.name}}NetworkConfigWithAnsible: true
{% endfor %}

View File

@ -18,5 +18,4 @@ parameter_defaults:
{%- else %}
{{role.name}}NetworkConfigTemplate: 'templates/2_linux_bonds_vlans/2_linux_bonds_vlans.j2'
{%- endif %}
{{role.name}}NetworkConfigWithAnsible: true
{%- endfor %}

View File

@ -25,5 +25,4 @@ parameter_defaults:
{%- else %}
{{role.name}}NetworkConfigTemplate: 'templates/bonds_vlans/bonds_vlans.j2'
{%- endif %}
{{role.name}}NetworkConfigWithAnsible: true
{%- endfor %}

View File

@ -21,5 +21,4 @@ parameter_defaults:
{%- else %}
{{role.name}}NetworkConfigTemplate: 'templates/bonds_vlans/bonds_vlans_dpdk.j2'
{%- endif %}
{{role.name}}NetworkConfigWithAnsible: true
{%- endfor %}

View File

@ -19,5 +19,4 @@ parameter_defaults:
{%- else %}
{{role.name}}NetworkConfigTemplate: 'templates/multiple_nics_vlans/multiple_nics_vlans.j2'
{%- endif %}
{{role.name}}NetworkConfigWithAnsible: true
{%- endfor %}

View File

@ -25,5 +25,4 @@ parameter_defaults:
{%- else %}
{{role.name}}NetworkConfigTemplate: 'templates/multiple_nics/multiple_nics.j2'
{%- endif %}
{{role.name}}NetworkConfigWithAnsible: true
{%- endfor %}

View File

@ -17,5 +17,4 @@ parameter_defaults:
{%- else %}
{{role.name}}NetworkConfigTemplate: 'templates/single_nic_linux_bridge_vlans/single_nic_linux_bridge_vlans.j2'
{%- endif %}
{{role.name}}NetworkConfigWithAnsible: true
{%- endfor %}

View File

@ -24,5 +24,4 @@ parameter_defaults:
{%- else %}
{{role.name}}NetworkConfigTemplate: 'templates/single_nic_vlans/controller_no_external.j2'
{%- endif %}
{{role.name}}NetworkConfigWithAnsible: true
{%- endfor %}

View File

@ -23,5 +23,4 @@ parameter_defaults:
{%- else %}
{{role.name}}NetworkConfigTemplate: 'templates/single_nic_vlans/single_nic_vlans.j2'
{%- endif %}
{{role.name}}NetworkConfigWithAnsible: true
{%- endfor %}

View File

@ -19,7 +19,6 @@ resource_registry:
# With using default template values, the Compute nodes also need the br-ex
# bridge to be connected to a physical network.
ComputeNetworkConfigWithAnsible: true
ComputeNetworkConfigTemplate: 'templates/net_config_bridge.j2'
# Disable OVN services

View File

@ -14,7 +14,6 @@ resource_registry:
OS::TripleO::Services::NeutronL3Agent: ../../deployment/neutron/neutron-l3-container-puppet.yaml
OS::TripleO::Services::ComputeNeutronL3Agent: ../../deployment/neutron/neutron-l3-container-puppet.yaml
OS::TripleO::Services::ComputeNeutronMetadataAgent: ../../deployment/neutron/neutron-metadata-container-puppet.yaml
ComputeDVRNetworkConfigWithAnsible: true
ComputeDVRNetworkConfigTemplate: 'templates/net_config_bridge.j2'
# Disable OVN services

View File

@ -46,10 +46,6 @@ parameter_defaults:
# Type: string
StandaloneNetworkConfigTemplate: templates/net_config_bridge.j2
# Standalone NetworkConfig with ansible flag
# Type: boolean
StandaloneNetworkConfigWithAnsible: True
# How many replicas to use in the swift rings.
# Type: number
SwiftReplicas: 1

View File

@ -56,10 +56,6 @@ parameter_defaults:
# Type: string
StandaloneNetworkConfigTemplate: templates/standalone.j2
# Standalone NetworkConfig with ansible flag
# Type: boolean
StandaloneNetworkConfigWithAnsible: True
# How many replicas to use in the swift rings.
# Type: number
SwiftReplicas: 1

View File

@ -181,7 +181,6 @@ parameter_defaults:
UndercloudCtlplaneSubnets: {}
UndercloudCtlplaneLocalSubnet: 'ctlplane-subnet'
UndercloudNetworkConfigTemplate: 'templates/undercloud.j2'
UndercloudNetworkConfigWithAnsible: true
MistralDockerGroup: true
PasswordAuthentication: 'yes'
HeatEngineOptVolumes:

View File

@ -108,10 +108,6 @@ parameter_defaults:
# Type: string
UndercloudMinionNetworkConfigTemplate: templates/undercloud.j2
# UndercloudMinion NetworkConfig with ansible flag
# Type: boolean
UndercloudMinionNetworkConfigWithAnsible: True
resource_registry:
OS::TripleO::Network::Ports::ControlPlaneVipPort: OS::Heat::None
OS::TripleO::OVNMacAddressNetwork: OS::Heat::None

View File

@ -213,6 +213,11 @@ parameters:
description: The balance-tcp bond mode is known to cause packet loss and
should not be used in BondInterfaceOvsOptions.
NetworkConfigWithAnsible:
description: NetworkConfig with ansible flag
type: boolean
default: True
# Jinja loop for Role in role_data.yaml
{% for role in roles %}
@ -233,10 +238,6 @@ parameters:
description: {{role.name}} NetworkConfig Template
type: string
default: ''
{{role.name}}NetworkConfigWithAnsible:
description: {{role.name}} NetworkConfig with ansible flag
type: boolean
default: False
{{role.name}}ExtraConfig:
default: {}
description: |
@ -1041,7 +1042,7 @@ resources:
{%- endfor %}
service_metadata_settings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
tripleo_network_config_template: {get_param: {{role.name}}NetworkConfigTemplate}
tripleo_network_config_with_ansible: {get_param: {{role.name}}NetworkConfigWithAnsible}
tripleo_network_config_with_ansible: {get_param: NetworkConfigWithAnsible}
default_route_networks: {{role.default_route_networks}}
networks_skip_config: {{role.networks_skip_config }}
role_tags: {{role.tags}}

View File

@ -0,0 +1,12 @@
---
features:
- |
This changes network config generation with ansible, using the provided
jinja templates for roles, the default. Too keep using old heat templates
for network config with``OS::TripleO::{{role.name}}::Net::SoftwareConfig``
mappings, use ``NetworkConfigWithAnsible: false`` ``parameter_default``
in an environment file.
deprecations:
- |
The old way of generating network configs with heat templates has been
deprecated.

View File

@ -46,7 +46,6 @@ environments:
parameters:
- AddVipsToEtcHosts
- NetworkSafeDefaults
- StandaloneNetworkConfigWithAnsible
- StandaloneNetworkConfigTemplate
overcloud.yaml:
parameters:
@ -58,7 +57,6 @@ environments:
EnablePackageInstall: true
SwiftReplicas: 1
SshFirewallAllowAll: true
StandaloneNetworkConfigWithAnsible: True
StandaloneNetworkConfigTemplate: templates/standalone.j2
resource_registry:
@ -185,7 +183,6 @@ environments:
- StandaloneHostnameFormat
- StandaloneCount
- OvercloudStandaloneFlavor
- StandaloneNetworkConfigWithAnsible
- StandaloneNetworkConfigTemplate
overcloud.yaml:
parameters:
@ -194,7 +191,6 @@ environments:
StandaloneCount: 1
OvercloudStandaloneFlavor: standalone
SwiftReplicas: 1
StandaloneNetworkConfigWithAnsible: True
StandaloneNetworkConfigTemplate: templates/net_config_bridge.j2
resource_registry:
@ -299,7 +295,3 @@ parameters:
description: Standalone NetworkConfigTemplate
type: string
default: ''
StandaloneNetworkConfigWithAnsible:
description: Standalone NetworkConfig with ansible flag
type: boolean
default: False

View File

@ -29,7 +29,6 @@ environments:
sample-env-generator/undercloud-minion.yaml:
parameters:
- UndercloudMinionNetworkConfigTemplate
- UndercloudMinionNetworkConfigWithAnsible
deployment/ironic/ironic-conductor-container-puppet.yaml:
parameters:
- IronicCleaningDiskErase
@ -82,7 +81,6 @@ environments:
IronicProvisioningNetwork: 'ctlplane'
IronicRescuingNetwork: 'ctlplane'
UndercloudMinionNetworkConfigTemplate: 'templates/undercloud.j2'
UndercloudMinionNetworkConfigWithAnsible: true
resource_registry:
# this network config is assumed by the tripleo deploy command
OS::TripleO::Network::Ports::ControlPlaneVipPort: OS::Heat::None
@ -293,7 +291,3 @@ parameters:
description: UndercloudMinion NetworkConfigTemplate
type: string
default: ''
UndercloudMinionNetworkConfigWithAnsible:
description: UndercloudMinion NetworkConfig with ansible flag
type: boolean
default: False