From e7e7c96f5952a2c8027d9d2266af6b17eb361028 Mon Sep 17 00:00:00 2001 From: Javi Polo Date: Mon, 12 Aug 2024 06:45:09 -0400 Subject: [PATCH] Add customizations per cloud provider Signed-off-by: Javi Polo --- training/README.md | 17 +----- training/cloud/Containerfile | 8 +++ training/cloud/Makefile | 34 +++++++++++ training/cloud/README.md | 47 +++++++++++++++ training/cloud/aws/Makefile.env | 1 + training/cloud/aws/README.md | 34 +++++++++++ training/cloud/aws/cloud-setup.sh | 14 +++++ training/cloud/aws/config.toml | 4 ++ .../etc/X11/xorg.conf.d/00-keyboard.conf | 6 ++ .../cloud.cfg.d/00-rhel-default-user.cfg | 3 + training/cloud/aws/files/etc/locale.conf | 1 + training/cloud/aws/files/etc/localtime | 1 + .../nm-cloud-setup.service | 1 + .../cloud-config.service | 1 + .../cloud-final.service | 1 + .../cloud-init-local.service | 1 + .../cloud-init.service | 1 + ...able-sshd-keygen-if-cloud-init-active.conf | 7 +++ .../timers.target.wants/nm-cloud-setup.timer | 1 + training/cloud/aws/files/etc/vconsole.conf | 1 + .../usr/lib/bootc/install/05-cloud-kargs.toml | 2 + .../systemd/logind.conf.d/00-getty-fixes.conf | 3 + .../10-rh-enable-for-ec2.conf | 2 + training/cloud/azure/Makefile.env | 1 + training/cloud/azure/README.md | 60 +++++++++++++++++++ training/cloud/azure/cloud-setup.sh | 36 +++++++++++ training/cloud/azure/config.toml | 6 ++ .../etc/X11/xorg.conf.d/00-keyboard.conf | 6 ++ .../etc/cloud/cloud.cfg.d/10-azure-kvp.cfg | 6 ++ .../cloud/cloud.cfg.d/91-azure_datasource.cfg | 4 ++ training/cloud/azure/files/etc/locale.conf | 1 + training/cloud/azure/files/etc/localtime | 1 + .../etc/modprobe.d/blacklist-amdgpu.conf | 1 + .../etc/modprobe.d/blacklist-floppy.conf | 1 + .../modprobe.d/blacklist-intel-cstate.conf | 1 + .../etc/modprobe.d/blacklist-nouveau.conf | 2 + .../modprobe.d/blacklist-skylake-edac.conf | 1 + .../nm-cloud-setup.service | 1 + .../cloud-config.service | 1 + .../cloud-final.service | 1 + .../cloud-init-local.service | 1 + .../cloud-init.service | 1 + .../multi-user.target.wants/waagent.service | 1 + .../timers.target.wants/nm-cloud-setup.timer | 1 + .../rules.d/68-azure-sriov-nm-unmanaged.rules | 4 ++ training/cloud/azure/files/etc/vconsole.conf | 1 + .../usr/lib/bootc/install/05-cloud-kargs.toml | 5 ++ .../10-rh-enable-for-azure.conf | 2 + training/cloud/gcp/Makefile.env | 1 + training/cloud/gcp/README.md | 43 +++++++++++++ training/cloud/gcp/cloud-setup.sh | 52 ++++++++++++++++ training/cloud/gcp/config.toml | 4 ++ .../etc/X11/xorg.conf.d/00-keyboard.conf | 6 ++ .../files/etc/default/instance_configs.cfg | 3 + training/cloud/gcp/files/etc/locale.conf | 1 + training/cloud/gcp/files/etc/localtime | 1 + .../etc/modprobe.d/blacklist-floppy.conf | 1 + .../google-guest-agent.service | 1 + .../google-guest-agent.service | 1 + .../google-osconfig-agent.service | 1 + .../google-shutdown-scripts.service | 1 + .../google-startup-scripts.service | 1 + .../google-guest-agent.service | 1 + .../google-guest-agent.service | 1 + .../google-guest-agent.service | 1 + .../google-guest-agent.service | 1 + .../google-oslogin-cache.timer | 1 + training/cloud/gcp/files/etc/vconsole.conf | 1 + .../usr/lib/bootc/install/05-cloud-kargs.toml | 2 + 69 files changed, 446 insertions(+), 16 deletions(-) create mode 100644 training/cloud/Containerfile create mode 100644 training/cloud/Makefile create mode 100644 training/cloud/README.md create mode 100644 training/cloud/aws/Makefile.env create mode 100644 training/cloud/aws/README.md create mode 100755 training/cloud/aws/cloud-setup.sh create mode 100644 training/cloud/aws/config.toml create mode 100644 training/cloud/aws/files/etc/X11/xorg.conf.d/00-keyboard.conf create mode 100644 training/cloud/aws/files/etc/cloud/cloud.cfg.d/00-rhel-default-user.cfg create mode 100644 training/cloud/aws/files/etc/locale.conf create mode 120000 training/cloud/aws/files/etc/localtime create mode 120000 training/cloud/aws/files/etc/systemd/system/NetworkManager.service.wants/nm-cloud-setup.service create mode 120000 training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-config.service create mode 120000 training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-final.service create mode 120000 training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service create mode 120000 training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-init.service create mode 100644 training/cloud/aws/files/etc/systemd/system/sshd-keygen@.service.d/disable-sshd-keygen-if-cloud-init-active.conf create mode 120000 training/cloud/aws/files/etc/systemd/system/timers.target.wants/nm-cloud-setup.timer create mode 100644 training/cloud/aws/files/etc/vconsole.conf create mode 100644 training/cloud/aws/files/usr/lib/bootc/install/05-cloud-kargs.toml create mode 100644 training/cloud/aws/files/usr/lib/systemd/logind.conf.d/00-getty-fixes.conf create mode 100644 training/cloud/aws/files/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-ec2.conf create mode 100644 training/cloud/azure/Makefile.env create mode 100644 training/cloud/azure/README.md create mode 100755 training/cloud/azure/cloud-setup.sh create mode 100644 training/cloud/azure/config.toml create mode 100644 training/cloud/azure/files/etc/X11/xorg.conf.d/00-keyboard.conf create mode 100644 training/cloud/azure/files/etc/cloud/cloud.cfg.d/10-azure-kvp.cfg create mode 100644 training/cloud/azure/files/etc/cloud/cloud.cfg.d/91-azure_datasource.cfg create mode 100644 training/cloud/azure/files/etc/locale.conf create mode 120000 training/cloud/azure/files/etc/localtime create mode 100644 training/cloud/azure/files/etc/modprobe.d/blacklist-amdgpu.conf create mode 100644 training/cloud/azure/files/etc/modprobe.d/blacklist-floppy.conf create mode 100644 training/cloud/azure/files/etc/modprobe.d/blacklist-intel-cstate.conf create mode 100644 training/cloud/azure/files/etc/modprobe.d/blacklist-nouveau.conf create mode 100644 training/cloud/azure/files/etc/modprobe.d/blacklist-skylake-edac.conf create mode 120000 training/cloud/azure/files/etc/systemd/system/NetworkManager.service.wants/nm-cloud-setup.service create mode 120000 training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-config.service create mode 120000 training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-final.service create mode 120000 training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service create mode 120000 training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-init.service create mode 120000 training/cloud/azure/files/etc/systemd/system/multi-user.target.wants/waagent.service create mode 120000 training/cloud/azure/files/etc/systemd/system/timers.target.wants/nm-cloud-setup.timer create mode 100644 training/cloud/azure/files/etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules create mode 100644 training/cloud/azure/files/etc/vconsole.conf create mode 100644 training/cloud/azure/files/usr/lib/bootc/install/05-cloud-kargs.toml create mode 100644 training/cloud/azure/files/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-azure.conf create mode 100644 training/cloud/gcp/Makefile.env create mode 100644 training/cloud/gcp/README.md create mode 100755 training/cloud/gcp/cloud-setup.sh create mode 100644 training/cloud/gcp/config.toml create mode 100644 training/cloud/gcp/files/etc/X11/xorg.conf.d/00-keyboard.conf create mode 100644 training/cloud/gcp/files/etc/default/instance_configs.cfg create mode 100644 training/cloud/gcp/files/etc/locale.conf create mode 120000 training/cloud/gcp/files/etc/localtime create mode 100644 training/cloud/gcp/files/etc/modprobe.d/blacklist-floppy.conf create mode 120000 training/cloud/gcp/files/etc/systemd/system/NetworkManager.service.wants/google-guest-agent.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-guest-agent.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-osconfig-agent.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-shutdown-scripts.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-startup-scripts.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/network.service.wants/google-guest-agent.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/networking.service.wants/google-guest-agent.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/sshd.service.wants/google-guest-agent.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/systemd-networkd.service.wants/google-guest-agent.service create mode 120000 training/cloud/gcp/files/etc/systemd/system/timers.target.wants/google-oslogin-cache.timer create mode 100644 training/cloud/gcp/files/etc/vconsole.conf create mode 100644 training/cloud/gcp/files/usr/lib/bootc/install/05-cloud-kargs.toml diff --git a/training/README.md b/training/README.md index 97e409e0..1ad9498f 100644 --- a/training/README.md +++ b/training/README.md @@ -9,9 +9,6 @@ In order to run accelerated AI workloads, we've prepared [bootc](https://github. |-----------------|---------------------------------------------------------------------| | amd | Create bootable container for AMD platform | | deepspeed | DeepSpeed container for optimization deep learning | -| cloud-amd | Add cloud-init to bootable container for AMD platform | -| cloud-intel | Add cloud-init to bootable container for Intel platform | -| cloud-nvidia | Add cloud-init to bootable container for Nvidia platform | | disk-amd | Create disk image from bootable container for AMD platform | | disk-intel | Create disk image from bootable container for Intel platform | | disk-nvidia | Create disk image from bootable container for Nvidia platform | @@ -86,18 +83,6 @@ Of course, the other Makefile variables are still available, so the following is make nvidia REGISTRY=myregistry.com REGISTRY_ORG=ai-training IMAGE_NAME=nvidia IMAGE_TAG=v1 FROM=registry.redhat.io/rhel9/rhel-bootc:9.4 ``` -# How to build Cloud ready images - -Bootc container images can be installed on physical machines, virtual machines and in the cloud. Often it is useful to add the cloud-init package when running the operating systems in the cloud. - -To add cloud-init to your existing bootc container image, executing `make cloud-` should be enough. For example to build the `cloud-nvidia`, `cloud-amd` and `cloud-intel` bootc containers, respectively: - -``` -make cloud-nvidia -make cloud-amd -make cloud-intel -``` - # How to build disk images bootc-image-builder produces disk images using a bootable container as input. Disk images can be used to directly provision a host The process will write the disk image in -bootc/build @@ -110,7 +95,7 @@ make disk-nvidia ``` or ``` -make disk-nvidia DISK_TYPE=ami BOOTC_IMAGE=quay.io/ai-lab/nvidia-bootc-cloud:latest +make disk-nvidia DISK_TYPE=ami BOOTC_IMAGE=quay.io/ai-lab/nvidia-bootc-custom:latest ``` In addition to the variables common to all targets, a few extra can be defined to customize disk image creation diff --git a/training/cloud/Containerfile b/training/cloud/Containerfile new file mode 100644 index 00000000..ee5b6c92 --- /dev/null +++ b/training/cloud/Containerfile @@ -0,0 +1,8 @@ +ARG BASEIMAGE=quay.io/ai-labs/bootc-nvidia:latest +FROM ${BASEIMAGE} + +ARG CLOUD + +COPY $CLOUD/cloud-setup.sh /tmp +RUN /tmp/cloud-setup.sh && rm -f /tmp/cloud-setup.sh +COPY $CLOUD/files/ / diff --git a/training/cloud/Makefile b/training/cloud/Makefile new file mode 100644 index 00000000..4c416937 --- /dev/null +++ b/training/cloud/Makefile @@ -0,0 +1,34 @@ +CLOUD ?= +VERSION ?= 1.1 +HARDWARE ?= nvidia +REGISTRY ?= quay.io +REGISTRY_ORG ?= ai-lab +IMAGE_NAME ?= bootc-${HARDWARE}-rhel9-${CLOUD} +IMAGE_TAG ?= ${VERSION} +CONTAINER_TOOL ?= podman +CONTAINER_TOOL_EXTRA_ARGS ?= + +BOOTC_IMAGE_CLOUD ?= ${REGISTRY}/${REGISTRY_ORG}/${IMAGE_NAME}:${IMAGE_TAG} + +default: help + +-include $(CLOUD)/Makefile.env + +cloud-image: ## Create bootc image for a cloud, using stable RHEL AI as base + "${CONTAINER_TOOL}" build \ + $(BASEIMAGE:%=--build-arg BASEIMAGE=%) \ + $(CLOUD:%=--build-arg CLOUD=%) \ + ${CONTAINER_TOOL_EXTRA_ARGS} \ + --tag ${BOOTC_IMAGE_CLOUD} \ + --file Containerfile \ + . + +cloud-disk: ## Create disk image for a cloud, using the image built with cloud-image target + make -f ../common/Makefile.common bootc-image-builder \ + BOOTC_IMAGE=${BOOTC_IMAGE_CLOUD} \ + DISK_TYPE=${DISK_TYPE} \ + IMAGE_BUILDER_CONFIG=$(abspath $(CLOUD))/config.toml + +help: ## Shows this message. + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(shell echo "$(MAKEFILE_LIST) " | tac -s' ') | perl -pe 's/^.*Makefile.*?://g' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + diff --git a/training/cloud/README.md b/training/cloud/README.md new file mode 100644 index 00000000..9d65a3ec --- /dev/null +++ b/training/cloud/README.md @@ -0,0 +1,47 @@ +Customizing RHEL AI for the different cloud providers +=== + +In order to create images for the different cloud providers, we need to add some extra packages and configuration, and create special disk images + +Please refer to the official RHEL AI documentation on how to create machine images for different clouds. + +# Makefile targets + +| Target | Description | +|-----------------|-----------------------------------------------------------------------| +| cloud-image | Create bootc image for a cloud, using stable RHEL AI as base | +| cloud-disk | Create disk image for a cloud, using the image built with cloud-image | + +# Makefile variables + +| Variable | Description | Default | +|---------------------------|-------------------------------------------------|--------------------------------------------------------------| +| CLOUD | Sets the name of the cloud: aws, gcp, azure, ...| ` ` | +| HARDWARE | Hardware accelerator RHEL AI source image | `nvidia` | +| VERSION | RHEL AI version | `1.1` | +| REGISTRY | Container Registry for storing container images | `quay.io` | +| REGISTRY_ORG | Container Registry organization | `ai-lab` | +| IMAGE_NAME | Container image name | `bootc-${HARDWARE}-rhel9-${CLOUD}` | +| IMAGE_TAG | Container image tag | `${CLOUD}-latest` | +| CONTAINER_TOOL | Container tool used for build | `podman` | +| CONTAINER_TOOL_EXTRA_ARGS | Container tool extra arguments | ` ` | +| BASEIMAGE | Source RHEL AI image | `registry.stage.redhat.io/rhelai1/bootc-nvidia-rhel9:latest` | +| BOOTC_IMAGE_CLOUD | Override cloud image name | `${REGISTRY}/${REGISTRY_ORG}/${IMAGE_NAME}:${IMAGE_TAG}` | + + +# Example on how to build your own AI Bootc disk image + +Simply execute `make cloud-image CLOUD= BASEIMAGE=`. For example: + +* make cloud-image CLOUD=azure BASEIMAGE=quay.io/ai-lab/nvidia-bootc:1.1 +* make cloud-image CLOUD=gcp BASEIMAGE=quay.io/ai-lab/nvidia-bootc:1.1 + +Once you have the bootc image, you can use it to create a disk image. +Simply execute `make cloud-disk CLOUD=`. For example: + +* make cloud-disk CLOUD=azure +* make cloud-disk CLOUD=gcp + + +This will produce an image in the `build/output` directory. +Then, you can follow RHEL AI documentation on how to create a machine image in your cloud provider. diff --git a/training/cloud/aws/Makefile.env b/training/cloud/aws/Makefile.env new file mode 100644 index 00000000..2a20bb8d --- /dev/null +++ b/training/cloud/aws/Makefile.env @@ -0,0 +1 @@ +DISK_TYPE=ami diff --git a/training/cloud/aws/README.md b/training/cloud/aws/README.md new file mode 100644 index 00000000..66630a3c --- /dev/null +++ b/training/cloud/aws/README.md @@ -0,0 +1,34 @@ +# Amazon Web Services modifications for RHEL AI +Trying to mimic as much as possible the [changes on RHEL for AWS](https://github.com/osbuild/images/blob/main/pkg/distro/rhel/rhel9/ami.go) + +## Changes + +- Extra kernel parameters + +``` +console=ttyS0,115200n8 net.ifnames=0 nvme_core.io_timeout=4294967295 +``` + +- Timezone: UTC +- Chrony configuration: + - Change server + - LeapsecTz +- Locale: en_US.UTF-8 +- Keymap: us +- X11 layout: us + +- Getty configuration + - NautoVTs false + +- Cloud init default user: `ec2-user` + +- Packages + - @core metapackage + - authselect-compat + - langpacks-en + - tuned + +- Services + - nm-cloud-setup.service + - nm-cloud-setup.timer + - tuned diff --git a/training/cloud/aws/cloud-setup.sh b/training/cloud/aws/cloud-setup.sh new file mode 100755 index 00000000..53b8438e --- /dev/null +++ b/training/cloud/aws/cloud-setup.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +dnf install -y --nobest \ + cloud-init \ + langpacks-en \ + tuned + +# Chrony configuration +sed -i \ + -e '/^pool /c\server 169.254.169.123 prefer iburst minpoll 4 maxpoll 4' \ + -e '/^leapsectz /d' \ + /etc/chrony.conf diff --git a/training/cloud/aws/config.toml b/training/cloud/aws/config.toml new file mode 100644 index 00000000..8c0379da --- /dev/null +++ b/training/cloud/aws/config.toml @@ -0,0 +1,4 @@ +[customizations.kernel] +name = "customizations-for-aws" +append = "console=ttyS0,115200n8 net.ifnames=0 nvme_core.io_timeout=4294967295" + diff --git a/training/cloud/aws/files/etc/X11/xorg.conf.d/00-keyboard.conf b/training/cloud/aws/files/etc/X11/xorg.conf.d/00-keyboard.conf new file mode 100644 index 00000000..c5fe1721 --- /dev/null +++ b/training/cloud/aws/files/etc/X11/xorg.conf.d/00-keyboard.conf @@ -0,0 +1,6 @@ +# Do not edit manually, use localectl(1). +Section "InputClass" + Identifier "system-keyboard" + MatchIsKeyboard "on" + Option "XkbLayout" "us" +EndSection diff --git a/training/cloud/aws/files/etc/cloud/cloud.cfg.d/00-rhel-default-user.cfg b/training/cloud/aws/files/etc/cloud/cloud.cfg.d/00-rhel-default-user.cfg new file mode 100644 index 00000000..996064ce --- /dev/null +++ b/training/cloud/aws/files/etc/cloud/cloud.cfg.d/00-rhel-default-user.cfg @@ -0,0 +1,3 @@ +system_info: + default_user: + name: ec2-user diff --git a/training/cloud/aws/files/etc/locale.conf b/training/cloud/aws/files/etc/locale.conf new file mode 100644 index 00000000..01ec548f --- /dev/null +++ b/training/cloud/aws/files/etc/locale.conf @@ -0,0 +1 @@ +LANG=en_US.UTF-8 diff --git a/training/cloud/aws/files/etc/localtime b/training/cloud/aws/files/etc/localtime new file mode 120000 index 00000000..bfb22a5d --- /dev/null +++ b/training/cloud/aws/files/etc/localtime @@ -0,0 +1 @@ +../usr/share/zoneinfo/UTC \ No newline at end of file diff --git a/training/cloud/aws/files/etc/systemd/system/NetworkManager.service.wants/nm-cloud-setup.service b/training/cloud/aws/files/etc/systemd/system/NetworkManager.service.wants/nm-cloud-setup.service new file mode 120000 index 00000000..e17b7d4c --- /dev/null +++ b/training/cloud/aws/files/etc/systemd/system/NetworkManager.service.wants/nm-cloud-setup.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/nm-cloud-setup.service \ No newline at end of file diff --git a/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-config.service b/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-config.service new file mode 120000 index 00000000..ebc50f0c --- /dev/null +++ b/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-config.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-config.service \ No newline at end of file diff --git a/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-final.service b/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-final.service new file mode 120000 index 00000000..80fa3c82 --- /dev/null +++ b/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-final.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-final.service \ No newline at end of file diff --git a/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service b/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service new file mode 120000 index 00000000..dd8e9f1c --- /dev/null +++ b/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-init-local.service \ No newline at end of file diff --git a/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-init.service b/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-init.service new file mode 120000 index 00000000..24c7a26f --- /dev/null +++ b/training/cloud/aws/files/etc/systemd/system/cloud-init.target.wants/cloud-init.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-init.service \ No newline at end of file diff --git a/training/cloud/aws/files/etc/systemd/system/sshd-keygen@.service.d/disable-sshd-keygen-if-cloud-init-active.conf b/training/cloud/aws/files/etc/systemd/system/sshd-keygen@.service.d/disable-sshd-keygen-if-cloud-init-active.conf new file mode 100644 index 00000000..1a5d7a5a --- /dev/null +++ b/training/cloud/aws/files/etc/systemd/system/sshd-keygen@.service.d/disable-sshd-keygen-if-cloud-init-active.conf @@ -0,0 +1,7 @@ +# In some cloud-init enabled images the sshd-keygen template service may race +# with cloud-init during boot causing issues with host key generation. This +# drop-in config adds a condition to sshd-keygen@.service if it exists and +# prevents the sshd-keygen units from running *if* cloud-init is going to run. +# +[Unit] +ConditionPathExists=!/run/systemd/generator.early/multi-user.target.wants/cloud-init.target diff --git a/training/cloud/aws/files/etc/systemd/system/timers.target.wants/nm-cloud-setup.timer b/training/cloud/aws/files/etc/systemd/system/timers.target.wants/nm-cloud-setup.timer new file mode 120000 index 00000000..e88457e3 --- /dev/null +++ b/training/cloud/aws/files/etc/systemd/system/timers.target.wants/nm-cloud-setup.timer @@ -0,0 +1 @@ +/usr/lib/systemd/system/nm-cloud-setup.timer \ No newline at end of file diff --git a/training/cloud/aws/files/etc/vconsole.conf b/training/cloud/aws/files/etc/vconsole.conf new file mode 100644 index 00000000..12b81a1b --- /dev/null +++ b/training/cloud/aws/files/etc/vconsole.conf @@ -0,0 +1 @@ +KEYMAP=us diff --git a/training/cloud/aws/files/usr/lib/bootc/install/05-cloud-kargs.toml b/training/cloud/aws/files/usr/lib/bootc/install/05-cloud-kargs.toml new file mode 100644 index 00000000..7f1b54ee --- /dev/null +++ b/training/cloud/aws/files/usr/lib/bootc/install/05-cloud-kargs.toml @@ -0,0 +1,2 @@ +[install] +kargs = ["console=tty0", "console=ttyS0,115200n8", "net.ifnames=0", "nvme_core.io_timeout=4294967295"] diff --git a/training/cloud/aws/files/usr/lib/systemd/logind.conf.d/00-getty-fixes.conf b/training/cloud/aws/files/usr/lib/systemd/logind.conf.d/00-getty-fixes.conf new file mode 100644 index 00000000..7758eb2a --- /dev/null +++ b/training/cloud/aws/files/usr/lib/systemd/logind.conf.d/00-getty-fixes.conf @@ -0,0 +1,3 @@ +[Login] +NAutoVTs=0 + diff --git a/training/cloud/aws/files/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-ec2.conf b/training/cloud/aws/files/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-ec2.conf new file mode 100644 index 00000000..0eb38219 --- /dev/null +++ b/training/cloud/aws/files/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-ec2.conf @@ -0,0 +1,2 @@ +[Service] +Environment="NM_CLOUD_SETUP_EC2=yes" diff --git a/training/cloud/azure/Makefile.env b/training/cloud/azure/Makefile.env new file mode 100644 index 00000000..5f7f07c9 --- /dev/null +++ b/training/cloud/azure/Makefile.env @@ -0,0 +1 @@ +DISK_TYPE=raw diff --git a/training/cloud/azure/README.md b/training/cloud/azure/README.md new file mode 100644 index 00000000..f159c3cc --- /dev/null +++ b/training/cloud/azure/README.md @@ -0,0 +1,60 @@ +# Azure for RHEL AI +Trying to mimic as much as possible the [changes on RHEL for Azure](https://github.com/osbuild/images/blob/main/pkg/distro/rhel/rhel9/azure.go) + +# Summary +- Extra kernel parameters + +Even if in the link [Kernel Parameters on RHEL for Azure](https://github.com/osbuild/images/blob/a4ae81dc3eed3e86c359635e3135fc8a07f411dd/pkg/distro/rhel/rhel9/azure.go#L454) we see other changes, when running a RHEL instance in Azure, the extra kernel parameters are others, so we will take those as our reference +``` +loglevel=3 console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 net.ifnames=0 cloud-init=disabled +``` + +Note that we also disable cloud-init via kernel parameter + +- Timezone: UTC +- Locale: en_US.UTF-8 +- Keymap: us +- X11 layout: us + +- sshd config + - ClientAliveInterval: 180 + +- Packages + - hyperv-daemons + - langpacks-en + - NetworkManager-cloud-setup + - nvme-cli + - patch + - rng-tools + - uuid + - WALinuxAgent + +- Services + - nm-cloud-setup.service + - nm-cloud-setup.timer + - waagent + +- Systemd + - nm-cloud-setup.service: `Environment=NM_CLOUD_SETUP_AZURE=yes` + +- Kernel Modules + - blacklist amdgpu + - blacklist intel_cstate + - blacklist floppy + - blacklist nouveau + - blacklist lbm-nouveau + - blacklist skx_edac + +- Cloud Init + - 10-azure-kvp.cfg + - 91-azure_datasource.cfg + +- PwQuality + - /etc/security/pwquality.conf + +- WaAgentConfig + - RDFormat false + - RDEnableSwap false + +- udev rules + - /etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules diff --git a/training/cloud/azure/cloud-setup.sh b/training/cloud/azure/cloud-setup.sh new file mode 100755 index 00000000..8404941e --- /dev/null +++ b/training/cloud/azure/cloud-setup.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +set -o errexit + +dnf install -y --nobest \ + cloud-init \ + hyperv-daemons \ + langpacks-en \ + NetworkManager-cloud-setup \ + nvme-cli \ + patch \ + rng-tools \ + uuid \ + WALinuxAgent + +# sshd configuration +cat << EOF >> /etc/ssh/sshd_config +ClientAliveInterval 180 +EOF + +# pwquality configuration +cat << EOF >> /etc/security/pwquality.conf +minlen = 6 +dcredit = 0 +ucredit = 0 +lcredit = 0 +ocredit = 0 +minclass = 3 +EOF + +# WAAgent configuration +sed -i \ + -e '/^ResourceDisk.Format=y/c\ResourceDisk.Format=n' \ + -e '/^ResourceDisk.EnableSwap=y/c\ResourceDisk.EnableSwap=n' \ + -e '/^Provisioning.RegenerateSshHostKeyPair=y/c\Provisioning.RegenerateSshHostKeyPair=n' \ + /etc/waagent.conf diff --git a/training/cloud/azure/config.toml b/training/cloud/azure/config.toml new file mode 100644 index 00000000..dabf9cda --- /dev/null +++ b/training/cloud/azure/config.toml @@ -0,0 +1,6 @@ +[customizations.kernel] +name = "customizations-for-azure" +# This is suggested by https://github.com/osbuild/images/blob/a4ae81dc3eed3e86c359635e3135fc8a07f411dd/pkg/distro/rhel/rhel9/azure.go#L454 +# append = "ro loglevel=3 console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300" +# However, starting a RHEL instance in azure shows this one, and I'll be using it +append = "loglevel=3 console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 net.ifnames=0" diff --git a/training/cloud/azure/files/etc/X11/xorg.conf.d/00-keyboard.conf b/training/cloud/azure/files/etc/X11/xorg.conf.d/00-keyboard.conf new file mode 100644 index 00000000..c5fe1721 --- /dev/null +++ b/training/cloud/azure/files/etc/X11/xorg.conf.d/00-keyboard.conf @@ -0,0 +1,6 @@ +# Do not edit manually, use localectl(1). +Section "InputClass" + Identifier "system-keyboard" + MatchIsKeyboard "on" + Option "XkbLayout" "us" +EndSection diff --git a/training/cloud/azure/files/etc/cloud/cloud.cfg.d/10-azure-kvp.cfg b/training/cloud/azure/files/etc/cloud/cloud.cfg.d/10-azure-kvp.cfg new file mode 100644 index 00000000..cbc0f747 --- /dev/null +++ b/training/cloud/azure/files/etc/cloud/cloud.cfg.d/10-azure-kvp.cfg @@ -0,0 +1,6 @@ +# This configuration file is used to enable logging to Hyper-V kvp +reporting: + logging: + type: log + telemetry: + type: hyperv diff --git a/training/cloud/azure/files/etc/cloud/cloud.cfg.d/91-azure_datasource.cfg b/training/cloud/azure/files/etc/cloud/cloud.cfg.d/91-azure_datasource.cfg new file mode 100644 index 00000000..39b3c693 --- /dev/null +++ b/training/cloud/azure/files/etc/cloud/cloud.cfg.d/91-azure_datasource.cfg @@ -0,0 +1,4 @@ +datasource_list: [ Azure ] +datasource: + Azure: + apply_network_config: False diff --git a/training/cloud/azure/files/etc/locale.conf b/training/cloud/azure/files/etc/locale.conf new file mode 100644 index 00000000..01ec548f --- /dev/null +++ b/training/cloud/azure/files/etc/locale.conf @@ -0,0 +1 @@ +LANG=en_US.UTF-8 diff --git a/training/cloud/azure/files/etc/localtime b/training/cloud/azure/files/etc/localtime new file mode 120000 index 00000000..bfb22a5d --- /dev/null +++ b/training/cloud/azure/files/etc/localtime @@ -0,0 +1 @@ +../usr/share/zoneinfo/UTC \ No newline at end of file diff --git a/training/cloud/azure/files/etc/modprobe.d/blacklist-amdgpu.conf b/training/cloud/azure/files/etc/modprobe.d/blacklist-amdgpu.conf new file mode 100644 index 00000000..fda53f20 --- /dev/null +++ b/training/cloud/azure/files/etc/modprobe.d/blacklist-amdgpu.conf @@ -0,0 +1 @@ +blacklist amdgpu diff --git a/training/cloud/azure/files/etc/modprobe.d/blacklist-floppy.conf b/training/cloud/azure/files/etc/modprobe.d/blacklist-floppy.conf new file mode 100644 index 00000000..81e9704e --- /dev/null +++ b/training/cloud/azure/files/etc/modprobe.d/blacklist-floppy.conf @@ -0,0 +1 @@ +blacklist floppy diff --git a/training/cloud/azure/files/etc/modprobe.d/blacklist-intel-cstate.conf b/training/cloud/azure/files/etc/modprobe.d/blacklist-intel-cstate.conf new file mode 100644 index 00000000..4bbfb046 --- /dev/null +++ b/training/cloud/azure/files/etc/modprobe.d/blacklist-intel-cstate.conf @@ -0,0 +1 @@ +blacklist intel_cstate diff --git a/training/cloud/azure/files/etc/modprobe.d/blacklist-nouveau.conf b/training/cloud/azure/files/etc/modprobe.d/blacklist-nouveau.conf new file mode 100644 index 00000000..3a21cfef --- /dev/null +++ b/training/cloud/azure/files/etc/modprobe.d/blacklist-nouveau.conf @@ -0,0 +1,2 @@ +blacklist nouveau +blacklist lbm-nouveau diff --git a/training/cloud/azure/files/etc/modprobe.d/blacklist-skylake-edac.conf b/training/cloud/azure/files/etc/modprobe.d/blacklist-skylake-edac.conf new file mode 100644 index 00000000..7a8bdda3 --- /dev/null +++ b/training/cloud/azure/files/etc/modprobe.d/blacklist-skylake-edac.conf @@ -0,0 +1 @@ +blacklist skx_edac diff --git a/training/cloud/azure/files/etc/systemd/system/NetworkManager.service.wants/nm-cloud-setup.service b/training/cloud/azure/files/etc/systemd/system/NetworkManager.service.wants/nm-cloud-setup.service new file mode 120000 index 00000000..e17b7d4c --- /dev/null +++ b/training/cloud/azure/files/etc/systemd/system/NetworkManager.service.wants/nm-cloud-setup.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/nm-cloud-setup.service \ No newline at end of file diff --git a/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-config.service b/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-config.service new file mode 120000 index 00000000..ebc50f0c --- /dev/null +++ b/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-config.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-config.service \ No newline at end of file diff --git a/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-final.service b/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-final.service new file mode 120000 index 00000000..80fa3c82 --- /dev/null +++ b/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-final.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-final.service \ No newline at end of file diff --git a/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service b/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service new file mode 120000 index 00000000..dd8e9f1c --- /dev/null +++ b/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-init-local.service \ No newline at end of file diff --git a/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-init.service b/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-init.service new file mode 120000 index 00000000..24c7a26f --- /dev/null +++ b/training/cloud/azure/files/etc/systemd/system/cloud-init.target.wants/cloud-init.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-init.service \ No newline at end of file diff --git a/training/cloud/azure/files/etc/systemd/system/multi-user.target.wants/waagent.service b/training/cloud/azure/files/etc/systemd/system/multi-user.target.wants/waagent.service new file mode 120000 index 00000000..17c38902 --- /dev/null +++ b/training/cloud/azure/files/etc/systemd/system/multi-user.target.wants/waagent.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/waagent.service \ No newline at end of file diff --git a/training/cloud/azure/files/etc/systemd/system/timers.target.wants/nm-cloud-setup.timer b/training/cloud/azure/files/etc/systemd/system/timers.target.wants/nm-cloud-setup.timer new file mode 120000 index 00000000..e88457e3 --- /dev/null +++ b/training/cloud/azure/files/etc/systemd/system/timers.target.wants/nm-cloud-setup.timer @@ -0,0 +1 @@ +/usr/lib/systemd/system/nm-cloud-setup.timer \ No newline at end of file diff --git a/training/cloud/azure/files/etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules b/training/cloud/azure/files/etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules new file mode 100644 index 00000000..59cf73bb --- /dev/null +++ b/training/cloud/azure/files/etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules @@ -0,0 +1,4 @@ +# Accelerated Networking on Azure exposes a new SRIOV interface to the VM. +# This interface is transparently bonded to the synthetic interface, +# so NetworkManager should just ignore any SRIOV interfaces. +SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION=="add", ENV{NM_UNMANAGED}="1" diff --git a/training/cloud/azure/files/etc/vconsole.conf b/training/cloud/azure/files/etc/vconsole.conf new file mode 100644 index 00000000..12b81a1b --- /dev/null +++ b/training/cloud/azure/files/etc/vconsole.conf @@ -0,0 +1 @@ +KEYMAP=us diff --git a/training/cloud/azure/files/usr/lib/bootc/install/05-cloud-kargs.toml b/training/cloud/azure/files/usr/lib/bootc/install/05-cloud-kargs.toml new file mode 100644 index 00000000..d221eaac --- /dev/null +++ b/training/cloud/azure/files/usr/lib/bootc/install/05-cloud-kargs.toml @@ -0,0 +1,5 @@ +[install] +# This is suggested by https://github.com/osbuild/images/blob/a4ae81dc3eed3e86c359635e3135fc8a07f411dd/pkg/distro/rhel/rhel9/azure.go#L454 +# kargs = ["ro", "loglevel=3", "console=tty1", "console=ttyS0", "earlyprintk=ttyS0", "rootdelay=300"] +# However, starting a RHEL instance in azure shows this one, and I'll be using it +kargs = ["loglevel=3", "console=tty1", "console=ttyS0,115200n8", "earlyprintk=ttyS0,115200", "net.ifnames=0"] diff --git a/training/cloud/azure/files/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-azure.conf b/training/cloud/azure/files/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-azure.conf new file mode 100644 index 00000000..2cb23781 --- /dev/null +++ b/training/cloud/azure/files/usr/lib/systemd/system/nm-cloud-setup.service.d/10-rh-enable-for-azure.conf @@ -0,0 +1,2 @@ +[Service] +Environment="NM_CLOUD_SETUP_AZURE=yes" diff --git a/training/cloud/gcp/Makefile.env b/training/cloud/gcp/Makefile.env new file mode 100644 index 00000000..5f7f07c9 --- /dev/null +++ b/training/cloud/gcp/Makefile.env @@ -0,0 +1 @@ +DISK_TYPE=raw diff --git a/training/cloud/gcp/README.md b/training/cloud/gcp/README.md new file mode 100644 index 00000000..813e975b --- /dev/null +++ b/training/cloud/gcp/README.md @@ -0,0 +1,43 @@ +# Google Cloud Platform modifications for RHEL AI +Trying to mimic as much as possible the [changes on RHEL for GCP](https://github.com/osbuild/images/blob/main/pkg/distro/rhel/rhel9/gce.go) + +## Changes + +- Extra kernel parameters + +``` +net.ifnames=0 biosdevname=0 scsi_mod.use_blk_mq=Y console=ttyS0,38400n8d +``` + +- Timezone: UTC +- Chrony configuration: + - Change server +- Locale: en_US.UTF-8 +- Keymap: us +- X11 layout: us + +- sshd config + - PasswordAuthentication: false + - ClientAliveInterval: 420 + - PermitRootLogin: No + +- Modules + - blacklist floppy + +- GCPGuestAgentConfig + - SetBotoConfig: false + +- Packages + - langpacks-en + - acpid + - rng-tools + - vim + - google-compute-engine + - google-osconfig-agent + - gce-disk-expand + - timedatex + - tuned + +- Remove Packages + - irqbalance + - microcode_ctl diff --git a/training/cloud/gcp/cloud-setup.sh b/training/cloud/gcp/cloud-setup.sh new file mode 100755 index 00000000..a13d9bae --- /dev/null +++ b/training/cloud/gcp/cloud-setup.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +set -o errexit + +eval $(grep VERSION_ID /etc/os-release) +tee /etc/yum.repos.d/google-cloud.repo << EOF +[google-compute-engine] +name=Google Compute Engine +baseurl=https://packages.cloud.google.com/yum/repos/google-compute-engine-el${VERSION_ID/.*}-x86_64-stable +enabled=1 +gpgcheck=1 +repo_gpgcheck=0 +gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg + https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg +EOF + +dnf install -y --nobest \ + acpid \ + cloud-init \ + google-compute-engine \ + google-osconfig-agent \ + langpacks-en \ + langpacks-en \ + rng-tools \ + timedatex \ + tuned \ + tuned \ + vim + +# rpm-state is needed to remove microcode_ctl +mkdir /var/lib/rpm-state +dnf remove -y \ + irqbalance \ + microcode_ctl +rmdir /var/lib/rpm-state + +rm -f /etc/yum.repos.d/google-cloud.repo + +# dnf install -y google-guest-agent +# systemctl enable google-guest-agent + +# Chrony configuration +sed -i \ + -e '/^pool /c\server metadata.google.internal iburst' \ + /etc/chrony.conf + +# sshd configuration +cat << EOF >> /etc/ssh/sshd_config +PermitRootLogin no +PasswordAuthentication no +ClientAliveInterval 420 +EOF diff --git a/training/cloud/gcp/config.toml b/training/cloud/gcp/config.toml new file mode 100644 index 00000000..fb1a1581 --- /dev/null +++ b/training/cloud/gcp/config.toml @@ -0,0 +1,4 @@ +[customizations.kernel] +name = "customizations-for-gcp" +append = "net.ifnames=0 biosdevname=0 scsi_mod.use_blk_mq=Y console=ttyS0,38400n8d cloud-init=disabled" + diff --git a/training/cloud/gcp/files/etc/X11/xorg.conf.d/00-keyboard.conf b/training/cloud/gcp/files/etc/X11/xorg.conf.d/00-keyboard.conf new file mode 100644 index 00000000..c5fe1721 --- /dev/null +++ b/training/cloud/gcp/files/etc/X11/xorg.conf.d/00-keyboard.conf @@ -0,0 +1,6 @@ +# Do not edit manually, use localectl(1). +Section "InputClass" + Identifier "system-keyboard" + MatchIsKeyboard "on" + Option "XkbLayout" "us" +EndSection diff --git a/training/cloud/gcp/files/etc/default/instance_configs.cfg b/training/cloud/gcp/files/etc/default/instance_configs.cfg new file mode 100644 index 00000000..cf3b1586 --- /dev/null +++ b/training/cloud/gcp/files/etc/default/instance_configs.cfg @@ -0,0 +1,3 @@ +# Disable boto plugin setup. +[InstanceSetup] +set_boto_config = false diff --git a/training/cloud/gcp/files/etc/locale.conf b/training/cloud/gcp/files/etc/locale.conf new file mode 100644 index 00000000..01ec548f --- /dev/null +++ b/training/cloud/gcp/files/etc/locale.conf @@ -0,0 +1 @@ +LANG=en_US.UTF-8 diff --git a/training/cloud/gcp/files/etc/localtime b/training/cloud/gcp/files/etc/localtime new file mode 120000 index 00000000..bfb22a5d --- /dev/null +++ b/training/cloud/gcp/files/etc/localtime @@ -0,0 +1 @@ +../usr/share/zoneinfo/UTC \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/modprobe.d/blacklist-floppy.conf b/training/cloud/gcp/files/etc/modprobe.d/blacklist-floppy.conf new file mode 100644 index 00000000..81e9704e --- /dev/null +++ b/training/cloud/gcp/files/etc/modprobe.d/blacklist-floppy.conf @@ -0,0 +1 @@ +blacklist floppy diff --git a/training/cloud/gcp/files/etc/systemd/system/NetworkManager.service.wants/google-guest-agent.service b/training/cloud/gcp/files/etc/systemd/system/NetworkManager.service.wants/google-guest-agent.service new file mode 120000 index 00000000..7c9bfe75 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/NetworkManager.service.wants/google-guest-agent.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-guest-agent.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-guest-agent.service b/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-guest-agent.service new file mode 120000 index 00000000..7c9bfe75 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-guest-agent.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-guest-agent.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-osconfig-agent.service b/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-osconfig-agent.service new file mode 120000 index 00000000..7f0a4ab6 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-osconfig-agent.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-osconfig-agent.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-shutdown-scripts.service b/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-shutdown-scripts.service new file mode 120000 index 00000000..fdb00525 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-shutdown-scripts.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-shutdown-scripts.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-startup-scripts.service b/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-startup-scripts.service new file mode 120000 index 00000000..d2d05f41 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/multi-user.target.wants/google-startup-scripts.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-startup-scripts.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/network.service.wants/google-guest-agent.service b/training/cloud/gcp/files/etc/systemd/system/network.service.wants/google-guest-agent.service new file mode 120000 index 00000000..7c9bfe75 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/network.service.wants/google-guest-agent.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-guest-agent.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/networking.service.wants/google-guest-agent.service b/training/cloud/gcp/files/etc/systemd/system/networking.service.wants/google-guest-agent.service new file mode 120000 index 00000000..7c9bfe75 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/networking.service.wants/google-guest-agent.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-guest-agent.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/sshd.service.wants/google-guest-agent.service b/training/cloud/gcp/files/etc/systemd/system/sshd.service.wants/google-guest-agent.service new file mode 120000 index 00000000..7c9bfe75 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/sshd.service.wants/google-guest-agent.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-guest-agent.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/systemd-networkd.service.wants/google-guest-agent.service b/training/cloud/gcp/files/etc/systemd/system/systemd-networkd.service.wants/google-guest-agent.service new file mode 120000 index 00000000..7c9bfe75 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/systemd-networkd.service.wants/google-guest-agent.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-guest-agent.service \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/systemd/system/timers.target.wants/google-oslogin-cache.timer b/training/cloud/gcp/files/etc/systemd/system/timers.target.wants/google-oslogin-cache.timer new file mode 120000 index 00000000..61b05030 --- /dev/null +++ b/training/cloud/gcp/files/etc/systemd/system/timers.target.wants/google-oslogin-cache.timer @@ -0,0 +1 @@ +/usr/lib/systemd/system/google-oslogin-cache.timer \ No newline at end of file diff --git a/training/cloud/gcp/files/etc/vconsole.conf b/training/cloud/gcp/files/etc/vconsole.conf new file mode 100644 index 00000000..12b81a1b --- /dev/null +++ b/training/cloud/gcp/files/etc/vconsole.conf @@ -0,0 +1 @@ +KEYMAP=us diff --git a/training/cloud/gcp/files/usr/lib/bootc/install/05-cloud-kargs.toml b/training/cloud/gcp/files/usr/lib/bootc/install/05-cloud-kargs.toml new file mode 100644 index 00000000..c940e5a9 --- /dev/null +++ b/training/cloud/gcp/files/usr/lib/bootc/install/05-cloud-kargs.toml @@ -0,0 +1,2 @@ +[install] +kargs = ["net.ifnames=0", "biosdevname=0", "scsi_mod.use_blk_mq=Y", "console=ttyS0,38400n8d", "cloud-init=disabled"]