Configure undercloud containers default params

The noop network config had been removed from the
containerized undercloud deploy script. With the t-h-t
default network configuration, CI wants eth1 and fails
as there is no such interface available for CI slaves.

Parametrize undercloud network config following the
existing overcloud network configuration parameters:
 - (undercloud_)resource_registry_args
 - (undercloud_)network_environment_args.

Set the default net config to net-config-noop.yaml.
Remove network_environment_file as never used for UC.

Closes-bug: #1746540

Change-Id: I8aa0ca5312a162e11c04bce7da4c59980799e8d0
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2018-02-02 14:16:55 +01:00
parent 0b59e2348d
commit 3c57850687
5 changed files with 35 additions and 29 deletions

View File

@ -19,8 +19,6 @@ defaults imply the 'openstack undercloud install' command will be invoked. See t
deployment methods section below for the alternative modes.
- `undercloud_install_log`: <'{{ working_dir }}/undercloud_install.log'> -- the full path
to the undercloud install log file.
- `network_environment_file`: <'network-environment.yaml.j2'> -- the name of the jinja template
used as the base for the network-environment for tripleo.
- `undercloud_hieradata_override_file`: <'quickstart-hieradata-overrides-classic-undercloud.yaml.j2'> -- the name of
jinja template used to override the undercloud's install hieradata
- `undercloud_ironic_ipxe_port`: <'3816'> -- port to use for httpd ipxe server
@ -123,6 +121,10 @@ the ``undercloud deploy --local_ip`` (and `local_ip` in the undercloud.conf)
may not be used. Enable this variable instead. Doing so changes the heat endpoint
type from the default internal to public and changes the signaling method to use
TempURLs from OpenStack Object Storage (swift).
- `undercloud_resource_registry_args`: Sets up network config for Undercloud
(resource_registry for heat templates). Defaults to Noop.
- `undercloud_network_environment_args`: Complements Undercloud networking
setup with the default parameters for heat templates (parameter_defaults).
Undercloud deployment methods
-----------------------------

View File

@ -3,7 +3,6 @@
undercloud_config_file: undercloud.conf.j2
undercloud_post_install_script: undercloud-install-post.sh.j2
undercloud_install_log: "{{ working_dir }}/undercloud_install.log"
network_environment_file: network-environment.yaml.j2
# default undercloud install method
# containerized_undercloud is an EXPERIMENTAL FEATURE
@ -79,3 +78,18 @@ undercloud_enable_validations: true
undercloud_ipxe_deploy: true
undercloud_undercloud_debug: true
# Use to populate the resource registry for nic configs and networking setup
undercloud_resource_registry_args:
OS::TripleO::Undercloud::Net::SoftwareConfig: "{{overcloud_templates_path}}/net-config-noop.yaml"
undercloud_network_environment_args:
UndercloudNetworkCidr: "{{undercloud_network_cidr}}"
UndercloudDhcpRangeStart: "{{undercloud_dhcp_start|default(
undercloud_network_cidr|nthhost(5))}}"
UndercloudDhcpRangeEnd: "{{undercloud_dhcp_end|default(
undercloud_network_cidr|nthhost(30))}}"
UndercloudNetworkGateway: "{{undercloud_network_gateway|default(
undercloud_network_cidr|nthhost(1))}}"
UndercloudNameserver: "{% if undercloud_undercloud_nameservers is string %}{{undercloud_undercloud_nameservers.split(',')[0]}}{% else %}{{undercloud_undercloud_nameservers[-1]}}{% endif %}"
NeutronServicePlugins: ""
ControlPlaneSubnetCidr: 24

View File

@ -67,3 +67,9 @@
- overcloud_templates_repo is defined
- overcloud_templates_path is defined
static: no
- name: Create the undercloud parameter defaults file.
template:
src: undercloud-parameter-defaults.yaml.j2
dest: "{{ working_dir }}/undercloud-parameter-defaults.yaml"
mode: 0600

View File

@ -14,31 +14,6 @@ set -eux
export {{ var }}
{% endfor %}
## * Create the parameters for the deployment.
## ::
cat > {{ working_dir }}/custom_undercloud_deploy.yaml << EOF_CAT
# custom undercloud deployment parameters from heat
# NOTE: many of these live in t-h-t in:
# extraconfig/post_deploy/undercloud_post.yaml
parameter_defaults:
UndercloudNetworkCidr: {{undercloud_network_cidr}}
UndercloudDhcpRangeStart: {{undercloud_dhcp_start|default(
undercloud_network_cidr|nthhost(5))}}
UndercloudDhcpRangeEnd: {{undercloud_dhcp_end|default(
undercloud_network_cidr|nthhost(30))}}
UndercloudNetworkGateway: {{undercloud_network_gateway|default(
undercloud_network_cidr|nthhost(1))}}
{% if undercloud_undercloud_nameservers is string %}
UndercloudNameserver: {{undercloud_undercloud_nameservers.split(',')[0]}}
{% elif undercloud_undercloud_nameservers is sequence %}
UndercloudNameserver: {{undercloud_undercloud_nameservers[-1]}}
{% endif %}
NeutronServicePlugins: ""
EOF_CAT
## * Update requested packages.
## ::
@ -122,7 +97,7 @@ sudo openstack undercloud deploy \
{% if undercloud_cloud_domain is defined %}
--local-domain={{ undercloud_cloud_domain }} \
{% endif %}
-e {{ working_dir }}/custom_undercloud_deploy.yaml \
-e {{ working_dir }}/undercloud-parameter-defaults.yaml \
{% if containerized_undercloud|bool %}
{{ undercloud_extra_services_args }} \
-e {{ working_dir }}/undercloud-containers-default-parameters.yaml \

View File

@ -0,0 +1,9 @@
{#
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 undercloud_resource_registry = {'resource_registry': undercloud_resource_registry_args} %}
{% set undercloud_parameter_defaults = {'parameter_defaults': undercloud_network_environment_args} %}
{{ undercloud_parameter_defaults|combine(undercloud_resource_registry, recursive=True)|to_nice_json }}