When you add a new host to a Rancher 1.6 environment, Rancher's web UI gives you a sudo docker...
command to run in the host. The command looks like this:
sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:
/var/lib/rancher rancher/agent:v1.2.11 https://rancher.example.com/v1/scripts/xxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyy:zzzzzzzzzzzzzzzzzzzzzzzzzzz
The rancher/agent:v1.2.11
image can't connect to Rancher Server's whose HTTPS connection uses a Let's Encrypt certificate (yes, that issue). So we have to change it to our custom build: manastech/rancher-v1.6-agent:v1.2.12
. But, even if you can change the image in the above command - it won't do any good.
The rancher-agent
connects to the server and asks for a bootstrap script located at https://rancher.example.com/v1/scripts/bootstrap
, which overrides which im