Page MenuHomeDevCentral

Deploy a MongoDB container
Closed, WontfixPublic

Description

Name: mercatorial

Event Timeline

We would need something like:

/usr/local/bin/mongo-mercatorial-client
#!/bin/sh
#
# Runs a MongoDB client, attached to mercatorial instance

INSTANCE=mercatorial

if [ -z "$1" ]; then
    DB=test
else
    DB=$1
fi

docker run -it --rm --link $INSTANCE:mongo mongo sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/$DB"'

But it must be escaped properly to have a subtitution for $DB.

Done, but autocompletion still to do for mongo-mercatorial-client.

dereckson removed Sandlayth as the assignee of this task.Mar 8 2018, 21:11

[ Mass switching long-time assigned tasks to user projects dashboards instead. ]

dereckson claimed this task.

With T727 closed, we don't currently have service requiring a shared MongoDB instance.

Obsidian needs one (but can use other datastores too), but, well, it would be a dedicated one like a obsidian_db container.

A small note about why dedicated instances seem a better fit, here the resources consumed by a new container:

$ docker run mongo
$ docker stats amazing_beaver
CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
f8cc18edac42        amazing_beaver      0.52%               70.26MiB / 9.598GiB   0.71%               976B / 0B           0B / 1.31MB         32

The log warns 2020-02-17T06:06:43.264+0000 I INDEX [LogicalSessionCacheRefresh] build may temporarily use up to 200 megabytes of RAM.

Looks reasonable to set up a dedicated MongoDB for each project.