Skip to content
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

MongoDB Connector #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

bdemetris
Copy link

@bdemetris bdemetris commented Oct 20, 2022

#12

Adding MongoDB Support to nanodep

How to test this PR

create a local mongodb using the docker-compose file located in this PR storage/mongodb/docker-compose.yml

export MONGO_ROOT_USER=root
export MONGO_ROOT_PASSWORD=root

docker-compose -f path/to/compose.yml up -d

make release

./depserver-darwin-amd64 -api supersecret -storage=mongodb -storage-dsn=mongodb://root:root@127.0.0.1:27017

follow the quickstart guide for setting up env vars and then just walk through it...

./tools/cfg-get-cert.sh > $DEP_NAME.pem

./tools/cfg-decrypt-tokens.sh /path/to/depname_Token_2022-10-19T19-48-43Z_smime.p7m

./tools/cfg-set-assigner.sh 6E19C113DD0D67948306CB70F7FA0338

alternatively, the testing suite handles cleaning and testing writes to the database so you could just do

export NANODEP_MONGODB_STORAGE_TEST=true
go test -v ./...

@bdemetris bdemetris marked this pull request as ready for review October 20, 2022 19:33
@jessepeterson jessepeterson mentioned this pull request Oct 21, 2022
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.

1 participant