summaryrefslogtreecommitdiff
path: root/mongodb/mongo-init.js
diff options
context:
space:
mode:
authorjc0b <j.burley@vu.nl>2020-04-23 14:59:48 +0200
committerjc0b <j.burley@vu.nl>2020-04-23 14:59:48 +0200
commit4c347eb501a16eaa2a54933ed1ec8fa26521cc88 (patch)
tree5121e50197c1ff4837d250509c47950a7644028f /mongodb/mongo-init.js
parentc7629d482e9129160858282d32d94f7278bbf6df (diff)
Added basic mongodb framework
Diffstat (limited to 'mongodb/mongo-init.js')
-rw-r--r--mongodb/mongo-init.js67
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