Skip to content

Commit 39bf24b

Browse files
committed
jenkins: Add Amazon Linux 2023 AMIs
Add AMIs for Amazon Linux 2023. Do not currently include Sphinx on the AMIs, as it's a rathole of Python dependency hell. I believe it is time to admit defeate and use a virtual env on all the platforms for building Open MPI, but that is going to be a follow-on commit. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent c67283d commit 39bf24b

2 files changed

Lines changed: 78 additions & 1 deletion

File tree

jenkins/customize-ami.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ case $PLATFORM_ID in
103103
echo "==> Installing packages"
104104
sudo yum -y update
105105
sudo yum -y groupinstall "Development Tools"
106-
sphinx_installed=1
107106
labels="${labels} linux"
108107
case $VERSION_ID in
109108
2)
@@ -115,8 +114,18 @@ case $PLATFORM_ID in
115114
# system python3 is linked against openssl 1.0, which doesn't work with
116115
# urllib3 2.0 or later. So pin to an older version of urllib :(.
117116
sudo pip3 install sphinx recommonmark docutils sphinx-rtd-theme 'urllib3<2' sphobjinv
117+
sphinx_installed=1
118118
labels="${labels} amazon_linux_2-${arch} gcc7 clang7"
119119
;;
120+
2023)
121+
sudo yum -y install clang gdb \
122+
java-17-amazon-corretto-headless \
123+
python3 python3-devel python3-pip \
124+
hwloc hwloc-devel libevent libevent-devel \
125+
python3-mock
126+
sphinx_installed=0
127+
labels="${labels} amazon_linux_2023-${arch} gcc11 clang15"
128+
;;
120129
*)
121130
echo "ERROR: Unknown version ${PLATFORM_ID} ${VERSION_ID}"
122131
exit 1

jenkins/jenkins-amis.pkr.hcl

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,72 @@ source "amazon-ebs" "AmazonLinux2-x86" {
118118
}
119119

120120

121+
data "amazon-parameterstore" "AmazonLinux2023-arm64" {
122+
name = "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64"
123+
region = "us-west-2"
124+
}
125+
126+
source "amazon-ebs" "AmazonLinux2023-arm64" {
127+
ami_block_device_mappings {
128+
delete_on_termination = true
129+
device_name = "/dev/sda1"
130+
volume_size = 16
131+
}
132+
ami_name = "Jenkins Amazon Linux 2023 arm64"
133+
deprecate_at = "${var.deprecation_date}"
134+
associate_public_ip_address = true
135+
ena_support = true
136+
iam_instance_profile = "${var.iam_role}"
137+
instance_type = "t4g.large"
138+
launch_block_device_mappings {
139+
delete_on_termination = true
140+
device_name = "/dev/sda1"
141+
volume_size = 16
142+
}
143+
region = "us-west-2"
144+
source_ami = "${data.amazon-parameterstore.AmazonLinux2023-arm64.value}"
145+
ssh_pty = true
146+
ssh_username = "ec2-user"
147+
tags = {
148+
BuildType = "${var.BuildType}",
149+
JenkinsBuilderAmi = "True"
150+
}
151+
}
152+
153+
154+
data "amazon-parameterstore" "AmazonLinux2023-x86" {
155+
name = "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64"
156+
region = "us-west-2"
157+
}
158+
159+
source "amazon-ebs" "AmazonLinux2023-x86" {
160+
ami_block_device_mappings {
161+
delete_on_termination = true
162+
device_name = "/dev/sda1"
163+
volume_size = 16
164+
}
165+
ami_name = "Jenkins Amazon Linux 2023 x86"
166+
deprecate_at = "${var.deprecation_date}"
167+
associate_public_ip_address = true
168+
ena_support = true
169+
iam_instance_profile = "${var.iam_role}"
170+
instance_type = "t3.large"
171+
launch_block_device_mappings {
172+
delete_on_termination = true
173+
device_name = "/dev/sda1"
174+
volume_size = 16
175+
}
176+
region = "us-west-2"
177+
source_ami = "${data.amazon-parameterstore.AmazonLinux2023-x86.value}"
178+
ssh_pty = true
179+
ssh_username = "ec2-user"
180+
tags = {
181+
BuildType = "${var.BuildType}",
182+
JenkinsBuilderAmi = "True"
183+
}
184+
}
185+
186+
121187
################################################################################
122188
#
123189
# Red Hat Enterprise Linux
@@ -540,6 +606,8 @@ build {
540606
sources = [
541607
"source.amazon-ebs.AmazonLinux2-arm64",
542608
"source.amazon-ebs.AmazonLinux2-x86",
609+
"source.amazon-ebs.AmazonLinux2023-arm64",
610+
"source.amazon-ebs.AmazonLinux2023-x86",
543611
"source.amazon-ebs.RHEL8-arm64",
544612
"source.amazon-ebs.RHEL8-x86",
545613
"source.amazon-ebs.SLES15-x86",

0 commit comments

Comments
 (0)