Skip to content

Commit

Permalink
feat(ee-multicloud-public): add multi-platform support for execution …
Browse files Browse the repository at this point in the history
…environments

- Updated `install_binaries.sh` to dynamically detect system architecture (`ARCH`)
- Modified OpenShift CLI (`oc`) installation to use RHEL 8 version with architecture-specific tarballs.
- Adjusted AWS CLI download URL to include architecture detection.
- Added placeholder for Bitwarden CLI installation, as it does not support ARM64 yet.
  • Loading branch information
marcosmamorim committed Jan 6, 2025
1 parent f5908c1 commit c820bbe
Showing 1 changed file with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,32 @@ set -ue

cd /tmp

# OC
# initArch discovers the architecture for this system.
ARCH=$(uname -m)
case $ARCH in
armv5*) ARCH="armv5";;
armv6*) ARCH="armv6";;
armv7*) ARCH="arm";;
aarch64) ARCH="arm64";;
x86) ARCH="386";;
x86_64) ARCH="amd64";;
i686) ARCH="386";;
i386) ARCH="386";;
esac

# OC
# Install rhel8 version of oc
# https://access.redhat.com/solutions/7077895
version=stable
arch=x86_64
tarball=openshift-client-linux.tar.gz
url="https://mirror.openshift.com/pub/openshift-v4/${arch}/clients/ocp/${version}/${tarball}"
tarball=openshift-client-linux-${ARCH}-rhel8.tar.gz
url="https://mirror.openshift.com/pub/openshift-v4/${ARCH}/clients/ocp/${version}/${tarball}"
curl -s -L "${url}" -o ${tarball}
tar xzf ${tarball}
install -t /usr/bin oc kubectl
rm ${tarball}

# Bitwarden

# DISCLAIMER: BW doesn't support ARM64 yet, so this is just a placeholder
url="https://vault.bitwarden.com/download/?app=cli&platform=linux"
curl -s -L "${url}" -o bw.zip
unzip bw.zip
Expand All @@ -24,9 +37,8 @@ rm bw bw.zip


# AWS CLI

aws_version=2.4.23
curl -s -L "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${aws_version}.zip" \
curl -s -L "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m)-${aws_version}.zip" \
-o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
Expand Down

0 comments on commit c820bbe

Please sign in to comment.