Richard Bucker

rancher docker registry

Posted at — Apr 21, 2015

Earlier today I wrote an article describing a rancher quick start. When I mentioned an enterprise deployment I mentioned that I needed to install a registry server. Since docker released version 2 I thought no time like the present.open the rancher console in a browser: http://172.19.8.101:8080/click containerclick add containerprovide your vanity container name: “registry”. This is a name I selected not the container name in the registryin the “image” select “docker” and type “registry"click createNow rancher is going go get the container and start instantiating it. I did not select the particular host but it’s selected one for me. Also, rancher also started a sidekick container for the registry container so that networking is obvious.Once the registry service is running you should add it to the rancher registry list.get the IP address of the container you created aboveclick registriesclick add registryprovide your vanity name for this serviceprovide the IP addressclick addNow if you add a new container you’ll see that the registry list now includes the registry you just created.One thing that is TBD is persisting the storage for the registry so it can be rebooted. But I did not get to that point in the configuration… but I should.UPDATE:  I had decided to install the latest etcd. (a) adding a container seemed to be a little round robin - unexpected goodness. (b) I had to add quay.io to the registry list. (c) the first attempt to install etcd failed because I tried ‘etcd’ and it should have been ‘coreos/etcd’. Interestingly when it failed rancher left the sidekick in running mode (with no way to delete it) and when I corrected the image name it did not create a new sidekick (assuming that rancher reused the existing). Too many unknowns.UPDATE2: I was hoping this was the end of the story but it’s not.  It seems either rancher agent or server are failing. This is not reliable for me.