add conf for private registry

This commit is contained in:
Kevin TIBI 2017-11-09 13:16:27 +00:00
parent 0c1f75e0f3
commit e3b8fb5f59
4 changed files with 12 additions and 0 deletions

View File

@ -34,8 +34,10 @@
- name: Login to docker registry
docker_login:
registry_url: "{{ kolla_docker_registry or omit }}"
username: "{{ kolla_docker_registry_username }}"
password: "{{ kolla_docker_registry_password }}"
reauthorize: yes
when: kolla_docker_registry_username is not none and kolla_docker_registry_password is not none
- name: Ensure Kolla container images are built
@ -45,6 +47,7 @@
kolla-build \
--config-dir {{ kolla_build_config_path }} \
{% if item.type is defined %}--type {{ item.type }}{% endif %} \
{% if kolla_docker_registry is defined %}--registry {{ kolla_docker_registry }}{% endif %} \
{% if push_images | bool %}--push{% endif %} \
{{ item.regexes }} 2>&1 | tee --append {{ kolla_build_log_path }}
with_items: "{{ container_image_sets }}"

View File

@ -58,6 +58,9 @@ kolla_install_type: "binary"
# Docker namespace to use for Kolla images.
kolla_docker_namespace: "stackhpc"
# Url of docker registry to use for Kolla images.
kolla_docker_registry:
# Username to use to access a docker registry.
kolla_docker_registry_username:

View File

@ -53,6 +53,9 @@ node_custom_config: "{{ kolla_node_custom_config_path }}"
### Example: Private repository with authentication
#docker_registry: "172.16.0.10:4000"
{% if kolla_docker_registry %}
docker_registry: "{{ kolla_docker_registry }}"
{% endif %}
docker_namespace: "{{ kolla_docker_namespace }}"
{% if kolla_docker_registry_username and kolla_docker_registry_password %}
docker_registry_username: "{{ kolla_docker_registry_username }}"

View File

@ -57,6 +57,9 @@
# Kolla installation type: binary or source.
#kolla_install_type:
# URL of docker registry to use for Kolla images.
#kolla_docker_registry:
# Docker namespace to use for Kolla images.
#kolla_docker_namespace: