Skip to content

Switch from Minio to Versitygw#2656

Merged
jmthomas merged 19 commits intorelease/v7.0.0from
versity
Jan 13, 2026
Merged

Switch from Minio to Versitygw#2656
jmthomas merged 19 commits intorelease/v7.0.0from
versity

Conversation

@jmthomas
Copy link
Copy Markdown
Member

I ran through the migration script and successfully migrated my data. This will obviously need extensive testing in Enterprise (haven't done that yet) but it's a good start and all works in Core.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 29.16667% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.22%. Comparing base (8c17851) to head (d40959c).
⚠️ Report is 27 commits behind head on release/v7.0.0.

Files with missing lines Patch % Lines
openc3/lib/openc3/utilities/aws_bucket.rb 20.00% 16 Missing ⚠️
openc3/lib/openc3/script/storage.rb 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           release/v7.0.0    #2656      +/-   ##
==================================================
- Coverage           79.25%   79.22%   -0.03%     
==================================================
  Files                 670      670              
  Lines               54135    54164      +29     
  Branches              734      734              
==================================================
+ Hits                42906    42913       +7     
- Misses              11149    11171      +22     
  Partials               80       80              
Flag Coverage Δ
python 80.98% <ø> (-0.04%) ⬇️
ruby-api 84.19% <ø> (+0.04%) ⬆️
ruby-backend 82.23% <29.16%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

tar xzf /tmp/versitygw_v${OPENC3_VERSITYGW_VERSION}_Linux_${ARCH}.tar.gz -C /tmp versitygw_v${OPENC3_VERSITYGW_VERSION}_Linux_${ARCH}/versitygw && \
mv /tmp/versitygw_v${OPENC3_VERSITYGW_VERSION}_Linux_${ARCH}/versitygw /usr/local/bin/ && \
chmod +x /usr/local/bin/versitygw && \
rm -rf /tmp/versitygw_*
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This install uses the released binaries from the release assets page: https://github.com/versity/versitygw/releases/tag/v1.0.10. We'll have to manually grab updates ... probably needs to be in the package_audit script.

# Batch delete in chunks of 1000 (S3 limit)
keys.each_slice(1000) do |key_batch|
@bucket.delete_objects(bucket: ENV['OPENC3_CONFIG_BUCKET'], keys: key_batch)
end
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think this is a great optimization claude found

echo ""
echo "Fixing permissions on ${NEW_VOLUME} for host user ${HOST_UID}:${HOST_GID}..."
docker run --rm -v "${NEW_VOLUME}:/data" alpine chown -R "${HOST_UID}:${HOST_GID}" /data
echo -e "${GREEN}✓ Permissions fixed${NC}"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This section was key to getting it to work

Copy link
Copy Markdown
Member

@ryanmelt ryanmelt left a comment

Choose a reason for hiding this comment

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

I would like to keep the reduced ScriptRunner permissions if possible at all. From the docs I think it is possible... They seem to support policies and users. Please see if that can be restored.

jmthomas and others added 6 commits January 10, 2026 17:09
- Rename openc3-s3 to openc3-bucket for clarity
- Implement IAM user creation in docker-entrypoint.sh for ScriptRunner
  with "user" role (limited permissions vs admin)
- Add bucket policies via ensure_scriptrunner_policy() to grant
  ScriptRunner access to config and logs buckets
- Update all minio references to bucket/versitygw throughout codebase
- Update traefik configs: service-minio -> service-bucket
- Update credentials: openc3minio -> openc3bucket
- Update package_audit scripts to check versitygw releases
- Remove obsolete openc3-minio directory

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add auto-detection of running MINIO/versitygw containers
- Support pre-migration while COSMOS 6 is running
- Use separate credentials for source (MINIO) and destination (versitygw)
- Match user IDs with openc3.sh behavior (rootless detection)
- Use minio/mc from openc3-cosmos-init:6.10.4 container
- Add proper health checks and status reporting with file counts
- Fix compose.yaml volume name to prevent prefix issues
- Update README with migration documentation and credential info

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@jmthomas jmthomas requested a review from ryanmelt January 12, 2026 00:39
@jmthomas
Copy link
Copy Markdown
Member Author

jmthomas commented Jan 13, 2026

Summary is that we've completely removed the minio container and renamed it openc3-buckets. Since the volume was already named openc3-bucket-v I named the new one openc3-buckets-v since it's much easier to create a new volume and transfer the data over. I actually tried to migrate the existing data but since they both mount to /data that doesn't work without setting an ENV var in versitygw to move the mount point which would be annoying because it would have to be set to something other than /data forever.

jmthomas and others added 4 commits January 13, 2026 11:01
# Conflicts:
#	.env
#	.github/workflows/clamav.yml
#	.github/workflows/cli.yml
#	.github/workflows/post_release_clamav.yml
#	.github/workflows/post_release_trivy.yml
#	.github/workflows/trivy.yml
#	compose-build.yaml
#	compose.yaml
#	openc3-cosmos-init/init.sh
#	openc3-traefik/traefik-allow-http.yaml
#	openc3-traefik/traefik-letsencrypt.yaml
#	openc3-traefik/traefik-ssl.yaml
#	openc3-traefik/traefik.yaml
#	openc3.sh
#	openc3/lib/openc3/script/storage.rb
#	openc3/lib/openc3/utilities/aws_bucket.rb
#	openc3/lib/openc3/utilities/s3_autoload.rb
#	openc3/python/openc3/script/storage.py
#	openc3/python/openc3/utilities/aws_bucket.py
#	scripts/linux/openc3_build_ubi.sh
#	scripts/linux/openc3_migrate_s3.sh
#	scripts/linux/openc3_setup.sh
#	scripts/linux/openc3_util.sh
#	scripts/release/build_multi_arch.sh
#	scripts/windows/openc3_setup.bat
#	scripts/windows/openc3_util.bat
- Rename openc3-bucket container/service to openc3-buckets (plural)
- Rename openc3-block-v volume to openc3-buckets-v
- Update all references across compose files, scripts, code, and docs
- Add openc3-cosmos-migration service definition to compose.yaml (commented out)
- Add migration configuration variables to .env
- Consolidate openc3-s3 and openc3-bucket directories into openc3-buckets
  - Keep IAM support from openc3-bucket's docker-entrypoint.sh
  - Add tar/gzip installation to Dockerfile-ubi from openc3-s3
- Delete redundant openc3-s3 directory

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Update openc3-redis UBI build to use Dockerfile-ubi which builds
  Valkey from source, fixing the 'invalid user valkey' error when
  using Iron Bank Redis image
- Add -fno-lto flags to Dockerfile-ubi to fix parallel build failures
  caused by LTO jobserver issues
- Add architecture detection to openc3_build_ubi.sh to skip
  --platform linux/amd64 on ARM Macs, allowing native builds
- Simplify openc3-redis/Dockerfile by removing conditional package updates

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@jmthomas jmthomas merged commit 6c183ec into release/v7.0.0 Jan 13, 2026
27 of 28 checks passed
@jmthomas jmthomas deleted the versity branch January 13, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants