From 4a4798dfa66f0ba29408f1779eb0cac5eafa3e1c Mon Sep 17 00:00:00 2001 From: Booster Test Date: Sat, 28 Oct 2023 22:42:32 +0000 Subject: [PATCH 1/3] fix(framework-provider-azure-infrastructure): changed cosmosdb max throughput to 400 --- .../src/infrastructure/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/framework-provider-azure-infrastructure/src/infrastructure/constants.ts b/packages/framework-provider-azure-infrastructure/src/infrastructure/constants.ts index acfb80fb3..63f0a6da1 100644 --- a/packages/framework-provider-azure-infrastructure/src/infrastructure/constants.ts +++ b/packages/framework-provider-azure-infrastructure/src/infrastructure/constants.ts @@ -1,2 +1,2 @@ -export const MAX_CONTAINER_THROUGHPUT = 4000 -export const MAX_DATABASE_THROUGHPUT = 4000 +export const MAX_CONTAINER_THROUGHPUT = 400 +export const MAX_DATABASE_THROUGHPUT = 400 From f5d621c0f97bacebdb4552bbbbfbc35608b0a7cd Mon Sep 17 00:00:00 2001 From: Booster Test Date: Wed, 1 Nov 2023 23:27:54 +0000 Subject: [PATCH 2/3] fix(framework-provider-azure-infrastructure): changed cosmosdb throughput to use process env and added documentation --- ...3_changed-cosmosdb-throughput_2023-11-01-23-23.json | 10 ++++++++++ .../src/infrastructure/constants.ts | 4 ++-- .../docs/10_going-deeper/infrastructure-providers.mdx | 5 +++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 common/changes/@boostercloud/framework-core/fix-1313_changed-cosmosdb-throughput_2023-11-01-23-23.json diff --git a/common/changes/@boostercloud/framework-core/fix-1313_changed-cosmosdb-throughput_2023-11-01-23-23.json b/common/changes/@boostercloud/framework-core/fix-1313_changed-cosmosdb-throughput_2023-11-01-23-23.json new file mode 100644 index 000000000..92876e8a3 --- /dev/null +++ b/common/changes/@boostercloud/framework-core/fix-1313_changed-cosmosdb-throughput_2023-11-01-23-23.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@boostercloud/framework-core", + "comment": "changed CosmosDB throughput to use process env", + "type": "none" + } + ], + "packageName": "@boostercloud/framework-core" +} \ No newline at end of file diff --git a/packages/framework-provider-azure-infrastructure/src/infrastructure/constants.ts b/packages/framework-provider-azure-infrastructure/src/infrastructure/constants.ts index 63f0a6da1..52270f67a 100644 --- a/packages/framework-provider-azure-infrastructure/src/infrastructure/constants.ts +++ b/packages/framework-provider-azure-infrastructure/src/infrastructure/constants.ts @@ -1,2 +1,2 @@ -export const MAX_CONTAINER_THROUGHPUT = 400 -export const MAX_DATABASE_THROUGHPUT = 400 +export const MAX_CONTAINER_THROUGHPUT = parseInt(process.env.AZURE_MAX_CONTAINER_THROUGHPUT ?? '400', 10) +export const MAX_DATABASE_THROUGHPUT = parseInt(process.env.AZURE_MAX_DATABASE_THROUGHPUT ?? '400', 10) diff --git a/website/docs/10_going-deeper/infrastructure-providers.mdx b/website/docs/10_going-deeper/infrastructure-providers.mdx index 060cedcd4..cd1f4595f 100644 --- a/website/docs/10_going-deeper/infrastructure-providers.mdx +++ b/website/docs/10_going-deeper/infrastructure-providers.mdx @@ -192,12 +192,17 @@ After the service principal is created, create a bash script with the following SP_DISPLAY_NAME="" #replace with the name of your own SP REGION="East US" #replace with a region of your choice, see full list here: https://azure.microsoft.com/en-us/global-infrastructure/locations/ +AZURE_MAX_CONTAINER_THROUGHPUT=400 #replace with a desired value for CosmosDB container throughput +AZURE_MAX_DATABASE_THROUGHPUT=400 #replace with a desired value for CosmosDB database throughput export AZURE_APP_ID=$(az ad sp list --display-name ${SP_DISPLAY_NAME} | jq -r '.[].appId') export AZURE_TENANT_ID=$(az ad sp list --display-name ${SP_DISPLAY_NAME} | jq -r '.[].appOwnerOrganizationId') export AZURE_SECRET=$(az ad sp credential reset --id ${AZURE_APP_ID} | jq -r '.password') export AZURE_SUBSCRIPTION_ID=$(az account show | jq -r '.id') export REGION=$REGION + +export AZURE_MAX_CONTAINER_THROUGHPUT=:AZURE_MAX_CONTAINER_THROUGHPUT +export AZURE_MAX_DATABASE_THROUGHPUT=:AZURE_MAX_DATABASE_THROUGHPUT ``` :::note From 691ea7d7e14029af46c00b2cad611702f9ec37d5 Mon Sep 17 00:00:00 2001 From: Booster Test Date: Wed, 1 Nov 2023 23:44:25 +0000 Subject: [PATCH 3/3] fix(framework-provider-azure-infrastructure): fixed documentation example for cosmosdb throughput --- ...3_changed-cosmosdb-throughput_2023-11-01-23-43.json | 10 ++++++++++ .../docs/10_going-deeper/infrastructure-providers.mdx | 5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 common/changes/@boostercloud/framework-core/fix-1313_changed-cosmosdb-throughput_2023-11-01-23-43.json diff --git a/common/changes/@boostercloud/framework-core/fix-1313_changed-cosmosdb-throughput_2023-11-01-23-43.json b/common/changes/@boostercloud/framework-core/fix-1313_changed-cosmosdb-throughput_2023-11-01-23-43.json new file mode 100644 index 000000000..d617e2512 --- /dev/null +++ b/common/changes/@boostercloud/framework-core/fix-1313_changed-cosmosdb-throughput_2023-11-01-23-43.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@boostercloud/framework-core", + "comment": "fixed documentation env example for cosmosdb throughput", + "type": "none" + } + ], + "packageName": "@boostercloud/framework-core" +} \ No newline at end of file diff --git a/website/docs/10_going-deeper/infrastructure-providers.mdx b/website/docs/10_going-deeper/infrastructure-providers.mdx index cd1f4595f..95379817e 100644 --- a/website/docs/10_going-deeper/infrastructure-providers.mdx +++ b/website/docs/10_going-deeper/infrastructure-providers.mdx @@ -200,9 +200,8 @@ export AZURE_TENANT_ID=$(az ad sp list --display-name ${SP_DISPLAY_NAME} | jq -r export AZURE_SECRET=$(az ad sp credential reset --id ${AZURE_APP_ID} | jq -r '.password') export AZURE_SUBSCRIPTION_ID=$(az account show | jq -r '.id') export REGION=$REGION - -export AZURE_MAX_CONTAINER_THROUGHPUT=:AZURE_MAX_CONTAINER_THROUGHPUT -export AZURE_MAX_DATABASE_THROUGHPUT=:AZURE_MAX_DATABASE_THROUGHPUT +export AZURE_MAX_CONTAINER_THROUGHPUT=$AZURE_MAX_CONTAINER_THROUGHPUT +export AZURE_MAX_DATABASE_THROUGHPUT=$AZURE_MAX_DATABASE_THROUGHPUT ``` :::note