-
Notifications
You must be signed in to change notification settings - Fork 106
Install redis-gears from S3 as part of module deps, and test AI-Gears LLAPI. #584
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d48406b
Install redis-gears from S3 as part of module deps, and test AI-Gears…
alonre24 a197b9f
- Copy Install gears script to docker-gpu
alonre24 acb97eb
Updated Install_RedisGears.sh
rafie e1b7a7e
Install_RedisGears.sh: fix 1
rafie 9dd7561
Set RedisGears path for redis gears tests
alonre24 7564b42
Merge branch 'master' into Add_tests_with_gears_to_CI
alonre24 c9eba52
PR fixes
alonre24 4488c8a
Loading gears before test - PR fixes
alonre24 9a705e9
Fixes in Install_RedisGears.sh + readies update
rafie 819b0da
Merge branch 'master' into Add_tests_with_gears_to_CI
alonre24 b3cb0d7
PR comments - added quoting and set -e so that things will fail when …
chayim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#!/bin/bash | ||
|
||
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
ROOT=$(cd $HERE/../..; pwd) | ||
READIES=$ROOT/opt/readies | ||
. $READIES/shibumi/defs | ||
|
||
if [[ $1 == --help || $1 == help || $HELP == 1 ]]; then | ||
cat <<-END | ||
Obtain RedisGears module binaries | ||
|
||
Install_RedisGears.sh [--help|help] | ||
|
||
Argument variables: | ||
GEARS_OSNICK=nick Get binaries for give osnick | ||
GEARS_PATH=dir Get binaries from given Gears repo | ||
NOP=1 No operation | ||
HELP=1 Show help | ||
|
||
END | ||
exit 0 | ||
fi | ||
|
||
OP="" | ||
[[ $NOP == 1 ]] && OP=echo | ||
|
||
os=$($READIES/bin/platform --os) | ||
arch=$($READIES/bin/platform --arch) | ||
|
||
if [[ ! -z $GEARS_PATH ]]; then | ||
platform=$($READIES/bin/platform -t) | ||
else | ||
if [[ $os != linux || $arch != x64 ]]; then | ||
eprint "Cannot match binary artifacts - build RedisGears and set GEARS_PATH" | ||
exit 1 | ||
alonre24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fi | ||
|
||
dist=$($READIES/bin/platform --dist) | ||
nick=$($READIES/bin/platform --osnick) | ||
|
||
if [[ $dist == ubuntu ]]; then | ||
if [[ $nick != bionic && $nick != xenial && $nick != trusty ]]; then | ||
nick=bionic | ||
fi | ||
elif [[ $dist == debian ]]; then | ||
nick=bionic | ||
elif [[ $dist == centos || $dist == redhat || $dist == fedora ]]; then | ||
nick=centos7 | ||
elif [[ ! -z $GEARS_OSNICK ]]; then | ||
nick="$GEARS_OSNICK" | ||
else | ||
eprint "Cannot match binary artifacts - build RedisGears and set GEARS_PATH" | ||
exit 1 | ||
fi | ||
platform="${os}-${nick}-${arch}" | ||
fi | ||
|
||
GEARS_S3_URL=http://redismodules.s3.amazonaws.com/redisgears/snapshots | ||
GEARS_MOD=redisgears.$platform.master.zip | ||
GEARS_DEPS=redisgears-python.$platform.master.tgz | ||
rafie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
FINAL_WORK_DIR=$ROOT/bin/$($READIES/bin/platform -t)/RedisGears | ||
alonre24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if [[ -d $FINAL_WORK_DIR && -f $FINAL_WORK_DIR/redisgears.so ]]; then | ||
echo "RedisGears is in $FINAL_WORK_DIR" | ||
exit 0 | ||
fi | ||
|
||
$OP mkdir -p $(dirname $FINAL_WORK_DIR) | ||
$OP rm -rf ${FINAL_WORK_DIR}.* | ||
WORK_DIR=$(mktemp -d ${FINAL_WORK_DIR}.XXXXXX) | ||
$OP mkdir -p $WORK_DIR | ||
|
||
if [[ -z $GEARS_PATH ]]; then | ||
F_GEARS_MOD=$WORK_DIR/$GEARS_MOD | ||
if [[ ! -f $F_GEARS_MOD ]]; then | ||
echo "Download RedisGears ..." | ||
$OP wget -q -P $WORK_DIR $GEARS_S3_URL/$GEARS_MOD | ||
fi | ||
|
||
F_GEARS_DEPS=$WORK_DIR/$GEARS_DEPS | ||
if [[ ! -f $F_GEARS_DEPS ]]; then | ||
echo "Download RedisGears deps ..." | ||
$OP wget -q -P $WORK_DIR $GEARS_S3_URL/$GEARS_DEPS | ||
fi | ||
else | ||
F_GEARS_MOD=$GEARS_PATH/artifacts/snapshot/$GEARS_MOD | ||
F_GEARS_DEPS=$GEARS_PATH/artifacts/snapshot/$GEARS_DEPS | ||
[[ ! -f $F_GEARS_MOD ]] && { eprint "$F_GEARS_MOD is missing"; exit 1; } | ||
[[ ! -f $F_GEARS_DEPS ]] && { eprint "$F_GEARS_DEPS is missing"; exit 1; } | ||
fi | ||
|
||
$OP unzip -q $F_GEARS_MOD -d $WORK_DIR | ||
$OP tar --no-same-owner -C $WORK_DIR -xzf $F_GEARS_DEPS | ||
$OP mv $WORK_DIR $FINAL_WORK_DIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.