Monday, October 7, 2019

Ugh, docker-machine is abandonware

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 unique
  • the OVA, by default, is not enough storage so resize it or use the ISO
  • change the password (root/changeme)
  • 'ifconfig' to get the IP address
  • check sshd status: 'systemctl status sshd'
  • add the new machine to docker-machine: 'docker-machine create --driver none -url=tcp:// photon3' or use the generic `docker-machine create --driver generic --generic-ip-address= --generic-ssh-user=root photon3` (generic is better)
That was some basic system config... now comes k3s

  • iptables -A INPUT -p tcp --dport 6443 -j ACCEPT
  • gotta remember to save the iptables changes: iptables-save >/etc/systemd/scripts/ip4save
  • curl -sfL | sh -
  • cat /var/lib/rancher/k3s/server/node-token
  • curl -sfL | K3S_URL= K3S_TOKEN=token_goes_here_for_agent sh -
  • kubectl get nodes
  • kind 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 info
photon update tdnf update -y

Other tools:
  • tdnf install -y awk
  • add an existing kubernetes cluster to gitlab (doc)

Compares to k3s, docker swarm has as much cruft.
  • tdnf install -y git
  • get the worker token from the leader: docker swarm join-token worker
  • check the docker service: systemctl status docker
  • start docker: systemctl start docker
  • restart docker: systemctl restart docker
  • join the swarm: docker swarm join --token <token_goes_here>
  • check the swarm inventory: docker node ls
  • add labels if necessary: docker node update --label-add type=queue worker1
I'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.

No comments:

Post a Comment

another bad day for open source

One of the hallmarks of a good open source project is just how complicated it is to install, configure and maintain. Happily gitlab and the ...