summaryrefslogtreecommitdiffstats
path: root/playbooks/provisioning/openstack/README.md
diff options
context:
space:
mode:
authorTlacenka <tlacencin@gmail.com>2017-10-13 16:42:07 +0200
committerTomas Sedovic <tomas@sedovic.cz>2017-10-13 16:42:07 +0200
commit428018cbe505101d6f034fa4a0aaf53fd8f2caf1 (patch)
tree314fac86e114e115daa63c2ef13f74b1a4299f28 /playbooks/provisioning/openstack/README.md
parentb450ff75888f7801094ca88957a237f33f5e85f1 (diff)
downloadopenshift-428018cbe505101d6f034fa4a0aaf53fd8f2caf1.tar.gz
openshift-428018cbe505101d6f034fa4a0aaf53fd8f2caf1.tar.bz2
openshift-428018cbe505101d6f034fa4a0aaf53fd8f2caf1.tar.xz
openshift-428018cbe505101d6f034fa4a0aaf53fd8f2caf1.zip
Add Extra Docker Registry URLs (custom post-provision action) (#794)
* add-docker-registry: playbook that adds docker registries to docker config file (in progress) * indentation fix * docker registries: add check for variable type * another type conversion * docker registry: try another unified formatting * another attempt * type error fix * quotation attempt * docker registry: bug fixes * docker registry: fixed formatting * docker registry: if docker is not available, skip the whole playbook * README updated * README: typo * docker registries: suggested changes applied (in progress) * docker registries: README updated, redundant check removed * removed redundant become:true
Diffstat (limited to 'playbooks/provisioning/openstack/README.md')
-rw-r--r--playbooks/provisioning/openstack/README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md
index 370f582b2..78d4ffe7c 100644
--- a/playbooks/provisioning/openstack/README.md
+++ b/playbooks/provisioning/openstack/README.md
@@ -584,12 +584,31 @@ This playbook runs against all cluster nodes. In order to help prevent slow conn
problems, the task is retried 10 times in case of initial failure.
Note that in order for this example to work in your deployment, your servers must use the RHEL image.
+#### Adding extra Docker registry URLs
+
+This playbook is located in the [custom-actions](https://github.com/openshift/openshift-ansible-contrib/tree/master/playbooks/provisioning/openstack/custom-actions) directory.
+
+It adds URLs passed as arguments to the docker configuration program.
+Going into more detail, the configuration program (which is in the YAML format) is loaded into an ansible variable
+([lines 27-30](https://github.com/openshift/openshift-ansible-contrib/blob/master/playbooks/provisioning/openstack/custom-actions/add-docker-registry.yml#L27-L30))
+and in its structure, `registries` and `insecure_registries` sections are expanded with the newly added items
+([lines 56-76](https://github.com/openshift/openshift-ansible-contrib/blob/master/playbooks/provisioning/openstack/custom-actions/add-docker-registry.yml#L56-L76)).
+The new content is then saved into the original file
+([lines 78-82](https://github.com/openshift/openshift-ansible-contrib/blob/master/playbooks/provisioning/openstack/custom-actions/add-docker-registry.yml#L78-L82))
+and docker is restarted.
+
+Example usage:
+```
+ansible-playbook -i <inventory> openshift-ansible-contrib/playbooks/provisioning/openstack/custom-actions/add-docker-registry.yml --extra-vars '{"registries": "reg1", "insecure_registries": ["ins_reg1","ins_reg2"]}'
+```
+
Please consider contributing your custom playbook back to openshift-ansible-contrib!
A library of custom post-provision actions exists in `openshift-ansible-contrib/playbooks/provisioning/openstack/custom-actions`. Playbooks include:
* [add-yum-repos.yml](https://github.com/openshift/openshift-ansible-contrib/blob/master/playbooks/provisioning/openstack/custom-actions/add-yum-repos.yml): adds a list of custom yum repositories to every node in the cluster
* [add-rhn-pools.yml](https://github.com/openshift/openshift-ansible-contrib/blob/master/playbooks/provisioning/openstack/custom-actions/add-rhn-pools.yml): attaches a list of additional RHN pools to every node in the cluster
+* [add-docker-registry.yml](https://github.com/openshift/openshift-ansible-contrib/blob/master/playbooks/provisioning/openstack/custom-actions/add-docker-registry.yml): adds a list of docker registries to the docker configuration on every node in the cluster
### Install OpenShift