Skip to content

Commit 6fd7acc

Browse files
committed
Connect part
1 parent eb4ccf0 commit 6fd7acc

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed
88 KB
Loading

articles/cosmos-db/mongodb/vcore/quickstart-cross-region-replica-portal.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ In this quickstart, you create a cluster replica in another region for an Azure
2626
## Prerequisites
2727

2828
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free).
29+
- [MongoDB shell](https://www.mongodb.com/try/download/shell)
2930

3031
## Create a cluster replica for a new cluster
3132

@@ -53,7 +54,7 @@ Create a MongoDB cluster with a cluster read replica in another region by using
5354
:::image type="content" source="media/quickstart-cross-region-replication/select-access-to-cross-region-replication-preview.png" alt-text="Screenshot of the access to global distribution preview.":::
5455

5556
> [!IMPORTANT]
56-
> You should select **Access to global distribution (preview)** during provisioning to be able to create a preview replica cluster.
57+
> You should select **Access to global distribution (preview)** during provisioning to be able to create a preview replica cluster.
5758
5859
1. On the **Create Azure Cosmos DB for MongoDB cluster** page, select the **Configure** option within the **Cluster tier** section.
5960

@@ -87,7 +88,7 @@ Create a MongoDB cluster with a cluster read replica in another region by using
8788

8889
1. Select **Next: Global distribution (preview)**.
8990

90-
1. Select **Enable** for **Read replica in another region (preview)** to create a cluster read replica as a part of this new primary cluster provisioning.
91+
1. On the **Global distribution (preview)** tab, select **Enable** for **Read replica in another region (preview)** to create a cluster read replica as a part of this new primary cluster provisioning.
9192

9293
1. In the **Read replica name** field, enter a name for the cluster read replica. It should be a globally unique cluster name.
9394

@@ -109,26 +110,30 @@ You can also select add 0.0.0.0 - 255.255.255.255 firewall rule to allow not jus
109110

110111
1. Select **Review + create**.
111112

112-
1. Review the settings you provide, and then select **Create**. It takes a few minutes to create the cluster. Wait for the portal page to display **Your deployment is complete** before moving on.
113+
1. Review the settings you provided, and then select **Create**. It takes a few minutes to create the cluster. Wait for the portal page to display **Your deployment is complete** before moving on.
113114

114115
1. Select **Go to resource** to go to the Azure Cosmos DB for MongoDB cluster page.
115116

116117
:::image type="content" source="media/quickstart-portal/deployment-complete.png" alt-text="Screenshot of the deployment page for a cluster.":::
117118

118-
## Get cluster credentials
119+
## Connect to the cluster and ingest data
119120

120-
Get the connection string you need to connect to this cluster using your application code.
121+
Get the connection string you need to connect to this primary cluster using your application code.
121122

122-
1. From the Azure Cosmos DB for MongoDB vCore cluster page, select the **Connection strings** navigation menu option.
123+
1. From the Azure Cosmos DB for MongoDB vCore primary cluster page, select the **Connection strings** navigation menu option under **Settings**.
123124

124-
:::image type="content" source="media/quickstart-portal/select-connection-strings-option.png" alt-text="Screenshot of the connection strings option on the page for a cluster.":::
125+
:::image type="content" source="media/quickstart-cross-region-replication/select-connection-strings-option.png" alt-text="Screenshot of the connection strings page in the cluster propteries.":::
125126

126127
1. Record the value from the **Connection string** field.
128+
129+
> [!IMPORTANT]
130+
> The connection string in the portal does not include the username and password values. You must replace the `<user>` and `<password>` placeholders with the credentials you entered when you created the cluster.
127131
128-
:::image type="content" source="media/quickstart-portal/connection-string-value.png" alt-text="Screenshot of the connection string credential for a cluster.":::
132+
1. In MongoDB shell, connect to the primary cluster using the connection string.
129133

130-
> [!IMPORTANT]
131-
> The connection string in the portal does not include the username and password values. You must replace the `<user>` and `<password>` placeholders with the credentials you used when you originally created the cluster.
134+
```Mongo Shell
135+
mongosh mongodb+srv://`<user>`@`<cluster_name>`.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000
136+
```
132137

133138
## Clean up resources
134139

0 commit comments

Comments
 (0)