Merge "Allow custom undercloud roles files for images prepare"

This commit is contained in:
Jenkins 2017-09-25 14:05:43 +00:00 committed by Gerrit Code Review
commit 03313c648b
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,14 @@
features:
- |
Add `undercloud_roles_data` for containerized undercloud
deployments. Allows to specify a custom undercloud roles file which
should be taken into account when preparing docker images for UC.
Defaults to `{{overcloud_templates_path}}/roles_data_undercloud.yaml`.
.. note :: The default value can not be changed yet. The command
`openstack undercloud deploy` works only with the static role file
`roles_data_undercloud.yaml` from t-h-t. Custom undercloud roles
data files, like `roles/UndercloudLight.yaml`, need to be copied as
`{{ overcloud_heat_templates }}/roles_data_undercloud.yaml` in order
to use this feature.

View File

@ -13,6 +13,11 @@ undercloud_docker_registry_port: 8787
undercloud_docker_registry_insecure: true
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

@ -84,6 +84,7 @@ openstack overcloud container image prepare \
-e {{overcloud_templates_path}}/environments/services-docker/zaqar.yaml \
-e {{overcloud_templates_path}}/environments/docker.yaml \
{% endif %}
-r {{undercloud_roles_data}} \
--namespace {{ undercloud_docker_registry_host }}:{{ undercloud_docker_registry_port }}/{{ undercloud_docker_registry_namespace }}
{% if undercloud_docker_registry_insecure|bool %}
echo " DockerInsecureRegistryAddress: {{ undercloud_docker_registry_host }}:{{ undercloud_docker_registry_port }}" >> \
@ -97,6 +98,7 @@ openstack overcloud container image prepare \
-e {{overcloud_templates_path}}/environments/services-docker/zaqar.yaml \
-e {{overcloud_templates_path}}/environments/docker.yaml \
{% endif %}
-r {{undercloud_roles_data}} \
--env-file {{ working_dir }}/undercloud-containers-default-parameters.yaml
{% endif %}
@ -113,6 +115,9 @@ 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.
sudo openstack undercloud deploy \
--templates={{overcloud_templates_path}} \
--local-ip=$undercloud_local_ip \