Skip to content

Commit e681751

Browse files
authored
DOCSP-45173: Deployment & connection string (#94)
* DOCSP-45173: Deployment & connection string * edits * edit image * SA feedback
1 parent 0905ae3 commit e681751

File tree

5 files changed

+89
-2
lines changed

5 files changed

+89
-2
lines changed

source/get-started.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Get Started with the Ruby Driver
2121
.. toctree::
2222

2323
Download & Install </get-started/download-and-install/>
24-
25-
.. TODO:
2624
Create a Deployment </get-started/create-a-deployment>
2725
Create a Connection String </get-started/create-a-connection-string>
26+
27+
.. TODO:
2828
Connect to MongoDB </get-started/connect-to-mongodb>
2929
Next Steps </get-started/next-steps>
3030

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.. _ruby-get-started-connection-string:
2+
3+
==========================
4+
Create a Connection String
5+
==========================
6+
7+
You can connect to your MongoDB deployment by providing a
8+
**connection URI**, also called a *connection string*, which
9+
instructs the driver how to connect to a MongoDB deployment
10+
and how to behave while connected.
11+
12+
The connection string includes the hostname or IP address and
13+
port of your deployment, the authentication mechanism, user credentials
14+
when applicable, and connection options.
15+
16+
.. TODO:
17+
To connect to an instance or deployment not hosted on Atlas, see
18+
:ref:`ruby-connection-targets`.
19+
20+
.. procedure::
21+
:style: connected
22+
23+
.. step:: Find your MongoDB Atlas connection string
24+
25+
To retrieve your connection string for the deployment that
26+
you created in the :ref:`previous step <ruby-get-started-create-deployment>`,
27+
log in to your Atlas account and navigate to the
28+
:guilabel:`Clusters` section. Then, click the :guilabel:`Connect` button
29+
for your new deployment.
30+
31+
.. figure:: /includes/figures/atlas_connection_connect_cluster.png
32+
:alt: The connect button in the clusters section of the Atlas UI
33+
34+
Proceed to the :guilabel:`Connect your application` section. Select
35+
"Ruby" from the :guilabel:`Driver` selection menu and the version
36+
that best matches your installed version from the :guilabel:`Version`
37+
selection menu.
38+
39+
.. step:: Copy your connection string
40+
41+
Click the copy button on the right of the connection string to copy it to
42+
your clipboard, as shown in the following screenshot:
43+
44+
.. figure:: /includes/figures/atlas_connection_copy_string_ruby.png
45+
:alt: The connection string copy button in the Atlas UI
46+
47+
.. step:: Update the placeholders
48+
49+
Paste this connection string into a file in your preferred text editor
50+
and replace the ``<db_username>`` and ``<db_password>`` placeholders with
51+
your database user's username and password.
52+
53+
Save this file to a safe location for use in the next step.
54+
55+
After completing these steps, you have a connection string that
56+
contains your database username and password.
57+
58+
.. include:: /includes/get-started/quickstart-troubleshoot.rst
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.. _ruby-get-started-create-deployment:
2+
3+
===========================
4+
Create a MongoDB Deployment
5+
===========================
6+
7+
You can create a free tier MongoDB deployment on MongoDB Atlas
8+
to store and manage your data. MongoDB Atlas hosts and manages
9+
your MongoDB database in the cloud.
10+
11+
.. procedure::
12+
:style: connected
13+
14+
.. step:: Create a free MongoDB deployment on Atlas
15+
16+
Complete the :atlas:`Get Started with Atlas </getting-started>`
17+
guide to set up a new Atlas account and load sample data into a new free
18+
tier MongoDB deployment.
19+
20+
.. step:: Save your credentials
21+
22+
After you create your database user, save that user's
23+
username and password to a safe location for use in an upcoming step.
24+
25+
After you complete these steps, you have a new free tier MongoDB
26+
deployment on Atlas, database user credentials, and sample data loaded
27+
in your database.
28+
29+
.. include:: /includes/get-started/quickstart-troubleshoot.rst
Loading
Loading

0 commit comments

Comments
 (0)