Add generated deployed network environment
The environments/deployed-network-environment.j2.yaml template will generate an environment file based entirely off of the used roles data and network data files that can be used in place of the generated environments from the "overcloud network" commands. For environments without Neutron, the generated file is easier than having to define all these parameter values manually. Change-Id: If839245b306370095ad21d753e9f5d4c98f1740c Signed-off-by: James Slagle <jslagle@redhat.com>
This commit is contained in:
parent
913aa30d85
commit
925af6378e
1
.gitignore
vendored
1
.gitignore
vendored
@ -66,6 +66,7 @@ deployment/container-image-prepare/container-image-prepare-baremetal-ansible.yam
|
||||
deployment/haproxy/haproxy-internal-tls-certmonger.yaml
|
||||
deployment/octavia/octavia-deployment-config.yaml
|
||||
environments/deployed-ports.yaml
|
||||
environments/deployed-network-environment.yaml
|
||||
environments/deployed-server-environment.yaml
|
||||
environments/net-2-linux-bonds-with-vlans.yaml
|
||||
environments/net-bond-with-vlans-no-external.yaml
|
||||
|
65
environments/deployed-network-environment.j2.yaml
Normal file
65
environments/deployed-network-environment.j2.yaml
Normal file
@ -0,0 +1,65 @@
|
||||
# DeployedNetworkEnvironment parameter value generated from the networks data
|
||||
# file. Can be used instead of provisioning networks to deploy without Neutron.
|
||||
|
||||
resource_registry:
|
||||
OS::TripleO::Network: ../network/deployed_networks.yaml
|
||||
OS::TripleO::DeployedServer::ControlPlanePort: ../deployed-server/deployed-neutron-port.yaml
|
||||
|
||||
# Role ports
|
||||
{%- for role in roles %}
|
||||
{%- for network in networks if network.enabled|default(true) and network.name in role.networks %}
|
||||
OS::TripleO::{{ role.name }}::Ports::{{ network.name }}Port: ../network/ports/deployed_{{ network.name_lower }}.yaml
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
||||
|
||||
# VIP ports
|
||||
OS::TripleO::Network::Ports::ControlPlaneVipPort: ../network/ports/deployed_vip_ctlplane.yaml
|
||||
{%- for network in networks if network.enabled|default(true) and network.vip %}
|
||||
OS::TripleO::Network::Ports::{{ network.name }}VipPort: ../network/ports/deployed_vip_{{ network.name_lower }}.yaml
|
||||
{%- endfor %}
|
||||
|
||||
parameter_defaults:
|
||||
|
||||
DeployedNetworkEnvironment:
|
||||
net_attributes_map:
|
||||
{%- for network in networks if network.enabled|default(true) %}
|
||||
{%- set dns_domain = network.dns_domain|default(network.name_lower ~ '.localdomain.') %}
|
||||
{{ network.name_lower }}:
|
||||
network:
|
||||
dns_domain: {{ dns_domain }}
|
||||
mtu: {{ network.mtu }}
|
||||
name: {{ network.name_lower }}
|
||||
tags:
|
||||
- tripleo_network_name={{ network.name }}
|
||||
- tripleo_net_idx={{ loop.index - 1 }}
|
||||
- tripleo_vip={{ network.vip }}
|
||||
subnets:
|
||||
{%- for subnet in network.subnets %}
|
||||
{{ subnet }}:
|
||||
cidr: {{ network.subnets[subnet].ip_subnet }}
|
||||
dns_nameservers: []
|
||||
gateway_ip: {{ network.subnets[subnet].gateway_ip }}
|
||||
host_routes: []
|
||||
ip_version: 4
|
||||
name: {{ subnet }}
|
||||
tags:
|
||||
{%- if network.subnets[subnet].vlan %}
|
||||
- tripleo_vlan_id={{ network.subnets[subnet].vlan }}
|
||||
{%- else %}
|
||||
[]
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
||||
|
||||
net_cidr_map:
|
||||
{%- for network in networks if network.enabled|default(true) %}
|
||||
{%- for subnet in network.subnets %}
|
||||
{{ network.name_lower }}:
|
||||
- {{ network.subnets[subnet].ip_subnet }}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
||||
|
||||
net_ip_version_map:
|
||||
{%- for network in networks if network.enabled|default(true) %}
|
||||
{{ network.name_lower }}: {{ "6" if network.ipv6 else "4" }}
|
||||
{%- endfor %}
|
Loading…
Reference in New Issue
Block a user