Skip to content

Commit 9a0fbf6

Browse files
authored
Merge pull request #261822 from seesharprun/cosmos-quickstarts-refresh
Cosmos DB | Refresh NoSQL developer quickstarts
2 parents bf8b53a + 67a6901 commit 9a0fbf6

19 files changed

+608
-2921
lines changed

.openpublishing.publish.config.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,12 +998,36 @@
998998
"branch": "main",
999999
"branch_mapping": {}
10001000
},
1001+
{
1002+
"path_to_root": "cosmos-db-nosql-nodejs-quickstart",
1003+
"url": "https://github.com/azure-samples/cosmos-db-nosql-nodejs-quickstart",
1004+
"branch": "main",
1005+
"branch_mapping": {}
1006+
},
10011007
{
10021008
"path_to_root": "cosmos-db-nosql-python-samples",
10031009
"url": "https://github.com/azure-samples/cosmos-db-nosql-python-samples",
10041010
"branch": "main",
10051011
"branch_mapping": {}
10061012
},
1013+
{
1014+
"path_to_root": "cosmos-db-nosql-python-quickstart",
1015+
"url": "https://github.com/azure-samples/cosmos-db-nosql-python-quickstart",
1016+
"branch": "main",
1017+
"branch_mapping": {}
1018+
},
1019+
{
1020+
"path_to_root": "cosmos-db-nosql-java-quickstart",
1021+
"url": "https://github.com/azure-samples/cosmos-db-nosql-java-quickstart",
1022+
"branch": "main",
1023+
"branch_mapping": {}
1024+
},
1025+
{
1026+
"path_to_root": "cosmos-db-nosql-go-quickstart",
1027+
"url": "https://github.com/azure-samples/cosmos-db-nosql-go-quickstart",
1028+
"branch": "main",
1029+
"branch_mapping": {}
1030+
},
10071031
{
10081032
"path_to_root": "cosmos-db-mongodb-dotnet-samples",
10091033
"url": "https://github.com/azure-samples/cosmos-db-mongodb-dotnet-samples",

articles/cosmos-db/.openpublishing.redirection.cosmos-db.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6240,6 +6240,16 @@
62406240
"redirect_url": "/azure/cosmos-db/postgresql/how-to-configure-authentication",
62416241
"redirect_document_id": false
62426242
},
6243+
{
6244+
"source_path_from_root": "/articles/cosmos-db/nosql/quickstart-java-spring-data.md",
6245+
"redirect_url": "/azure/cosmos-db/nosql/quickstart-java",
6246+
"redirect_document_id": false
6247+
},
6248+
{
6249+
"source_path_from_root": "/articles/cosmos-db/nosql/quickstart-spark.md",
6250+
"redirect_url": "/azure/cosmos-db/nosql/quickstart-python",
6251+
"redirect_document_id": false
6252+
},
62436253
{
62446254
"source_path_from_root": "/articles/cosmos-db/migration-choices.md",
62456255
"redirect_url": "/azure/cosmos-db",

articles/cosmos-db/nosql/TOC.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,32 @@
22
href: index.yml
33
- name: Quickstarts
44
items:
5-
- name: Develop app - .NET
5+
- name: .NET
66
href: quickstart-dotnet.md
7-
- name: Develop app - Node.js
7+
displayName: Quickstart, ASP.NET, Blazor, AZD, Azure Developer CLI
8+
- name: Node.js
89
href: quickstart-nodejs.md
9-
- name: Develop app - Java
10+
displayName: Quickstart, Node.js, JavaScript, Express, AZD, Azure Developer CLI
11+
- name: Java
1012
href: quickstart-java.md
11-
- name: Develop app - Spring Data
12-
href: quickstart-java-spring-data.md
13-
- name: Develop app - Python
13+
displayName: Quickstart, Spring, Spring Data, AZD, Azure Developer CLI
14+
- name: Python
1415
href: quickstart-python.md
15-
- name: Develop app - Spark v3
16-
href: quickstart-spark.md
17-
- name: Develop app - Go
16+
displayName: Quickstart, Spark, AZD, Azure Developer CLI
17+
- name: Go
1818
href: quickstart-go.md
19-
- name: Create resources - Azure portal
19+
displayName: Quickstart, AZD, Azure Developer CLI
20+
- name: Portal
2021
href: quickstart-portal.md
21-
- name: Create resources - Bicep template
22-
displayName: ARM, Resource Manager, Template, Bicep
22+
displayName: Quickstart, Azure portal
23+
- name: Bicep
24+
displayName: Quickstart, ARM, Azure Resource Manager, Template, Bicep
2325
href: quickstart-template-bicep.md
24-
- name: Create resources - JSON template
25-
displayName: ARM, Resource Manager, Template, JSON
26+
- name: ARM template
27+
displayName: Quickstart, ARM, Azure Resource Manager, Template, JSON
2628
href: quickstart-template-json.md
27-
- name: Create resources - Terraform template
28-
displayName: ARM, Resource Manager, Template, Terraform
29+
- name: Terraform
30+
displayName: Quickstart, ARM, Azure Resource Manager, Template, Terraform
2931
href: quickstart-terraform.md
3032
- name: Tutorials
3133
items:
198 KB
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
author: seesharprun
3+
ms.author: sidandrews
4+
ms.service: cosmos-db
5+
ms.subservice: nosql
6+
ms.topic: include
7+
ms.date: 01/08/2024
8+
ms.custom: include file
9+
---
10+
11+
Application requests to most Azure services must be authorized. Use the `DefaultAzureCredential` type as the preferred way to implement a passwordless connection between your applications and Azure Cosmos DB for NoSQL. `DefaultAzureCredential` supports multiple authentication methods and determines which method should be used at runtime.
12+
13+
> [!IMPORTANT]
14+
> You can also authorize requests to Azure services using passwords, connection strings, or other credentials directly. However, this approach should be used with caution. Developers must be diligent to never expose these secrets in an unsecure location. Anyone who gains access to the password or secret key is able to authenticate to the database service. `DefaultAzureCredential` offers improved management and security benefits over the account key to allow passwordless authentication without the risk of storing keys.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
author: seesharprun
3+
ms.author: sidandrews
4+
ms.service: cosmos-db
5+
ms.subservice: nosql
6+
ms.topic: include
7+
ms.date: 01/08/2024
8+
ms.custom: include file
9+
zone_pivot_groups: azure-cosmos-db-quickstart-env
10+
---
11+
12+
::: zone pivot="devcontainer-codespace,devcontainer-vscode"
13+
14+
When you no longer need the sample application or resources, remove the corresponding deployment and all resources.
15+
16+
```azurecli
17+
azd down
18+
```
19+
20+
::: zone-end
21+
22+
::: zone pivot="devcontainer-codespace"
23+
24+
In GitHub Codespaces, delete the running codespace to maximize your storage and core entitlements.
25+
26+
::: zone-end
27+
28+
::: zone pivot="devcontainer-vscode"
29+
30+
::: zone-end
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
author: seesharprun
3+
ms.author: sidandrews
4+
ms.service: cosmos-db
5+
ms.subservice: nosql
6+
ms.topic: include
7+
ms.date: 01/08/2024
8+
ms.custom: include file
9+
zone_pivot_groups: azure-cosmos-db-quickstart-env
10+
---
11+
12+
::: zone pivot="devcontainer-codespace"
13+
14+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
15+
- [GitHub account](https://docs.github.com//get-started/quickstart/creating-an-account-on-github)
16+
17+
::: zone-end
18+
19+
::: zone pivot="devcontainer-vscode"
20+
21+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
22+
- [Azure Developer CLI](/azure/developer/azure-developer-cli/install-azd)
23+
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
24+
25+
::: zone-end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
author: seesharprun
3+
ms.author: sidandrews
4+
ms.service: cosmos-db
5+
ms.subservice: nosql
6+
ms.topic: include
7+
ms.date: 01/08/2024
8+
ms.custom: include file
9+
---
10+
11+
The sample code in the template uses a database named `cosmicworks` and container named `products`. The `products` container contains details such as name, category, quantity, a unique identifier, and a sale flag for each product. The container uses the `/category` property as a logical partition key.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
author: seesharprun
3+
ms.author: sidandrews
4+
ms.service: cosmos-db
5+
ms.subservice: nosql
6+
ms.topic: include
7+
ms.date: 01/08/2024
8+
ms.custom: include file
9+
---
10+
11+
> [!div class="op_single_selector"]
12+
>
13+
> - [.NET](../../quickstart-dotnet.md)
14+
> - [JavaScript/Node.js](../../quickstart-nodejs.md)
15+
> - [Java](../../quickstart-java.md)
16+
> - [Python](../../quickstart-python.md)
17+
> - [Go](../../quickstart-go.md)
18+
>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
author: seesharprun
3+
ms.author: sidandrews
4+
ms.service: cosmos-db
5+
ms.subservice: nosql
6+
ms.topic: include
7+
ms.date: 01/08/2024
8+
ms.custom: include file
9+
zone_pivot_groups: azure-cosmos-db-quickstart-env
10+
---
11+
12+
::: zone pivot="devcontainer-codespace"
13+
14+
> [!IMPORTANT]
15+
> GitHub accounts include an entitlement of storage and core hours at no cost. For more information, see [included storage and core hours for GitHub accounts](https://docs.github.com/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts).
16+
17+
::: zone-end
18+
19+
::: zone pivot="devcontainer-vscode"
20+
21+
::: zone-end
22+
23+
1. Open a terminal in the root directory of the project.
24+
25+
1. Authenticate to the Azure Developer CLI using `azd auth login`. Follow the steps specified by the tool to authenticate to the CLI using your preferred Azure credentials.
26+
27+
```azurecli
28+
azd auth login
29+
```
30+
31+
1. Use `azd init` to initialize the project.
32+
33+
```azurecli
34+
azd init
35+
```
36+
37+
1. During initialization, configure a unique environment name.
38+
39+
> [!TIP]
40+
> The environment name will also be used as the target resource group name. For this quickstart, consider using `msdocs-cosmos-db-nosql`.
41+
42+
1. Deploy the Azure Cosmos DB for NoSQL account using `azd up`. The Bicep templates also deploy a sample web application.
43+
44+
```azurecli
45+
azd up
46+
```
47+
48+
1. During the provisioning process, select your subscription and desired location. Wait for the provisioning process to complete. The process can take **approximately five minutes**.
49+
50+
1. Once the provisioning of your Azure resources is done, a URL to the running web application is included in the output.
51+
52+
```output
53+
Deploying services (azd deploy)
54+
55+
(✓) Done: Deploying service web
56+
- Endpoint: <https://[container-app-sub-domain].azurecontainerapps.io>
57+
58+
SUCCESS: Your application was provisioned and deployed to Azure in 5 minutes 0 seconds.
59+
```
60+
61+
1. Use the URL in the console to navigate to your web application in the browser. Observe the output of the running app.
62+
63+
:::image type="content" source="../media/quickstart/dev-web-application.png" alt-text="Screenshot of the running web application.":::

0 commit comments

Comments
 (0)