From ac2ca5ede6d28099dd9bce502459f585c81a70f2 Mon Sep 17 00:00:00 2001 From: Kevin Davin Date: Mon, 14 Apr 2025 10:51:01 +0200 Subject: [PATCH 1/2] refactor(version): remove version parameter In order to keep the script as simple as possible, we only offer installation of the last Develocity version --- AWS/EC2/ec2-install.sh | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/AWS/EC2/ec2-install.sh b/AWS/EC2/ec2-install.sh index fc1d7d8..8b00564 100644 --- a/AWS/EC2/ec2-install.sh +++ b/AWS/EC2/ec2-install.sh @@ -18,8 +18,7 @@ trap cleanup SIGINT SIGTERM ERR EXIT # --- Variables --- INSTALL_K3S_VERSION=${INSTALL_K3S_VERSION:-"v1.32.3+k3s1"} DV_CHART_REGISTRY_URL=${DV_CHART_REGISTRY_URL:-"https://helm.gradle.com/"} -DV_VERSION=${DV_VERSION:-"2025.1.0"} -Script_Version="0.1" +SCRIPT_VERSION="0.1" # Log File LOGFILE="$(pwd)/install_$(date +'%Y%m%d_%H%M%S').log" @@ -108,23 +107,6 @@ echo -e "${YELLOW}-u, --uninstall${NOFORMAT} Uninstall Develocity Platform" exit } -# --- Validation functions --- -# Check if the script is running as root -# This is not used at the moment. -#validateSudo () { -# local OS_TYPE=$(uname) -# if [ "$OS_TYPE" == "Linux" ] && [ $EUID -ne 0 ]; then -# exitError "This script must be run as root or with sudo." -# elif [ "$OS_TYPE" != "Linux" ]; then -# exitError "This script is only supported on Linux." -# fi - -# local ARCHITECTURE=$(uname -m) -# if [ "$ARCHITECTURE" != "x86_64" ]; then -# exitError "This script is only supported on x86_64 architecture." -# fi -#} - # Check if the OS is Linux and x86_64 validateOS () { local OS_TYPE @@ -270,7 +252,6 @@ installPlatformChart(){ helm repo add gradle "${baseUrl}" && \ helm repo update && \ helm install \ - --version "${DV_VERSION}" \ --create-namespace --namespace develocity \ ge-standalone \ gradle/gradle-enterprise-standalone \ From 4c2757b3523ac20bf477dc98425dbc8939665990 Mon Sep 17 00:00:00 2001 From: Kevin Davin Date: Mon, 14 Apr 2025 10:56:21 +0200 Subject: [PATCH 2/2] feat(k3s): use default/stable version offered by default In the previous version, we used an hardcoded version, but this was not required and generated too much maintenance overload for our team. The default behavior matches our expectation and is now part of our script --- AWS/EC2/ec2-install.sh | 2 -- AWS/EC2/ec2-install.sh.sha256 | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/AWS/EC2/ec2-install.sh b/AWS/EC2/ec2-install.sh index 8b00564..64ad440 100644 --- a/AWS/EC2/ec2-install.sh +++ b/AWS/EC2/ec2-install.sh @@ -16,7 +16,6 @@ set -e trap cleanup SIGINT SIGTERM ERR EXIT # --- Variables --- -INSTALL_K3S_VERSION=${INSTALL_K3S_VERSION:-"v1.32.3+k3s1"} DV_CHART_REGISTRY_URL=${DV_CHART_REGISTRY_URL:-"https://helm.gradle.com/"} SCRIPT_VERSION="0.1" @@ -212,7 +211,6 @@ installK3s(){ checkUrl "${baseUrl}" logInfo "Installing K3s..." - export INSTALL_K3S_VERSION="${INSTALL_K3S_VERSION}" curl -s -fL ${baseUrl} | sh - || exitError "Failed to install k3s" } diff --git a/AWS/EC2/ec2-install.sh.sha256 b/AWS/EC2/ec2-install.sh.sha256 index 4b29bbc..e2c2d2d 100644 --- a/AWS/EC2/ec2-install.sh.sha256 +++ b/AWS/EC2/ec2-install.sh.sha256 @@ -1 +1 @@ -ae5a646c78d3de90c29018b2153a5660d2410a991f724434337902cbcd7f251a ec2-install.sh +e194a237d36b92b90f7661e57fac2047dc74c769a0b4c837002794d24c0645c8 ec2-install.sh