-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: use seaweedfs as nodestore backend #3842
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
Changes from all commits
07c92d5
160cca7
fb303bd
e1e1a23
b09f4bb
6fea950
38d9c12
30a11e7
3a8c050
0bdf72b
d25faa3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
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}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,6 @@ echo "Created $(create_volume sentry-kafka)." | |
echo "Created $(create_volume sentry-postgres)." | ||
echo "Created $(create_volume sentry-redis)." | ||
echo "Created $(create_volume sentry-symbolicator)." | ||
echo "Created $(create_volume sentry-seaweedfs)." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if we should make this a global volume btw. Not sure if that pattern is good at all (carried the old ones over for compatibility reasons) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would survive |
||
|
||
echo "${_endgroup}" |
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.
What if we actually migrated all the data at this stage?