diff options
| author | jc0b <j.burley@vu.nl> | 2020-06-09 14:56:03 +0200 |
|---|---|---|
| committer | jc0b <j.burley@vu.nl> | 2020-06-09 14:56:03 +0200 |
| commit | d91bd3112d4de786888630ebf4243778161b2662 (patch) | |
| tree | 2ab9228c55cb8f8613d4a1de282d2b4fc2e0c8ab | |
| parent | 69623bda88d520842fca11143d79ed6b52453928 (diff) | |
| parent | 3ad2c696003294d8f49fac14d2dc56e81426c3c3 (diff) | |
still merging
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | mongodb/mongo-init.js | 67 |
2 files changed, 68 insertions, 1 deletions
@@ -9,4 +9,4 @@ keys.json mongodb/opendc_testing/* # macOS-specific files -.DS_Store
\ No newline at end of file +.DS_Store diff --git a/mongodb/mongo-init.js b/mongodb/mongo-init.js new file mode 100644 index 00000000..562bda6f --- /dev/null +++ b/mongodb/mongo-init.js @@ -0,0 +1,67 @@ +db.auth('root', 'rootpassword') + +let error = true + +db.createUser( + { + user: "admin", + pwd: "adminpassword", + roles: [ + { + role: "readWrite", + db: "admin" + } + ] + } +) + +db = db.getSiblingDB('opendc') + +db.createUser( + { + user: "opendc", + pwd: "opendcpassword", + roles: [ + { + role: "readWrite", + db: "opendc" + } + ] + } +); + +db.createCollection(users) +db.createCollection(authorizations) +db.createCollection(authorization_levels) +db.createCollection(simulations) +db.createCollection(experiments) +db.createCollection(paths) +db.createCollection(sections) +db.createCollection(schedulers) +db.createCollection(traces) +db.createCollection(jobs) +db.createCollection(tasks) +db.createCollection(task_dependencies) +db.createCollection(task_states) +db.createCollection(machine_states) +db.createCollection(datacenters) +db.createCollection(rooms) +db.createCollection(room_types) +db.createCollection(tiles) +db.createCollection(objects) +db.createCollection(object_types) +db.createCollection(allowed_objects) +db.createCollection(psus) +db.createCollection(cooling_items) +db.createCollection(racks) +db.createCollection(machines) +db.createCollection(machine_tags) +db.createCollection(failure_models) +db.createCollection(cpus) +db.createCollection(machine_cpus) +db.createCollection(gpus) +db.createCollection(machine_gpus) +db.createCollection(memories) +db.createCollection(machine_memories) +db.createCollection(storages) +db.createCollection(machine_storages)
\ No newline at end of file |
