Skip to content

Commit

Permalink
scripts/*: switch to let ccm download files
Browse files Browse the repository at this point in the history
since the move to have the arch in the package name, the ccm code
is going to do a better job of selecting the correct packages to download
  • Loading branch information
fruch committed Dec 28, 2021
1 parent 6e803ca commit 476e502
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 47 deletions.
17 changes: 3 additions & 14 deletions scripts/download_enterprise.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,9 @@ LATEST_ENTERPRISE_JOB_ID=`aws --no-sign-request s3 ls downloads.scylladb.com/uns
AWS_BASE=s3://downloads.scylladb.com/enterprise/relocatable/unstable/enterprise/${LATEST_ENTERPRISE_JOB_ID}
AWS_BASE=s3://downloads.scylladb.com/unstable/scylla-enterprise/${BRANCH}/relocatable/${LATEST_ENTERPRISE_JOB_ID}

rm scylla-*.tar.gz

aws s3 --no-sign-request cp ${AWS_BASE}/scylla-enterprise-package.tar.gz .
aws s3 --no-sign-request cp ${AWS_BASE}/scylla-enterprise-tools-package.tar.gz .
aws s3 --no-sign-request cp ${AWS_BASE}/scylla-enterprise-jmx-package.tar.gz .

NAME=master_$LATEST_ENTERPRISE_JOB_ID
NAME=$(echo enterprise_$LATEST_ENTERPRISE_JOB_ID | sed 's/:/_/g')

ccm create scylla-driver-temp -n 1 --scylla --version $NAME \
--scylla-core-package-uri=./scylla-enterprise-package.tar.gz \
--scylla-tools-java-package-uri=./scylla-enterprise-tools-package.tar.gz \
--scylla-jmx-package-uri=./scylla-enterprise-jmx-package.tar.gz

NAME="unstable/${BRANCH}:${LATEST_ENTERPRISE_JOB_ID}"
export SCYLLA_PRODUCT=scylla-enterprise
ccm create scylla-temp -n 1 --scylla --version $NAME
ccm remove

echo "now it can be used in dtest as:"
Expand Down
15 changes: 2 additions & 13 deletions scripts/download_master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,9 @@ export BRANCH=master
export LATEST_MASTER_JOB_ID=`aws --no-sign-request s3 ls downloads.scylladb.com/unstable/scylla/${BRANCH}/relocatable/ | grep '-' | tr -s ' ' | cut -d ' ' -f 3 | tr -d '\/' | sort -g | tail -n 1`
AWS_BASE=s3://downloads.scylladb.com/unstable/scylla/${BRANCH}/relocatable/${LATEST_MASTER_JOB_ID}

rm scylla-*.tar.gz

aws s3 --no-sign-request cp ${AWS_BASE}/scylla-x86_64-package.tar.gz .
aws s3 --no-sign-request cp ${AWS_BASE}/scylla-tools-package.tar.gz .
aws s3 --no-sign-request cp ${AWS_BASE}/scylla-jmx-package.tar.gz .

NAME=master_$LATEST_MASTER_JOB_ID
NAME=$(echo master_$LATEST_MASTER_JOB_ID | sed 's/:/_/g')

ccm create scylla-driver-temp -n 1 --scylla --version $NAME \
--scylla-core-package-uri=./scylla-x86_64-package.tar.gz \
--scylla-tools-java-package-uri=./scylla-tools-package.tar.gz \
--scylla-jmx-package-uri=./scylla-jmx-package.tar.gz
NAME="unstable/master:$LATEST_MASTER_JOB_ID"

ccm create scylla-driver-temp -n 1 --scylla --version $NAME
ccm remove

echo "now it can be used in dtest as:"
Expand Down
23 changes: 3 additions & 20 deletions scripts/download_rc_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,9 @@
BRANCH=$1
VERSION=$2

AWS_BASE=s3://downloads.scylladb.com/downloads/scylla/relocatable/scylladb-$BRANCH/

for f in `aws s3 ls ${AWS_BASE} | awk '{print $4}' | grep "${VERSION}" | grep 'scylla-tools\|scylla-package\|scylla-jmx'` ;
do
aws s3 cp ${AWS_BASE}${f} .
if [[ $f == *"scylla-package"* ]]; then
export SCYLLA_CORE_PACKAGE=./$f
fi
if [[ $f == *"scylla-tools"* ]]; then
export SCYLLA_TOOLS_JAVA_PACKAGE=./$f
fi
if [[ $f == *"scylla-jmx"* ]]; then
export SCYLLA_JMX_PACKAGE=./$f
fi
done

NAME=$(echo "${BRANCH}.${VERSION}" | sed 's/:/_/g')

ccm create temp_${NAME} -n 1 --scylla --version branch_${NAME}
NAME="$BRANCH.$VERSION"
ccm create temp_${NAME} -n 1 --scylla --version release:${NAME}
ccm remove

echo "now it can be used in dtest as:"
echo "export SCYLLA_VERSION=branch_${NAME}"
echo "export SCYLLA_VERSION=release:${NAME}"
14 changes: 14 additions & 0 deletions scripts/download_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# download release candidates version from release direcorty
#
# Usage:
# ./scripts/download_rc_version.sh 4.3
# ./scripts/download_rc_version.sh 4.2

BRANCH=$1

NAME="$BRANCH"
ccm create temp_${NAME} -n 1 --scylla --version release:${NAME}
ccm remove

echo "now it can be used in dtest as:"
echo "export SCYLLA_VERSION=release:${NAME}"

0 comments on commit 476e502

Please sign in to comment.