Benjamin Sherman bf9d9d2c86 chore: reorganize build to prepare for future changes (#9)
* chore: move build build files to main subdirectory
Prepare for future build changes by moving all existing build files
to a `main` subdirectory and verifying workflow handles this.


* chore: build approx 1 hour after upstream images
It seems upstream CoreOS images publish around 10:20pm.
https://quay.io/repository/fedora/fedora-coreos?tab=tags&tag=latest
2023-03-31 17:13:48 -05:00
2022-12-19 21:24:37 -08:00
2023-03-20 16:13:06 -05:00
2023-03-18 00:40:13 -05:00

uCore

build-ucore

What is this?

You should be familiar with Fedora CoreOS, as this is an OCI image of CoreOS with "batteries included". More specifically, it's an opinionated, custom CoreOS image, built daily with some commonly used tools added in. The idea is to make a lightweight server image including most used services or the building blocks to host them.

WARNING: This image has not been heavily tested, though the underlying components have. Please take a look at the included modifications and help test if this project interests you.

Features

  • Starts with a Fedora CoreOS image
  • Removes these stock packages:
    • toolbox
    • zincati
  • Adds the following:
  • Sets automatic staging of updates for system
  • Sets 60 second service stop timeout for reasonably fast shutdowns
  • Enables password based SSH auth (required for locally running cockpit web interface)

One can layer packages directly on a machine running uCore or use this image as a base for further customized OCI builds.

This image should be suitable for use on bare metal or on virtual machines where you wish to run containerized workloads.

Note: per cockpit instructions the cockpit-ws RPM is not installed, rather it is available as a podman container.

Tips and Tricks

These images are immutable, you can't, and really shouldn't, install packages like in a mutable "normal" distribution.

CoreOS expects the user to run services using podman. moby-engine, the free Docker implementation, is installed for those who desire docker instead of podman.

To maintain this image's suitability as a minimal container host, most add-on services are not auto-enabled.

To activate any of the pre-installed cockpit, docker, or tailscaled services:

sudo systemctl enable --now SERVICENAME.service

NOTE: CoreOS cautions against running podman and docker containers at the same time. Thus, docker.socket is disabled by default to prevent accidental activate of docker daemon, given podman is the default.

Users may use distrobox to run images of mutable distributions where applications can be installed with traditional package managers. This may be useful for installing interactive utilities such has htop, nmap, etc. As stated above, however, services should run as containers.

It's a good idea to become familar with the Fedora CoreOS Documentation as well as the CoreOS rpm-ostree docs. Note especially, this image is only possible due to ostree native containers.

How to Install

Prerequsites

This image is not currently avaialable for direct install. The user must follow the CoreOS installation guide. There are varying methods of installation for bare metal, cloud providers, and virtualization platforms.

All CoreOS installation methods require the user to produce an Ignition file. This Ignition file should, at mimimum, set a password and SSH key for the default user (default username is core).

Install and Manually Rebase

You can rebase any Fedora CoreOS x86_64 installation to uCore. Installing CoreOS itself can be done through a number of provisioning methods.

To rebase an Fedora CoreOS machine to the latest uCore (stable):

  1. Execute the desired rpm-ostree rebase command...
  2. Reboot, as instructed.
  3. After rebooting, you should pin the working deployment which allows you to rollback if required.
# Fedora CoreOS stable stream
sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/ublue-os/ucore:stable
# Fedora CoreOS testing stream, instead use the following
#sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/ublue-os/ucore:testing

Install with Auto-Rebase

Your path to a running uCore can be shortend by using examples/ucore-autorebase.butane as the starting point for your CoreOS ignition file.

  1. As usual, you'll need to follow the docs to setup a password. Substitute your password hash for YOUR_GOOD_PASSWORD_HASH_HERE in the ucore-autorebase.butane file, and add your ssh pub key while you are at it.
  2. Generate an ignition file from your new ucore-autorebase.butane using the butane utility.
  3. Now install CoreOS for hypervisor, cloud provider or bare-metal. Your ignition file should work for any platform, auto-rebasing to the ucore:stable, rebooting and leaving your install ready to use.

Verification

These images are signed with sisgstore's cosign. You can verify the signature by downloading the cosign.pub key from this repo and running the following command:

cosign verify --key cosign.pub ghcr.io/ublue-os/ucore
Description
No description provided
Readme Apache-2.0 432 KiB
Languages
Shell 79.8%
Dockerfile 11.2%
Just 9%