From 1d3a76ac4e8de0af33454db9bb76853dbcca30f1 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 17 Mar 2022 11:39:56 +0100 Subject: refactor(web): Remove obsolete database configuration This change removes the obsolete Mongo database configuration that was stored in the repository, now that the new web API migrates to Postgres. --- database/mongo-init-opendc-db.sh | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 database/mongo-init-opendc-db.sh (limited to 'database/mongo-init-opendc-db.sh') diff --git a/database/mongo-init-opendc-db.sh b/database/mongo-init-opendc-db.sh deleted file mode 100644 index d55b8990..00000000 --- a/database/mongo-init-opendc-db.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -echo 'Creating OpenDC user and database' - -mongo opendc --host localhost \ - --port 27017 \ - -u "$MONGO_INITDB_ROOT_USERNAME" \ - -p "$MONGO_INITDB_ROOT_PASSWORD" \ - --authenticationDatabase admin \ - --eval "db.createUser({user: '$OPENDC_DB_USERNAME', pwd: '$OPENDC_DB_PASSWORD', roles:[{role:'dbOwner', db: '$OPENDC_DB'}]});" - -MONGO_CMD="mongo $OPENDC_DB -u $OPENDC_DB_USERNAME -p $OPENDC_DB_PASSWORD --authenticationDatabase $OPENDC_DB" - -echo 'Creating collections' - -$MONGO_CMD --eval 'db.createCollection("authorizations");' -$MONGO_CMD --eval 'db.createCollection("projects");' -$MONGO_CMD --eval 'db.createCollection("topologies");' -$MONGO_CMD --eval 'db.createCollection("portfolios");' -$MONGO_CMD --eval 'db.createCollection("scenarios");' -$MONGO_CMD --eval 'db.createCollection("traces");' -$MONGO_CMD --eval 'db.createCollection("prefabs");' - -echo 'Loading default traces' - -$MONGO_CMD --eval 'db.traces.update( - {"_id": "bitbrains-small"}, - { - "$set": { - "_id": "bitbrains-small", - "name": "bitbrains-small", - "type": "VM", - } - }, - {"upsert": true} -);' -- cgit v1.2.3