Undercloud deploy custom sources of container images

Allow tripleo client to generate default parameters
for undercloud container images from docker.io/tripleoupstream
images or a given docker registry host, port, namespace and
(un)secure access mode.

Switch heat-all to run in a container defined from that template
to minimize installation of dependencies.

Change-Id: I8cb71be205aec1122cadbdb045efa71e1f7d01d1
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2017-07-21 14:53:18 +02:00
parent 5d6334a7ee
commit 5ab7d5f41b
3 changed files with 37 additions and 4 deletions

View File

@ -35,7 +35,7 @@ user sessions to provide greater flexixiblity to our users. ** additional docume
http://docs.openstack.org/developer/tripleo-quickstart/accessing-libvirt.html http://docs.openstack.org/developer/tripleo-quickstart/accessing-libvirt.html
- `undercloud_conf_extra`: <''> -- extra options to be added to ~/undercloud.conf - `undercloud_conf_extra`: <''> -- extra options to be added to ~/undercloud.conf
- `undercloud_extra_args`: <''> -- extra options for undercloud deploy command. - `undercloud_extra_args`: <''> -- extra options for undercloud deploy command.
- `undercloud_update_packages`: <null> -- a string with a list of packages to update as dependencies for - `undercloud_update_packages`: <'null'> -- a string with a list of packages to update as dependencies for
your hacking setup. By defaults it updates nothing, which is backwards compatible. your hacking setup. By defaults it updates nothing, which is backwards compatible.
- `undercloud_enable_ui`: Sets up the 'enable_ui' option in undercloud.conf. - `undercloud_enable_ui`: Sets up the 'enable_ui' option in undercloud.conf.
It's undefined by default, however, the default value for this option in the It's undefined by default, however, the default value for this option in the
@ -69,6 +69,16 @@ your hacking setup. By defaults it updates nothing, which is backwards compatibl
`cloud-names.yaml` template used by the `overcloud-deploy` role. `cloud-names.yaml` template used by the `overcloud-deploy` role.
- `tripleo_ui_secure_access`: Defaults to false due to the self signed certificate and - `tripleo_ui_secure_access`: Defaults to false due to the self signed certificate and
usability issues. See the tripleo-quickstart documentation `accessing the undercloud` for details. usability issues. See the tripleo-quickstart documentation `accessing the undercloud` for details.
- `undercloud_docker_registry_host`: <'null'> -- configures the custom registry host for
containerized undercloud services.
- `undercloud_docker_registry_port`: <'8787'> -- the container images registry port for the
custom `undercloud_docker_registry_host`, if defined.
- `undercloud_docker_registry_insecure`: <'true'> -- defines either the custom
`undercloud_docker_registry_host` points to an unsecure or secure registry.
- `undercloud_docker_registry_namespace`: <`docker_registry_namespace`> -- the
container images namespace to be used with the custom `undercloud_docker_registry_host`,
if defined. Defaults to the overcloud `docker_registry_namespace` variable, which in
turn defaults to 'tripleoupstream'.
Role Network Variables Role Network Variables
---------------------- ----------------------
@ -97,7 +107,7 @@ from undercloud.conf. May be a string or a sequence. Only the last item goes for
the undercloud deploy command. the undercloud deploy command.
- `undercloud_undercloud_hostname`: Sets up the 'undercloud_hostname' value from undercloud.conf. - `undercloud_undercloud_hostname`: Sets up the 'undercloud_hostname' value from undercloud.conf.
Note, use the `undercloud_public_vip` instead for Mitaka/Newton releases. Note, use the `undercloud_public_vip` instead for Mitaka/Newton releases.
- `undercloud_heat_public_endpoints`: <False> -- when the ctlplane network is not routable - `undercloud_heat_public_endpoints`: <'false'> -- when the ctlplane network is not routable
from overcloud nodes, for example pre-provisioned from overcloud nodes, for example pre-provisioned
[deployed servers](https://docs.openstack.org/developer/tripleo-docs/advanced_deployment/deployed_server.html#undercloud), [deployed servers](https://docs.openstack.org/developer/tripleo-docs/advanced_deployment/deployed_server.html#undercloud),
the ``undercloud deploy --local_ip`` (and `local_ip` in the undercloud.conf) the ``undercloud deploy --local_ip`` (and `local_ip` in the undercloud.conf)

View File

@ -8,11 +8,13 @@ network_environment_file: network-environment.yaml.j2
# default undercloud install method # default undercloud install method
# containerized_undercloud is an EXPERIMENTAL FEATURE # containerized_undercloud is an EXPERIMENTAL FEATURE
containerized_undercloud: false containerized_undercloud: false
undercloud_docker_registry_namespace: "{{ docker_registry_namespace|default('tripleoupstream') }}"
undercloud_docker_registry_port: 8787
undercloud_docker_registry_insecure: true
undercloud_install_script: undercloud-install.sh.j2 undercloud_install_script: undercloud-install.sh.j2
# defines extra args for the undercloud deploy command # defines extra args for the undercloud deploy command
undercloud_extra_args: >- undercloud_extra_args: ""
--heat-native
# The undercloud can also be deployed with heat # The undercloud can also be deployed with heat
# thus requiring a t-h-t driven undercloud *and* the classic undercloud # thus requiring a t-h-t driven undercloud *and* the classic undercloud

View File

@ -73,6 +73,26 @@ sudo systemctl start docker #FIXME: do these in the installer?
sudo mkdir -p /etc/puppet/modules/ sudo mkdir -p /etc/puppet/modules/
sudo ln -f -s /usr/share/openstack-puppet/modules/* /etc/puppet/modules/ sudo ln -f -s /usr/share/openstack-puppet/modules/* /etc/puppet/modules/
## * Configure the undercloud containers default parameters
## ::
{% if undercloud_docker_registry_host is defined %}
openstack overcloud container image prepare \
--env-file {{ working_dir }}/undercloud-containers-default-parameters.yaml \
--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 }}" >> \
{{ working_dir }}/undercloud-containers-default-parameters.yaml
{% endif %}
{% else %}
openstack overcloud container image prepare \
--env-file {{ working_dir }}/undercloud-containers-default-parameters.yaml
{% endif %}
echo "============================="
echo "Undercloud containers default parameters:"
cat {{ working_dir }}/undercloud-containers-default-parameters.yaml
echo "============================="
## * Set the local ip used for the undercloud install ## * Set the local ip used for the undercloud install
## :: ## ::
@ -90,6 +110,7 @@ sudo openstack undercloud deploy \
-e {{overcloud_templates_path}}/environments/services-docker/mistral.yaml \ -e {{overcloud_templates_path}}/environments/services-docker/mistral.yaml \
-e {{overcloud_templates_path}}/environments/services-docker/zaqar.yaml \ -e {{overcloud_templates_path}}/environments/services-docker/zaqar.yaml \
-e {{overcloud_templates_path}}/environments/docker.yaml \ -e {{overcloud_templates_path}}/environments/docker.yaml \
-e {{ working_dir }}/undercloud-containers-default-parameters.yaml \
-e {{overcloud_templates_path}}/environments/mongodb-nojournal.yaml \ -e {{overcloud_templates_path}}/environments/mongodb-nojournal.yaml \
{% endif %} {% endif %}
{{ undercloud_extra_args }} \ {{ undercloud_extra_args }} \