Use templated network-environment file for OVB

There are specific network-environment.yaml files for the
OVB deployments. This review removes those specific files
and adds settings so that the OVB deployments can use the
network-environment.yaml file generated from the j2 template.

Closes-Bug: #1698982
Change-Id: If4861c8fa7f847a524738f274189f6fdab4a5942
This commit is contained in:
Ronelle Landy 2017-06-22 14:21:34 -04:00
parent 09803a3625
commit 704fc1e4fc
10 changed files with 81 additions and 59 deletions

View File

@ -15,6 +15,7 @@ undercloud_flavor: ci.m1.large
provision_net_cidr: 192.168.24.0/24
custom_nameserver:
- 38.145.33.91
- 38.145.32.66
- 38.145.32.79
undercloud_undercloud_nameservers: "{{ custom_nameserver }}"

View File

@ -15,6 +15,7 @@ undercloud_flavor: m1.large
provision_net_cidr: 192.168.24.0/24
custom_nameserver:
- 38.145.33.91
- 38.145.32.66
- 38.145.32.79
undercloud_undercloud_nameservers: "{{ custom_nameserver }}"

View File

@ -11,13 +11,35 @@ undercloud_masquerade_network: 192.168.24.0/24
undercloud_dhcp_start: 192.168.24.5
undercloud_dhcp_end: 192.168.24.24
undercloud_inspection_iprange: 192.168.24.25,192.168.24.39
undercloud_external_network_cidr: 10.0.0.0/24
# template copies
undercloud_instackenv_template: "{{ local_working_dir }}/instackenv.json"
baremetal_nic_configs: "{{ local_working_dir }}/openstack-virtual-baremetal/network-templates/nic-configs"
network_environment_file: "ovb-multiple-nics.yaml"
use_resource_registry_nic_configs: true
image_cache_dir: "{{ working_dir }}/images-cache"
network_environment_args:
ExternalNetCidr: "{{ undercloud_external_network_cidr }}"
ExternalAllocationPools: >
[{'start': '{{ undercloud_external_network_cidr|nthhost(10) }}',
'end': '{{ undercloud_external_network_cidr|nthhost(50) }}'}]
NeutronExternalNetworkBridge: ""
ControlPlaneSubnetCidr: "{{ undercloud_network_cidr|ipaddr('prefix') }}"
ControlPlaneDefaultRoute: "{{ undercloud_network_cidr|nthhost(1) }}"
EC2MetadataIp: "{{ undercloud_network_cidr|nthhost(1) }}"
ExternalInterfaceDefaultRoute: "{{ undercloud_external_network_cidr|nthhost(1) }}"
InternalApiNetCidr: 172.20.0.0/24
InternalApiAllocationPools: [{"start": "172.20.0.10", "end": "172.20.0.250"}]
StorageNetCidr: 172.18.0.0/24
StorageAllocationPools: [{"start": "172.18.0.10", "end": "172.18.0.250"}]
StorageMgmtNetCidr: 172.19.0.0/24
StorageMgmtAllocationPools: [{"start": "172.19.0.10", "end": "172.19.0.250"}]
TenantNetCidr: 172.16.0.0/24
TenantAllocationPools: [{"start": "172.16.0.10", "end": "172.16.0.250"}]
DnsServers: "{{ overcloud_dns_servers }}"
PublicVirtualFixedIPs: [{ "ip_address": "{{ undercloud_external_network_cidr|nthhost(5) }}" }]
# baremetal settings
overcloud_nodes:
node_count: 4
@ -56,9 +78,7 @@ images:
# overcloud deployment settings
validation_args: " "
extra_args: " --control-flavor baremetal --compute-flavor baremetal --control-scale 3 \
-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
-e ~/network-environment.yaml --ntp-server {{ ntp_server }} "
--ntp-server {{ ntp_server }} "
# This featureset is extremely resource intensive, so we disable telemetry
# in order to reduce the overall memory footprint

View File

@ -11,13 +11,36 @@ undercloud_masquerade_network: 192.168.24.0/24
undercloud_dhcp_start: 192.168.24.5
undercloud_dhcp_end: 192.168.24.24
undercloud_inspection_iprange: 192.168.24.25,192.168.24.39
undercloud_external_network_cidr: 10.0.0.0/24
# template copies
undercloud_instackenv_template: "{{ local_working_dir }}/instackenv.json"
baremetal_nic_configs: "{{ local_working_dir }}/openstack-virtual-baremetal/bond-network-templates/nic-configs"
network_environment_file: "ovb-public-bond.yaml"
use_resource_registry_nic_configs: true
image_cache_dir: "{{ working_dir }}/images-cache"
network_environment_args:
ExternalNetCidr: "{{ undercloud_external_network_cidr }}"
ExternalAllocationPools: >
[{'start': '{{ undercloud_external_network_cidr|nthhost(10) }}',
'end': '{{ undercloud_external_network_cidr|nthhost(50) }}'}]
NeutronExternalNetworkBridge: ""
ControlPlaneSubnetCidr: "{{ undercloud_network_cidr|ipaddr('prefix') }}"
ControlPlaneDefaultRoute: "{{ undercloud_network_cidr|nthhost(1) }}"
EC2MetadataIp: "{{ undercloud_network_cidr|nthhost(1) }}"
ExternalInterfaceDefaultRoute: "{{ undercloud_external_network_cidr|nthhost(1) }}"
InternalApiNetCidr: 172.20.0.0/24
InternalApiAllocationPools: [{"start": "172.20.0.10", "end": "172.20.0.250"}]
StorageNetCidr: 172.18.0.0/24
StorageAllocationPools: [{"start": "172.18.0.10", "end": "172.18.0.250"}]
StorageMgmtNetCidr: 172.19.0.0/24
StorageMgmtAllocationPools: [{"start": "172.19.0.10", "end": "172.19.0.250"}]
TenantNetCidr: 172.16.0.0/24
TenantAllocationPools: [{"start": "172.16.0.10", "end": "172.16.0.250"}]
DnsServers: "{{ overcloud_dns_servers }}"
PublicVirtualFixedIPs: [{ "ip_address": "{{ undercloud_external_network_cidr|nthhost(5) }}" }]
BondInterfaceOvsOptions: bond_mode=balance-slb
# baremetal settings
overcloud_nodes:
node_count: 2
@ -56,9 +79,7 @@ images:
# overcloud deployment settings
validation_args: " "
extra_args: " --control-flavor baremetal --compute-flavor baremetal \
-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
-e ~/network-environment.yaml --ntp-server {{ ntp_server }} "
--ntp-server {{ ntp_server }} "
# This featureset is extremely resource intensive, so we disable telemetry
# in order to reduce the overall memory footprint

View File

@ -75,6 +75,8 @@ network_args: ""
pacemaker_args: ""
workers_args: ""
backup_args: ""
resource_registry_nic_configs_args: ""
use_resource_registry_nic_configs: false
ssl_args: ""
tls_everywhere_args: ""
@ -102,6 +104,7 @@ deploy_args: >-
{{ container_args }}
{{ network_args }}
{{ pacemaker_args }}
{{ resource_registry_nic_configs_args }}
{{ workers_args }}
{{ backup_args }}
{{ ssl_args }}
@ -141,3 +144,11 @@ overcloud_services:
- name: 'ControllerServices:'
services:
- OS::TripleO::Services::Kernel
# Use to populate the resource registry for nic configs
resource_registry_args:
OS::TripleO::BlockStorage::Net::SoftwareConfig: nic-configs/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: nic-configs/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: nic-configs/ceph-storage.yaml

View File

@ -31,3 +31,8 @@
src: "cloud-names.yaml.j2"
dest: "{{ working_dir }}/cloud-names.yaml"
- name: Copy nic-configs resource registry template
when: use_resource_registry_nic_configs|bool
template:
src: "resource-registry-nic-configs.yaml.j2"
dest: "{{ working_dir }}/resource-registry-nic-configs.yaml"

View File

@ -98,6 +98,12 @@
-e {{ overcloud_templates_path }}/environments/puppet-pacemaker.yaml
when: enable_pacemaker|bool
- name: use resource registry
set_fact:
resource_registry_nic_configs_args: >-
-e {{ working_dir }}/resource-registry-nic-configs.yaml
when: use_resource_registry_nic_configs|bool
- name: extract the number of controllers to be deployed
set_fact: number_of_controllers="{{ deploy_args| regex_replace('^.*--control-scale +([0-9]+).*$', '\\1') | regex_replace('^[^ 0-9]+$', '1') }}"

View File

@ -0,0 +1,8 @@
{#
This takes advantage of the fact that valid JSON is also
valid YAML. The default to_nice_yaml filter doesn't quote strings,
which can cause unexpected implicit type conversion when the
resulting YAML is consumed, whereas with JSON all strings are quoted.
#}
{% set resource_registry = {'resource_registry': resource_registry_args} %}
{{ resource_registry|to_nice_json }}

View File

@ -1,25 +0,0 @@
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: nic-configs/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: nic-configs/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: nic-configs/ceph-storage.yaml
parameter_defaults:
ControlPlaneSubnetCidr: '24'
ControlPlaneDefaultRoute: 192.168.24.1
EC2MetadataIp: 192.168.24.1
ExternalNetCidr: 10.0.0.0/24
ExternalAllocationPools: [{"start": "10.0.0.10", "end": "10.0.0.50"}]
ExternalInterfaceDefaultRoute: 10.0.0.1
NeutronExternalNetworkBridge: "''"
InternalApiNetCidr: 172.20.0.0/24
InternalApiAllocationPools: [{"start": "172.20.0.10", "end": "172.20.0.250"}]
StorageNetCidr: 172.18.0.0/24
StorageAllocationPools: [{"start": "172.18.0.10", "end": "172.18.0.250"}]
StorageMgmtNetCidr: 172.19.0.0/24
StorageMgmtAllocationPools: [{"start": "172.19.0.10", "end": "172.19.0.250"}]
TenantNetCidr: 172.16.0.0/24
TenantAllocationPools: [{"start": "172.16.0.10", "end": "172.16.0.250"}]
DnsServers: ["38.145.32.66", "38.145.32.79"]
PublicVirtualFixedIPs: [{ "ip_address": "10.0.0.5" }]

View File

@ -1,26 +0,0 @@
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: nic-configs/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: nic-configs/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nic-configs/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: nic-configs/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: nic-configs/ceph-storage.yaml
parameter_defaults:
ControlPlaneSubnetCidr: '24'
ControlPlaneDefaultRoute: 192.168.24.1
EC2MetadataIp: 192.168.24.1
ExternalNetCidr: 10.0.0.0/24
ExternalAllocationPools: [{"start": "10.0.0.10", "end": "10.0.0.50"}]
ExternalInterfaceDefaultRoute: 10.0.0.1
NeutronExternalNetworkBridge: "''"
InternalApiNetCidr: 172.20.0.0/24
InternalApiAllocationPools: [{"start": "172.20.0.10", "end": "172.20.0.250"}]
StorageNetCidr: 172.18.0.0/24
StorageAllocationPools: [{"start": "172.18.0.10", "end": "172.18.0.250"}]
StorageMgmtNetCidr: 172.19.0.0/24
StorageMgmtAllocationPools: [{"start": "172.19.0.10", "end": "172.19.0.250"}]
TenantNetCidr: 172.16.0.0/24
TenantAllocationPools: [{"start": "172.16.0.10", "end": "172.16.0.250"}]
DnsServers: ["38.145.32.66", "38.145.32.79"]
BondInterfaceOvsOptions: bond_mode=balance-slb
PublicVirtualFixedIPs: [{ "ip_address": "10.0.0.5" }]