Getting started with Managed Service for MongoDB

    Before creating a database cluster:

    1. If you already have a folder in Yandex.Cloud, open the page of that folder in the management console. If there is no folder yet, create one:

      1. On the management console home page, click Create folder.

      2. Enter the folder name.

        The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The length of the name must be from 3 to 63 characters.

      3. Click Create folder.

    2. Create a VM (based on Linux or Windows) that you will use for accessing the DB cluster. If you plan to connect to the database from outside the Cloud, request external IP addresses for hosts when creating a cluster.

    Follow the instructions below to quickly create a cluster and test your connection to it.

    1. In the management console, select the folder where you want to create a DB cluster.

    2. Click Managed Service for MongoDB.

    3. Click Create cluster and select the necessary DBMS.

    4. Set the cluster parameters and click Create cluster. The process is described in detail in the section Creating a MongoDB cluster.

    5. When the cluster is ready to operate, its status on the Managed Service for MongoDB dashboard will change to RUNNING.

    6. To connect to the DB server, an SSL certificate is required. You can prepare all the necessary authentication data as follows:

      $ mkdir ~/.mongodb
      $ wget "https://storage.yandexcloud.net/cloud-certs/CA.pem" -O ~/.mongodb/CA.pem
      $ mongo --norc \
              --ssl \
              --sslCAFile ~/.mongodb/CA.pem \
              --ipv6 \
              --host 'rs01/<address of host 1>:27018,<address of host 2>:27018,<address of host N>:27018' \
              -u <user name> \
              -p <user password> \
              <DB name>