Richard Bucker

Ugh, docker-machine is abandonware

Posted at — Oct 7, 2019

To comment; I’m disappointed and pissed that this is my reality. Docker-machine is not a rock star but it works. It does not have many providers it does not support many OS. So now what? I suppose I can make the argument that if docker-machine is meant to be the turbo pascal of tools then maybe I should just skip it. Ugh.download the OVA file (As of Oct 2019 it’s 3.0)create a VM guest with the OVA; there are few params… one for disk and none for RAM. when creating the machine hostnames make them uniquethe OVA, by default, is not enough storage so resize it or use the ISOchange the password (root/changeme)'ifconfig’ to get the IP addresscheck sshd status: ‘systemctl status sshd'add the new machine to docker-machine: ‘docker-machine create –driver none -url=tcp://192.168.86.147:2376 photon3’ or use the generic docker-machine create --driver generic --generic-ip-address=192.168.86.147 --generic-ssh-user=root photon3 (generic is better)That was some basic system config… now comes k3siptables -A INPUT -p tcp –dport 6443 -j ACCEPTgotta remember to save the iptables changes: iptables-save >/etc/systemd/scripts/ip4savecurl -sfL https://get.k3s.io | sh -cat /var/lib/rancher/k3s/server/node-tokencurl -sfL https://get.k3s.io | K3S_URL=https://192.168.86.185:6443 K3S_TOKEN=token_goes_here_for_agent sh -kubectl get nodeskind the master: kubectl cluster-info | grep ‘Kubernetes master’ | awk ‘/http/ {print $NF}‘One strange thing is that the OVA file really limits the amount or RAM and the disk is small too. There is a belief that we need many VMs with limited resources each. Well this is just not how it’s supposed to be put together.I had to expand the disk with these instructions.As I’m writing this I’ve shutdown the machine and doubled the disk and ram.check photon updates: tdnf updateinfo infophoton update tdnf update -yOther tools:tdnf install -y awkadd an existing kubernetes cluster to gitlab (doc)Compares to k3s, docker swarm has as much cruft.tdnf install -y gitget the worker token from the leader: docker swarm join-token workercheck the docker service: systemctl status dockerstart docker: systemctl start dockerrestart docker: systemctl restart dockerjoin the swarm: docker swarm join –token <token_goes_here> 192.168.86.28:2377check the swarm inventory: docker node lsadd labels if necessary: docker node update –label-add type=queue worker1I’ve said this about k3s before. It’s complicated. The docker swarm setup did not need any iptable changes. It used most of the stuff that was already there. The swarm deploy and container deploy is pretty simple. It’s still just simple.