Running dhcpd as a container on Mac OS X: the problems
Well, this has been challenging.
My goal was to implement dhcpd on each school site's time machine server to provide failover and reduce latency. I am using Mac OS X Minis as the server platform, as we invested in them as Time Machine backups for critical staff laptops, and they also serve to manage printer and copier queues for the print accounting service. I hit a couple of road blocks that are forcing me to seriously consider investing a couple of grand in 4 linux boxes and just move the whole container concept back to linux. Here are a couple of the issues I've been working through:
- Docker for Mac is not for production. I am finding out that the app is designed for single user, and doesn't respond to tinkering with the storage-driver or other options, and I can't run a swarm using Macs or Windows as nodes, so no docker services or that very cool mesh routing.
- Running Docker for Mac as a production service. The app requires an interactive window session to run, so each time machine has to be set to automatically log in.
- Freeing up port 67 & 68 is difficult. I moved the network interface to a static IP, but there were some legacy services from the Server app that kept taking over the ports I to run dhcpd from a container. I have to remove the Dhcp scope reference from the Dhcp service, even though the service was turned off, and I had to disable NetBoot. This worked fine on OS X 1.10 - 13, but 10.14 will not release control of those ports no matter what I do, even after removing the Server app entirely. May have to take a hammer to it...
- The container may not be handling all the traffic. I am testing a set up where the site's router has two ip helper-address directives for each vlan, forwarding layer 2 traffic to the time machine and a central dhcpd server at a remote site, which is running on a trusty snowflake centos 6 installation, a treasured pet for many years. In reviewing the logs, the centos service appears to be handling all of the dhcpd traffic, while the container is only handling a fraction. I haven't ruled out the time machine entirely, as I need to confirm how the switches and wifi controllers are handling the ip helper-address directives, but it is possible that the high volume of traffic (each site has over 500 devices over 5-7 subnets) may be too much for either the time machine's interface or the container's bridge network interface.
So, it has not been as easy as I had thought to implement Docker with Macs as nodes. However, I think I can use this proof of concept to perhaps fund some small linux boxes and build a proper cluster. We'll see what happens...