Fix path and wire-in UC deploy role data file

It had been missing for some places and now that
technical debt gets addressed.

Depends-on: Iaef2671acf516b7e89358984a0d8a59555fc91f0

Change-Id: I887d5bccc6bd5c514348d8ebfc7c13f0bcdc217d
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2018-04-24 16:46:06 +02:00
parent b018938c66
commit 90aba7ea27
6 changed files with 23 additions and 14 deletions

View File

@ -0,0 +1,10 @@
---
fixes:
- |
Fix `undercloud_roles_data` to contain a relative path as tripleoclient
expects it.
other:
- |
``undercloud deploy`` CLI now supports `undercloud_roles_data`.
It can also be defined in `undercloud.conf` as `roles_file` to be
used with ``undercloud install --use-heat`` as well.

View File

@ -96,6 +96,8 @@ https://docs.openstack.org/tripleo-quickstart/latest/accessing-libvirt.html
- `undercloud_upgrade_cleanup`: <null> -- controls post upgrade cleanup after we containerize the undercloud.
- update_containers: <false> -- whether to update containers from the local registry.
- `undercloud_enable_tempest`: <null> -- The tempest container will be available on the undercloud.
- `undercloud_roles_data`: <null> -- A custom t-h-t roles file (the path must be relative to
``overcloud_templates_path``).
Role Network Variables
----------------------
@ -274,11 +276,9 @@ Mistral). If you need a lightweight undercloud, make sure your custom
undercloud installation script template omits those services and the
`environments/docker.yaml` defaults.
Also note, if you want to override the undercloud roles data, you should
provide a custom roles file and put it in place of the default
`./roles_data_undercloud.yaml` by the given ``overcloud_templates_path``.
This can be done with a ``cp`` command in the custom undercloud deploy
script. For the example above, custom undercloud roles may look like:
You may also override ``undercloud_roles_data`` with a custom roles file
(the path must be relative to the t-h-t templates ``overcloud_templates_path``).
For the example above, custom undercloud roles may look like:
```
- name: Undercloud

View File

@ -14,11 +14,6 @@ undercloud_docker_registry_namespace: "{{ docker_registry_namespace }}"
undercloud_docker_image_tag: "{{ docker_image_tag }}"
undercloud_install_script: undercloud-install.sh.j2
# defines a custom undercloud roles file should be used with
# openstack overcloud container image prepare (and undercloud deploy, in future)
# FIXME(bogdando): do not attempt to change it yet the client's hardcode is fixed
undercloud_roles_data: "{{overcloud_templates_path}}/roles_data_undercloud.yaml"
# defines extra args for the undercloud deploy command
undercloud_extra_args: ""

View File

@ -32,9 +32,6 @@ undercloud_local_ip={{ hostvars['undercloud'].undercloud_ip }}
## * Deploy the undercloud
## ::
# TODO(bogdando) add '-r {{undercloud_roles_data}}' once the client
# starts supporting 'openstack undercloud deploy -r' option.
{% if release in ['pike', 'queens'] -%}
{%- set env_files_path='services-docker' -%}
{%- else -%}
@ -83,6 +80,9 @@ sudo openstack undercloud deploy \
-e {{ f }} \
{% endfor %}
{% endif %}
{% if release not in ['pike', 'queens'] and undercloud_roles_data is defined -%}
-r {{undercloud_roles_data}} \
{% endif %}
{% if undercloud_extra_args %}
{{ undercloud_extra_args }} \
{% endif %}

View File

@ -64,7 +64,7 @@ openstack overcloud container image prepare \
{% endfor %}
-e {{ working_dir }}/undercloud-parameter-defaults.yaml \
{% endif %}
-r {{undercloud_roles_data}} \
-r {{undercloud_roles_data|default('roles_data_undercloud.yaml')}} \
--namespace {{ undercloud_docker_registry_host }}{% if undercloud_docker_registry_port is defined %}:{{ undercloud_docker_registry_port }}{% endif%}/{{ undercloud_docker_registry_namespace }} \
--tag $BUILD_ID

View File

@ -311,6 +311,10 @@ templates = {{overcloud_templates_path}}
enable_routed_networks = {{undercloud_enable_routed_networks}}
{% endif %}
{% if undercloud_roles_data is defined %}
roles_file = {{undercloud_roles_data}}
{% endif %}
# Whether to clean overcloud nodes (wipe the hard drive) between
# deployments and after the introspection.
{% if undercloud_clean_nodes is defined %}