From 9f9c56720e0c415679e2350caa353936b42b926b Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 9 Oct 2024 16:42:36 -0400 Subject: [PATCH] Remove C5/C6g agents and update new AMIs from #495 (#496) Signed-off-by: Peter Zhu --- lib/ci-stack.ts | 2 -- lib/compute/agent-nodes.ts | 48 +++++---------------------- packer/jenkins-agent-macos13-x64.json | 2 +- 3 files changed, 9 insertions(+), 43 deletions(-) diff --git a/lib/ci-stack.ts b/lib/ci-stack.ts index 40340cc..41dbb82 100644 --- a/lib/ci-stack.ts +++ b/lib/ci-stack.ts @@ -158,11 +158,9 @@ export class CIStack extends Stack { agentNode.AL2023_X64, agentNode.AL2_X64_DOCKER_HOST, agentNode.AL2023_X64_DOCKER_HOST, - agentNode.AL2023_X64_DOCKER_HOST_EXTRA, agentNode.AL2023_ARM64, agentNode.AL2_ARM64_DOCKER_HOST, agentNode.AL2023_ARM64_DOCKER_HOST, - agentNode.AL2023_ARM64_DOCKER_HOST_EXTRA, agentNode.AL2023_X64_BENCHMARK_TEST, agentNode.UBUNTU2004_X64_GRADLE_CHECK, agentNode.UBUNTU2004_X64_DOCKER_BUILDER, diff --git a/lib/compute/agent-nodes.ts b/lib/compute/agent-nodes.ts index 8d784ba..39be32e 100644 --- a/lib/compute/agent-nodes.ts +++ b/lib/compute/agent-nodes.ts @@ -18,16 +18,12 @@ export class AgentNodes { readonly AL2023_X64_DOCKER_HOST: AgentNodeProps; - readonly AL2023_X64_DOCKER_HOST_EXTRA: AgentNodeProps; - readonly AL2023_ARM64: AgentNodeProps; readonly AL2_ARM64_DOCKER_HOST: AgentNodeProps; readonly AL2023_ARM64_DOCKER_HOST: AgentNodeProps; - readonly AL2023_ARM64_DOCKER_HOST_EXTRA: AgentNodeProps; - readonly AL2023_X64_BENCHMARK_TEST: AgentNodeProps; readonly UBUNTU2004_X64_GRADLE_CHECK: AgentNodeProps; @@ -58,7 +54,7 @@ export class AgentNodes { maxTotalUses: -1, minimumNumberOfSpareInstances: 1, numExecutors: 1, - amiId: 'ami-0df585704536eaa6b', + amiId: 'ami-0e8c1c93cdfb4ce70', initScript: 'sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf repolist &&' + ' sudo dnf update --releasever=latest --skip-broken --exclude=openssh* --exclude=docker* --exclude=gh* --exclude=python* -y && docker ps', remoteFs: '/var/jenkins', @@ -78,20 +74,6 @@ export class AgentNodes { remoteFs: '/var/jenkins', }; this.AL2023_X64_DOCKER_HOST = { - agentType: 'unix', - customDeviceMapping: '/dev/xvda=:300:true:::encrypted', - workerLabelString: 'Jenkins-Agent-AL2023-X64-C54xlarge-Docker-Host', - instanceType: 'C54xlarge', - remoteUser: 'ec2-user', - maxTotalUses: -1, - minimumNumberOfSpareInstances: 3, - numExecutors: 4, - amiId: 'ami-0df585704536eaa6b', - initScript: 'sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf repolist &&' - + ' sudo dnf update --releasever=latest --skip-broken --exclude=openssh* --exclude=docker* --exclude=gh* --exclude=python* -y && docker ps', - remoteFs: '/var/jenkins', - }; - this.AL2023_X64_DOCKER_HOST_EXTRA = { agentType: 'unix', customDeviceMapping: '/dev/xvda=:600:true:::encrypted', workerLabelString: 'Jenkins-Agent-AL2023-X64-M54xlarge-Docker-Host', @@ -100,7 +82,7 @@ export class AgentNodes { maxTotalUses: -1, minimumNumberOfSpareInstances: 1, numExecutors: 3, - amiId: 'ami-0df585704536eaa6b', + amiId: 'ami-0e8c1c93cdfb4ce70', initScript: 'sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf repolist &&' + ' sudo dnf update --releasever=latest --skip-broken --exclude=openssh* --exclude=docker* --exclude=gh* --exclude=python* -y && docker ps', remoteFs: '/var/jenkins', @@ -114,7 +96,7 @@ export class AgentNodes { maxTotalUses: -1, minimumNumberOfSpareInstances: 1, numExecutors: 1, - amiId: 'ami-08313eb4c2050a49c', + amiId: 'ami-07171e0264441db0a', initScript: 'sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf repolist &&' + ' sudo dnf update --releasever=latest --skip-broken --exclude=openssh* --exclude=docker* --exclude=gh* --exclude=python* -y && docker ps', remoteFs: '/var/jenkins', @@ -134,20 +116,6 @@ export class AgentNodes { remoteFs: '/var/jenkins', }; this.AL2023_ARM64_DOCKER_HOST = { - agentType: 'unix', - customDeviceMapping: '/dev/xvda=:300:true:::encrypted', - workerLabelString: 'Jenkins-Agent-AL2023-Arm64-C6g4xlarge-Docker-Host', - instanceType: 'C6g4xlarge', - remoteUser: 'ec2-user', - maxTotalUses: -1, - minimumNumberOfSpareInstances: 3, - numExecutors: 4, - amiId: 'ami-08313eb4c2050a49c', - initScript: 'sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf repolist &&' - + ' sudo dnf update --releasever=latest --skip-broken --exclude=openssh* --exclude=docker* --exclude=gh* --exclude=python* -y && docker ps', - remoteFs: '/var/jenkins', - }; - this.AL2023_ARM64_DOCKER_HOST_EXTRA = { agentType: 'unix', customDeviceMapping: '/dev/xvda=:600:true:::encrypted', workerLabelString: 'Jenkins-Agent-AL2023-Arm64-M6g4xlarge-Docker-Host', @@ -156,7 +124,7 @@ export class AgentNodes { maxTotalUses: -1, minimumNumberOfSpareInstances: 1, numExecutors: 3, - amiId: 'ami-08313eb4c2050a49c', + amiId: 'ami-07171e0264441db0a', initScript: 'sudo dnf clean all && sudo rm -rf /var/cache/dnf && sudo dnf repolist &&' + ' sudo dnf update --releasever=latest --skip-broken --exclude=openssh* --exclude=docker* --exclude=gh* --exclude=python* -y && docker ps', remoteFs: '/var/jenkins', @@ -184,7 +152,7 @@ export class AgentNodes { maxTotalUses: 1, minimumNumberOfSpareInstances: 1, numExecutors: 1, - amiId: 'ami-0e8a55b605c497075', + amiId: 'ami-0cdc3fd42e6dc728c', initScript: 'sudo apt-mark hold docker docker.io openssh-server gh grub-efi* shim-signed && docker ps &&' + ' sudo apt-get update -y && (sudo killall -9 apt-get apt 2>&1 || echo) && sudo env "DEBIAN_FRONTEND=noninteractive" apt-get upgrade -y &&' + ' sudo update-alternatives --set "java" "/usr/lib/jvm/temurin-21-jdk-amd64/bin/java" && java -version', @@ -199,7 +167,7 @@ export class AgentNodes { maxTotalUses: -1, minimumNumberOfSpareInstances: 2, numExecutors: 1, - amiId: 'ami-0e8a55b605c497075', + amiId: 'ami-0cdc3fd42e6dc728c', initScript: 'sudo apt-mark hold docker docker.io openssh-server gh grub-efi* shim-signed && docker ps &&' + ' sudo apt-get update -y && (sudo killall -9 apt-get apt 2>&1 || echo) && sudo env "DEBIAN_FRONTEND=noninteractive" apt-get upgrade -y &&' + ' sudo update-alternatives --set "java" "/usr/lib/jvm/temurin-21-jdk-amd64/bin/java" && java -version', @@ -214,7 +182,7 @@ export class AgentNodes { maxTotalUses: -1, minimumNumberOfSpareInstances: 1, numExecutors: 4, - amiId: 'ami-05a9221f96f21bfb6', + amiId: 'ami-0dbb293b6db1cac67', initScript: 'echo', remoteFs: '/var/jenkins', }; @@ -227,7 +195,7 @@ export class AgentNodes { maxTotalUses: -1, minimumNumberOfSpareInstances: 1, numExecutors: 4, - amiId: 'ami-0931ef2039744bef9', + amiId: 'ami-0fca4d6286ab64f66', initScript: 'echo', remoteFs: '/var/jenkins', }; diff --git a/packer/jenkins-agent-macos13-x64.json b/packer/jenkins-agent-macos13-x64.json index 30901dc..2a8575e 100644 --- a/packer/jenkins-agent-macos13-x64.json +++ b/packer/jenkins-agent-macos13-x64.json @@ -1,6 +1,6 @@ { "variables": { - "ami_name": "Jenkins-Agent-MacOS13-X64-Mac1Metal-JDK21", + "ami_name": "Jenkins-Agent-MacOS13-X64-Mac1Metal", "os_version": "13.6.7", "os_architecture": "x86_64_mac", "build-region": "us-east-1",