Giter Club home page Giter Club logo

okd-machine-os's Introduction

OKD Machine OS

This repository contains the components necessary to build a Fedora CoreOS based OKD node. The process involves creating a container that incorporates the latest developer release of Fedora CoreOS, the OpenShift cluster artifacts, the Machine Controller Daemon, and various container overlays specific to OKD. To better understand the various components, please see the following resources:

Structure

This repo uses fedora-coreos-config as a submodule for basic configuration. Stable OKD versions use stable branch, OKD development versions use testing-devel for latest packages.

manifest.yaml is a copy of FCOS manifest with the following changes:

  • tweaked version (special OKD version is set to designate the difference between OKD image and FCOS) and custom ostree ref
  • On top of FCOS base configuration additional OKD packages are installed:
    • openshift-hyperkube - kubelet
    • crio, cri-tools - container runtime
    • NetworkManager-ovs for OpenshiftOVN
    • open-vm-tools, qemu-guest-agent - cloud tools for vSphere/oVirt
    • openshift-clients - RPM with oc binary
    • glusterfs, glusterfs-fuse - required to pass glusterfs tests
  • packages is updated to avoid including zincati (OKD uses CVO/MCO for updates)
  • Available repos are disabled in postprocess section to make sure updates are reproducible

OKD machine-os inherits image.yaml to produce ostree commit and manifest-lock.* files to ensure base packages are as close to FCOS as possible.

Overlayed configuration is used in overlay.d, symlinking FCOS settings. The repo also has OKD-specific 99okd overlay, which does the following:

  • dhclient.conf in order to prevent br-ex interface from getting a wrong MAC
  • sshd_config.d dropin to allow ssh-rsa keys to be compatible with OCP.
  • localtime symlinked to UTC (required for fluentd).
  • gcp-hostname service which uses Afterburn to set GCP hostname.

Build process

Dockerfile.ci is creating a new build on Cirrus CI, templating configuration from .cirrus.yml.j2 via cirrus-run tool. This is required to have KVM socket passed in the container build. Cirrus CI builds Dockerfile.cosa, fetches latest promoted kubelet and MCD and runs entrypoint.sh in latest CoreOS Assembler image. During the build upload-oscontainer subcommand is executed and the new machine-os image is pushed to quay.io/vrutkovs/okd-os:$CIRRUS_BUILD_ID.

During the run the build updates Dockerfile.template replacing INITIAL_IMAGE with a pullspec of the build container. This dockerfile is used to build a final oscontainer image, which includes OKD specific manifests:

  • the setting to use community operator collection only
  • MachineConfigs which set cgroupsv1 kernel arguments on boot

In order to have them applied during machine-config phase these manifests are placed in /manifests and io.openshift.release.operator=true label is added.

okd-machine-os's People

Contributors

aleskandro avatar cgwalters avatar coverprice avatar dependabot[bot] avatar fortinj66 avatar ibotty avatar jaimemagiera avatar lorbuschris avatar mattpolson avatar openshift-ci[bot] avatar openshift-merge-bot[bot] avatar openshift-merge-robot avatar vrutkovs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

okd-machine-os's Issues

`99-okd-worker-disable-mitigations` disables intel pstate on bare metal

99-okd-worker-disable-mitigations.yaml is added to fix an issue on AWS m6 virtualized instances (according to commit message), this should not be applied on other machine types such as bare metal.

intel_pstate will be better managed by Node Tuning Operator.

Is there a work around to remove this on the existing OKD cluster? Deleting the machine config results it being recreated by the ClusterVersion.

Can there be a better way to machine specific patches?

Tracker to stop rebuilding FCOS

The README includes details on the diff between FCOS and OKD. Let's figure out how to address each of them without having to rebuild FCOS.

New overlay files don't appear in new cluster builds

As part of testing I have added several new overlays:

overlay.d/99okd/etc/systemd/system/ovsdb-server.service.d/99-okd-permission-fix.conf
overlay.d/99okd/etc/jef-test

These seem to get processed during the Dockerfile.ci build

'/src/overlay.d/99okd' -> './overrides/rootfs/overlay.d/99okd'
'/src/overlay.d/99okd/etc' -> './overrides/rootfs/overlay.d/99okd/etc'
'/src/overlay.d/99okd/etc/jef-test' -> './overrides/rootfs/overlay.d/99okd/etc/jef-test'
...
'/src/overlay.d/99okd/etc/systemd/system' -> './overrides/rootfs/overlay.d/99okd/etc/systemd/system'
'/src/overlay.d/99okd/etc/systemd/system/ovsdb-server.service.d' -> './overrides/rootfs/overlay.d/99okd/etc/systemd/system/ovsdb-server.service.d'
'/src/overlay.d/99okd/etc/systemd/system/ovsdb-server.service.d/99-okd-permission-fix.conf' -> './overrides/rootfs/overlay.d/99okd/etc/systemd/system/ovsdb-server.service.d/99-okd-permission-fix.conf'
...

but the files are not present in a new cluster build... I was able to delete files though so I know the image build ok...

stop referencing `machine-os-content`

AIUI current OKD is using machine-os-content as a way to find "the default OS image" - it's making it be a new format image.

I guess actually we could just do that for OCP/RHCOS too, i.e. do a hard cutover and just ship rhel-coreos-8 as a retagging. I'm not opposed to that. But it feels better to make a "clean cut" and have a new image in the new format, and crucially define a better way to find "the default OS image". Which could just be another new tag...like default-operating-system or something.

Anyways the bootstrap phase currently does

MACHINE_CONFIG_OSCONTENT=$(image_for machine-os-content)

and this will eventually break if we do openshift/machine-config-operator#3364

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.