Skip to content

Commit 2aa2682

Browse files
committed
sync install script for Almalinux 8 and 9
1 parent 0521b5f commit 2aa2682

2 files changed

Lines changed: 35 additions & 32 deletions

File tree

build/almalinux-8/include/install-build-dependencies.sh

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,6 @@ dnf -y install \
6565
time \
6666
valgrind
6767

68-
# Install recent aws CLI
69-
curl -sSLf "https://awscli.amazonaws.com/awscli-exe-linux-$(arch).zip" -o "awscliv2.zip"
70-
unzip -q awscliv2.zip
71-
./aws/install
72-
rm -rf aws awscliv2.zip
73-
74-
# Install session manager
75-
if [ "$(arch)" = x86_64 ]; then
76-
dnf install -y https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm
77-
else
78-
dnf install -y https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_arm64/session-manager-plugin.rpm
79-
fi
80-
8168
GIT_REPO="https://github.com/vespa-engine/vespa"
8269

8370
# Change git reference for a specific version of the vespa.spec file. Use a tag or SHA to allow for reproducible builds.
@@ -94,18 +81,6 @@ sed -e '/^BuildRequires:/d' \
9481
# Install vespa build and runtime dependencies
9582
dnf builddep --nobest -y vespa.spec vesparun.spec
9683
rm -f vespa.spec vesparun.spec
97-
gcc_version=$(rpm -qa | sed -ne "s/vespa-toolset-\([0-9][0-9]\)-meta.*/\1/p")
98-
99-
# Install extra compiler tools
100-
dnf -y install \
101-
clang \
102-
"gcc-toolset-$gcc_version-libasan-devel" \
103-
"gcc-toolset-$gcc_version-libtsan-devel" \
104-
"gcc-toolset-$gcc_version-libubsan-devel"
105-
106-
# shellcheck disable=SC1091
107-
. /opt/rh/gcc-toolset/enable
108-
/usr/lib/rpm/redhat/redhat-annobin-plugin-select.sh
10984

11085
# Install Ruby in build image that is required for running system test in PR jobs for both Vespa and system tests
11186
dnf -y module enable ruby:3.1
@@ -129,6 +104,18 @@ dnf -y install \
129104
# Compile two rubygems
130105
gem install ffi libxml-ruby
131106

107+
# Install extra compiler tools
108+
gcc_version=$(rpm -qa | sed -ne "s/vespa-toolset-\([0-9][0-9]\)-meta.*/\1/p")
109+
dnf -y install \
110+
clang \
111+
"gcc-toolset-$gcc_version-libasan-devel" \
112+
"gcc-toolset-$gcc_version-libtsan-devel" \
113+
"gcc-toolset-$gcc_version-libubsan-devel"
114+
115+
# shellcheck disable=SC1091
116+
. /opt/rh/gcc-toolset/enable
117+
/usr/lib/rpm/redhat/redhat-annobin-plugin-select.sh
118+
132119
printf '%s\n' \
133120
'# for cmake, ccache, protobuf etc:' \
134121
'export PATH="/opt/vespa-deps/bin:${PATH}"' > /etc/profile.d/enable-vespa-deps.sh
@@ -137,6 +124,19 @@ printf '%s\n' "* soft nproc 102400" "* hard nproc 102400" > /etc/security/
137124
printf '%s\n' "* soft core 0" "* hard core unlimited" > /etc/security/limits.d/99-coredumps.conf
138125
printf '%s\n' "* soft nofile 262144" "* hard nofile 262144" > /etc/security/limits.d/99-nofile.conf
139126

127+
# Install recent aws CLI
128+
curl -sSLf "https://awscli.amazonaws.com/awscli-exe-linux-$(arch).zip" -o "awscliv2.zip"
129+
unzip -q awscliv2.zip
130+
./aws/install
131+
rm -rf aws awscliv2.zip
132+
133+
# Install session manager
134+
if [ "$(arch)" = x86_64 ]; then
135+
dnf install -y https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm
136+
else
137+
dnf install -y https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_arm64/session-manager-plugin.rpm
138+
fi
139+
140140
# Install docker client to avoid doing this in all pipelines.
141141
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
142142
dnf -y install docker-ce docker-ce-cli containerd.io

build/almalinux-9/include/install-build-dependencies.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ echo "✍️ Installing cosign version ${COSIGN_VERSION}"
165165
dnf install -y "https://github.com/sigstore/cosign/releases/download/v${COSIGN_VERSION}/cosign-${COSIGN_VERSION}-1.$(arch).rpm"
166166

167167
TRIVY_VERSION=$(curl -sSL https://api.github.com/repos/aquasecurity/trivy/releases/latest | jq -re '.tag_name|sub("^v";"")')
168-
KUBECTL_VERSION="1.31.1"
168+
KUBECTL_VERSION="1.34.3"
169+
echo "⎈ Installing trivy version ${TRIVY_VERSION} and kubectl version ${KUBECTL_VERSION}"
169170
if [ "$(arch)" = x86_64 ]; then
170171
dnf install -y "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.rpm"
171172
curl -L -o /usr/local/bin/kubectl "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
@@ -176,13 +177,18 @@ fi
176177

177178
chmod 755 /usr/local/bin/kubectl
178179

180+
# Install helm for package management in Kubernetes
181+
/include/get_helm.sh --version 3.19.4
182+
179183
# Install crane for image management
180-
GOPATH=/usr/local go install github.com/google/go-containerregistry/cmd/crane@v0.20.2
184+
GOPATH=/usr/local go install github.com/google/go-containerregistry/cmd/crane@v0.20.7
181185

182186
# Install siad for Buildkite provider
183-
ATHENZ_VERSION="1.11.65"
187+
# FIXME @marlon remove hardcoded version and fetch latest after updating usage
188+
ATHENZ_VERSION="1.11.67"
189+
echo "🔑 Installing athenz version ${ATHENZ_VERSION} and building siad for buildkite"
184190
curl -Lf -O https://github.com/AthenZ/athenz/archive/refs/tags/v${ATHENZ_VERSION}.tar.gz
185-
tar zxvf v${ATHENZ_VERSION}.tar.gz
191+
tar zxf v${ATHENZ_VERSION}.tar.gz
186192
(
187193
cd "/athenz-${ATHENZ_VERSION}/provider/buildkite/sia-buildkite"
188194
GOTOOLCHAIN=auto /usr/bin/go build -v ./cmd/siad
@@ -197,9 +203,6 @@ dnf install -y python3-pip
197203
curl -L -o /usr/local/bin/factory-command "https://raw.githubusercontent.com/vespa-engine/vespa/refs/heads/master/.buildkite/factory-command.sh"
198204
chmod 755 /usr/local/bin/factory-command
199205

200-
# Install helm for package management in Kubernetes
201-
/include/get_helm.sh --version 3.17.0
202-
203206
# Cleanup
204207
dnf clean all --enablerepo='*'
205208
rm -rf /var/cache/yum

0 commit comments

Comments
 (0)