- Installing FireWorks still suggests, “Set up an account via the mLab web site instructions…” but that should be removed now since mLab no longer allows new accounts.
- It also suggests MongoDB Atlas but doesn’t document how to set up FireWorks with Atlas. That’s tricky because Atlas creates a server cluster rather than a single server. Having figured it out, I’ve documented how, below.
lpad initcommand (without
-u) asks for a host parameter like
'localhost' or 'mongodb+srv://CLUSTERNAME.mongodb.net'but I did not succeed in getting that to work with Atlas. If there’s a way, the steps below could be simpler.
How to configure FireWorks to connect to MongoDB Atlas
On the Atlas website
- Create an account at https://cloud.mongodb.com/ with a strong password (this account will be accessible on the open Internet).
- Create a free cluster, name it, and add a database “
- Add a database user with a strong password and give it “Atlas Admin” user privileges.
- Set “Network Access” to Allow Access from your IP range (or from Anywhere,
- Under Clusters > CONNECT, click
Connect your applicationand pick the “driver” “Python x.y or later” corresponding to your pymongo pip version
- Copy the connection URI, e.g.
On your computer
pip install dnspython# needed to access a mongo cluster
- Compute the URL-quoted DB user’s password:
python -c "import urllib.parse; print(urllib.parse.quote('DB USER PASSWORD'))"
my_launchpad.yaml, assembling parts of the connection URI with step 2:
lpad init -u Enter host parameter: mongodb+srv://DBUSERNAME:[email protected]/fireworks Enter ssl_ca_file parameter: Enter authsource parameter: admin
I hope this helps. Thanks all your contributions, people!