FerretDB is a document-oriented database that provides a MongoDB-compatible API. It is built on top of PostgreSQL and offers a truly open-source alternative to MongoDB.
Installing FerretDB
To get started with FerretDB:
- Navigate to the Datastoressection in the control server.
- Click Manage Batteries.
- Find the FerretDBbattery and clickInstall.
FerretDB also depends on the Postgres battery, which is installed automatically when first starting the control server.
Creating a FerretDB instance
To create a new FerretDB instance:
- Go to the Datastorestab.
- Ensure that there is a Postgres instance running.
- Click New FerretDBin the FerretDB section.
- Fill out the form with the desired settings, choosing the Postgres instance to use, along with memory and CPU limits.
- Click Save FerretDBto finalize creation.
Accessing FerretDB
After creating a FerretDB instance, there will be a service created in the battery-data namespace with the name of the FerretDB instance.
For example, from within a Jupyter notebook we can easily connect to the instance:
from pymongo import MongoClient
# Using the IP shown in the FerretDB service
client = MongoClient('mongodb://10.244.0.33:27017')
client.server_info()
Additional Resources
- Check out the official FerretDB documentation for more details.