Deploy Azure Hosts

Could anyone point me to the correct way to setup Azure hosts?

When using the “Add Hosts”, and then “Other” I always get the following error message ;

“illegal base64 data at input byte 11”

Though, when I try the same ,directly from the shell of the Rancher host with a (debug purposed) local install of docker-machine, it works without a hassle…

root@rancher01:~# vi Azure.publishsettings
root@rancher01:~# curl -L >/usr/local/bin/docker-machine
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 599 0 599 0 0 262 0 --:–:-- 0:00:02 --:–:-- 262
100 14.1M 100 14.1M 0 0 2183k 0 0:00:06 0:00:06 --:–:-- 3823k
root@rancher01:~# chmod +x /usr/local/bin/docker-machine
root@rancher01:~# docker-machine create -d azure --azure-publish-settings-file /root/Azure.publishsettings testrancherhost
Creating CA: /root/.docker/machine/certs/ca.pem
Creating client certificate: /root/.docker/machine/certs/cert.pem
Running pre-create checks…
Creating machine…
(testrancherhost) Creating Azure machine…
Waiting for machine to be running, this may take a few minutes…

I’ve tested both the publishsettings file & the certificate method. Both give the same result…

“illegal base64 data at input byte ***” (where the byte sometimes changes)

Is this familiar to someone?

Issue fixed ;

The “subscriptionCert” should be a base64 encoded string of your .pem certificate.

cat ~/.docker/ca.pem | base64

Sorry for lack of response @kvaes. I’m glad you figured it out and thanks for the cool write up. I’ll see if we can note the base64 issue somewhere in the UI or docs.

Thanks for the update. I’ve just updated the docs to include some notes on this. I have never deployed on Azure so wasn’t able to test it out myself to provide you additional information.