Repository navigation
Expand file tree
/
Copy pathinit-container.sh
More file actions
54 lines (40 loc) · 2.55 KB
/
Copy pathinit-container.sh
File metadata and controls
54 lines (40 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -euo pipefail
case "${TARGETPLATFORM}" in
"linux/amd64") ARCH=amd64 && AWS_ARCH=x86_64 && NODE_ARCH=x64 ;;
"linux/arm64") ARCH=arm64 && AWS_ARCH=aarch64 && NODE_ARCH=arm64 ;;
*) exit 1 ;;
esac
microdnf -y install jq tar xz git buildah findutils unzip python3.11 python3.11-pip make gettext
curl -fsSL -o /usr/local/bin/ocm \
"https://github.com/openshift-online/ocm-cli/releases/latest/download/ocm-linux-${ARCH}" && chmod 0755 /usr/local/bin/ocm
curl -Lfs "https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3" | bash # installs to /usr/local/bin/helm
curl -LSs -o /usr/local/bin/kubectl "https://dl.k8s.io/release/$(curl -Lfs https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" \
&& chmod 0755 /usr/local/bin/kubectl
curl -Lfs "https://mirror.openshift.com/pub/openshift-v4/${AWS_ARCH}/clients/ocp/stable/openshift-client-linux-${ARCH}-rhel9.tar.gz" | \
tar -xz -f - -C /usr/local/bin 'oc' \
&& chmod 0755 /usr/local/bin/oc
curl -fsSL -o rosa.zip "https://github.com/openshift/rosa/releases/latest/download/rosa_linux_${ARCH}.zip" \
&& unzip -o rosa.zip -d /usr/local/bin \
&& chmod 0755 /usr/local/bin/rosa \
&& rm rosa.zip
curl -fsSL -o /usr/local/bin/opm "https://github.com/operator-framework/operator-registry/releases/latest/download/linux-${ARCH}-opm" \
&& chmod 0755 /usr/local/bin/opm
curl -fsSL -o /usr/local/bin/cli53 "https://github.com/barnybug/cli53/releases/latest/download/cli53-linux-${ARCH}" \
&& chmod 0755 /usr/local/bin/cli53
GO_VERSION=$(curl -Lfs 'https://go.dev/VERSION?m=text' | head -n1) \
&& curl -Lfs "https://go.dev/dl/${GO_VERSION}.linux-${ARCH}.tar.gz" | \
tar -xz -f - -C /usr/local \
&& ln -s /usr/local/go/bin/go /usr/local/bin/go \
&& ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt
NODE_VERSION=$(curl -Lfs https://nodejs.org/dist/index.json | jq -r '[.[] | select(.lts != false)][0].version') \
&& curl -Lfs "https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz" | \
tar -xJ -f - --strip-components=1 -C /usr/local
curl -LSs -o awscli.zip "https://awscli.amazonaws.com/awscli-exe-linux-${AWS_ARCH}.zip" \
&& unzip awscli.zip \
&& ./aws/install -i /usr/local/aws -b /usr/local/bin \
&& rm -rf ./aws ./awscli.zip
rpm --import https://packages.microsoft.com/keys/microsoft.asc \
&& rpm -Uvh https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm \
&& microdnf -y install azure-cli
python3.11 -m pip install --no-cache-dir git+https://github.com/Kuadrant/osia.git