This is an automated email from the ASF dual-hosted git repository.
mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git
The following commit(s) were added to refs/heads/trunk by this push:
new 732f7ac Update ci-cassandra.a.o's agent-install.sh to ubuntu 24.04
and add GHA for it
732f7ac is described below
commit 732f7acdfafd5fc26759134d630e0403598ad36c
Author: Mick Semb Wever <[email protected]>
AuthorDate: Mon Dec 29 13:17:15 2025 +0100
Update ci-cassandra.a.o's agent-install.sh to ubuntu 24.04 and add GHA for
it
patch by Mick Semb Wever; reviewed by Himanshu Jindal
---
.github/workflows/jenkins-agent-install.yaml | 20 ++++++++++++++
ASF-jenkins-agents.md | 6 ++--
jenkins-dsl/agent-install.sh | 41 +++++++++++++++++++---------
3 files changed, 51 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/jenkins-agent-install.yaml
b/.github/workflows/jenkins-agent-install.yaml
new file mode 100644
index 0000000..ec40c35
--- /dev/null
+++ b/.github/workflows/jenkins-agent-install.yaml
@@ -0,0 +1,20 @@
+name: Test jenkins-dsl/agent-install.sh
+
+on:
+ push:
+ branches:
+ - '**'
+ pull_request:
+ branches:
+ - '**'
+
+jobs:
+ test-agent-install:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout cassandra-builds
+ uses: actions/checkout@v3
+ - name: Test agent-install.sh
+ working-directory: jenkins-dsl
+ run: docker run --cap-add net_raw --cap-add sys_admin -v
`pwd`:/jenkin-dsl ubuntu:24.04 bash -e -o pipefail /jenkin-dsl/agent-install.sh
diff --git a/ASF-jenkins-agents.md b/ASF-jenkins-agents.md
index 763c747..a8bac58 100644
--- a/ASF-jenkins-agents.md
+++ b/ASF-jenkins-agents.md
@@ -12,7 +12,7 @@ If you have questions about compute resource donations, ask
on the dev mailing l
## Server Requirements
Server Requirements:
- - Installed OS software is the stock online.net Ubuntu 22.04 LTS amd64 image.
+ - Installed OS software is the stock online.net Ubuntu 24.04 LTS amd64 image.
- Static IP address.
- Root volume is all available space (500GB+), preferably in a RAID-0
configuration.
@@ -113,7 +113,7 @@ ask for more in console
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elas
Contacts for system donators, when console hands may be needed by INFRA:
- *Datastax*: Mick Semb Wever <[email protected]>
+ *IBM*: Mick Semb Wever <[email protected]>
*NetApp*: Stefan Miklosovic <[email protected]>
alternative group list: [email protected]
@@ -122,7 +122,7 @@ Contacts for system donators, when console hands may be
needed by INFRA:
*iland*: Julien Anguenot <[email protected]>
- *Huawei*: Liu Sheng <[email protected]>
+ *Huawei*: Weijun Lu <[email protected]>
----
diff --git a/jenkins-dsl/agent-install.sh b/jenkins-dsl/agent-install.sh
index 59a088f..b97864b 100644
--- a/jenkins-dsl/agent-install.sh
+++ b/jenkins-dsl/agent-install.sh
@@ -1,39 +1,52 @@
-#!/bin/bash
+#!/bin/bash -e -o pipefail
#
# This script sets up an Ubuntu 22.04 server to be a ASF Jenkins agent.
# After this setup is complete, an INFRA jira ticket must be opened for ASF
Infra to complete the process.
#
# Script Requirements:
-# * Ubuntu 22.04
+# * Ubuntu 24.04
# * run as root
# * internet access
#
# To run the script…
-# 1. ssh into server and allow sudo without password. For example: `%sudo
ALL=(ALL:ALL) NOPASSWD:ALL` in /etc/sudoers
-# 2. scp agent-install.sh <server>:~/
-# 3. ssh <server>
-# 4. sudo bash agent-install.sh
+# 1. scp agent-install.sh root@<server>:~/
+# 2. ssh root@<server>
+# 3. bash -e agent-install.sh
#
-command -v lsb_release >/dev/null 2>&1 || { echo >&2 "Expecting an Ubuntu
server with lsb_release installed"; exit 1; }
-if ! lsb_release -d | grep -q "Ubuntu 22.04" ; then
- echo "Ubuntu 22.04 expected. Found $(lsb_release -d | cut -d' ' -f2)"
+export DEBIAN_FRONTEND=noninteractive
+
+if ! command -v lsb_release >/dev/null 2>&1 ; then
+ echo >&2 "Installing lsb_release"
+ apt-get update
+ apt-get install -y lsb-release
+fi
+if ! lsb_release -d | grep -q "Ubuntu 24.04" ; then
+ echo "Ubuntu 24.04 expected. Found $(lsb_release -d | cut -d' ' -f2)"
exit 1
fi
if [ "$EUID" -ne 0 ] ; then
echo "Please run as root"
exit 1
fi
-if ! ping -c 1 -q apt.puppetlabs.com >&/dev/null ; then
+if ! command -v ping >/dev/null 2>&1 ; then
+ echo >&2 "Installing iputils-ping"
+ apt-get install -y iputils-ping
+fi
+if ! command -v curl >/dev/null 2>&1 ; then
+ echo >&2 "Installing curl"
+ apt-get install -y curl
+fi
+if ! (ping -c 1 -q apt.puppetlabs.com || curl -s --connect-timeout 5 --head
https://apt.puppetlabs.com)>&/dev/null ; then
echo "Cannot access apt.puppetlabs.com"
exit 1
fi
# Remove the default installation of bind9
apt-get -y autoremove --purge bind9
-rm -r /var/cache/bind
+rm -fr /var/cache/bind
-apt-get -y install net-tools software-properties-common
+apt-get -y install apt-utils dnsutils net-tools software-properties-common
# Ensure `hostname` is configured to the server's public ip
hostname `dig +short myip.opendns.com @resolver1.opendns.com`
@@ -56,6 +69,7 @@ chmod 600 /home/jenkins/.ssh/authorized_keys
# Add asf999 user
useradd -m -s /bin/bash asf999
+echo "asf999 ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
mkdir /home/asf999/.ssh
usermod -a -G sudo asf999
@@ -75,12 +89,13 @@ chmod 700 /home/asf999/.ssh
chmod 600 /home/asf999/.ssh/authorized_keys
# Install Puppet 6 (not Puppet 5 that Jammy would normally install) and
configured the puppet.conf file ready for use
-wget https://apt.puppetlabs.com/puppet-release-jammy.deb
+curl -sL -O https://apt.puppetlabs.com/puppet-release-jammy.deb
dpkg -i puppet-release-jammy.deb
rm puppet-release-jammy.deb
apt-get update
apt-get install -y puppet-agent
+mkdir -p /etc/puppetlabs/puppet
sh -c 'cat >> /etc/puppetlabs/puppet/puppet.conf << EOF
[main]
use_srv_records = true
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]