import-script

command
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 10 Imported by: 0

README

import script

This utility adds predefined data to the MongoDB permissions API database. The utility uses the same config type as the permissions API service, so any custom configuration can be added via environment variables.

  • The roles collection is populated with data in the roles.json file.
  • The policies collection is populated with data in the policies.json
How to run the utility against a local MongoDB

In a terminal, ensure you are in the import-script directory:

cd import-script

Run the import script with the default configuration:

go run import.go
How to run the utility against an environment (DocumentDB)

In a terminal, ensure you are in the import-script directory:

cd import-script

Open an SSH tunnel to the environment (replace {cluster address}):

dp ssh develop publishing 1 -p 27017:{cluster address}:27017

Run the import script, setting the required configuration values:

MONGODB_IS_SSL=true MONGODB_USERNAME=... MONGODB_PASSWORD=... go run import.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL