How to Use Vultr's MongoDB Community Edition Marketplace Application

Updated on July 25, 2024
How to Use Vultr's MongoDB Community Edition Marketplace Application header image

Introduction

MongoDB Community Edition is an open-source version of the popular NoSQL database, offering a flexible document data model for storing information. Unlike traditional relational databases, it stores data in JSON-like documents, making it easy to work with complex data structures. You can leverage MongoDB Community Edition for local development or cloud deployments, allowing you to perform ad-hoc queries, create indexes for faster retrieval, and carry out real-time data analysis.

This guide explains how to use the Vultr MongoDB Community Edition marketplace application. You will install the MongoDB Shell and MongoDB Compass to connect to your MongoDB server.

Deploy MongoDB Community Edition

  1. Login to your Vultr account and click the Deploy button.

    Image of Deploy page

  2. Start the deployment of a new instance by selecting a Server type.

    Image of server type

  3. Choose a nearby location that is available to you.

    Image of sever available location

  4. Select the MongoDB Community Edition marketplace application image.

    Image of MongoDB Community Edition app

  5. Select a server size as per your requirements.

    Image of server size.

  6. Press the Deploy Now button to start the instance deployment.

    Image of Deploy button

    It's recommended to enable auto backups as they prevent data loss.

  7. Once the instance is deployed go to the server details.

    Image of server details

    The deployment may take a few minutes to fully complete, and you can follow the initialization process on the instance console.

Access via MongoDB Shell

The MongoDB Shell is a command-line interface (CLI) provided by MongoDB, enables users to perform tasks like querying, updating, and managing databases and collections directly from the command line. It uses JavaScript syntax for scripting and executing complex operations within the shell. This section explains the steps to connect to your MongoDB server deployed using the marketplace application via MongoDB Shell. You will download MongoDB Shell on your workstation based on your requirements.

  1. To connect to your MongoDB server using the marketplace application via MongoDB Shell, download MongoDB Shell on your workstation based on your requirements.

  2. To connect to MongoDB instance with authentication, using the admin database for authentication. Access the value listed in your App Instructions section within the instance control panel, and copy the command.

    Image of Instance Access

  3. Once the MongoDB Shell is set up on your system, open your terminal/console and enter the following command you saved earlier.

    console
    $ mongosh "mongodb://admin_username:admin_password@SERVER_IP:27017/defaultdb" --authenticationDatabase admin
    

    Replace the admin_username, admin_password, and SERVER_IP with your actual server credentials.

    If the connection is successful, your output should look like this:

    console
    Current Mongosh Log ID: 66200038fb5fc403d7ef634a
    Connecting to:          mongodb://<credentials>@SERVER_IP:27017/?directConnection=true&authSource=admin&
    Using MongoDB:          7.0.8
    Using Mongosh:          2.2.4
    
    For mongosh info see: https://docs.mongodb.com/mongodb-shell/
    

Access via MongoDB Compass

MongoDB Compass is a graphical user interface (GUI) provided by MongoDB, offering users a visual representation of their data. It facilitates easy navigation through collections, execution of queries, and manipulation of data compared to using the command-line interface. This section explains the steps to connect to your MongoDB server deployed using the marketplace application via MongoDB Compass. You will download MongoDB Compass on your workstation based on your requirements.

  1. To connect to your MongoDB server using the marketplace application via MongoDB Compass, download MongoDB Compass on your workstation based on your requirements.

  2. Once MongoDB Compass is set up on your system, open the application and click on New connection, Enter your URL to connect to your MongoDB server.

    Image of MongoDB Compass

    Replace the admin_username, admin_password, and SERVER_IP with your actual server credentials, which are listed in the App Instructions section within the instance control panel.

  3. Once your MongoDB server successfully connects to MongoDB Compass, you can now interact with your databases.

    Image of MongoDB Compass

Conclusion

In this guide, you deployed the Vultr MongoDB Community Edition marketplace application along with its specified requirements. Then, you connect your MongoDB server to MongoDB Shell for command-line interface (CLI) and MongoDB Compass for graphical user interface (GUI) using the marketplace application.