How to setup docker insecure registry for kolla?
I have been working through the kolla ansible installation for openstack. https://docs.openstack.org/project-deploy-guide/kolla-ansible/ocata/multinode.html (Ocata Guide I am using here) . Currently using 3x centos 7 virtual machines in order to test a multi node deployment method. The problem I am running into is when deploying the insecure registry.
The following are the steps I am taking.
sudo /usr/share/kolla/tools/start-registry
Modify the /etc/sysconfig/docker
file to contain the following where 192.168.1.100
is the IP address of the machine where the registry is currently running:
sudo nano /etc/sysconfig/docker
Adding to the file:
INSECURE_REGISTRY="--insecure-registry 192.168.1.100:5000"
Next, modify /etc/systemd/system/docker.service.d/kolla.conf
, add environmentFile
variable and add $DOCKER_OPTS
to the end of ExecStart
in [Service]
section:
sudo nano /etc/systemd/system/docker.service
[Service]
MountFlags=shared
EnvironmentFile=/etc/sysconfig/docker
ExecStart=/usr/bin/docker daemon $INSECURE_REGISTRY
Restart Docker by executing the following commands:
sudo systemctl daemon-reload
sudo systemctl restart docker
Upon going through these steps, end up with the following result:
[bobtheuser@kolla ~]$ sudo systemctl restart docker
Failed to restart docker.service: Unit is not loaded properly: Invalid argument.
looking into the error more, I have the following information.
[bobtheuser@kolla ~]$ sudo systemctl status docker.service -l
[sudo] password for cloudmaster:
● docker.service - Docker Application Container Engine
Loaded: error (Reason: Invalid argument)
Drop-In: /etc/systemd/system/docker.service.d
└─kolla.conf
Active: inactive (dead)
Docs: https://docs.docker.com
Aug 18 09:16:17 kolla.lab systemd[1]: docker.service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
I have looked around online to see if anyone else has encountered this issue, but with no results. It seems to be an error with the ExecStart
. Is there something that I am missing or a different procedure that needs to be followed?
Update 1:
[bobtheuser@kolla cloudmaster]# sudo systemctl status docker.service -l
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d
└─kolla.conf
Active: failed (Result: start-limit) since Mon 2017-08-21 08:42:48 EDT; 2s ago
Docs: https://docs.docker.com
Process: 2536 ExecStart=/usr/bin/docker daemon $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
Main PID: 2536 (code=exited, status=1/FAILURE)
Aug 21 08:42:47 kolla.lab systemd[1]: Failed to start Docker Application Container Engine.
Aug 21 08:42:47 kolla.lab systemd[1]: Unit docker.service entered failed state.
Aug 21 08:42:47 kolla.lab systemd[1]: docker.service failed.
Aug 21 08:42:48 kolla.lab systemd[1]: docker.service holdoff time over, scheduling restart.
Aug 21 08:42:48 kolla.lab systemd[1]: start request repeated too quickly for docker.service
Aug 21 08:42:48 kolla.lab systemd[1]: Failed to start Docker Application Container Engine.
Aug 21 08:42:48 kolla.lab systemd[1]: Unit docker.service entered ...
What docker version are you using, as iGene commented in his answer, may be an issue with docker daemon.
Try setting dockerd in execstart
also can try using directly the registry IP rather than the variable with --insecure-registry <url>
Have you done?
before
Also, please share current state of systemd docker's kolla.conf
Docker Version: 17.06.0-ce
And to answer your question, I was performing daemon-reload and restarting docker for each change/try attempt.
I posted working kolla.conf and docker file contents under "update 2" of original posting and under the answer post I made to this thread.