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

View File

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

View File

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

View File

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