-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Use S3 node store with seaweedfs #3498
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
Open
BYK
wants to merge
19
commits into
master
Choose a base branch
from
byk/feat/s3-nodestore
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+100
−2
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
364455b
feat: Use S3 node store with garage
BYK 803bef3
lol, fix bash
BYK 58b301c
moar bash
BYK bd414d5
lol
BYK a2ac10d
hate bash
BYK 7b28dfb
fix moar bash
BYK 4a6d337
Add healthcheck to garage service
BYK 595ed68
revert +x
BYK 99576bf
fix healthcheck, fix config
BYK 2a55a40
add env var for garage size
BYK a29cf0b
use better compression level
BYK a0ae9b1
simpler garage config
BYK 20e608b
Merge branch 'master' into byk/feat/s3-nodestore
BYK 8d7c1ff
add migration support
BYK 2809033
Merge branch 'master' into byk/feat/s3-nodestore
aldy505 0318e84
Merge branch 'master' into byk/feat/s3-nodestore
aldy505 3ab2d81
feat: use seaweedfs as nodestore backend (#3842)
aldy505 71b21a6
Merge branch 'master' into byk/feat/s3-nodestore
aldy505 7af258a
Merge branch 'master' into byk/feat/s3-nodestore
aldy505 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
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,25 @@ | ||
echo "${_group}Bootstrapping seaweedfs (node store)..." | ||
|
||
$dc up --wait seaweedfs postgres | ||
$dc exec seaweedfs apk add --no-cache s3cmd | ||
$dc exec seaweedfs mkdir -p /data/idx/ | ||
s3cmd="$dc exec seaweedfs s3cmd" | ||
|
||
bucket_list=$($s3cmd --access_key=sentry --secret_key=sentry --no-ssl --region=us-east-1 --host=localhost:8333 --host-bucket='localhost:8333/%(bucket)' ls) | ||
|
||
if [[ $($bucket_list | tail -1 | awk '{print $3}') != 's3://nodestore' ]]; then | ||
# Only touch if no existing nodestore config is found | ||
if ! grep -q "SENTRY_NODESTORE" $SENTRY_CONFIG_PY; then | ||
nodestore_config=$(sed -n '/SENTRY_NODESTORE/,/[}]/{p}' sentry/sentry.conf.example.py) | ||
if [[ $($dc exec postgres psql -qAt -U postgres -c "select exists (select * from nodestore_node limit 1)") = "f" ]]; then | ||
nodestore_config=$(echo -e "$nodestore_config" | sed '$s/\}/ "read_through": True,\n "delete_through": True,\n\}/') | ||
fi | ||
echo "$nodestore_config" >>$SENTRY_CONFIG_PY | ||
fi | ||
$dc exec seaweedfs mkdir -p /data/idx/ | ||
$s3cmd --access_key=sentry --secret_key=sentry --no-ssl --region=us-east-1 --host=localhost:8333 --host-bucket='localhost:8333/%(bucket)' mb s3://nodestore | ||
else | ||
echo "Node store already exists, skipping..." | ||
fi | ||
|
||
echo "${_endgroup}" |
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
ARG SENTRY_IMAGE | ||
FROM ${SENTRY_IMAGE} | ||
|
||
RUN pip install https://github.com/stayallive/sentry-nodestore-s3/archive/main.zip | ||
|
||
COPY . /usr/src/sentry | ||
|
||
RUN if [ -s /usr/src/sentry/enhance-image.sh ]; then \ | ||
/usr/src/sentry/enhance-image.sh; \ | ||
fi | ||
fi | ||
|
||
RUN if [ -s /usr/src/sentry/requirements.txt ]; then \ | ||
echo "sentry/requirements.txt is deprecated, use sentry/enhance-image.sh - see https://develop.sentry.dev/self-hosted/#enhance-sentry-image"; \ | ||
pip install -r /usr/src/sentry/requirements.txt; \ | ||
fi | ||
fi |
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.