Managed MongoDB® Databases provide fully-managed document Database Instances, with MongoDB® as a database engine.
Document databases enable users to store and retrieve data in a document format, such as json. Compared to traditional relational databases where data is stored in a table-like format, document-type storage supports storing multiple nested keys and values in each document key.
Note
Managed MongoDB® is currently in public beta. Fill out the formOpen in new context to be notified of the General Availability or if you want to get in touch with our team about Managed MongoDB®.
Concepts
Refer to our dedicated concepts pageOpen in new context to find definitions of the different terms referring to Managed MongoDB®.
Quickstart
-
Configure your environment variables.
Note
This is an optional step that seeks to simplify your usage of the APIs.
Code -
Edit the POST request payload you will use to create your Database Instance. Replace the parameters in the following example:
CodeParameter Description project_idREQUIRED The ID of the Project you want to create your Database Instance in. To find your Project ID you can list the projects or consult the Scaleway consoleOpen in new context. nameREQUIRED Name of the Database Instance node_amountREQUIRED Number of nodes in the Database Instance. You can select either 1 or 3. user_nameREQUIRED Identifier of the default user, which is created concurrently with the Database Instance passwordREQUIRED Password for the default user versionREQUIRED Version ID of the MongoDB® engine. To check the list of available version you can use the following endpoint: https://api.scaleway.com/mongodb/v1/regions/$SCW_REGION/versionstagsThe list of tags ["tag1", "tag2", ...]that will be associated with the Database Instance. Tags can be appended to the query of the List Database Instances call to show results for only the Database Instances using a specific tag. You can also combine tags to list Database Instances that possess all the appended tags.node_typeREQUIRED The node type. To check the list of available node types you can use the following endpoint: https://api.scaleway.com/mongodb/v1/regions/$SCW_REGION/node-typesvolume.typeREQUIRED Type of volume where data is stored. You can specify either sbs_5korsbs_15k. The default value issbs_5kvolume.size_bytesREQUIRED Volume size expressed in bytes. For example 30GB is expressed as 30000000000 endpointsREQUIRED Network connection point that allows you to access and interact with your managed Database Instance. You can leave this empty as it will be automatically generated. It takes on the following format: {instance_id}.mgdb.{region}.scw.cloud" -
Create a Database Instance by running the following command. Make sure you include the payload you edited in the previous step.
Code -
List your Database Instances.
CodeYou should get a response like the following:
Note
This is a response example, the UUIDs and IP address displayed are not real.
Code -
Retrieve your Database Instance ID from the response.
-
Get your TLS certificate in the console.
-
Connect to your Database Instance with the
mongoshclient.CodeNote
Alternatively, you can connect using different clients. Refer to the How to connect to a MongoDB Database InstanceOpen in new context documentation page for more information.
-
Enter the database password that you defined upon creation.
You are now connected to your Managed Database.
Requirement
To perform the following steps, you must first ensure that:
- you have an account and are logged into the Scaleway consoleOpen in new context
- you have created an API keyOpen in new context and that the API key has sufficient IAM permissionsOpen in new context to perform the actions described on this page.
- you have installed
curlOpen in new context
Technical Information
Regions
Scaleway's infrastructure is spread across different regions and Availability ZonesOpen in new context.
Currently, Managed MongoDB® is available only in the Paris region, which is represented by the following path parameter:
fr-par
MongoDB® specifications
User Management
- Currently, a single user is created when you create your Database Instance. This user has an
adminrole. - Users with an
adminrole have access to all logical databases and can create new ones.
Going Further
For more information about Managed MongoDB®, you can check out the following pages:
- Shared vCPU: a complete and highly reliable node range with shared resources that is made for scaling from development to production needs, at affordable prices.
- Dedicated vCPU: database nodes with dedicated vCPU for the most demanding workloads and mission-critical applications.