Use a cloud database¶
In this tutorial, you will learn how to switch from saving results locally to saving them to a collaborative remote (or "cloud") database.
The quick tutorial¶
Consider collaborating! Simmate is built for sharing results, so email email@example.com to discuss joining our effort. This will let you avoid the complexities of managing your own database. If you decide to join, you'll only have to complete steps 3 and 4 of this tutorial.
Set up a cloud database that is supported by django. We highly recommend setting up a connection pool for your database as well. If you need help with this setup, you can use our "deploy" button in the next section. 10GB is plenty to get started.
Make sure you have extra database dependencies installed. For postgres, run the command:
conda install -n my_env -c conda-forge psycopg2
Add the file
~/simmate/my_env-database.yamlwith your connection details that match django format. As an example, this
my_env-database.yamlfile gives a
defaultdatabase to use:
default: ENGINE: django.db.backends.postgresql HOST: simmate-database-do-user-8843535-0.b.db.ondigitalocean.com NAME: simmate-database-00-pool USER: doadmin PASSWORD: ryGEc5PDxC2IHDSM PORT: 25061 OPTIONS: sslmode: require
And if (and only if) you built a brand new database in step 2, reset your database in order to build initial tables. Use the command
simmate database resetto do this. do NOT run this command if you joined a collaborative database!
Set up using Digital Ocean¶
We recommend using Postgres through DigitalOcean. If you do not have a Digital Ocean account, we ask that you sign up using our referral link. The button below will then take you to the relevant page.
Note, we are not affiliated with Digital Ocean -- it's just what our team happens to use.