openshift / pivot

Pivots from on ostree OS/Deployment to another via containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pivot ➰

Deprecated: Please see machine-config-operator.

Build Status

pivot provides a simple command allowing you to upgrade an OSTree-based system from an OSTree repo embedded within a container image. Such container images are generated by the coreos-assembler oscontainer command.

It works by (1) downloading the oscontainer, (2) mounting it using podman mount, (3) looking for the OSTree commit stored inside the container, and (4) invoking rpm-ostree to rebase the OS to that commit.

It's not intended to be run manually, but rather as part of the installation and upgrade process of a cluster. Though one can certainly test it today by provisioning an RHCOS node and running it directly (see the internal guide and release page) for more information).

Building

make build

OR

make static

Example Usage

pivot -r $REGISTRY/os:latest

Though normally, one wants to use digests rather than tags, e.g.:

pivot -r $REGISTRY/os@sha256:fdf70521df4ed1dc135d81fd3c4608574aeca45dc22d1b4e38d16630e9d6f1a7

It also comes with a systemd unit to provide a "host API". For example:

mkdir -p /etc/pivot
echo $REGISTRY/os:latest > /etc/pivot/image-pullspec
touch /run/pivot/reboot-needed
systemctl start pivot

This will start pivot, which will read the file and execute the pivot. If the pivot is completed, the file will be deleted. The expected way to make use of this is to create the necessary files from Ignition.

See

About

Pivots from on ostree OS/Deployment to another via containers

License:Apache License 2.0


Languages

Language:Go 91.3%Language:Makefile 8.7%