Skip to content

Fix CoreOS provisioning so that it works with the only remaining CoreOS, Fedora CoreOS.

Myron Wu requested to merge myronwu/docker-machine:main into main

NOTE THAT THIS FORK IS MAINTAINED FOR CRITICAL BUG FIXES AFFECTING RUNNING COSTS ONLY. NO OTHER CONTRIBUTIONS WILL BE ACCEPTED.

What critical bug this MR is fixing?

Issue #32.

This fixes the existing CoreOS support by updating the /etc/os-release matching and updating some outdated provisioning commands. CoreOS support used to work once upon a time but was broken at some point after RedHat acquired CoreOS and replaced it with Fedora CoreOS. Note that no other flavours of CoreOS exist anymore and so Fedora CoreOS is the only one that these changes have to support. At least as far as EC2 goes, AMIs for other flavours have long been deprecated and no new instances can be created.

How does this change help reduce cost of usage? What scale of cost reduction is it?

This helps us lower our costs since CoreOS is faster to provision with docker already pre-installed. At least on our installation of gitlab-runner, we tend to see Ubuntu provisioning fail at least a few times a day with network errors during various yum commands that triggers retries. With faster provisioning, it's also more viable to lower the IdleCount number to decrease the number of executors on hand, which is still more in savings for us.

In what scenarios is this change usable with GitLab Runner's docker+machine executor?

It's useable for anyone able to run with minimal docker host requirements and executors can run CoreOS instead of Ubuntu.

Note that I tested this in AWS with the following configuration:

    MachineOptions = [
      ...
      "amazonec2-instance-type=r6a.xlarge",
      "amazonec2-ami=ami-04bafa6ec56bb062d",
      "amazonec2-region=us-east-2",
      "amazonec2-use-ebs-optimized-instance=true",
      "amazonec2-root-size=50",
      "amazonec2-ssh-user=core",
      "amazonec2-device-name=/dev/xvda",
    ]
Edited by Myron Wu

Merge request reports