From de7013540d0563e1c6baf6fbf5211f972a150b57 Mon Sep 17 00:00:00 2001 From: Theo Ilie Date: Tue, 6 Feb 2024 21:27:44 -0800 Subject: [PATCH] [PROTO-1621] Implement ddex indexer (#7486) --- packages/ddex/README.md | 4 +- packages/ddex/ingester/cmd/main.go | 6 +- packages/ddex/ingester/common/common.go | 4 +- packages/ddex/ingester/crawler/crawler.go | 6 +- packages/ddex/ingester/go.mod | 31 +-- packages/ddex/ingester/go.sum | 134 +-------- packages/ddex/ingester/indexer/indexer.go | 256 ++++++++++++++++-- packages/ddex/ingester/parser/parser.go | 9 +- packages/ddex/webapp/client/.env.dev | 2 +- .../webapp/client/src/pages/Upload/Upload.tsx | 2 +- .../client/src/providers/EnvVarsProvider.tsx | 2 +- packages/ddex/webapp/server/src/app.ts | 31 ++- 12 files changed, 292 insertions(+), 195 deletions(-) diff --git a/packages/ddex/README.md b/packages/ddex/README.md index 64df2aa076d..3bc7bc22902 100644 --- a/packages/ddex/README.md +++ b/packages/ddex/README.md @@ -22,7 +22,7 @@ chmod 400 packages/ddex/mongo-keyfile ``` 2. `audius-compose connect` to update your /etc/hosts 3. `audius-compose up --ddex` -4. Once the `ddex-mongo` container is running: manually intiate the mongodb replica set with `docker exec -it ddex-mongo mongosh -u mongo -p mongo --authenticationDatabase admin --eval 'rs.initiate({_id:"rs0", members:[{_id:0, host:"ddex-mongo:27017"}]})`. The other ddex containers will be blocked from starting until this command succeeds. +4. Once the `ddex-mongo` container is running: manually intiate the mongodb replica set with `docker exec -it ddex-mongo mongosh -u mongo -p mongo --authenticationDatabase admin --eval 'rs.initiate({_id:"rs0", members:[{_id:0, host:"ddex-mongo:27017"}]})'`. The other ddex containers will be blocked from starting until this command succeeds. ### Bring up the ddex stack subsequently `audius-compose up --ddex` @@ -32,7 +32,7 @@ Note: `audius-compose down` removes the `ddex-mongo-db` volume, so if you run th To access the ddex db via the mongo shell: `docker exec -it ddex-mongo mongosh -u mongo -p mongo --authenticationDatabase admin` then `use ddex` ### Develop with hot reloading -Each service can be run independently as long as `ddex-mongo` is up. See the respective subdirectories' READMEs. +Each service can be run independently as long as `ddex-mongo` is up (from `audius-compose up --ddex`` or `docker compose --project-directory=dev-tools/compose --file=dev-tools/compose/docker-compose.yml --profile=ddex up ddex-mongo -d`). See the respective subdirectories' READMEs. ### Creating a bucket in S3 1. Create a new bucket in the S3 console with the name `ddex-[dev|staging]-