From b1af8aff62cdc63b58b1beb383ff86b695bbf556 Mon Sep 17 00:00:00 2001 From: Yogendra Rampuria - Yogi Date: Tue, 11 Apr 2023 22:16:49 +0800 Subject: [PATCH 1/2] Add arm binary support --- scripts/install_software.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/install_software.sh b/scripts/install_software.sh index aff181a..b82f543 100755 --- a/scripts/install_software.sh +++ b/scripts/install_software.sh @@ -1,5 +1,5 @@ #!/bin/bash - +ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" ############################################################################### # # This is a simple script to install yugabyte-db software on a machine. @@ -12,8 +12,13 @@ YB_RELEASE=$(curl -s https://registry.hub.docker.com/v2/repositories/yugabytedb/ YB_HOME=/home/${USER}/yugabyte-db YB_DL_BASE="https://downloads.yugabyte.com/releases" YB_PACKAGE_URL="${YB_DL_BASE}/${YB_VERSION}/yugabyte-${YB_RELEASE}-linux-x86_64.tar.gz" +if [[ $ARCH == "arm64" ]]; then + YB_PACKAGE_URL="${YB_DL_BASE}/${YB_VERSION}/yugabyte-${YB_RELEASE}-el8-aarch64.tar.gz" +fi YB_PACKAGE_NAME="${YB_PACKAGE_URL##*/}" + + ############################################################################### # Create the necessary directories. ############################################################################### From 2025f25def5ea72146ef1aede84196a19bf80469 Mon Sep 17 00:00:00 2001 From: Yogendra Rampuria - Yogi Date: Tue, 11 Apr 2023 22:25:43 +0800 Subject: [PATCH 2/2] Fetch more tags version matching --- scripts/install_software.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_software.sh b/scripts/install_software.sh index b82f543..62e3f53 100755 --- a/scripts/install_software.sh +++ b/scripts/install_software.sh @@ -8,7 +8,7 @@ ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's YB_VERSION=$1 # this query is paginated, so there's no guarantee we will find this release on the first page # needs improvement to walk through all pages -YB_RELEASE=$(curl -s https://registry.hub.docker.com/v2/repositories/yugabytedb/yugabyte/tags | grep -Eo "${YB_VERSION}-b[0-9]+") +YB_RELEASE=$(curl -s https://registry.hub.docker.com/v2/repositories/yugabytedb/yugabyte/tags?page_size=300 | grep -Eo "${YB_VERSION}-b[0-9]+") YB_HOME=/home/${USER}/yugabyte-db YB_DL_BASE="https://downloads.yugabyte.com/releases" YB_PACKAGE_URL="${YB_DL_BASE}/${YB_VERSION}/yugabyte-${YB_RELEASE}-linux-x86_64.tar.gz"