In this attempt, we will:
- Use Docker-Machine-Driver-Linode to provision a Linode with Docker-CE
- Run Rancher 2.x in that Docker-CE
- Install the Docker-Machine-Driver-Linode binary in Rancher
- Create a Template with the Necessary Settings
- Create a Rancher Kubernetes Cluster a. First Try Ubuntu (failure) b. Then Try CoreOS
- Next Steps
Install the docker-machine-driver-linode binary from https://github.com/linode/docker-machine-driver-linode/releases
Be sure to grab the appropriate binary for your operating system.
$ docker-machine create -d linode --linode-token $LINODE_TOKEN --linode-root-pass $(openssl rand -base64 32) dockode
Running pre-create checks...
Creating machine...
(dockode) Creating Linode machine instance...
(dockode) Creating linode instance
(dockode) Waiting for Machine Running...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env dockode
Now configure this as the backend for the Docker commands to follow.
$ eval $(docker-machine env dockode)
Launch Rancher.
docker run -d -p 80:80 -p 443:443 rancher/rancher
Access port 443 on the Linode running docker and accept the certificate.
open https://$(docker-machine ip dockode):443/
Use the Latest Linode Docker Machine for Linux binary from the Github Releases:
https://github.com/linode/docker-machine-driver-linode/releases/download/v0.1.0/docker-machine-driver-linode_linux-amd64.zip
Use the Latest release of the Linode UI for Rancher:
https://github.com/displague/ui-driver-linode/releases/download/v0.1.0/component.js
Omitting this step will reveal all Docker Machine Driver options. Here be dragons. You'll want to provide the Region, Image, and Instance Type using the APIv4 IDs. You'll also need to provide a Root Pass, SSH User (core
for containerlinux, root
for everything else).
This cluster is currently Provisioning; areas that interact directly with it will not be available until the API is ready.
[pre-deploy] Pulling image [rancher/hyperkube:v1.11.3-rancher1] on host [192.155.90.133]
This cluster is currently Provisioning; areas that interact directly with it will not be available until the API is ready.
[addons] Saving addon ConfigMap to Kubernetes
Failed to get Kubernetes server version: Get https://173.255.238.177:6443/version: can not build dialer to c-qm8ln:m-2pbwc
Reduce the cluster count to 1 node. It works!
But after a few minutes, ContainerLinux will reboot. And the Kubernetes services will not restart.
This cluster is currently Unavailable; areas that interact directly with it will not be available until the API is ready.
Failed to communicate with API server: Get https://45.33.66.78:6443/api/v1/componentstatuses?timeout=30s: waiting for cluster agent to connect
Fix https://github.com/displague/ui-driver-linode so that the Rancher UI can present drop downs with human values instead of raw Linode API values (Region, Kernel, Instance Type, Image dropdowns)
-v /var/lib/rancher:/opt/rancher
(second one is the local directory) ..also, use rancher/rancher:v2.1.5