Merge "Allow to configure docker for Zun" into stable/stein

This commit is contained in:
Zuul 2019-08-22 12:01:38 +00:00 committed by Gerrit Code Review
commit b23b5144f9
6 changed files with 30 additions and 19 deletions

View File

@ -105,6 +105,10 @@ docker_restart_policy: "unless-stopped"
# '0' means unlimited retries
docker_restart_policy_retry: "10"
# Extra docker options for Zun
docker_configure_for_zun: "no"
docker_zun_options: -H fd:// -H tcp://{{ api_interface_address }}:2375 --cluster-store=etcd://{% for host in groups['etcd'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ hostvars[host]['etcd_client_port'] }}{% if not loop.last %},{% endif %}{% endfor %}
# Common options used throughout Docker
docker_common_options:
auth_email: "{{ docker_registry_email }}"

View File

@ -1,3 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/bin/{{ docker_binary_name|default("docker daemon", true) }}{% if docker_registry_insecure | bool %} --insecure-registry {{ docker_registry }}{% endif %}{% if docker_storage_driver %} --storage-driver {{ docker_storage_driver }}{% endif %}{% if docker_runtime_directory %} --graph {{ docker_runtime_directory }}{% endif %}{% if docker_custom_option %} {{ docker_custom_option }}{% endif %} --log-opt max-file={{ docker_log_max_file }} --log-opt max-size={{ docker_log_max_size }}
ExecStart=/usr/bin/{{ docker_binary_name|default("docker daemon", true) }}{% if docker_registry_insecure | bool %} --insecure-registry {{ docker_registry }}{% endif %}{% if docker_storage_driver %} --storage-driver {{ docker_storage_driver }}{% endif %}{% if docker_runtime_directory %} --graph {{ docker_runtime_directory }}{% endif %}{% if docker_custom_option %} {{ docker_custom_option }}{% endif %}{% if docker_configure_for_zun|bool %} {{ docker_zun_options }}{% endif %} --log-opt max-file={{ docker_log_max_file }} --log-opt max-size={{ docker_log_max_size }}

View File

@ -11,23 +11,8 @@ For more details about Zun, see `OpenStack Zun Documentation
Preparation and Deployment
--------------------------
Zun requires kuryr and etcd services, for more information about how to
configure kuryr refer to :doc:`../containers/kuryr-guide`.
To allow Zun Compute connect to the Docker Daemon, add the following in the
``docker.service`` file on each zun-compute node.
.. code-block:: ini
ExecStart= -H tcp://<DOCKER_SERVICE_IP>:2375 -H unix:///var/run/docker.sock --cluster-store=etcd://<DOCKER_SERVICE_IP>:2379 --cluster-advertise=<DOCKER_SERVICE_IP>:2375
.. note::
``DOCKER_SERVICE_IP`` is zun-compute host IP address. ``2375`` is port that
allows Docker daemon to be accessed remotely.
By default zun is disabled in the ``group_vars/all.yml``.
In order to enable it, you need to edit the file globals.yml and set the
By default Zun and its dependencies are disabled.
In order to enable Zun, you need to edit globals.yml and set the
following variables:
.. code-block:: yaml
@ -35,8 +20,20 @@ following variables:
enable_zun: "yes"
enable_kuryr: "yes"
enable_etcd: "yes"
docker_configure_for_zun: "yes"
Deploy the OpenStack cloud and zun.
Docker reconfiguration requires reboostrapping before deploy.
Make sure you understand the consequences of restarting Docker.
Please see :ref:`rebootstrapping` for details.
If it's initial deploy, then there is nothing to worry about
because it's initial bootstrapping as well and there are no
running services to affect.
.. code-block:: console
$ kolla-ansible bootstrap-servers
Finally deploy:
.. code-block:: console

View File

@ -51,6 +51,8 @@ to override the inventory defaults:
kolla-ansible bootstrap-servers -i INVENTORY -e ansible_user=<bootstrap user> -e ansible_python_interpreter=/usr/bin/python
.. _rebootstrapping:
Subsequent bootstrap considerations
-----------------------------------

View File

@ -57,6 +57,8 @@ kolla_internal_vip_address: "10.10.10.254"
#docker_registry_username: "sam"
#docker_registry_password: "correcthorsebatterystaple"
#docker_configure_for_zun: "no"
###################
# Messaging options
###################

View File

@ -0,0 +1,6 @@
---
features:
- |
Kolla Ansible can now configure deployed docker for Zun.
Enable docker_configure_for_zun (disabled by default to retain backwards
compatibility).