MongoDB configuration ===================== You will need a running MongoDB instance to use task object storage. It is recommended to use MongoDB Atlas https://www.mongodb.com/cloud/atlas. If and when you need an on-premise MongoDB, you can read the following instructions. Setting up on-prem Mongo for development ---------------------------------------- See installation instructions here: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ To use MongoDB with authentication, set up the users first in Mongo shell (for more information, see MongoDB documentation: https://docs.mongodb.com/manual/tutorial/enable-authentication/) First, start mongoDB .. code-block:: bash mongod or, as a service: .. code-block:: bash sudo service mongod start Then connect Mongo shell to the running instance .. code-block:: bash mongo Create an admin user (if no admin exists): .. code-block:: bash use admin db.createUser( { user: "admin", pwd: "secret-password", roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ] } ) Exit and restart MongoDB with authentication enabled: .. code-block:: bash mongod --auth Then connect with Mongo shell. Inside the shell authenticate with admin user: .. code-block:: bash use admin db.auth("admin", "secret-password" ) Now you can create the robot user which authenticates via TOS: .. code-block:: bash use robot_process db.createUser( { user: "robot-process-user", pwd: "super-secret", roles: [ { role: "readWrite", db: "robot_process" }] } ) where authentication database ``robot_process`` is the same where task objects are stored. Username and password should be passed to TOSLibrary as keyword arguments ``db_user`` and ``db_passw``, respectively. Setting up on-prem Mongo for production --------------------------------------- Set up Mongo to always use authentication in ``/etc/mongod.conf``: .. code-block:: text security: authorization: enabled and use Mongod as a service: .. code-block:: bash sudo systemctl enable mongod.service