Skip to content

DOCSP-45173: Deployment & connection string #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/get-started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Get Started with the Ruby Driver
.. toctree::

Download & Install </get-started/download-and-install/>

.. TODO:
Create a Deployment </get-started/create-a-deployment>
Create a Connection String </get-started/create-a-connection-string>

.. TODO:
Connect to MongoDB </get-started/connect-to-mongodb>
Next Steps </get-started/next-steps>

Expand Down
58 changes: 58 additions & 0 deletions source/get-started/create-a-connection-string.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.. _ruby-get-started-connection-string:

==========================
Create a Connection String
==========================

You can connect to your MongoDB deployment by providing a
**connection URI**, also called a *connection string*, which
instructs the driver how to connect to a MongoDB deployment
and how to behave while connected.

The connection string includes the hostname or IP address and
port of your deployment, the authentication mechanism, user credentials
when applicable, and connection options.

.. TODO:
To connect to an instance or deployment not hosted on Atlas, see
:ref:`ruby-connection-targets`.

.. procedure::
:style: connected

.. step:: Find your MongoDB Atlas connection string

To retrieve your connection string for the deployment that
you created in the :ref:`previous step <ruby-get-started-create-deployment>`,
log in to your Atlas account and navigate to the
:guilabel:`Clusters` section. Then, click the :guilabel:`Connect` button
for your new deployment.

.. figure:: /includes/figures/atlas_connection_connect_cluster.png
:alt: The connect button in the clusters section of the Atlas UI

Proceed to the :guilabel:`Connect your application` section. Select
"Ruby" from the :guilabel:`Driver` selection menu and the version
that best matches your installed version from the :guilabel:`Version`
selection menu.

.. step:: Copy your connection string

Click the copy button on the right of the connection string to copy it to
your clipboard, as shown in the following screenshot:

.. figure:: /includes/figures/atlas_connection_copy_string_ruby.png
:alt: The connection string copy button in the Atlas UI

.. step:: Update the placeholders

Paste this connection string into a file in your preferred text editor
and replace the ``<db_username>`` and ``<db_password>`` placeholders with
your database user's username and password.

Save this file to a safe location for use in the next step.

After completing these steps, you have a connection string that
contains your database username and password.

.. include:: /includes/get-started/quickstart-troubleshoot.rst
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to reviewer: this file is included in #92

29 changes: 29 additions & 0 deletions source/get-started/create-a-deployment.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _ruby-get-started-create-deployment:

===========================
Create a MongoDB Deployment
===========================

You can create a free tier MongoDB deployment on MongoDB Atlas
to store and manage your data. MongoDB Atlas hosts and manages
your MongoDB database in the cloud.

.. procedure::
:style: connected

.. step:: Create a free MongoDB deployment on Atlas

Complete the :atlas:`Get Started with Atlas </getting-started>`
guide to set up a new Atlas account and load sample data into a new free
tier MongoDB deployment.

.. step:: Save your credentials

After you create your database user, save that user's
username and password to a safe location for use in an upcoming step.

After you complete these steps, you have a new free tier MongoDB
deployment on Atlas, database user credentials, and sample data loaded
in your database.

.. include:: /includes/get-started/quickstart-troubleshoot.rst
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading