Start with a virtual machine running Ubuntu with snap support (e.g. 16  or 18LTS)

SSL

Rancher has “native” support for letscencrypt.

If you have access to a domain and can create a new DNS entry on it, add one pointing to this server.

Make sure ports 80 and 443 are open to this server.

Install docker

sudo snap install docker

Rancher

mkdir rancher
sudo docker run -d --restart=unless-stopped \
-v ${PWD}/rancher:/var/lib/rancher \
-p 80:80 -p 443:443 \
--name rancher \
rancher/rancher:latest \
--acme-domain {your_host_name}

Navigate to https://{your_host_name} on your favorite browser

Set the administrator password. 

Prepare the first node

Create another virtual machine running Ubuntu 16.04LTS. 

Install docker 

As of 10/2018, Rancher instructions recommend ubuntu 16.04LTS and docker-ce 17.03.2. Double check for latest node requirements.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"

sudo apt update

sudo apt-get install docker-ce=17.03.2~ce-0~ubuntu-xenial

Create Custom Cluster

Back in Rancher, select Global and click Add Cluster.

Select Custom, fill the cluster name (e.g. MyCustomCluster) and then click next.

Check all the options under node options

Follow the on-screen instructions (e.g. copy the command, ssh into the virtual machine and paste there)

Click Done.

It will take a few minutes. You can monitor the cluster creation in the rancher UI.

References


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *