{"id":1925,"date":"2017-02-13T13:34:54","date_gmt":"2017-02-13T18:34:54","guid":{"rendered":"http:\/\/blog.domb.net\/?p=1925"},"modified":"2017-05-17T10:36:39","modified_gmt":"2017-05-17T14:36:39","slug":"openshift-3-4-standalone-registry-atomic-registry","status":"publish","type":"post","link":"https:\/\/blog.domb.net\/?p=1925","title":{"rendered":"OpenShift 3.4 Standalone Registry (Atomic Registry)"},"content":{"rendered":"<p>I realized today that the current OpenShift 3.4 documentation around installing the standalone registry is missing an important parameter. Here is the link to the bug <a href=\"https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=1421811\">openshift_master_default_subdomain missing<\/a> . Its a small error but has some impact as the route registry-console-default.yourdomain will not be exposed externally.<\/p>\n<p>Remember the standalone OpenShift registry is a full OpenShift installation thus it will need a DNS wildcard entry pointing to it for the subdomain defined in openshift_master_default_subdomain.<\/p>\n<p>I used the following ansible hosts file to install the registry<\/p>\n<pre class=\"lang:default decode:true \"># Create an OSEv3 group that contains the masters and nodes groups\r\n[OSEv3:children]\r\nmasters\r\nnodes\r\n\r\n# Set variables common for all OSEv3 hosts\r\n[OSEv3:vars]\r\n# SSH user, this user should allow ssh based auth without requiring a password\r\nansible_ssh_user=root\r\n\r\n# If ansible_ssh_user is not root, ansible_become must be set to true\r\n#ansible_become=true\r\n#openshift_master_cluster_public_hostname=registry.local.domb.com\r\nopenshift_master_default_subdomain=reg.local.domb.com\r\n#openshift_master_cluster_hostname=registry.local.domb.com\r\n\r\ndeployment_type=openshift-enterprise\r\ndeployment_subtype=registry\r\n\r\n# uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider\r\nopenshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '\/etc\/origin\/master\/htpasswd'}]\r\n\r\n# host group for masters\r\n[masters]\r\nregistry.local.domb.com\r\n\r\n# host group for nodes, includes region info\r\n[nodes]\r\nregistry.local.domb.com openshift_schedulable=true openshift_node_labels=\"{'region': 'infra', 'zone': 'default'}\" \r\n<\/pre>\n<p>If you followed the redhat documentation around requirements you should be good to go. You can know run the<\/p>\n<pre class=\"lang:default decode:true \"> [root@registry ~]# ansible-playbook \/usr\/share\/ansible\/openshift-ansible\/playbooks\/byo\/config.yml<\/pre>\n<p>Once the install is done you can check with oc get routes if your route was created correctly<\/p>\n<pre class=\"lang:default decode:true \">[root@registry ~]# oc get routes\r\nNAME               HOST\/PORT                                     PATH      SERVICES           PORT               TERMINATION\r\ndocker-registry    docker-registry-default.reg.local.domb.com              docker-registry    5000-tcp           passthrough\r\nregistry-console   registry-console-default.reg.local.domb.com             registry-console   registry-console   passthrough\r\n<\/pre>\n<p>You can know browse to https:\/\/registry-console-default.reg.local.domb.com and you should see the following UI (if you did not configure any users yet you will not be able to login!)<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1929\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_018.png\" alt=\"\" width=\"1879\" height=\"838\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_018.png 1879w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_018-300x134.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_018-768x343.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_018-1024x457.png 1024w\" sizes=\"auto, (max-width: 1879px) 100vw, 1879px\" \/><\/p>\n<p>If you chose htpasswd_auth create a user with htpasswd \/etc\/origin\/master\/htpasswd admin and login. Once logged in you will see the atomic registry.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1930\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_019.png\" alt=\"\" width=\"1268\" height=\"997\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_019.png 1268w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_019-300x236.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_019-768x604.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_019-1024x805.png 1024w\" sizes=\"auto, (max-width: 1268px) 100vw, 1268px\" \/><\/p>\n<p>Then you can create a project and upload an image and you should see something like this<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1932\" src=\"http:\/\/blog.domb.net\/wp-content\/uploads\/Selection_020-1.png\" alt=\"\" width=\"1219\" height=\"784\" srcset=\"https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_020-1.png 1219w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_020-1-300x193.png 300w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_020-1-768x494.png 768w, https:\/\/blog.domb.net\/wp-content\/uploads\/Selection_020-1-1024x659.png 1024w\" sizes=\"auto, (max-width: 1219px) 100vw, 1219px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I realized today that the current OpenShift 3.4 documentation around installing the standalone registry is missing an important parameter. Here is the link to the bug openshift_master_default_subdomain missing . Its a small error but has some impact as the route registry-console-default.yourdomain will not be exposed externally. Remember the standalone OpenShift registry is a full OpenShift&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[76],"tags":[88,85,89,87,86],"class_list":["post-1925","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-openshift","tag-all-in-one-stand-alone-registry-inventory-file","tag-ocp-3-4","tag-stand-alone-registry","tag-standalone-docker-registry","tag-standalone-registry"],"_links":{"self":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/1925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1925"}],"version-history":[{"count":6,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/1925\/revisions"}],"predecessor-version":[{"id":2026,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/1925\/revisions\/2026"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/media\/2025"}],"wp:attachment":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}