MicrosoftLearning / dp-420-cosmos-db-dev

DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB
https://microsoftlearning.github.io/dp-420-cosmos-db-dev/
MIT License
81 stars 95 forks source link

Lab 30 Observations #49

Closed pstueck closed 9 months ago

pstueck commented 10 months ago

Module: Manage an Azure Cosmos DB for NoSQL solution using DevOps practices

Lab/Demo: 30

Task: generally

Consider upgrading the lab to Azure-Cli 2.49 or later to have auto complete. Consider making the instructions less PowerShell-y and maybe also add specifics for e.g. Bash, … Consider using VSCode only when required. This lab does not require it, so a simple PowerShell/(Git)Bash would be sufficient. Although senior staff might know, one can use PowerShell w/out VSCode, not necessarily everyone does know.

Not a lab issue, yet still worth noting … seems like az-cli updates on Scales aren’t updateable. Tried multiple times to refresh the database/container, but still the changed scaling only was shown after closing the browser (no new login required though).

Task: Create Azure Cosmos DB account using the Azure CLI

Step: 8

Consider using region besides South Central US … whenever I tried something with this region, it usually failed due to high demand (timezone: CET, time frame: 9am-5pm). In my experience West US works almost every single time I request it.

Task: Adjust the throughput of an existing container using the Azure CLI

Step: 6

As per az cosmosdb sql container throughput migrate output, the default maximum throughput is 1,000.

{
  "id": "/subscriptions/92a5590d-8d7f-44d1-9a46-4e7fab67784e/resourceGroups/Cosmoslod37011099/providers/Microsoft.DocumentDB/databaseAccounts/csms2175/sqlDatabases/cosmicworks/containers/products/throughputSettings/default/migrateToAutoscale",  
  "location": null,  
  "name": "mzZM",  
  "resource": {
    "autoscaleSettings": {
      "autoUpgradePolicy": null,
      "maxThroughput": 1000,
      "targetMaxThroughput": null
    },
    "etag": null,
    "instantMaximumThroughput": "10000",
    "minimumThroughput": "1000",
    "offerReplacePending": null,
    "rid": null,
    "softAllowedMaximumThroughput": "1000000",
    "throughput": 100,
    "ts": null
  },
  "resourceGroup": "Cosmoslod37011099",
  "tags": null,
  "type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers/throughputSettings/migrateToAutoscale"
}
MScalopez commented 10 months ago

Reviewing suggestions

MScalopez commented 9 months ago

While its true we could use PS, note that we use Visual Studio Code to remain consistent across all our labs.

Some labs are more geared to PowerShell to support the training material.

Step 8. Unluckily the included Azure accounts are pre-created with a resource group which could be in South Central US region.

Step 6: Fixed to 1000.