Repository navigation
feat(maat): deploy the judge on the shared VPS - #67
Open
Omar-Mohamed24 wants to merge 2 commits into
Open
Omar-Mohamed24 wants to merge 2 commits into
Omar-Mohamed24 wants to merge 2 commits into
Conversation
Add Docker Compose configuration for Maat services, MinIO storage, databases, backups, judge worker startup, and deployment values.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
Adds
deploy/maat/to run Ma'at, an online judge, atmaat.project-graphite.com: frontend, backend, worker, MongoDB, Redis, MinIO and verified hourly database dumps for the nightly backup.IMAGE_TAG=REPLACE_WITH_SHA_TAGindeploy/maat/valuesis replaced withIMAGE_TAG=sha-a665a99, whose three images are published. Please don't roll back to an older tag: earlier worker images cannot start this judge. After the merge, CI updates the tag by itself.Ma'at runs untrusted C++ and Python, so it never gets the host's Docker socket. Its worker uses a separate rootless daemon and refuses to start on any other kind.
Draft: merging deploys, so please don't merge before the list below is done.
Needed from an owner before merging
projects/maat.ymlsayskind: compose. The PR checks fail until then.maat-judge, uid and gid1500, with subordinate ids and linger/srv/maat-judge/run/docker.sock/srv/maat-judge/jobs, owned by1500:1500cpu cpuset io memory pids, with the slice limited to 1 core and 1 GBgcc:13-bookwormandpython:3.12-slimpulled on it, so the first rollout doesn't time outhost/agent.py, only for projectmaat, serviceworker:/srv/maat-judge/run(read-only) and/srv/maat-judge/jobs, each to the same path. Please don't addmaattoHOST_ACCESS.agent.pyto/srv/graphite/bin/and restartinggraphite-agent. Re-runningbootstrap.shwould overwrite/etc/graphite/agent.envand loseDEPLOY_REPORT_SECRET.systemindeploy/host.yamlfrom700Mto1724Mfor the judge. Projects would then reserve 1728M of 1976M./maat/, or give me access to:MONGO_PASSWORD,REDIS_PASSWORD,JWT_SECRET,MINIO_ROOT_PASSWORD,S3_SECRET_KEYEMAIL_HOST,EMAIL_FROM,EMAIL_USERNAME,EMAIL_PASSWORDVerification
composeregistry entry,deploy.py check,check-memory.pyandcheck-values.pypass.edge/backup.pybrought back data, pictures and standings.After merging
Rollback and restore
ENABLED=false. Volumes are kept.IMAGE_TAGtosha-a665a99or newer. Database changes are not undone.backendandworker.mongo-backup, runbash /mongo-backup.sh list, thenbash /mongo-backup.sh restore <dump>with the newest dump older than the archive.redis-backup, do the same withsh /redis-backup.sh.backendandworker.PROXIED=true: visitors would share Cloudflare's IPs and rate limits.Checklist