diff options
| author | jc0b <j.burley@vu.nl> | 2020-04-23 14:59:48 +0200 |
|---|---|---|
| committer | jc0b <j.burley@vu.nl> | 2020-06-09 14:51:50 +0200 |
| commit | 3e182d0476637fca2ee618d26aa6776f0e20b2c7 (patch) | |
| tree | e556fbd633b979d7c233630d4692ed2e922d47df /mongodb/mongo-init.js | |
| parent | 8d8486bef1b08fbc43cc100cca83fe6d8bc09f28 (diff) | |
Added basic mongodb framework
Diffstat (limited to 'mongodb/mongo-init.js')
| -rw-r--r-- | mongodb/mongo-init.js | 67 |
1 files changed, 67 insertions, 0 deletions
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 |
