4.3 Setting up the Docker Registry

OpenStack services are deployed to the target nodes as Docker containers. The containers are created from Docker images, which are stored in a Docker registry. By default, the Docker registry used for a deployment is the Oracle Container Registry at https://container-registry.oracle.com. The Oracle Container Registry contains Docker images for a number of Oracle products, including Oracle OpenStack for Oracle Linux. As an alternative, you can also deploy the containers from the Docker Hub (https://hub.docker.com).

If you prefer, you can set up a local Docker registry to mirror the images in the Oracle Container Registry. For details on how to set up a Docker registry, see the Oracle Linux Docker User's Guide at http://docs.oracle.com/cd/E52668_01/E75728/html/index.html. By default, a Docker registry runs on port 5000. If you set up the Docker registry on a controller node, you must select a different free port on the host (for example port 5443) because port 5000 is used by the OpenStack Keystone service. The Oracle OpenStack for Oracle Linux Docker images are available on the Oracle Software Delivery Cloud, together with a script for uploading the images to the registry, at https://edelivery.oracle.com/linux.

To set up the Docker registry:

  1. If you are using the Oracle Container Registry, make sure you can sign in.

    In a web browser, go to https://container-registry.oracle.com and sign in using your Oracle credentials. If you do not have an Oracle account, click the Register link to create one.

  2. Configure the Docker registry properties.

    On the master node, use the kollacli property set command to set the following properties:

    docker_registry

    To use the Oracle Container Registry, this property is set to container-registry.oracle.com by default and you do not need to change it.

    To use Docker Hub, set this to an empty value using two empty quotation marks (""). This sets Docker to use its default registry, which is Docker Hub.

    To use a local registry server, set the host name or IP address, and the port number, of the host that runs the Docker registry, for example myregistry.example.com:5000.

    docker_registry_username

    The user name to use to log into the Docker registry.

    For the Oracle Container Registry, this is the user name for your Oracle account, usually your email address.

    For Docker Hub, you do not need to set a user name.

    For a local registry server, you may not need to set a user name.

    docker_namespace

    To use the Oracle Container Registry, this property is set to openstack by default and you do not need to change it.

    To use Docker Hub, set this to oracle.

  3. Set the password to use to log in to the Docker registry.

    This is the password for the user name you configured for the docker_registry_username property.

    Use the kollacli password set command:

    $ kollacli password set docker_registry_password

    The command prompts you for the password, and to confirm the password. The password value is not displayed on screen.

    To use Docker Hub, you do not need to set a password.

    For a local registry server, you might not need to set a password.

Example 4.1 Deployment Properties for the Oracle Container Registry

To set up the deployment to use the Oracle Container Registry:

$ kollacli property set docker_registry_username email@example.com
$ kollacli password set docker_registry_password
Password:

Example 4.2 Deployment Properties for Docker Hub

To set up the deployment to use Docker Hub:

$ kollacli property set docker_registry ""
$ kollacli property set docker_namespace oracle