qovery-cli icon indicating copy to clipboard operation
qovery-cli copied to clipboard

Update qovery install script to account for arm64 architecture

Open YounessFkhach opened this issue 1 year ago • 4 comments

What would you like to be added: Update qovery install script to account for arm64 architecture, and not hardcode amd64

an update proposal to the script:

#!/usr/bin/env bash
​
set -e
#set -x
​
echo "##################################"
echo "#                                #"
echo "#       QOVERY CLI INSTALL       #"
echo "#                                #"
echo "##################################"
echo ""
​
repo="Qovery/qovery-cli"
output_tgz="/tmp/qovery.tgz"
dest_binary="/usr/local/bin"
os=$(uname | tr '[:upper:]' '[:lower:]')
arch=$(uname -m)
​
if [ "$arch" != "aarch64" ]; then
  arch="arm64"
else
  arch="amd64"
fi
​
echo "[+] Downloading Qovery CLI archive..."
​
latest_tag=$(curl --silent "https://api.github.com/repos/$repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
version=$(echo $latest_tag | sed 's/^v//')
​
test -f $output_tgz && rm -f $output_tgz
curl -o $output_tgz -sOL "https://github.com/${repo}/releases/download/${latest_tag}/qovery-cli_${version}_${os}_${arch}.tar.gz"
​
echo "[+] Uncompressing qovery binary in $dest_binary directory (sudo permissions are required)"
sudo tar -xzf $output_tgz -C $dest_binary qovery
rm -f $output_tgz
​
echo -e "\nQovery CLI is installed, you can now use 'qovery' command line"

Why is this needed: when running the installer on an arm arch, the qovery doesn't work, since the installer didn't fetch the arm64 build

YounessFkhach avatar Apr 06 '23 15:04 YounessFkhach

cc @deimosfr - can you take a look?

evoxmusic avatar Apr 06 '23 18:04 evoxmusic

Hitting the same issue. It's fine on Mac laptops, probably thanks to Rosetta, but not on our CI as it runs on ARM machines. We're using that for now: https://gist.github.com/jbbarth/0356bdfa2e703a1f218c79731287200d

jbbarth avatar Feb 05 '24 16:02 jbbarth

Hey @jbbarth - thanks for bumping this one. I share it with the team

evoxmusic avatar Feb 05 '24 20:02 evoxmusic

internal track https://qovery.atlassian.net/browse/COR-891

acarranoqovery avatar Apr 22 '24 14:04 acarranoqovery

This was fixed a month ago, sorry for the late reply. The script has been updated to manage both amd64 and arm64 architectures

acarranoqovery avatar Aug 02 '24 07:08 acarranoqovery