Skip to content

Commit

Permalink
Merge pull request #268 from vespa-engine/aressem/align-el8-el9
Browse files Browse the repository at this point in the history
Align images in el8 and el9 images to be usable on Buildkite
  • Loading branch information
aressem authored Feb 25, 2025
2 parents 00224f7 + 20efa0f commit 8909fb4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions build/almalinux-9/include/install-build-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ dnf -y install \
time \
valgrind

# Install recent aws CLI
curl -sSLf "https://awscli.amazonaws.com/awscli-exe-linux-$(arch).zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
rm -rf aws awscliv2.zip

# Install session manager
if [ "$(arch)" = x86_64 ]; then
dnf install -y https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm
else
dnf install -y https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_arm64/session-manager-plugin.rpm
fi

GIT_REPO="https://github.com/vespa-engine/vespa"

# Change git reference for a specific version of the vespa.spec file. Use a tag or SHA to allow for reproducible builds.
Expand Down Expand Up @@ -117,12 +130,32 @@ cp -a /include/ssh-env-config.sh /usr/local/bin
dnf install -y https://github.com/sigstore/cosign/releases/latest/download/cosign-"$(curl -sSL https://api.github.com/repos/sigstore/cosign/releases/latest | jq -re '.tag_name|sub("^v";"")')"-1."$(arch)".rpm

TRIVY_VERSION=$(curl -sSL https://api.github.com/repos/aquasecurity/trivy/releases/latest | jq -re '.tag_name|sub("^v";"")')
KUBECTL_VERSION="1.31.1"
if [ "$(arch)" = x86_64 ]; then
dnf install -y "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.rpm"
curl -L -o /usr/local/bin/kubectl "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
else
dnf install -y "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-ARM64.rpm"
curl -L -o /usr/local/bin/kubectl "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/arm64/kubectl"
fi

chmod 755 /usr/local/bin/kubectl

# Install crane for image management
GOPATH=/usr/local go install github.com/google/go-containerregistry/cmd/[email protected]

# Install siad for Buildkite provider
ATHENZ_VERSION="1.11.65"
curl -Lf -O https://github.com/AthenZ/athenz/archive/refs/tags/v${ATHENZ_VERSION}.tar.gz
tar zxvf v${ATHENZ_VERSION}.tar.gz
(
cd "/athenz-${ATHENZ_VERSION}/provider/buildkite/sia-buildkite"
GOTOOLCHAIN=auto /usr/bin/go build -v ./cmd/siad
mv ./siad /usr/local/bin
)
rm -rf v${ATHENZ_VERSION}.tar.gz athenz-${ATHENZ_VERSION} /root/go


# Set default python to the newes installed and make sure it has pip
PYBIN="$(ls /usr/bin/python3* | grep -E "/usr/bin/python3.[0-9]+$" |sort -n -k2 -t.|tail -1)"
alternatives --set python3 "$PYBIN" || true # If the newest/default is not set via alternatives this is ok
Expand Down

0 comments on commit 8909fb4

Please sign in to comment.