Richard Bucker

SSL sucks

Posted at — Oct 15, 2018

Don’t read this post unless you want to read about FAILs.Trying to deploy a secure “developer in a box” domain is non trivial. Which also means that trying to deploy any kind of domain is also non-trivial. The challenge is the bootstrap which is also a “race condition” or a “chicken and the egg”.For example in my system I have a single public IP address. The router forwards ports 80, 443 and a few others to my traefic server. My traefic server allows my projects to register with traefic so that their various network requests are forwarded properly. However, since my traefic server is also version controlled in my private git repo and I cannot deploy traefic until my git server is also in place. And therefore the chicken and egg.As for the SSL title… when you let your SSL certificate expire because it’s too hard to remember what you had to do last time to renew and reload the certificate or that you’ve imposed too many guardrails in the organization in order to manage secrets that any sort of tweak requires a complete redeploy… or when using mechanical and mutually dependent chicken-eggs systems that it’s too easy to lose control.Here’s the outline of my hyper developer domain in a box.create an account on a VPS service like digital oceancreate a projectregister a DNS domain and configure your nameservers.create a gitlab instance (good luck configuring it. so that it’s secure)configure gitlab including letsencryptimport the baseline traefik project so that [1] you have a known version rather than relying on release version numbers or public repos [2] consistent deployscreate a console machine instance that would be used to deploy the swarm of instances.OK, first FAIL. Git is famously difficult to deploy and gitlab does not make that much easier especially since we are talking about the bootstrap and console. Starting again… this time instead of deploying a bootstrap git repo and a separate console I’m going to deploy a small container OS like rancher, install docker-machine and docker-compose then install fossil-scm.Add support for Docker. Just install docker and type “sudo docker run -d -p 8080:8080 nijtmans/fossil” to get it running.Another FAIL. RancherOS does not install anything less than 4GB of ram. Or at least not that I can be certain of. So this time I’m going to try fedora… I like CoreOS, however, releases have been slow and now that RedHat owns them it’s tough to know what it’s future is.And another FAIL: FedoraAtomic 26 uses stock docker 1.13 and the latest docker release is 1.18++. Even though RancherOS has some heavy ram requirements at least it stock with the latest version. Now as I’m trying to upgrade my atomic host Atomic failed.INSTALL DOCKER-MACHINE (link)another FAIL – ‘curl’ does not exist on the base RancherOS… you have to convert the console to alpine and then apk add curl… and CoreOS does not permit writing to the /usr partition. So you gotta change it to /opt and add that to the path. UGH And on CoreOS forget any plan to add auto-completion.Now that fossil is running on my console machine and I’ve installed docker-compose and docker-machine… I’ve also updated the admin password on fossil. At this point I’ve gone back and deleted the RancherOS instance because it’s 2GB requirement is 2x the 1GB for CoreOS. At this point this machine is meant to be basically idle although I need to add my swarm tools and traefik.And another FAIL – the fossil container is over 2 years old and does not provide any information on hosted persistence and no link to the Dockerfile.