-
Notifications
You must be signed in to change notification settings - Fork 1k
PEP458: Add minimal RSTUF service configuration #15241
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
Conversation
90e471e
to
cbff7e2
Compare
6045b4d
to
e5b0658
Compare
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.
overall i appreciate how clean this is when treated as a dependent service.
i believe we could remove the vault
service at this time since nothing integrates with it and it only was added in support of implementing TUF inside warehouse.
The vault container was a previous TUF implementation (TUF initialization pypi#7488) The new integration with RSTUF does not require this container. Signed-off-by: Kairo de Araujo <[email protected]>
This commit adds the RSTUF services to the Warehouse infrastructure for development and sets the minimum required to start RSTUF services. It adds the RSTUF API, which is used later to integrate into Warehouse and RSTUF Worker, which is responsible for computing the TUF metadata. The RSTUF requires the Postgres and Redis. Postgres stores the rstuf database used for TUF metadata computing. Redis stores the task message queue between RSTUF API and Worker, task backend result, and live settings between RSTUF services. RSTUF shares the same Postgres and Redis in development environment but has a specific setup to use its own Postgres database and Redis database ID. Postgresql URI `RSTUF_SQL_SERVER=postgresql://postgres@db:5432/rstuf` Redis DB Broker and Result is id 1 `RSTUF_BROKER_SERVER=redis://redis/1` `RSTUF_REDIS_SERVER_DB_RESULT=1` Redis DB for TUF repository settings is 2 `RSTUF_REDIS_SERVER_DB_REPO_SETTINGS=2` This commit also includes TUF database creation in the Makefile during the `make initdb`. Signed-off-by: Kairo de Araujo <[email protected]>
Remove settings from rstuf-worker in docker-compose.yml Signed-off-by: Kairo de Araujo <[email protected]>
e5b0658
to
6116b2e
Compare
I added the |
Thanks @kairoaraujo! Looks great. |
Unclear to me why CI is failing. Seems to be unrelated and consistent with other branches. |
I see this failure in two other opened PRs 🤔 https://github.com/pypi/warehouse/actions/runs/7655175103/job/20867003665#step:8:1 |
I did some investigation and I commented here: |
Supersedes: #13943
This PR is part 1 in a series of PRs to integrate Repository Service for TUF (RSTUF) with Warehouse for PEP 458 adoption.
Background
RSTUF maintains a PEP 458 TUF metadata repository as a black box. It provides REST API, which accepts requests upon addition or removal of release files, and a Worker service, which performs the TUF metadata update and signing tasks asynchronously upon API requests.
Change details
Add
rstuf-api
service to docker-compose.ymlAdd
rstuf-worker
service to docker-compose.ymlInclude rstuf db initialization in
initdb
target in Makefile.Preview of next PR
The next PR will include: