Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(scripts): add script to install risingwave #14901

Merged
merged 4 commits into from
Feb 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions scripts/install/install-risingwave.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh -e

OS=$(uname -s)
ARCH=$(uname -m)
VERSION=$(curl -s https://api.github.com/repos/risingwavelabs/risingwave/releases/latest | jq '.tag_name' -r)
kwannoel marked this conversation as resolved.
Show resolved Hide resolved
BASE_URL="https://github.com/risingwavelabs/risingwave/releases/download"

# TODO(kwannoel): Add support for other OS and architectures.
if [[ "${OS}" == "Linux" && "${ARCH}" == "x86_64" || "${ARCH}" == "amd64" ]]; then
BASE_ARCHIVE_NAME="risingwave-${VERSION}-x86_64-unknown-linux-all-in-one"
else
echo
echo "Unsupported OS or Architecture: ${OS}-${ARCH}"
echo
echo "Supported OSes: Linux"
kwannoel marked this conversation as resolved.
Show resolved Hide resolved
echo "Supported architectures: x86_64"
echo
echo "Please open an issue at <https://github.com/risingwavelabs/risingwave/issues/new/choose>,"
echo "if you would like to request support for your OS or architecture."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request arch support on demand

echo
exit 1
fi

ARCHIVE_NAME="${BASE_ARCHIVE_NAME}.tar.gz"
URL="${BASE_URL}/${VERSION}/${ARCHIVE_NAME}"

echo
echo "Downloading ${URL} into ${PWD}."
echo
curl -L "${URL}" | tar -zx || exit 1
chmod +x risingwave
echo
echo "Successfully downloaded the RisingWave binary, you can run it as:"
echo " ./risingwave standalone"
Loading