- 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.
- The
lpad init
command (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 “
fireworks
”. - 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,
0.0.0.0/0
). - Under Clusters > CONNECT, click
Connect your application
and pick the “driver” “Python x.y or later” corresponding to your pymongo pip versionx.y
. - Copy the connection URI, e.g.
mongodb+srv://DBUSERNAME:<password>@cluster1.6wxyz.azure.mongodb.net/<dbname>?retryWrites=true&w=majority
.
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'))"
- Create
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
lpad reset
I hope this helps. Thanks all your contributions, people!