Skip to main content

ansible-role-container-registry

A role to deploy a container registry and provide methods to login to it. For now, the role only support Docker Registry v2. The login currently doesn’t work with hub.docker.com.

Role Variables

Variables used for container registry

Name

Default Value

Description

container_registry_debug

false

Enable debug option in Docker

container_registry_deploy_docker

true

Whether or not to deploy Docker

container_registry_deploy_docker_distribution

true

Whether or not to deploy Docker Distribution

container_registry_deployment_user

centos

User which needs to manage containers

container_registry_docker_options

–log-driver=journald –signature-verification=false –iptables=false –live-restore

Options given to Docker configuration

container_registry_docker_disable_iptables

false

Adds –iptables=false to /etc/sysconfig/docker-network config

container_registry_insecure_registries

[]

Array of insecure registries

container_registry_network_options

[undefined]

Docker networking options

container_registry_host

localhost

Docker registry host

container_registry_port

8787

Docker registry port

container_registry_mirror

[undefined]

Docker registry mirror

container_registry_storage_options

-s overlay2

Docker storage options

container_registry_selinux

false

Whether or not SElinux is enabled for containers

container_registry_additional_sockets

[undefined]

Additional sockets for containers

container_registry_skip_reconfiguration

false

Do not perform container registry reconfiguration if it’s already configured

container_registry_logins

[]

A dictionary containing registries and a username and a password associated with the registry. Example: {‘docker.io’: {‘myusername’: ‘mypassword’}, ‘registry.example.com:8787’: {‘otheruser’: ‘otherpass’}}

Requirements

  • ansible >= 2.4

  • python >= 2.6

Dependencies

None

Example Playbooks

Modify Image

The following playbook will deploy a Docker registry:

- hosts: localhost
  become: true
  roles:
    - container-registry

License

Apache 2.0

Running local testing

Local testing of this role can be done in a number of ways.

Mimic Zuul

Sometimes its nessisary to setup a test that will mimic what the OpenStack gate will do (Zuul). To run tests that minic the gate, python-virtualenv git, gcc, and ansible are required.

$ sudo yum install python-virtualenv git gcc

Once the packages are installed, create a python virtual environment.

$ python -m virtualenv --system-site-packages ~/test-python
$ ~/test-python/bin/pip install pip setuptools --upgrade

Now install the latest Ansible

$ ~/test-python/bin/pip install ansible

With Ansible installed, activate the virtual environment and run the run-local.yml test playbook.

$ source ~/test-python/bin/activate
(test-python) $ ansible-playbook -i 'localhost,' \
                                 -e "tripleo_src=$(realpath --relative-to="${HOME}" "$(pwd)")" \
                                 -e "ansible_user=${USER}" \
                                 -e "ansible_user_dir=${HOME}" \
                                 -e "ansible_connection=local" \
                                 zuul.d/playbooks/run-local.yml

Running Molecule directly

It is also possible to test this role using molecule directly. When running tests directly it is assumed all of the dependencies are setup and ready to run on the local workstation. When

$ molecule test --all

Metadata

Release files for ansible-role-container-registry 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ansible-role-container-registry 1.4.0
File Size Uploaded Provenance
ansible-role-container-registry-1.4.0.tar.gz 18.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ansible-role-container-registry 1.4.0
File Interpreter ABI Platform
ansible_role_container_registry-1.4.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 36.9 kB

Release files / ansible-role-container-registry-1.4.0.tar.gz

Download URL ansible-role-container-registry-1.4.0.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
320e95a39cf6ae46cf608909d7e6810a52952778722402bdc38abba4b9979dea
BLAKE2b-256 checksum
How to use checksums
3f61b91ff2fc5bbbd9258dcfd964559b512197a93964f49d0f8923b57af8c109
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

Release files / ansible_role_container_registry-1.4.0-py2.py3-none-any.whl

Download URL ansible_role_container_registry-1.4.0-py2.py3-none-any.whl
Size 18.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0b0cdd2db2b82268ee66179f63227aa7d1246b0d2ebcc7306b4baa831e87ed2b
BLAKE2b-256 checksum
How to use checksums
158b11a32d52514205554b3a9b224dc21cfbe70d5fa24420c4fd8b7842524b8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

Security for ansible-role-container-registry 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page