Skip to content

Commit 6de4afa

Browse files
committed
Revert "Merge pull request #5 from ios-xr/dev/ebeaty_al23"
This reverts commit ece3315, reversing changes made to e73967c.
1 parent ece3315 commit 6de4afa

File tree

6 files changed

+15
-107
lines changed

6 files changed

+15
-107
lines changed

README.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You must have Packer installed, see
1313
[the official instructions](https://developer.hashicorp.com/packer/downloads).
1414

1515
The template has a single mandatory argument, `kubernetes_version`, which
16-
is used to control the Amazon EKS optimized Amazon Linux 2023 base AMI that
16+
is used to control the Amazon EKS optimized Amazon Linux 2 base AMI that
1717
is used to generate the image and also as a tag on the produced image.
1818

1919
To build an AMI:
@@ -47,11 +47,6 @@ packer build \
4747
-var 'tags={"mykey": "myvalue", "myotherkey": "myothervalue"}'
4848
```
4949

50-
Note that when building the AMI, the following warnings are expected and can be ignored:
51-
52-
* When building the igb_uio driver, a warning for 'Skipping BTF generation' is expected. This doesn't affect the performance of the built driver.
53-
* When building TuneD, the 'desktop-file-install' action is expected to fail. This doesn't affect the installation of the tuned service.
54-
5550
## Using AMIs
5651

5752
The AMIs produced by the template here require further configuration
@@ -75,23 +70,13 @@ Additionally, to ensure the worker node joins an EKS cluster, the normal
7570
EKS bootstrap script must be called.
7671

7772
It's recommended to set this up in the User Data for the EC2 instance
78-
to ensure it's run on first boot. An example section containing this in a MIME
79-
multi-part user-data is:
73+
to ensure it's run on first boot. An example user data for this is:
8074

8175
```bash
82-
MIME-Version: 1.0
83-
Content-Type: multipart/mixed; boundary="BOUNDARY"
84-
85-
<Other MIME sections, including for NodeConfig>
86-
87-
--BOUNDARY
88-
Content-Type: text/x-shellscript; charset="us-ascii"
89-
90-
#!/bin/bash
76+
#!/usr/bin/env bash
9177
HUGEPAGES_GB=6 ISOLATED_CORES=16-23 /etc/xrd/bootstrap.sh
78+
/etc/eks/bootstrap.sh my-cluster-name
9279
reboot
93-
94-
--BOUNDARY--
9580
```
9681

9782
## Image Tuning
@@ -103,15 +88,6 @@ The Packer template uses resources in this repository to run the following
10388
tuning steps:
10489
- Install the [TuneD](https://github.com/redhat-performance/tuned) tool.
10590
- Install an XRd TuneD profile, and run it.
106-
- Set up recommended boot cmdline arguments
10791
- Build, install, and activate the `igb_uio` interface driver kernel module.
10892
- Set up recommended core handling behavior.
10993
- Set up hugepage handling for systems with more than one NUMA node.
110-
111-
Note that the TuneD bootloader plugin does not work in Amazon Linux 2023. The packer template matches the cmdline arguments set by the `realtime-virtual-guest` TuneD profile, in addition to the `default_hugepagesz`, `hugepagesz` and `hugepages` arguments.
112-
113-
## Amazon Linux 2
114-
115-
Amazon Linux 2 is EOL.
116-
117-
To create AMIs for AL2, see the AL2 tagged version of XRd Packer.

amazon-ebs.pkr.hcl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ source "amazon-ebs" "base" {
4545
owners = ["amazon"]
4646

4747
filters = {
48-
name = format(
49-
"amazon-eks-node-al2023-x86_64-standard-%s-*",
50-
var.kubernetes_version
51-
)
48+
name = format("amazon-eks-node-%s-*", var.kubernetes_version)
5249
root-device-type = "ebs"
5350
virtualization-type = "hvm"
5451
}

files/etc/xrd/bootstrap.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,3 @@ tuned-adm active
5050
# Enable and run the hugepage configuration service.
5151
systemctl start hugetlb-gigantic-pages
5252
systemctl enable hugetlb-gigantic-pages
53-
54-
# Add boot cmdline args
55-
# The below arguments are those that the `realtime-virtual-guest` TuneD profile
56-
# sets, in addition to the default_hugepagesz, hugepagesz and hugepages
57-
# arguments. These are set here as the TuneD bootloader plugin does not work
58-
# in the Amazon Linux 2023 image.
59-
non_isolated_cores=$(/etc/xrd/get_non_isolated_cores.py $ISOLATED_CORES)
60-
grubby --update-kernel ALL --args "nohz_full=${ISOLATED_CORES} nohz=on skew_tick=1 intel_pstate=disable tsc=reliable nosoftlockup isolcpus=${ISOLATED_CORES} irqaffinity=${non_isolated_cores} hugepages=${boot_hugepages} rcu_nocbs=${ISOLATED_CORES} hugepagesz=1G default_hugepagesz=1G rcupdate.rcu_normal_after_boot=1"

files/etc/xrd/get_non_isolated_cores.py

Lines changed: 0 additions & 59 deletions
This file was deleted.

install.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
set -x
55

66
# Download and build the igb_uio driver, and load it into the kernel.
7-
# N.B. A warning for 'Skipping BTF generation' is expected. This doesn't affect
8-
# the performance of the built driver.
9-
dnf install -y "kernel-devel-$(uname -r)"
7+
yum install -y "kernel-devel-$(uname -r)"
108

119
mkdir igb_uio
1210
curl https://git.dpdk.org/dpdk-kmods/snapshot/dpdk-kmods-e721c733cd24206399bebb8f0751b0387c4c1595.tar.gz | tar -xz -C igb_uio --strip-components 1
@@ -15,10 +13,12 @@ cp igb_uio/linux/igb_uio/igb_uio.ko "/lib/modules/$(uname -r)/kernel/drivers/uio
1513
depmod "$(uname -r)"
1614
rm -rf igb_uio
1715

18-
# TuneD is not available in the Amazon Linux 2023 repository, so download our
19-
# own version instead.
20-
dnf install -y \
16+
# Download a much newer version of TuneD that available from the
17+
# Amazon Linux 2 repositories. This fixes several issues with the old
18+
# version available there.
19+
yum install -y \
2120
dbus \
21+
dbus-python \
2222
ethtool \
2323
gawk \
2424
polkit \
@@ -28,14 +28,16 @@ dnf install -y \
2828
python-linux-procfs \
2929
python-perf \
3030
python-pyudev \
31+
python-schedutils \
32+
tuna \
3133
util-linux \
3234
virt-what
3335

3436
mkdir tuned
35-
curl -L https://github.com/redhat-performance/tuned/archive/refs/tags/v2.24.1.tar.gz | tar -xz -C tuned --strip-components 1
37+
curl -L https://github.com/redhat-performance/tuned/archive/refs/tags/v2.20.0.tar.gz | tar -xz -C tuned --strip-components 1
3638
# N.B. The 'desktop-file-install' action is expected to fail. This doesn't
3739
# affect the installation of the tuned service.
38-
make -C tuned install
40+
make -C tuned PYTHON=/usr/bin/python2 install
3941
rm -rf tuned
4042

4143
# Set up the sysctls.

0 commit comments

Comments
 (0)