Issue/Scenario:
The admin would like to view the contents of env variables from multiple projects via Mongo.
Resolution:
The contents of the env variables aren't directly visible via mongo and we'd have to curl to /v1/blobs/<objectId>
The objectId is a property/key in the project collection, it'll be visible only within those bson objects for which the env variable is/are set, as per :
"environmentVariablesBlobKey" : "3e763f2717751680bd7d6f78365d18e6543cf486"
For instance, with our internal deployment, I have a quick-start project which has a env variable set, it would have environmentVariablesBlobKey set towards the bottom of the bson object, and if I curl to https://domain-name/v1/blobs/3e763f2717751680bd7d6f78365d18e6543cf486 it'd return the key-val pair which we're looking for.
We could also automate it to iterate over an array/list, the basic idea is to connect to an instance (not specifically admin) of Mongodb and print the results of db.projects.find({ "environmentVariablesBlobKey" : {"$exists": 1} } ) to a file, from this use the blobKey as an argument with urllib or any other url handler to send request to /v1/blobs/, decode the response to utf-8 and return or print the data.
Note:
For specific implementation using the script, please reach out to Domino Support.
Comments
0 comments
Please sign in to leave a comment.