Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop k8s 1.28 and 1.29 metal variants #4287

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ members = [
"variants/aws-k8s-1.30-nvidia",
"variants/aws-k8s-1.31-nvidia",
"variants/metal-dev",
"variants/metal-k8s-1.28",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should drop the corresponding settings-plugins for these variants (looks like I'd missed that in the 1.27 drop amidst the core kit shift 😅):

%description metal-dev
%{summary}.
%package metal-k8s
Summary: Settings plugin for the metal-k8s variants
Requires: %{_cross_os}variant-family(metal-k8s)
Provides: %{_cross_os}settings-plugin(any)
Provides: %{_cross_os}settings-plugin(metal-k8s-1.27)
Provides: %{_cross_os}settings-plugin(metal-k8s-1.28)
Provides: %{_cross_os}settings-plugin(metal-k8s-1.29)
Provides: %{_cross_os}settings-plugin(metal-k8s-1.30)
Conflicts: %{_cross_os}settings-plugin(any)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, I removed the defaults and plugins for metal-k8s.

"variants/metal-k8s-1.29",
"variants/vmware-dev",
"variants/vmware-k8s-1.28",
"variants/vmware-k8s-1.28-fips",
Expand Down
2 changes: 1 addition & 1 deletion PROVISIONING-METAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ You might need to install `jq` to fetch the VERSION.

```shell
ARCH="x86_64"
VERSION=$(curl -s https://api.github.com/repos/bottlerocket-os/bottlerocket/releases/latest | jq -r '.name')
VERSION="v1.26.1" # New releases do not have metal-k8s variants
VARIANT="metal-k8s-1.28"
IMAGE="bottlerocket-${VARIANT}-${ARCH}-${VERSION}.img.lz4"
OUTDIR="${VARIANT}-${VERSION}"
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,11 @@ We also have variants that are designed to be Kubernetes worker nodes in VMware:
* `vmware-k8s-1.30`
* `vmware-k8s-1.31`

The following variants are designed to be Kubernetes worker nodes on bare metal:

* `metal-k8s-1.28`
* `metal-k8s-1.29`

The following variants are no longer supported:

* All Kubernetes variants using Kubernetes 1.23 and earlier
* Bare metal and VMware variants using Kubernetes 1.27 and earlier
* VMware variants using Kubernetes 1.27 and earlier
* Bare metal variants for Kubernetes

We recommend users replace nodes running these variants with the [latest variant compatible with their cluster](variants/).

Expand Down
53 changes: 0 additions & 53 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,59 +334,6 @@ You can monitor the tests with:
cargo make watch-test
```

### metal-k8s

First, an initial baremetal management cluster needs to be created using [`EKS Anywhere`](https://anywhere.eks.amazonaws.com/docs/getting-started/production-environment/baremetal-getstarted/#create-an-initial-cluster).
You can then set `TESTSYS_MGMT_CLUSTER_KUBECONFIG` to the path to the management clusters kubeconfig.
You need to [build](BUILDING.md) Bottlerocket and a publicly accessible [TUF repository](https://github.com/bottlerocket-os/bottlerocket/blob/develop/PUBLISHING.md#repo-location) to test metal variants.
In addition to the management cluster, you will need to [prepare a hardware CSV file](https://anywhere.eks.amazonaws.com/docs/reference/baremetal/bare-preparation/#prepare-hardware-inventory) containing all machines you want to provision and a [cluster config](https://anywhere.eks.amazonaws.com/docs/reference/clusterspec/baremetal/) for the cluster.
Create a directory in `tests/shared/clusters` with an identifier for this cluster, i.e cluster1 (`tests/shared/clusters/cluster1`).
In that directory create 2 files, `cluster.yaml` with the EKS Anywhere cluster config, and `hardware.csv`.
In `Test.toml` set `cluster-names = ["cluster1"]` to tell TestSys that we want the cluster config and hardware csv from the directory we just created.

Metal testing also requires and additional manual step for testing.
The Bottlerocket build system compresses the metal images with lz4, but EKS Anywhere requires them to be gzipped, so before testing make sure to uncompress the lz4 image and gzip it.
Make sure it is downloadable from a URL accessible from the management cluster.
The directory used should be added to `Test.toml` as `os-image-dir`.

Change the commands below to the desired `metal-k8s` variant:

First, build the Metal variant you want to test.

```shell
cargo make \
-e BUILDSYS_VARIANT="metal-k8s-1.29" \
-e BUILDSYS_ARCH="x86_64" \
build
```

Build the TUF repo containing the metal images.

```shell
cargo make \
-e BUILDSYS_VARIANT="metal-k8s-1.29" \
-e BUILDSYS_ARCH="x86_64" \
repo
```

Make sure you gzip the metal image and add it to your `os-image-dir`.

Now, you can run the test.

```shell
cargo make \
-e BUILDSYS_VARIANT="metal-k8s-1.29" \
-e BUILDSYS_ARCH="x86_64" \
-e TESTSYS_MGMT_CLUSTER_KUBECONFIG=${TESTSYS_MGMT_CLUSTER_KUBECONFIG}
test
```

You can monitor the tests with:

```shell
cargo make watch-test
```

## Migration Testing

Migration testing is used to ensure Bottlerocket can update from one version to a new version and back.
Expand Down
24 changes: 0 additions & 24 deletions packages/settings-defaults/settings-defaults.spec
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,6 @@ Conflicts: %{_cross_os}settings-defaults(any)
%description metal-dev
%{summary}.

%package metal-k8s-1.30
Summary: Settings defaults for the metal-k8s 1.27 through 1.30 variants
Requires: (%{shrink:
%{_cross_os}variant(metal-k8s-1.27) or
%{_cross_os}variant(metal-k8s-1.28) or
%{_cross_os}variant(metal-k8s-1.29) or
%{_cross_os}variant(metal-k8s-1.30)
%{nil}})
Provides: %{_cross_os}settings-defaults(any)
Provides: %{_cross_os}settings-defaults(metal-k8s-1.27)
Provides: %{_cross_os}settings-defaults(metal-k8s-1.28)
Provides: %{_cross_os}settings-defaults(metal-k8s-1.29)
Provides: %{_cross_os}settings-defaults(metal-k8s-1.30)
Conflicts: %{_cross_os}settings-defaults(any)

%description metal-k8s-1.30
%{summary}.

%package vmware-dev
Summary: Settings defaults for the vmware-dev variant
Requires: %{_cross_os}variant(vmware-dev)
Expand Down Expand Up @@ -266,7 +248,6 @@ for defaults in \
aws-k8s-1.31 \
aws-k8s-1.31-nvidia \
metal-dev \
metal-k8s-1.30 \
vmware-dev \
vmware-k8s-1.31 \
;
Expand Down Expand Up @@ -303,7 +284,6 @@ for defaults in \
aws-k8s-1.31 \
aws-k8s-1.31-nvidia \
metal-dev \
metal-k8s-1.30 \
vmware-dev \
vmware-k8s-1.31 \
;
Expand Down Expand Up @@ -376,10 +356,6 @@ done
%{_cross_defaultsdir}/metal-dev.toml
%{_cross_tmpfilesdir}/storewolf-defaults-metal-dev.conf

%files metal-k8s-1.30
%{_cross_defaultsdir}/metal-k8s-1.30.toml
%{_cross_tmpfilesdir}/storewolf-defaults-metal-k8s-1.30.conf

%files vmware-dev
%{_cross_defaultsdir}/vmware-dev.toml
%{_cross_tmpfilesdir}/storewolf-defaults-vmware-dev.conf
Expand Down
20 changes: 0 additions & 20 deletions packages/settings-plugins/settings-plugins.spec
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,6 @@ Conflicts: %{_cross_os}settings-plugin(any)
%description metal-dev
%{summary}.

%package metal-k8s
Summary: Settings plugin for the metal-k8s variants
Requires: %{_cross_os}variant-family(metal-k8s)
Provides: %{_cross_os}settings-plugin(any)
Provides: %{_cross_os}settings-plugin(metal-k8s-1.27)
Provides: %{_cross_os}settings-plugin(metal-k8s-1.28)
Provides: %{_cross_os}settings-plugin(metal-k8s-1.29)
Provides: %{_cross_os}settings-plugin(metal-k8s-1.30)
Conflicts: %{_cross_os}settings-plugin(any)

%description metal-k8s
%{summary}.

%package vmware-dev
Summary: Settings plugin for the vmware-dev variant
Requires: %{_cross_os}variant(vmware-dev)
Expand Down Expand Up @@ -160,7 +147,6 @@ Conflicts: %{_cross_os}settings-plugin(any)
-p settings-plugin-aws-k8s \
-p settings-plugin-aws-k8s-nvidia \
-p settings-plugin-metal-dev \
-p settings-plugin-metal-k8s \
-p settings-plugin-vmware-dev \
-p settings-plugin-vmware-k8s \
%{nil}
Expand All @@ -177,7 +163,6 @@ for plugin in \
aws-k8s-nvidia \
aws-k8s \
metal-dev \
metal-k8s \
vmware-dev \
vmware-k8s \
;
Expand Down Expand Up @@ -228,11 +213,6 @@ done
%{_cross_factorydir}%{_cross_sysconfdir}/ld.so.conf.d/metal-dev.conf
%{_cross_tmpfilesdir}/settings-plugin-metal-dev.conf

%files metal-k8s
%{_cross_pluginsdir}/metal-k8s/libsettings.so
%{_cross_factorydir}%{_cross_sysconfdir}/ld.so.conf.d/metal-k8s.conf
%{_cross_tmpfilesdir}/settings-plugin-metal-k8s.conf

%files vmware-dev
%{_cross_pluginsdir}/vmware-dev/libsettings.so
%{_cross_factorydir}%{_cross_sysconfdir}/ld.so.conf.d/vmware-dev.conf
Expand Down
27 changes: 14 additions & 13 deletions variants/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,6 @@ This variant is compatible with Kubernetes 1.31, 1.32, 1.33, and 1.34 clusters.
The [metal-dev](metal-dev/Cargo.toml) variant has useful packages for local development of the OS and is intended to run bare metal.
It includes tools for troubleshooting as well as Docker for running containers.

### metal-k8s-1.28: Metal Kubernetes 1.28 node

The [metal-k8s-1.28](metal-k8s-1.28/Cargo.toml) variant includes the packages needed to run a Kubernetes node on bare metal.
It supports self-hosted clusters.

This variant is compatible with Kubernetes 1.28, 1.29, 1.30, and 1.31 clusters.

### metal-k8s-1.29: Metal Kubernetes 1.28 node

The [metal-k8s-1.29](metal-k8s-1.29/Cargo.toml) variant includes the packages needed to run a Kubernetes node on bare metal.
It supports self-hosted clusters.

This variant is compatible with Kubernetes 1.29, 1.30, 1.31, and 1.32 clusters.

### Deprecated variants

Expand Down Expand Up @@ -446,6 +433,20 @@ It supported self-hosted clusters.

This variant was compatible with Kubernetes 1.27, 1.28, 1.29, and 1.30 clusters.

### metal-k8s-1.28: Metal Kubernetes 1.28 node

The [metal-k8s-1.28](metal-k8s-1.28/Cargo.toml) variant included the packages needed to run a Kubernetes node on bare metal.
It supports self-hosted clusters.

This variant was compatible with Kubernetes 1.28, 1.29, 1.30, and 1.31 clusters.

### metal-k8s-1.29: Metal Kubernetes 1.29 node

The [metal-k8s-1.29](metal-k8s-1.29/Cargo.toml) variant included the packages needed to run a Kubernetes node on bare metal.
It supports self-hosted clusters.

This variant was compatible with Kubernetes 1.29, 1.30, 1.31, and 1.32 clusters.

## Development

Say we want to create `my-variant`, a custom build of Bottlerocket that runs `my-agent`.
Expand Down
46 changes: 0 additions & 46 deletions variants/metal-k8s-1.28/Cargo.toml

This file was deleted.

46 changes: 0 additions & 46 deletions variants/metal-k8s-1.29/Cargo.toml

This file was deleted.