Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update sles15 sap image family #1743

Merged
merged 12 commits into from
Jul 9, 2024
11 changes: 5 additions & 6 deletions integration_test/gce/gce_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,10 +989,9 @@ func prepareSLES(ctx context.Context, logger *log.Logger, vm *VM) error {
// --gpg-auto-import-keys is included to fix a rare flake where (due to
// a policy being installed already) there is a new key that needs to
// be imported.
// timezone-java was selected arbitrarily as a package that:
// a) can be installed from the default repos, and
// b) isn't installed already.
_, zypperErr := RunRemotely(ctx, logger, vm, "sudo zypper --non-interactive --gpg-auto-import-keys refresh && sudo zypper --non-interactive install timezone-java")
// To fix this, we force install a package. coreutils is arbitrarily
// chosen as it's all but guaranteed to be present.
_, zypperErr := RunRemotely(ctx, logger, vm, "sudo zypper --non-interactive --gpg-auto-import-keys refresh && sudo zypper --non-interactive install --force coreutils")
return zypperErr
}, backoffPolicy)
if err != nil {
Expand Down Expand Up @@ -1586,7 +1585,7 @@ INSTALL_DIR="$(readlink --canonicalize .)"
INSTALL_LOG="$(mktemp)"
# This command produces a lot of console spam, so we only display that
# output if there is a problem.
sudo tar -xf ` + gcloudPkg + ` -C ${INSTALL_DIR}
sudo tar -xf ` + gcloudPkg + ` -C ${INSTALL_DIR}
sudo --preserve-env ${INSTALL_DIR}/google-cloud-sdk/install.sh -q &>"${INSTALL_LOG}" || \
EXIT_CODE=$?
if [[ "${EXIT_CODE-}" ]]; then
Expand All @@ -1600,7 +1599,7 @@ INSTALL_DIR="$(readlink --canonicalize .)"
# Upgrade to the latest version
sudo ${INSTALL_DIR}/google-cloud-sdk/bin/gcloud components update --quiet

sudo ln -s ${INSTALL_DIR}/google-cloud-sdk/bin/gsutil /usr/bin/gsutil
sudo ln -s ${INSTALL_DIR}/google-cloud-sdk/bin/gsutil /usr/bin/gsutil
`
// b/308962066: The GCloud CLI ARM Linux tarballs do not have bundled Python
// and the GCloud CLI requires Python >= 3.8. Install Python311 for ARM VMs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y \
curl java-11-openjdk java-11-openjdk-devel

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
set -e
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP5 has moved Java 8 to a legacy module
if [[ "${SUSE_VERSION}" == 15 ]]; then
sudo SUSEConnect --product sle-module-legacy/15.5/$(uname -m)
# SLES 15 SP5 moved Java 8 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 5 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

if [[ "$(uname -m)" == aarch64 ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y curl java-11-openjdk insserv-compat

sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Expand All @@ -21,7 +30,7 @@ sudo chmod 0644 /etc/zypp/repos.d/elasticsearch.repo

sudo zypper modifyrepo --enable elasticsearch
sudo zypper install -y elasticsearch
sudo zypper modifyrepo --disable elasticsearch
sudo zypper modifyrepo --disable elasticsearch

sudo chkconfig elasticsearch on

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y curl java-11-openjdk

# https://github.com/GoogleCloudPlatform/ops-agent/blob/master/integration_test/README.md#vendored-dependencies
Expand All @@ -11,15 +20,15 @@ sudo tar -xzf flink.tgz -C /opt/flink --strip-components 1
cat <<EOF | sudo tee /etc/systemd/system/flink.service
[Unit]
Description=Apache Flink

[Service]
Type=forking
User=root
Group=root
ExecStart=/opt/flink/bin/start-cluster.sh
ExecStop=/opt/flink/bin/stop-cluster.sh
Restart=always

[Install]
WantedBy=default.target
EOF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y wget java-11-openjdk java-11-openjdk-devel

sudo mkdir -p \
Expand Down Expand Up @@ -144,4 +153,4 @@ sudo -u hadoop bash -c "source /opt/hadoop/env && hdfs namenode -format"
sudo systemctl daemon-reload
sudo systemctl enable hadoop
sudo systemctl restart hadoop
sleep 60
sleep 60
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
set -e
set -o pipefail

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y wget java-11-openjdk

HBASE_VERSION=2.4.11
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y wget java-11-openjdk
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK <= 5 )); then
# This package is necessary on older service packs, but was
# removed in SP6.
sudo zypper install -y tzdata-java
fi

# the other available stable versions of jetty
# wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.46.v20220331/jetty-distribution-9.4.46.v20220331.tar.gz
# wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/10.0.9/jetty-home-10.0.9.tar.gz

JETTY_VERSION=11.0.15

sudo zypper install -y wget java-11-openjdk tzdata-java
sudo wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-home/"$JETTY_VERSION"/jetty-home-"$JETTY_VERSION".tar.gz
sudo mkdir -p /opt/jetty

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

if [[ "${ID}" == opensuse-leap && "${VERSION_ID}" == 15.[01] ]]; then
if [[ "${VERSION_ID}" == 15.0 ]]; then
Expand All @@ -14,11 +15,15 @@ sudo zypper -n refresh

if [[ "$(uname -m)" == aarch64 ]]; then
# GCP arm64 machines ship with Java 11 vs Java 8 support
# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi
sudo zypper -n install java-11-openjdk java-11-openjdk-devel
else
# SLES 15 SP5 has moved Java 8 to a legacy module
if [[ "${SUSE_VERSION}" == 15 ]]; then
sudo SUSEConnect --product sle-module-legacy/15.5/$(uname -m)
# SLES 15 SP5 moved Java 8 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 5 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi
sudo zypper -n install java-1_8_0-openjdk java-1_8_0-openjdk-devel
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y curl java-11-openjdk
sudo mkdir -p /opt/kafka/stage
# https://github.com/GoogleCloudPlatform/ops-agent/blob/master/integration_test/README.md#vendored-dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ if [[ "${SUSE_VERSION}" == 12 ]]; then
sudo zypper --no-gpg-checks in -y postgresql14-server=14.1-3.3.1 postgresql14-contrib=14.1-3.3.1 postgresql14-libs=14.1-1PGDG.sles12 postgresql14=14.1-3.3.1
elif [[ "${SUSE_VERSION}" == 15 ]]; then
sudo zypper addrepo https://download.postgresql.org/pub/repos/zypp/repo/pgdg-sles-15-pg14.repo

# VERSION_ID is taken from /etc/os-release, and is of the form <SLES version number>.<Service Pack number>.
if [[ "$VERSION_ID" == "15.6" ]]; then
# TODO(b/350987619): There is currently no "15.6" repo for PostgreSQL 14. Since the automatic
braydonk marked this conversation as resolved.
Show resolved Hide resolved
# $releasever variable
sudo sed -i "s/\$releasever/15/g" /etc/zypp/repos.d/pgdg-14.repo
fi

sudo zypper --non-interactive --no-gpg-checks ref
sudo zypper --no-gpg-checks in -y postgresql14-server postgresql14-contrib postgresql14

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y \
java-11-openjdk java-11-openjdk-devel curl lsof insserv-compat

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
set -e
sudo zypper --non-interactive install curl java-11-openjdk
sudo zypper --non-interactive install tomcat

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper --non-interactive install curl java-11-openjdk
sudo zypper --non-interactive install tomcat
sudo mkdir -p /etc/systemd/system/tomcat.service.d
sudo cat >> /etc/systemd/system/tomcat.service.d/local.conf << EOF
[Service]
Expand All @@ -13,7 +23,7 @@ EOF
mkdir -p /usr/share/tomcat/webapps/ROOT

sudo touch /usr/share/tomcat/webapps/ROOT/index.html

sudo systemctl daemon-reload
sudo service tomcat restart
sleep 60
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y curl java-11-openjdk

curl -L \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
set -e

source /etc/os-release
SUSE_VERSION="${VERSION_ID%%.*}"
SERVICE_PACK="${VERSION_ID##*.}"

# SLES 15 SP6 moved Java 11 to a legacy module
if [[ "$SUSE_VERSION" == 15 ]] && (( $SERVICE_PACK >= 6 )); then
sudo SUSEConnect --product sle-module-legacy/${VERSION_ID}/$(uname -m)
fi

sudo zypper install -y curl java-11-openjdk

sudo mkdir -p /opt/zookeeper/stage
Expand Down
2 changes: 1 addition & 1 deletion project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ targets:
- suse-cloud:sles-15
exhaustive:
- suse-sap-cloud:sles-15-sp2-sap
- suse-sap-cloud:sles-15-sp5-sap
- suse-sap-cloud:sles-15-sp6-sap
- opensuse-cloud:opensuse-leap
- opensuse-cloud=opensuse-leap-15-5-v20240516-x86-64
- opensuse-cloud=opensuse-leap-15-6-v20240612-x86-64
Expand Down
Loading