-
Notifications
You must be signed in to change notification settings - Fork 591
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
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 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,54 @@ | ||
#!/bin/sh -e | ||
|
||
OS=$(uname -s) | ||
ARCH=$(uname -m) | ||
VERSION=$(curl -s https://api.github.com/repos/risingwavelabs/risingwave/releases/latest | grep '.tag_name' | sed -E -n 's/.*(v[0-9]+.[0-9]+.[0-9])\",/\1/p') | ||
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" | ||
ARCHIVE_NAME="${BASE_ARCHIVE_NAME}.tar.gz" | ||
URL="${BASE_URL}/${VERSION}/${ARCHIVE_NAME}" | ||
USE_BREW=0 | ||
elif [[ "${OS}" == "Darwin" ]] && [[ "${ARCH}" == "x86_64" || "${ARCH}" == "amd64" || "${ARCH}" == "aarch64" || "${ARCH}" == "arm64" ]]; then | ||
USE_BREW=1 | ||
else | ||
echo | ||
echo "Unsupported OS or Architecture: ${OS}-${ARCH}" | ||
echo | ||
echo "Supported OSes: Linux, macOS" | ||
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." | ||
echo | ||
exit 1 | ||
fi | ||
|
||
############# Setup data directories | ||
echo "Setting up data directories." | ||
mkdir -p "${HOME}/.risingwave/data/state_store" | ||
mkdir -p "${HOME}/.risingwave/data/meta_store" | ||
|
||
############# BREW INSTALL | ||
if [[ "${USE_BREW}" -eq 1 ]]; then | ||
echo "Installing RisingWave using Homebrew." | ||
brew tap risingwavelabs/risingwave | ||
brew install risingwave | ||
echo "Successfully installed RisingWave using Homebrew." | ||
echo | ||
echo "You can run it as:" | ||
echo " risingwave standalone" | ||
exit 0 | ||
fi | ||
|
||
############# BINARY INSTALL | ||
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" |
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.
There was a problem hiding this comment.
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