Skip to content
Snippets Groups Projects
Commit 11e6b4a8 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "docs: Improve multinode Docker registry setup"

parents db3f0fa0 34cce4c5
No related branches found
No related tags found
No related merge requests found
......@@ -18,77 +18,64 @@ registry services.
The Docker registry prior to version 2.3 has extremely bad performance because
all container data is pushed for every image rather than taking advantage of
Docker layering to optimize push operations. For more information reference
`pokey registry <https://github.com/docker/docker/issues/14018>`__.
`pokey registry <https://github.com/docker/docker/issues/14018>`__. The Kolla
community recommends using registry 2.3 or later.
Edit the ``/etc/kolla/globals.yml`` and add the following where 192.168.1.100
is the IP address of the machine and 5000 is the port where the registry is
currently running:
The registry may be configured either as a local registry with support for
storing images, or as a pull-through cache for Docker hub.
.. code-block:: yaml
docker_registry: 192.168.1.100:5000
The Kolla community recommends using registry 2.3 or later. To deploy registry
with version 2.3 or later, do the following:
Option 1: local registry
------------------------
.. code-block:: console
cd kolla
tools/start-registry
The Docker registry can be configured as a pull through cache to proxy the
official Kolla images hosted in Docker Hub. In order to configure the local
registry as a pull through cache, in the host machine set the environment
variable ``REGISTRY_PROXY_REMOTEURL`` to the URL for the repository on
Docker Hub.
.. code-block:: console
export REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io
.. note::
Pushing to a registry configured as a pull-through cache is unsupported.
For more information, Reference the `Docker Documentation
<https://docs.docker.com/registry/configuration/>`__.
.. _configure_docker_all_nodes:
Configure Docker on all nodes
=============================
.. note::
docker run -d \
--name registry \
--restart=always \
-p 4000:5000 \
-v registry:/var/lib/registry \
registry:2
As the subtitle for this section implies, these steps should be
applied to all nodes, not just the deployment node.
Here we are using port 4000 to avoid a conflict with Keystone. If the registry
is not running on the same host as Keystone, the ``-p`` argument may be
omitted.
After starting the registry, it is necessary to instruct Docker that
it will be communicating with an insecure registry.
For example, To enable insecure registry communication,
modify the ``/etc/docker/daemon.json`` file to contain the following where
``192.168.1.100`` is the IP address of the machine where the registry
is currently running:
Edit ``globals.yml`` and add the following, where ``192.168.1.100:4000`` is the
IP address and port on which the registry is listening:
.. path /etc/docker/daemon.json
.. code-block:: json
.. code-block:: yaml
{
"insecure-registries" : ["192.168.1.100:5000"]
}
docker_registry: 192.168.1.100:4000
Restart Docker by executing the following commands:
Option 2: registry mirror
-------------------------
For CentOS or Ubuntu with systemd:
The Docker registry can be configured as a pull through cache to proxy the
official Kolla images hosted in Docker Hub. In order to configure the local
registry as a pull through cache, pass the environment variable
``REGISTRY_PROXY_REMOTEURL`` through to the registry container. Pushing to a
registry configured as a pull-through cache is unsupported. For more
information, Reference the `Docker Documentation
<https://docs.docker.com/registry/configuration/>`__.
.. code-block:: console
systemctl restart docker
docker run -d \
--name registry \
--restart=always \
-p 4000:5000 \
-v registry:/var/lib/registry \
-e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \
registry:2
For Ubuntu with upstart or sysvinit:
Edit ``globals.yml`` and add the following, where ``192.168.1.100:4000`` is the
IP address and port on which the registry is listening:
.. code-block:: console
.. code-block:: yaml
service docker restart
docker_custom_config:
registry-mirrors:
- 192.168.1.100:4000
.. _edit-inventory:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment