Giant Swarm has open-sourced Mayu and Yochu, its previously internal tools that make it easier to provision CoreOS clusters on bare metal. Mayu bootstraps CoreOS nodes on bare metal servers and Yochu takes care of provisioning and configuring fleet and etcd to turn a number of physical nodes into a cluster ready to run distributed container-based services.
Mayu runs on a Linux host (directly or in a Docker container) and acts as a preboot execution environment (PXE) server to ship operating-system binaries to target nodes and exposes an HTTPS endpoint for querying the status of the cluster. Mayu has two run-time dependencies: dnsmasq for DHCP and bootp support, and git for recording changes to the cluster. A cloud-config file can be included to be processed by the "coreos-cloudinit" startup process to customize OS-level settings such as user accounts, SSH keys or network configuration, and to assign different roles to different nodes in the cluster. Mayu saves the status of the cluster to a local git repo, recording every change to the cluster as it’s running. Once a cluster has been bootstrapped, the list and status of individual nodes in the cluster can be queried via command line.
Yochu works on a running CoreOS cluster. It is a systemd unit that runs when the physical node boots up and connects to Mayu’s HTTPS endpoint to fetch the binaries for Docker, etcd, and fleet. Yochu is most useful in scenarios where a production requirement dictates a specific version of Docker, fleet or etcd (for example to pin a specific version of Docker while keeping the rest of CoreOS updated). By default, it uses binaries pre-built by Giant Swarm (delivered over HTTPS), but it can use custom binaries instead. Yochu also adds additional security and convenience rules to iptables on every host (e.g. forwarding host’s established connections to containers running on that host).
While containers on bare metal offer better performance and utilization compared to running containers inside virtual machines (e.g. on AWS EC2 or ECS), the tooling available for containers on on-premises bare metal is behind that available for virtualized environments in the cloud. Tools such as Mayu and Yochu (and the recently released coreos-baremetal) help bridge that gap.
Mayu and Yochu are distributed under APL 2.0 on Giant Swarm’s GitHub page.