diff --git a/snooty.toml b/snooty.toml index ca122e1b..90142360 100644 --- a/snooty.toml +++ b/snooty.toml @@ -19,3 +19,4 @@ ruby-driver = "Ruby driver" language = "Ruby" quickstart-sinatra-app-name = "my-sinatra-app" feedback-widget-title = "Feedback" +server-manual = "Server manual" diff --git a/source/includes/figures/atlas_connection_select_cluster.png b/source/includes/figures/atlas_connection_select_cluster.png new file mode 100644 index 00000000..e072febf Binary files /dev/null and b/source/includes/figures/atlas_connection_select_cluster.png differ diff --git a/source/includes/quick-start/create-cxn-str.rst b/source/includes/quick-start/create-cxn-str.rst new file mode 100644 index 00000000..2708e1c6 --- /dev/null +++ b/source/includes/quick-start/create-cxn-str.rst @@ -0,0 +1,51 @@ +You can connect to your MongoDB deployment by providing a +**connection URI**, also called a *connection string*, which +tells {+odm+} how to connect to a MongoDB deployment and 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. + +To learn about connecting to an instance or deployment not hosted on +Atlas, see :manual:`Connection Strings ` +in the {+server-manual+}. + +.. procedure:: + :style: connected + + .. step:: Find your MongoDB Atlas connection string + + To retrieve your connection string for the deployment that + you created in the previous step, log in to your Atlas account. + Then, navigate to the :guilabel:`Database` section and click the + :guilabel:`Connect` button for your new deployment. + + .. figure:: /includes/figures/atlas_connection_select_cluster.png + :alt: The connect button in the clusters section of the Atlas UI + + Proceed to the :guilabel:`Connect your application` section. Select + **{+language+}** from the :guilabel:`Driver` selection menu and + the most recent {+ruby-driver+} version from the + :guilabel:`Version` selection menu. + + Deselect the :guilabel:`View full code sample` option to view only + the connection string. + + .. step:: Copy your connection string + + Click the button on the right of the connection string to copy it + to your clipboard. + + .. step:: Update the placeholders + + Paste the connection string into a file in your preferred text editor + and replace the ```` and ```` 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/quick-start/troubleshoot.rst \ No newline at end of file diff --git a/source/includes/quick-start/create-deployment.rst b/source/includes/quick-start/create-deployment.rst new file mode 100644 index 00000000..30f49201 --- /dev/null +++ b/source/includes/quick-start/create-deployment.rst @@ -0,0 +1,22 @@ +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 ` + 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 completing these steps, you have a new free-tier MongoDB deployment on +Atlas, database user credentials, and sample data loaded into your database. + +.. include:: /includes/quick-start/troubleshoot.rst diff --git a/source/quick-start-sinatra.txt b/source/quick-start-sinatra.txt index 60f5bd32..176b4efd 100644 --- a/source/quick-start-sinatra.txt +++ b/source/quick-start-sinatra.txt @@ -55,9 +55,9 @@ that connects to a MongoDB deployment. .. toctree:: /quick-start-sinatra/download-and-install/ + /quick-start-sinatra/create-a-deployment/ + /quick-start-sinatra/create-a-connection-string/ -.. /quick-start-sinatra/create-a-deployment/ -.. /quick-start-sinatra/create-a-connection-string/ .. /quick-start-sinatra/configure-mongodb/ .. /quick-start-sinatra/view-data/ .. /quick-start-sinatra/write-data/ diff --git a/source/quick-start-sinatra/create-a-connection-string.txt b/source/quick-start-sinatra/create-a-connection-string.txt new file mode 100644 index 00000000..cb44afc2 --- /dev/null +++ b/source/quick-start-sinatra/create-a-connection-string.txt @@ -0,0 +1,7 @@ +.. _mongoid-quick-start-sinatra-create-cxn-str: + +========================== +Create a Connection String +========================== + +.. include:: /includes/quick-start/create-cxn-str.rst \ No newline at end of file diff --git a/source/quick-start-sinatra/create-a-deployment.txt b/source/quick-start-sinatra/create-a-deployment.txt new file mode 100644 index 00000000..758a7807 --- /dev/null +++ b/source/quick-start-sinatra/create-a-deployment.txt @@ -0,0 +1,7 @@ +.. _mongoid-quick-start-sinatra-create-deployment: + +=========================== +Create a MongoDB Deployment +=========================== + +.. include:: /includes/quick-start/create-deployment.rst