From 27e481b48dfde176302bb161b322300459a10a96 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Wed, 20 Sep 2023 17:56:51 -0400 Subject: [PATCH 01/30] update 1.11 docs branch for release Signed-off-by: Hannah Hunter --- .github/workflows/website-root.yml | 109 ----------------------------- README.md | 4 +- daprdocs/config.toml | 15 ++-- 3 files changed, 11 insertions(+), 117 deletions(-) delete mode 100644 .github/workflows/website-root.yml diff --git a/.github/workflows/website-root.yml b/.github/workflows/website-root.yml deleted file mode 100644 index 1f8e503e4c2..00000000000 --- a/.github/workflows/website-root.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: Azure Static Web App Root - -on: - workflow_dispatch: - push: - branches: - - v1.11 - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - v1.11 - -concurrency: - # Cancel the previously triggered build for only PR build. - group: website-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -jobs: - build_and_deploy_job: - name: Build Hugo Website - if: github.event.action != 'closed' - runs-on: ubuntu-latest - env: - SWA_BASE: 'proud-bay-0e9e0e81e' - HUGO_ENV: production - steps: - - name: Checkout docs repo - uses: actions/checkout@v3 - with: - submodules: true - - name: Setup Node - uses: actions/setup-node@v2 - with: - node-version: '14' - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2.5.0 - with: - hugo-version: 0.102.3 - extended: true - - name: Setup Docsy - run: | - cd daprdocs - git submodule update --init --recursive - sudo npm install -D --save autoprefixer - sudo npm install -D --save postcss-cli - - name: Build Hugo Website - run: | - cd daprdocs - git config --global --add safe.directory /github/workspace - if [ $GITHUB_EVENT_NAME == 'pull_request' ]; then - STAGING_URL="https://${SWA_BASE}-${{github.event.number}}.westus2.azurestaticapps.net/" - fi - hugo ${STAGING_URL+-b "$STAGING_URL"} - - name: Deploy docs site - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: "upload" - app_location: "daprdocs/public/" - api_location: "daprdocs/public/" - output_location: "" - skip_app_build: true - skip_deploy_on_missing_secrets: true - - name: Upload Hugo artifacts - uses: actions/upload-artifact@v3 - with: - name: hugo_build - path: ./daprdocs/public/ - if-no-files-found: error - - close_staging_site: - if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Pull Request Job - steps: - - name: Close Pull Request - id: closepullrequest - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROUD_BAY_0E9E0E81E }} - action: "close" - skip_deploy_on_missing_secrets: true - - algolia_index: - name: Index site for Algolia - if: github.event_name == 'push' - needs: ['build_and_deploy_job'] - runs-on: ubuntu-latest - env: - ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} - ALGOLIA_API_WRITE_KEY: ${{ secrets.ALGOLIA_API_WRITE_KEY }} - ALGOLIA_INDEX_NAME: daprdocs - steps: - - name: Checkout docs repo - uses: actions/checkout@v2 - with: - submodules: false - - name: Download Hugo artifacts - uses: actions/download-artifact@v3 - with: - name: hugo_build - path: site/ - - name: Install Python packages - run: | - pip install --upgrade bs4 - pip install --upgrade 'algoliasearch>=2.0,<3.0' - - name: Index site - run: python ./.github/scripts/algolia.py ./site diff --git a/README.md b/README.md index 11ec2756e4d..a189c74f09e 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ The following branches are currently maintained: | Branch | Website | Description | | ------------------------------------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------ | -| [v1.11](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. | -| [v1.12](https://github.com/dapr/docs/tree/v1.12) (pre-release) | https://v1-12.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.12+ go here. | +| [v1.12](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. | +| [v1.13](https://github.com/dapr/docs/tree/v1.13) (pre-release) | https://v1-13.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.13+ go here. | For more information visit the [Dapr branch structure](https://docs.dapr.io/contributing/docs-contrib/contributing-docs/#branch-guidance) document. diff --git a/daprdocs/config.toml b/daprdocs/config.toml index 8090c7b7da8..000c2ca7a46 100644 --- a/daprdocs/config.toml +++ b/daprdocs/config.toml @@ -1,5 +1,5 @@ # Site Configuration -baseURL = "https://docs.dapr.io" +baseURL = "https://v1-11.docs.dapr.io" title = "Dapr Docs" theme = "docsy" disableFastRender = true @@ -171,17 +171,20 @@ github_subdir = "daprdocs" github_branch = "v1.11" # Versioning -version_menu = "v1.11 (latest)" +version_menu = "v1.11" version = "v1.11" -archived_version = false +archived_version = true url_latest_version = "https://docs.dapr.io" [[params.versions]] - version = "v1.12 (preview)" - url = "#" + version = "v1.13 (preview)" + url = "https://v1-13.docs.dapr.io" [[params.versions]] - version = "v1.11 (latest)" + version = "v1.12 (latest)" url = "https://docs.dapr.io" +[[params.versions]] + version = "v1.11" + url = "https://v1-11.docs.dapr.io" [[params.versions]] version = "v1.10" url = "https://v1-10.docs.dapr.io" From f0ef4b9964ce3a5db1127feb9a453bab5038da37 Mon Sep 17 00:00:00 2001 From: Ilia Stepin Date: Tue, 17 Oct 2023 08:03:49 +0300 Subject: [PATCH 02/30] update s3 bindings links (#3782) * update s3 bindings links Signed-off-by: Ilia Stepin * Update s3.md Signed-off-by: Ilia Stepin --------- Signed-off-by: Ilia Stepin Co-authored-by: Yaron Schneider --- .../components-reference/supported-bindings/s3.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/s3.md b/daprdocs/content/en/reference/components-reference/supported-bindings/s3.md index 1c01459c3ba..95e7599e252 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/s3.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/s3.md @@ -154,12 +154,12 @@ To use the S3 component, you need to use an existing bucket. Follow the [AWS doc This component supports **output binding** with the following operations: -- `create` : [Create file](#create-file) -- `get` : [Get file](#get-file) -- `delete` : [Delete file](#delete-file) -- `list`: [List file](#list-files) +- `create` : [Create object](#create-object) +- `get` : [Get object](#get-object) +- `delete` : [Delete object](#delete-object) +- `list`: [List objects](#list-objects) -### Create file +### Create object To perform a create operation, invoke the AWS S3 binding with a `POST` method and the following JSON body: From d9ee1f3e71829b329ea7443f26907e9547222ea7 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Mon, 20 Nov 2023 11:07:42 +0000 Subject: [PATCH 03/30] 1.11 update supported releases up to 1.11.6 Signed-off-by: joshvanl --- .../en/operations/support/support-release-policy.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/daprdocs/content/en/operations/support/support-release-policy.md b/daprdocs/content/en/operations/support/support-release-policy.md index 915042374eb..44686e1d8b4 100644 --- a/daprdocs/content/en/operations/support/support-release-policy.md +++ b/daprdocs/content/en/operations/support/support-release-policy.md @@ -45,10 +45,14 @@ The table below shows the versions of Dapr releases that have been tested togeth | Release date | Runtime | CLI | SDKs | Dashboard | Status | Release notes | |--------------------|:--------:|:--------|---------|---------|---------|------------| -| August 31st 2023 | 1.11.3
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.3) | -| July 20th 2023 | 1.11.2
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.2) | -| June 22nd 2023 | 1.11.1
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.1) | -| June 12th 2023 | 1.11.0
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.0) | +| November 18th 2023 | 1.11.6
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.6 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.6) | +| November 3rd 2023 | 1.11.5
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported | [v1.11.5 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.5) | +| October 5th 2023 | 1.11.4
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported | [v1.11.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.4) | +| August 31st 2023 | 1.11.3
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported | [v1.11.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.3) | +| July 20th 2023 | 1.11.2
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported | [v1.11.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.2) | +| June 22nd 2023 | 1.11.1
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported | [v1.11.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.1) | +| June 12th 2023 | 1.11.0
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported | [v1.11.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.0) | +| November 18th 2023 | 1.10.10
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | [v1.10.10 release notes](https://github.com/dapr/dapr/releases/tag/v1.10.10) | | July 20th 2023 | 1.10.9
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | [v1.10.9 release notes](https://github.com/dapr/dapr/releases/tag/v1.10.9) | | June 22nd 2023 | 1.10.8
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | [v1.10.8 release notes](https://github.com/dapr/dapr/releases/tag/v1.10.8) | | May 15th 2023 | 1.10.7
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | | From d68b3bca7e1e76a0827466aabb7e50cb449d21e9 Mon Sep 17 00:00:00 2001 From: Josh van Leeuwen Date: Tue, 21 Nov 2023 00:59:05 +0000 Subject: [PATCH 04/30] v1.11 fix links (#3877) * fix link Signed-off-by: Hannah Hunter * try again with link Signed-off-by: Hannah Hunter * pub-sub Signed-off-by: Hannah Hunter --------- Signed-off-by: Hannah Hunter Co-authored-by: Hannah Hunter --- .../components-reference/supported-bindings/kubemq.md | 4 ++-- .../components-reference/supported-pubsub/setup-kubemq.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kubemq.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kubemq.md index 5cf333ea213..e5112d2b29a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kubemq.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kubemq.md @@ -51,7 +51,7 @@ This component supports both **input and output** binding interfaces. {{< tabs "Self-Hosted" "Kubernetes">}} {{% codetab %}} -1. Obtain KubeMQ Key by visiting [https://account.kubemq.io/login/register](https://account.kubemq.io/login/register) and register for a key. +1. [Obtain KubeMQ Key](https://docs.kubemq.io/getting-started/quick-start#obtain-kubemq-license-key). 2. Wait for an email confirmation with your Key You can run a KubeMQ broker with Docker: @@ -64,7 +64,7 @@ You can then interact with the server using the client port: `localhost:50000` {{% /codetab %}} {{% codetab %}} -1. Obtain KubeMQ Key by visiting [https://account.kubemq.io/login/register](https://account.kubemq.io/login/register) and register for a key. +1. [Obtain KubeMQ Key](https://docs.kubemq.io/getting-started/quick-start#obtain-kubemq-license-key). 2. Wait for an email confirmation with your Key Then Run the following kubectl commands: diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-kubemq.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-kubemq.md index 28080ac150c..d6c22d5b552 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-kubemq.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-kubemq.md @@ -45,7 +45,7 @@ spec: {{< tabs "Self-Hosted" "Kubernetes">}} {{% codetab %}} -1. Obtain KubeMQ Key by visiting [https://account.kubemq.io/login/register](https://account.kubemq.io/login/register) and register for a key. +1. [Obtain KubeMQ Key](https://docs.kubemq.io/getting-started/quick-start#obtain-kubemq-license-key). 2. Wait for an email confirmation with your Key You can run a KubeMQ broker with Docker: @@ -58,7 +58,7 @@ You can then interact with the server using the client port: `localhost:50000` {{% /codetab %}} {{% codetab %}} -1. Obtain KubeMQ Key by visiting [https://account.kubemq.io/login/register](https://account.kubemq.io/login/register) and register for a key. +1. [Obtain KubeMQ Key](https://docs.kubemq.io/getting-started/quick-start#obtain-kubemq-license-key). 2. Wait for an email confirmation with your Key Then Run the following kubectl commands: From 910e69bfcc6dd76dda601f2cf36b82feba029435 Mon Sep 17 00:00:00 2001 From: Luigi Rende Date: Sat, 16 Dec 2023 12:55:44 +0100 Subject: [PATCH 05/30] Add new operations in the query request for state component Signed-off-by: Luigi Rende --- .../state-management/howto-state-query-api.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-state-query-api.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-state-query-api.md index 6b321d34d11..1fe01bf0efa 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-state-query-api.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-state-query-api.md @@ -28,9 +28,14 @@ The `filter` specifies the query conditions in the form of a tree, where each no The following operations are supported: -| Operator | Operands | Description | -|----------|-------------|--------------| -| `EQ` | key:value | key == value | +| Operator | Operands | Description | +|----------|-------------|--------------------------------------------------------------| +| `EQ` | key:value | key == value | +| `NEQ` | key:value | key != value | +| `GT` | key:value | key > value | +| `GTE` | key:value | key >= value | +| `LT` | key:value | key < value | +| `LTE` | key:value | key <= value | | `IN` | key:[]value | key == value[0] OR key == value[1] OR ... OR key == value[n] | | `AND` | []operation | operation[0] AND operation[1] AND ... AND operation[n] | | `OR` | []operation | operation[0] OR operation[1] OR ... OR operation[n] | From 6bcddf95a62a2e46d9a3b1d0aab43d8a7d485cc3 Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Wed, 3 Jan 2024 10:36:37 -0500 Subject: [PATCH 06/30] add latest version (#3936) Signed-off-by: Hannah Hunter --- .../content/en/operations/support/support-release-policy.md | 3 ++- daprdocs/layouts/shortcodes/dapr-latest-version.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/operations/support/support-release-policy.md b/daprdocs/content/en/operations/support/support-release-policy.md index b44ba75dc91..4b219545131 100644 --- a/daprdocs/content/en/operations/support/support-release-policy.md +++ b/daprdocs/content/en/operations/support/support-release-policy.md @@ -45,6 +45,7 @@ The table below shows the versions of Dapr releases that have been tested togeth | Release date | Runtime | CLI | SDKs | Dashboard | Status | Release notes | |--------------------|:--------:|:--------|---------|---------|---------|------------| +| January 2nd 2023 | 1.12.3
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.3) | | November 18th 2023 | 1.12.2
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.2) | | November 16th 2023 | 1.12.1
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported | [v1.12.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.1) | | October 11th 2023 | 1.12.0
| 1.12.0 | Java 1.10.0
Go 1.9.0
PHP 1.1.0
Python 1.11.0
.NET 1.12.0
JS 3.1.2 | 0.14.0 | Supported | [v1.12.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.0) | @@ -120,7 +121,7 @@ General guidance on upgrading can be found for [self hosted mode]({{< ref self-h | 1.9.0 | N/A | 1.9.6 | | 1.10.0 | N/A | 1.10.8 | | 1.11.0 | N/A | 1.11.4 | -| 1.12.0 | N/A | 1.12.0 | +| 1.12.0 | N/A | 1.12.3 | ## Upgrade on Hosting platforms diff --git a/daprdocs/layouts/shortcodes/dapr-latest-version.html b/daprdocs/layouts/shortcodes/dapr-latest-version.html index 109d34c73d2..f15687bb3b4 100644 --- a/daprdocs/layouts/shortcodes/dapr-latest-version.html +++ b/daprdocs/layouts/shortcodes/dapr-latest-version.html @@ -1 +1 @@ -{{- if .Get "short" }}1.12{{ else if .Get "long" }}1.12.0{{ else if .Get "cli" }}1.12.0{{ else }}1.12.0{{ end -}} +{{- if .Get "short" }}1.12{{ else if .Get "long" }}1.12.3{{ else if .Get "cli" }}1.12.0{{ else }}1.12.3{{ end -}} From 08939fc6271e8636449b78a3533a4a0ff87083fd Mon Sep 17 00:00:00 2001 From: Farshad Davoudi Date: Fri, 5 Jan 2024 20:18:00 +0330 Subject: [PATCH 07/30] Update multi-app-template.md (#3943) Fix some mistakes in the doc and try to make it better and more clear Signed-off-by: Farshad Davoudi --- .../multi-app-dapr-run/multi-app-template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md index 2d85efa1136..e5c526da43f 100644 --- a/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md +++ b/daprdocs/content/en/developing-applications/local-development/multi-app-dapr-run/multi-app-template.md @@ -162,9 +162,9 @@ apps: The following rules apply for all the paths present in the template file: - If the path is absolute, it is used as is. - - All relative paths under command section should be provided relative to the template file path. + - All relative paths under common section should be provided relative to the template file path. - `appDirPath` under apps section should be provided relative to the template file path. - - All relative paths under app section should be provided relative to the `appDirPath`. + - All other relative paths under apps section should be provided relative to the `appDirPath`. {{% /codetab %}} From 20494df4ec40006b210a18097f5d495f48cb13ab Mon Sep 17 00:00:00 2001 From: Simon Headley Date: Fri, 5 Jan 2024 19:05:14 +0200 Subject: [PATCH 08/30] Specifying the behaviour of the ConsumerID field when configuring Kafka pub/sub (#3935) Signed-off-by: Simon Headley Co-authored-by: Yaron Schneider --- .../supported-pubsub/setup-apache-kafka.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md index 05ff835208e..4b8aacfe582 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md @@ -58,8 +58,8 @@ spec: | Field | Required | Details | Example | |--------------------|:--------:|---------|---------| | brokers | Y | A comma-separated list of Kafka brokers. | `"localhost:9092,dapr-kafka.myapp.svc.cluster.local:9093"` -| consumerGroup | N | A kafka consumer group to listen on. Each record published to a topic is delivered to one consumer within each consumer group subscribed to the topic. | `"group1"` -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` +| consumerGroup | N | A kafka consumer group to listen on. Each record published to a topic is delivered to one consumer within each consumer group subscribed to the topic. If a value for `consumerGroup` is provided, any value for `consumerID` is ignored - a combination of the consumer group and a random unique identifier will be set for the `consumerID` instead. | `"group1"` +| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. If a value for `consumerGroup` is provided, any value for `consumerID` is ignored - a combination of the consumer group and a random unique identifier will be set for the `consumerID` instead. | `"channel1"` | clientID | N | A user-provided string sent with every request to the Kafka brokers for logging, debugging, and auditing purposes. Defaults to `"namespace.appID"` for Kubernetes mode or `"appID"` for Self-Hosted mode. | `"my-namespace.my-dapr-app"`, `"my-dapr-app"` | authRequired | N | *Deprecated* Enable [SASL](https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer) authentication with the Kafka brokers. | `"true"`, `"false"` | authType | Y | Configure or disable authentication. Supported values: `none`, `password`, `mtls`, or `oidc` | `"password"`, `"none"` From 174c51012b3d3a2a75946f344067db027d647e17 Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:42:38 -0500 Subject: [PATCH 09/30] [AWS SSM parameter store] Add prefix option (#3920) * add prefix to spec Signed-off-by: Hannah Hunter * add prefix to example Signed-off-by: Hannah Hunter --------- Signed-off-by: Hannah Hunter Co-authored-by: Mark Fussell --- .../supported-secret-stores/aws-parameter-store.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-secret-stores/aws-parameter-store.md b/daprdocs/content/en/reference/components-reference/supported-secret-stores/aws-parameter-store.md index eab410fe11c..bc951b50b84 100644 --- a/daprdocs/content/en/reference/components-reference/supported-secret-stores/aws-parameter-store.md +++ b/daprdocs/content/en/reference/components-reference/supported-secret-stores/aws-parameter-store.md @@ -30,6 +30,8 @@ spec: value: "[aws_secret_key]" - name: sessionToken value: "[aws_session_token]" + - name: prefix + value: "[secret_name]" ``` {{% alert title="Warning" color="warning" %}} The above example uses secrets as plain strings. It is recommended to use a local secret store such as [Kubernetes secret store]({{< ref kubernetes-secret-store.md >}}) or a [local file]({{< ref file-secret-store.md >}}) to bootstrap secure key storage. @@ -43,6 +45,7 @@ The above example uses secrets as plain strings. It is recommended to use a loca | accessKey | Y | The AWS Access Key to access this resource | `"key"` | | secretKey | Y | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | | sessionToken | N | The AWS session token to use | `"sessionToken"` | +| prefix | N | Allows you to specify more than one SSM parameter store secret store component. | `"prefix"` | {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. From 5c132e6e3d5f61d44286977184d0ff65300b8ac9 Mon Sep 17 00:00:00 2001 From: Simon Headley Date: Tue, 9 Jan 2024 08:02:59 +0200 Subject: [PATCH 10/30] =?UTF-8?q?Adding=20write=20performance=20optimizati?= =?UTF-8?q?on=20section=20to=20Cosmos=20DB=20state=20stor=E2=80=A6=20(#393?= =?UTF-8?q?4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adding write performance optimization section to Cosmos DB state store documentation Signed-off-by: Simon Headley * Applying suggestions as per PR review Signed-off-by: Simon Headley * Switching from Markdown note to {{% alert %}} {$ /alert $}} as per PR review Signed-off-by: Simon Headley * Putting example paragraph in a new line as per review Signed-off-by: Simon Headley --------- Signed-off-by: Simon Headley Co-authored-by: Mark Fussell --- .../setup-azure-cosmosdb.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md index 0d636a452d3..d7ee723eaa0 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/setup-azure-cosmosdb.md @@ -172,6 +172,42 @@ az cosmosdb sql role assignment create \ --role-definition-id "$ROLE_ID" ``` +## Optimizing Cosmos DB for bulk operation write performance + +If you are building a system that only ever reads data from Cosmos DB via key (`id`), which is the default Dapr behavior when using the state management API or actors, there are ways you can optimize Cosmos DB for improved write speeds. This is done by excluding all paths from indexing. By default, Cosmos DB indexes all fields inside of a document. On systems that are write-heavy and run little-to-no queries on values within a document, this indexing policy slows down the time it takes to write or update a document in Cosmos DB. This is exacerbated in high-volume systems. + +For example, the default Terraform definition for a Cosmos SQL container indexing reads as follows: + +```tf +indexing_policy { + indexing_mode = "consistent" + + included_path { + path = "/*" + } +} +``` + +It is possible to force Cosmos DB to only index the `id` and `partitionKey` fields by excluding all other fields from indexing. This can be done by updating the above to read as follows: + +```tf +indexing_policy { + # This could also be set to "none" if you are using the container purely as a key-value store. This may be applicable if your container is only going to be used as a distributed cache. + indexing_mode = "consistent" + + # Note that included_path has been replaced with excluded_path + excluded_path { + path = "/*" + } +} +``` + +{{% alert title="Note" color="primary" %}} + +This optimization comes at the cost of queries against fields inside of documents within the state store. This would likely impact any stored procedures or SQL queries defined and executed. It is only recommended that this optimization be applied only if you are using the Dapr State Management API or Dapr Actors to interact with Cosmos DB. + +{{% /alert %}} + ## Related links - [Basic schema for a Dapr component]({{< ref component-schema >}}) From 946c2c8b619bb7eaa446f2ca0cce7d09c9b5202a Mon Sep 17 00:00:00 2001 From: Marc Duiker Date: Thu, 11 Jan 2024 06:37:32 +0100 Subject: [PATCH 11/30] Add devcontainer to improve developer experience for contributors (#3942) * Add devcontainer with Hugo Signed-off-by: Marc Duiker * Add Node and install script Signed-off-by: Marc Duiker * Update README with devcontainer Signed-off-by: Marc Duiker * Add . Signed-off-by: Marc Duiker * Update README.md Co-authored-by: Mark Fussell Signed-off-by: Marc Duiker * Increment step numbers Signed-off-by: Marc Duiker * Clarify devcontainer in other IDEs Signed-off-by: Marc Duiker * revert back to old numbering Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Marc Duiker * revert back to old numbering Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Marc Duiker * revert back to old numbering Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Marc Duiker * revert back to old numbering Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Marc Duiker --------- Signed-off-by: Marc Duiker Co-authored-by: Mark Fussell Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> --- .devcontainer/devcontainer.json | 36 +++++++++++++++++++++++ .gitattributes | 3 ++ README.md | 52 +++++++++++++++++++++++---------- scripts/init-container.sh | 4 +++ 4 files changed, 80 insertions(+), 15 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .gitattributes create mode 100644 scripts/init-container.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..9c2c295f023 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,36 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu +{ + "name": "Ubuntu", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "features": { + "ghcr.io/devcontainers/features/go:1": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/hugo:1": { + "extended": true, + "version": "latest" + }, + "ghcr.io/devcontainers/features/node:1": { + "nodeGypDependencies": true, + "version": "lts", + "nvmVersion": "latest" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "streetsidesoftware.code-spell-checker", + "tamasfe.even-better-toml", + "davidanson.vscode-markdownlint", + "budparr.language-hugo-vscode" + ], + "settings": { + "git.alwaysSignOff": true + } + } + }, + "forwardPorts": [1313], + "postAttachCommand": "bash scripts/init-container.sh" +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..5dc46e6b38b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto eol=lf +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf \ No newline at end of file diff --git a/README.md b/README.md index a189c74f09e..98bc0a4c4ff 100644 --- a/README.md +++ b/README.md @@ -29,21 +29,44 @@ The Dapr docs are built using [Hugo](https://gohugo.io/) with the [Docsy](https: The [daprdocs](./daprdocs) directory contains the hugo project, markdown files, and theme configurations. -## Pre-requisites +## Setup with a devcontainer -- [Hugo extended version](https://gohugo.io/getting-started/installing) -- [Node.js](https://nodejs.org/en/) +This repository comes with a [devcontainer](/.devcontainer/devcontainer.json) configuration that automatically installs all the required dependencies and VSCode extensions to build and run the docs. + +This devcontainer can be used to develop locally with VSCode or via GitHub Codespaces completely in the browser. Other IDEs that support [devcontainers](https://containers.dev/) can be used but won't have the extensions preconfigured and will likely have different performance characteristics. + +### Pre-requisites -## Environment setup +- [Docker Desktop](https://www.docker.com/products/docker-desktop) +- [VSCode](https://code.visualstudio.com/download) -1. Ensure pre-requisites are installed -2. Clone this repository +### Environment setup + +1. [Fork](https://github.com/dapr/docs/fork) and clone this repository. + +1. Open the forked repository in VS Code ```sh -git clone https://github.com/dapr/docs.git +code . ``` -3. Change to daprdocs directory: +1. When prompted, click "Reopen in Container" to open the repository in the devcontainer. + +Continue with the [Run local server](#run-local-server) steps. + +## Setup without a devcontainer + +### Pre-requisites + +- [Hugo extended version](https://gohugo.io/getting-started/installing) +- [Node.js](https://nodejs.org/en/) + +### Environment setup + +1. Ensure pre-requisites are installed. +1. [Fork](https://github.com/dapr/docs/fork) and clone this repository. + +1. Change to daprdocs directory: ```sh cd ./daprdocs @@ -63,7 +86,7 @@ npm install ## Run local server -1. Make sure you're still in the `daprdocs` directory +1. Make sure you're in the `daprdocs` directory 2. Run ```sh @@ -72,14 +95,13 @@ hugo server 3. Navigate to `http://localhost:1313/` - ## Update docs -1. Fork repo into your account -1. Create new branch -1. Commit and push changes to forked branch -1. Submit pull request from downstream branch to the upstream branch for the correct version you are targeting -1. Staging site will automatically get created and linked to PR to review and test +1. Ensure you are in your forked repo +2. Create new branch +3. Commit and push changes to forked branch +4. Submit pull request from downstream branch to the upstream branch for the correct version you are targeting +5. Staging site will automatically get created and linked to PR to review and test ## Code of Conduct diff --git a/scripts/init-container.sh b/scripts/init-container.sh new file mode 100644 index 00000000000..61f6a8dccc3 --- /dev/null +++ b/scripts/init-container.sh @@ -0,0 +1,4 @@ +git config --global --add safe.directory '*' +cd ./daprdocs +git submodule update --init --recursive +npm install From 390de66da873b7f8fb4b282a4c792245ea1f11fc Mon Sep 17 00:00:00 2001 From: Simon Headley Date: Fri, 12 Jan 2024 00:38:57 +0200 Subject: [PATCH 12/30] Describing Kafka consumer behaviour when consuming from multiple topics (#3931) * Describing Kafka consumer behaviour when consuming from multiple topics Signed-off-by: Simon Headley * Further specifying the behaviour of Kafka consumer groups on topics. Signed-off-by: Simon Headley * Changing 'this will guarantee' to 'this guarantees' as per PR review Signed-off-by: Simon Headley * Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Mark Fussell --------- Signed-off-by: Simon Headley Signed-off-by: Mark Fussell Co-authored-by: Mark Fussell Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> --- .../supported-pubsub/setup-apache-kafka.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md index 4b8aacfe582..b05e6d01d1c 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md @@ -299,6 +299,44 @@ auth: secretStore: ``` +## Consuming from multiple topics + +When consuming from multiple topics using a single pub/sub component, there is no guarantee about how the consumers in your consumer group are balanced across the topic partitions. + +For instance, let's say you are subscribing to two topics with 10 partitions per topic and you have 20 replicas of your service consuming from the two topics. There is no guarantee that 10 will be assigned to the first topic and 10 to the second topic. Instead, the partitions could be divided unequally, with more than 10 assigned to the first topic and the rest assigned to the second topic. + +This can result in idle consumers listening to the first topic and over-extended consumers on the second topic, or vice versa. This same behavior can be observed when using auto-scalers such as HPA or KEDA. + +If you run into this particular issue, it is recommended that you configure a single pub/sub component per topic with uniquely defined consumer groups per component. This guarantees that all replicas of your service are fully allocated to the unique consumer group, where each consumer group targets one specific topic. + +For example, you may define two Dapr components with the following configuration: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: kafka-pubsub-topic-one +spec: + type: pubsub.kafka + version: v1 + metadata: + - name: consumerGroup + value: "{appID}-topic-one" +``` + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: kafka-pubsub-topic-two +spec: + type: pubsub.kafka + version: v1 + metadata: + - name: consumerGroup + value: "{appID}-topic-two" +``` + ## Sending and receiving multiple messages Apache Kafka component supports sending and receiving multiple messages in a single operation using the bulk Pub/sub API. From 71a5b990da3b51ea32670bd10cb23a287d006ab1 Mon Sep 17 00:00:00 2001 From: Mark Fussell Date: Wed, 17 Jan 2024 19:36:08 -0800 Subject: [PATCH 13/30] New hotfix patch for v1.12.4 (#3960) --- .../content/en/operations/support/support-release-policy.md | 6 ++++-- daprdocs/layouts/shortcodes/dapr-latest-version.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/daprdocs/content/en/operations/support/support-release-policy.md b/daprdocs/content/en/operations/support/support-release-policy.md index 4b219545131..47679a8baaf 100644 --- a/daprdocs/content/en/operations/support/support-release-policy.md +++ b/daprdocs/content/en/operations/support/support-release-policy.md @@ -45,7 +45,8 @@ The table below shows the versions of Dapr releases that have been tested togeth | Release date | Runtime | CLI | SDKs | Dashboard | Status | Release notes | |--------------------|:--------:|:--------|---------|---------|---------|------------| -| January 2nd 2023 | 1.12.3
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.3) | +| January 17th 2024 | 1.12.4
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.4 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.4) | +| January 2nd 2024 | 1.12.3
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.3) | | November 18th 2023 | 1.12.2
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported (current) | [v1.12.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.2) | | November 16th 2023 | 1.12.1
| 1.12.0 | Java 1.10.0
Go 1.9.1
PHP 1.2.0
Python 1.12.0
.NET 1.12.0
JS 3.2.0 | 0.14.0 | Supported | [v1.12.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.1) | | October 11th 2023 | 1.12.0
| 1.12.0 | Java 1.10.0
Go 1.9.0
PHP 1.1.0
Python 1.11.0
.NET 1.12.0
JS 3.1.2 | 0.14.0 | Supported | [v1.12.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.12.0) | @@ -121,7 +122,8 @@ General guidance on upgrading can be found for [self hosted mode]({{< ref self-h | 1.9.0 | N/A | 1.9.6 | | 1.10.0 | N/A | 1.10.8 | | 1.11.0 | N/A | 1.11.4 | -| 1.12.0 | N/A | 1.12.3 | +| 1.12.0 | N/A | 1.12.4 | + ## Upgrade on Hosting platforms diff --git a/daprdocs/layouts/shortcodes/dapr-latest-version.html b/daprdocs/layouts/shortcodes/dapr-latest-version.html index f15687bb3b4..d3c43ab7178 100644 --- a/daprdocs/layouts/shortcodes/dapr-latest-version.html +++ b/daprdocs/layouts/shortcodes/dapr-latest-version.html @@ -1 +1 @@ -{{- if .Get "short" }}1.12{{ else if .Get "long" }}1.12.3{{ else if .Get "cli" }}1.12.0{{ else }}1.12.3{{ end -}} +{{- if .Get "short" }}1.12{{ else if .Get "long" }}1.12.4{{ else if .Get "cli" }}1.12.0{{ else }}1.12.4{{ end -}} \ No newline at end of file From 4a528ad076796c70932affa660ccad38226e2b99 Mon Sep 17 00:00:00 2001 From: Marc Duiker Date: Sun, 21 Jan 2024 08:44:24 +0100 Subject: [PATCH 14/30] Add link to Docs contributor video and update CodeSpaces page (#3963) Signed-off-by: Marc Duiker --- daprdocs/content/en/contributing/codespaces.md | 1 + .../content/en/contributing/docs-contrib/contributing-docs.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/daprdocs/content/en/contributing/codespaces.md b/daprdocs/content/en/contributing/codespaces.md index bbefdcc626f..630b932abb4 100644 --- a/daprdocs/content/en/contributing/codespaces.md +++ b/daprdocs/content/en/contributing/codespaces.md @@ -30,6 +30,7 @@ If you haven't already forked the repo, creating the Codespace will also create - [dapr/dapr](https://github.com/dapr/dapr) - [dapr/components-contrib](https://github.com/dapr/components-contrib) - [dapr/cli](https://github.com/dapr/cli) +- [dapr/docs](https://github.com/dapr/docs) - [dapr/python-sdk](https://github.com/dapr/python-sdk) ## Developing Dapr Components in a Codespace diff --git a/daprdocs/content/en/contributing/docs-contrib/contributing-docs.md b/daprdocs/content/en/contributing/docs-contrib/contributing-docs.md index 85d16302b70..2ed1f81bd0e 100644 --- a/daprdocs/content/en/contributing/docs-contrib/contributing-docs.md +++ b/daprdocs/content/en/contributing/docs-contrib/contributing-docs.md @@ -8,6 +8,8 @@ description: Get started with contributing to the Dapr docs In this guide, you'll learn how to contribute to the [Dapr docs repository](https://github.com/dapr/docs). Since Dapr docs are published to [docs.dapr.io](https://docs.dapr.io), you must make sure your contributions compile and publish correctly. + + ## Prerequisites Before contributing to the Dapr docs: From 18785e4a8ebebdfd8de929fdd94ebff1cd2abe97 Mon Sep 17 00:00:00 2001 From: Yetkin Timocin Date: Sun, 21 Jan 2024 14:57:03 -0800 Subject: [PATCH 15/30] Update kubernetes-deploy.md (#3964) Added the missing `-k` flag in the Kubernetes Deploy docs. Signed-off-by: Yetkin Timocin --- .../en/operations/hosting/kubernetes/kubernetes-deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md index d88ec29209d..5764b92b24f 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md @@ -251,7 +251,7 @@ To use Mariner-based images for Dapr, you need to add `-mariner` to your Docker In the Dapr CLI, you can switch to using Mariner-based images with the `--image-variant` flag. ```sh -dapr init --image-variant mariner +dapr init -k --image-variant mariner ``` {{% /codetab %}} From 3dc5218b799efdcf8370276baa8af7e42acd90fe Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Mon, 22 Jan 2024 23:42:35 -0600 Subject: [PATCH 16/30] Added Crypto API reference documentation (#3952) * Added Crypto API reference documentation. Updated error codes weight so it's last in list. Signed-off-by: Whit Waldo * Added Crypto API reference documentation. Updated error codes weight so it's last in list. Signed-off-by: Whit Waldo * Update daprdocs/content/en/reference/api/cryptography_api.md Co-authored-by: Mark Fussell Signed-off-by: Whit Waldo * Update daprdocs/content/en/reference/api/cryptography_api.md Co-authored-by: Mark Fussell Signed-off-by: Whit Waldo * Minor text update Signed-off-by: Whit Waldo * Update daprdocs/content/en/reference/api/cryptography_api.md Co-authored-by: Mark Fussell Signed-off-by: Whit Waldo * Update daprdocs/content/en/reference/api/cryptography_api.md Co-authored-by: Mark Fussell Signed-off-by: Whit Waldo * Update daprdocs/content/en/reference/api/cryptography_api.md Co-authored-by: Mark Fussell Signed-off-by: Whit Waldo * Update daprdocs/content/en/reference/api/cryptography_api.md Co-authored-by: Mark Fussell Signed-off-by: Whit Waldo * Added related link to API reference on Crypto overview page. Signed-off-by: Whit Waldo --------- Signed-off-by: Whit Waldo Co-authored-by: Mark Fussell --- .../cryptography/cryptography-overview.md | 3 +- .../en/reference/api/cryptography_api.md | 128 ++++++++++++++++++ .../content/en/reference/api/error_codes.md | 2 +- 3 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 daprdocs/content/en/reference/api/cryptography_api.md diff --git a/daprdocs/content/en/developing-applications/building-blocks/cryptography/cryptography-overview.md b/daprdocs/content/en/developing-applications/building-blocks/cryptography/cryptography-overview.md index 48e582a3c37..e8af63f1aaf 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/cryptography/cryptography-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/cryptography/cryptography-overview.md @@ -85,4 +85,5 @@ Watch this [demo video of the Cryptography API from the Dapr Community Call #83] ## Related links - [Cryptography overview]({{< ref cryptography-overview.md >}}) -- [Cryptography component specs]({{< ref supported-cryptography >}}) \ No newline at end of file +- [Cryptography component specs]({{< ref supported-cryptography >}}) +- [Cryptography API reference doc]({{< ref cryptography_api >}}) \ No newline at end of file diff --git a/daprdocs/content/en/reference/api/cryptography_api.md b/daprdocs/content/en/reference/api/cryptography_api.md new file mode 100644 index 00000000000..248e8822ec6 --- /dev/null +++ b/daprdocs/content/en/reference/api/cryptography_api.md @@ -0,0 +1,128 @@ +--- +type: docs +title: "Cryptography API reference" +linkTitle: "Cryptography API" +description: "Detailed documentation on the cryptography API" +weight: 1300 +--- + +Dapr provides cross-platform and cross-language support for encryption and decryption support via the +cryptography building block. Besides the [language specific SDKs]({{}}), a developer can invoke these capabilities using +the HTTP API endpoints below. + +## Encrypt Payload + +This endpoint lets you encrypt a value provided as a byte array using a specified key and crypto component. + +### HTTP Request + +``` +PUT http://localhost:/v1.0/crypto//encrypt +``` + +#### URL Parameters + | Parameter | Description | +|-------------------|-------------------------------------------------------------| +| daprPort | The Dapr port | +| crypto-store-name | The name of the crypto store to get the encryption key from | + +> Note, all URL parameters are case-sensitive. + +#### Headers +Additional encryption parameters are configured by setting headers with the appropriate +values. The following table details the required and optional headers to set with every +encryption request. + +| Header Key | Description | Allowed Values | Required | +|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|----------------------------------------------------------| +| dapr-key-name | The name of the key to use for the encryption operation | | Yes | +| dapr-key-wrap-algorithm | The key wrap algorithm to use | `A256KW`, `A128CBC`, `A192CBC`, `RSA-OAEP-256` | Yes | +| dapr-omit-decryption-key-name | If true, omits the decryption key name from header `dapr-decryption-key-name` from the output. If false, includes the specified decryption key name specified in header `dapr-decryption-key-name`. | The following values will be accepted as true: `y`, `yes`, `true`, `t`, `on`, `1` | No | +| dapr-decryption-key-name | If `dapr-omit-decryption-key-name` is true, this contains the name of the intended decryption key to include in the output. | | Required only if `dapr-omit-decryption-key-name` is true | +| dapr-data-encryption-cipher | The cipher to use for the encryption operation | `aes-gcm` or `chacha20-poly1305` | No | + +### HTTP Response + +#### Response Body +The response to an encryption request will have its content type header set to `application/octet-stream` as it +returns an array of bytes with the encrypted payload. + +#### Response Codes +| Code | Description | +|------|-------------------------------------------------------------------------| +| 200 | OK | +| 400 | Crypto provider not found | +| 500 | Request formatted correctly, error in dapr code or underlying component | + +### Examples +```shell +curl http://localhost:3500/v1.0/crypto/myAzureKeyVault/encrypt \ + -X PUT \ + -H "dapr-key-name: myCryptoKey" \ + -H "dapr-key-wrap-algorithm: aes-gcm" \ + -H "Content-Type: application/octet-string" \ + --data-binary "\x68\x65\x6c\x6c\x6f\x20\x77\x6f\x72\x6c\x64" +``` + +> The above command sends an array of UTF-8 encoded bytes representing "hello world" and would return +> a stream of 8-bit values in the response similar to the following containing the encrypted payload: + +```bash +gAAAAABhZfZ0Ywz4dQX8y9J0Zl5v7w6Z7xq4jV3cW9o2l4pQ0YD1LdR0Zk7zIYi4n2Ll7t6f0Z4X7r8x9o6a8GyL0X1m9Q0Z0A== +``` + +## Decrypt Payload + +This endpoint lets you decrypt a value provided as a byte array using a specified key and crypto component. + +#### HTTP Request + +``` +PUT curl http://localhost:3500/v1.0/crypto//decrypt +``` + +#### URL Parameters + +| Parameter | Description | +|-------------------|-------------------------------------------------------------| +| daprPort | The Dapr port | +| crypto-store-name | The name of the crypto store to get the decryption key from | + +> Note all parameters are case-sensitive. + +#### Headers +Additional decryption parameters are configured by setting headers with the appropriate values. The following table +details the required and optional headers to set with every decryption request. + +| Header Key | Description | Required | +|---------------|----------------------------------------------------------|----------| +| dapr-key-name | The name of the key to use for the decryption operation. | Yes | + +### HTTP Response + +#### Response Body +The response to a decryption request will have its content type header to set `application/octet-stream` as it +returns an array of bytes representing the decrypted payload. + +#### Response Codes +| Code | Description | +|------|-------------------------------------------------------------------------| +| 200 | OK | +| 400 | Crypto provider not found | +| 500 | Request formatted correctly, error in dapr code or underlying component | + +### Examples +```bash +curl http://localhost:3500/v1.0/crypto/myAzureKeyVault/decrypt \ + -X PUT + -H "dapr-key-name: myCryptoKey"\ + -H "Content-Type: application/octet-stream" \ + --data-binary "gAAAAABhZfZ0Ywz4dQX8y9J0Zl5v7w6Z7xq4jV3cW9o2l4pQ0YD1LdR0Zk7zIYi4n2Ll7t6f0Z4X7r8x9o6a8GyL0X1m9Q0Z0A==" +``` + +> The above command sends a base-64 encoded string of the encrypted message payload and would return a response with +> the content type header set to `application/octet-stream` returning the response body `hello world`. + +```bash +hello world +``` \ No newline at end of file diff --git a/daprdocs/content/en/reference/api/error_codes.md b/daprdocs/content/en/reference/api/error_codes.md index 7de8c0a2c3c..19d3b8cc36c 100644 --- a/daprdocs/content/en/reference/api/error_codes.md +++ b/daprdocs/content/en/reference/api/error_codes.md @@ -3,7 +3,7 @@ type: docs title: "Error codes returned by APIs" linkTitle: "Error codes" description: "Detailed reference of the Dapr API error codes" -weight: 1300 +weight: 1400 --- For http calls made to Dapr runtime, when an error is encountered, an error json is returned in http response body. The json contains an error code and an descriptive error message, e.g. From 23222073d3f56de97314ea3a3ab7ec81ed40dc30 Mon Sep 17 00:00:00 2001 From: jhberge <36478438+jhberge@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:13:05 +0100 Subject: [PATCH 17/30] Update step 5 of pubsub-quickstart.md The notice about random numbers was a bit confusing. Signed-off-by: jhberge <36478438+jhberge@users.noreply.github.com> --- .../content/en/getting-started/quickstarts/pubsub-quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md index 63ba887755d..90d1e505ac4 100644 --- a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md @@ -878,7 +878,7 @@ with DaprClient() as client: ### Step 5: View the Pub/sub outputs -Notice, as specified in the code above, the publisher pushes a random number to the Dapr sidecar while the subscriber receives it. +The publisher pushes orders to the Dapr sidecar while the subscriber receives it. Publisher output: From 928acb316b1066eb251de44292427f4a97e4501a Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Wed, 24 Jan 2024 00:16:19 -0600 Subject: [PATCH 18/30] Added note explaining that use of the SDKs is preferred over HTTP APIs for production scenarios. (#3967) Signed-off-by: Whit Waldo --- daprdocs/content/en/reference/api/cryptography_api.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daprdocs/content/en/reference/api/cryptography_api.md b/daprdocs/content/en/reference/api/cryptography_api.md index 248e8822ec6..336088f23e3 100644 --- a/daprdocs/content/en/reference/api/cryptography_api.md +++ b/daprdocs/content/en/reference/api/cryptography_api.md @@ -10,6 +10,9 @@ Dapr provides cross-platform and cross-language support for encryption and decry cryptography building block. Besides the [language specific SDKs]({{}}), a developer can invoke these capabilities using the HTTP API endpoints below. +> The HTTP APIs are intended for development and testing only. For production scenarios, the use of the SDKs is strongly +> recommended as they implement the gRPC APIs providing higher performance and capability than the HTTP APIs. + ## Encrypt Payload This endpoint lets you encrypt a value provided as a byte array using a specified key and crypto component. From 4b389d3aca466b32a2251ad28c9aa99222cad931 Mon Sep 17 00:00:00 2001 From: Prashant Rewar <108176843+prashantrewar@users.noreply.github.com> Date: Fri, 26 Jan 2024 22:00:26 +0530 Subject: [PATCH 19/30] Add Instructions to add Kubernetes Metrics server to Kind (#3970) Signed-off-by: Prashant Rewar <108176843+prashantrewar@users.noreply.github.com> --- .../hosting/kubernetes/cluster/setup-kind.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-kind.md b/daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-kind.md index 00d34d93ac8..d77f27b3073 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-kind.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/cluster/setup-kind.md @@ -113,6 +113,43 @@ If you are using Docker Desktop, verify that you have [the recommended settings] 1. Navigate to `http://localhost:9999` to validate a successful setup. +## Install metrics-server on the Kind Kubernetes Cluster + +1. Get metrics-server manifests + + ```bash + wget https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml + ``` + +1. Add insecure TLS parameter to the components.yaml file + + ```yaml + metadata: + labels: + k8s-app: metrics-server + spec: + containers: + - args: + - --cert-dir=/tmp + - --secure-port=4443 + - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname + - --kubelet-use-node-status-port + - --kubelet-insecure-tls <==== Add this + - --metric-resolution=15s + image: k8s.gcr.io/metrics-server/metrics-server:v0.6.2 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /livez + ``` + +1. Apply modified manifest + + ```bash + kubectl apply -f components.yaml + ``` + ## Related links - [Try out a Dapr quickstart]({{< ref quickstarts.md >}}) - Learn how to [deploy Dapr on your cluster]({{< ref kubernetes-deploy.md >}}) From c43c36b21008a59d3c4ab876967d130e4a9e41c6 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 26 Jan 2024 13:47:57 -0500 Subject: [PATCH 20/30] go submodules Signed-off-by: Hannah Hunter --- sdkdocs/go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdkdocs/go b/sdkdocs/go index e16e0350a52..a65eddaa4e9 160000 --- a/sdkdocs/go +++ b/sdkdocs/go @@ -1 +1 @@ -Subproject commit e16e0350a52349b5a05138edc0b58e3be78ee753 +Subproject commit a65eddaa4e9217ed5cdf436b3438d2ffd837ba55 From 0b03f6fb30a3393446400e20be5e06f79829df74 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 26 Jan 2024 13:49:48 -0500 Subject: [PATCH 21/30] java submodule Signed-off-by: Hannah Hunter --- sdkdocs/java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdkdocs/java b/sdkdocs/java index 5e45aa86b81..a9a09ba2acc 160000 --- a/sdkdocs/java +++ b/sdkdocs/java @@ -1 +1 @@ -Subproject commit 5e45aa86b81748bf1e6efdbf7f52c20645a12435 +Subproject commit a9a09ba2acc39bc7e54a5a7092e1c5820818e23c From 482dbc174b8dc515a2a40150d08959916e1ee427 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 26 Jan 2024 13:50:48 -0500 Subject: [PATCH 22/30] js submodule Signed-off-by: Hannah Hunter --- sdkdocs/js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdkdocs/js b/sdkdocs/js index df7eff281a5..5c2b40ac94b 160000 --- a/sdkdocs/js +++ b/sdkdocs/js @@ -1 +1 @@ -Subproject commit df7eff281a5a1395a7967c658a5707e8dfb2b99e +Subproject commit 5c2b40ac94b50f6a5bdb32008f6a47da69946d95 From b5dbf2e4459f6a32a49bf3c42a7699410f4acf05 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 26 Jan 2024 13:51:55 -0500 Subject: [PATCH 23/30] dotnet submodules Signed-off-by: Hannah Hunter --- sdkdocs/dotnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdkdocs/dotnet b/sdkdocs/dotnet index 99d874a2b13..d023a43ba4f 160000 --- a/sdkdocs/dotnet +++ b/sdkdocs/dotnet @@ -1 +1 @@ -Subproject commit 99d874a2b138af020df099a0fc0a09a7d0597fae +Subproject commit d023a43ba4fd4cddb7aa2c0962cf786f01f58c24 From 8137597929f846b4b759c24c9bf1fcfb4a1e2ebb Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 26 Jan 2024 13:55:39 -0500 Subject: [PATCH 24/30] python submodule Signed-off-by: Hannah Hunter --- sdkdocs/python | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdkdocs/python b/sdkdocs/python index 6171b67db60..ef732090e8e 160000 --- a/sdkdocs/python +++ b/sdkdocs/python @@ -1 +1 @@ -Subproject commit 6171b67db60d51704ed8425ae71dda9226bf1255 +Subproject commit ef732090e8e04629ca573d127c5ee187a505aba4 From d02f303ae20e55be5e7eef985404f68bf1a72857 Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:47:37 -0500 Subject: [PATCH 25/30] Update daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md Co-authored-by: Mark Fussell Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> --- .../content/en/getting-started/quickstarts/pubsub-quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md index 90d1e505ac4..108225377e6 100644 --- a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md @@ -878,7 +878,7 @@ with DaprClient() as client: ### Step 5: View the Pub/sub outputs -The publisher pushes orders to the Dapr sidecar while the subscriber receives it. +The publisher sends orders to the Dapr sidecar while the subscriber receives them. Publisher output: From eab7975f9148a858c747214899cc5d4b0743d8f1 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 26 Jan 2024 15:19:46 -0500 Subject: [PATCH 26/30] add reqs to multi run instructions Signed-off-by: Hannah Hunter --- .../quickstarts/pubsub-quickstart.md | 58 +++++++++++++++++++ .../serviceinvocation-quickstart.md | 52 +++++++++++++++++ .../quickstarts/statemanagement-quickstart.md | 33 +++++++++++ 3 files changed, 143 insertions(+) diff --git a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md index 108225377e6..3b459afebfd 100644 --- a/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/pubsub-quickstart.md @@ -51,6 +51,20 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory: cd pub_sub/python/sdk ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./checkout +pip3 install -r requirements.txt +cd .. +cd ./order-processor +pip3 install -r requirements.txt +cd .. +cd ./order-processor-fastapi +pip3 install -r requirements.txt +cd .. +``` + ### Step 3: Run the publisher and subscriber With the following command, simultaneously run the following services alongside their own Dapr sidecars: @@ -215,6 +229,17 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory: cd pub_sub/javascript/sdk ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +npm install +cd .. +cd ./checkout +npm install +cd .. +``` + ### Step 3: Run the publisher and subscriber With the following command, simultaneously run the following services alongside their own Dapr sidecars: @@ -352,6 +377,18 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory: cd pub_sub/csharp/sdk ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +dotnet restore +dotnet build +cd ../checkout +dotnet restore +dotnet build +cd .. +``` + ### Step 3: Run the publisher and subscriber With the following command, simultaneously run the following services alongside their own Dapr sidecars: @@ -497,6 +534,17 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory: cd pub_sub/java/sdk ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +mvn clean install +cd .. +cd ./checkout +mvn clean install +cd .. +``` + ### Step 3: Run the publisher and subscriber With the following command, simultaneously run the following services alongside their own Dapr sidecars: @@ -647,6 +695,16 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory: cd pub_sub/go/sdk ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +go build . +cd ../checkout +go build . +cd .. +``` + ### Step 3: Run the publisher and subscriber With the following command, simultaneously run the following services alongside their own Dapr sidecars: diff --git a/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md index d75e1a7a6e3..0164e35fddf 100644 --- a/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md @@ -48,6 +48,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire cd service_invocation/python/http ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +pip3 install -r requirements.txt +cd ../checkout +pip3 install -r requirements.txt +cd .. +``` + ### Step 3: Run the `order-processor` and `checkout` services With the following command, simultaneously run the following services alongside their own Dapr sidecars: @@ -184,6 +194,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire cd service_invocation/javascript/http ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +npm install +cd ../checkout +npm install +cd .. +``` + ### Step 3: Run the `order-processor` and `checkout` services With the following command, simultaneously run the following services alongside their own Dapr sidecars: @@ -314,6 +334,18 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire cd service_invocation/csharp/http ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +dotnet restore +dotnet build +cd ../checkout +dotnet restore +dotnet build +cd .. +``` + ### Step 3: Run the `order-processor` and `checkout` services With the following command, simultaneously run the following services alongside their own Dapr sidecars: @@ -448,6 +480,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire cd service_invocation/java/http ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +mvn clean install +cd ../checkout +mvn clean install +cd .. +``` + ### Step 3: Run the `order-processor` and `checkout` services With the following command, simultaneously run the following services alongside their own Dapr sidecars: @@ -577,6 +619,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire cd service_invocation/go/http ``` +Install the dependencies for the `order-processor` and `checkout` apps: + +```bash +cd ./order-processor +go build . +cd ../checkout +go build . +cd .. +``` + ### Step 3: Run the `order-processor` and `checkout` services With the following command, simultaneously run the following services alongside their own Dapr sidecars: diff --git a/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md index 26d63ae9826..bfa8427da8c 100644 --- a/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/statemanagement-quickstart.md @@ -48,6 +48,12 @@ In a terminal window, navigate to the `order-processor` directory. cd state_management/python/sdk/order-processor ``` +Install the dependencies: + +```bash +pip3 install -r requirements.txt +``` + Run the `order-processor` service alongside a Dapr sidecar using [Multi-App Run]({{< ref multi-app-dapr-run >}}). ```bash @@ -163,6 +169,14 @@ Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quic git clone https://github.com/dapr/quickstarts.git ``` +Install the dependencies for the `order-processor` app: + +```bash +cd ./order-processor +npm install +cd .. +``` + ### Step 2: Manipulate service state In a terminal window, navigate to the `order-processor` directory. @@ -171,6 +185,12 @@ In a terminal window, navigate to the `order-processor` directory. cd state_management/javascript/sdk/order-processor ``` +Install the dependencies: + +```bash +npm install +``` + Run the `order-processor` service alongside a Dapr sidecar. ```bash @@ -297,6 +317,13 @@ In a terminal window, navigate to the `order-processor` directory. cd state_management/csharp/sdk/order-processor ``` +Install the dependencies: + +```bash +dotnet restore +dotnet build +``` + Run the `order-processor` service alongside a Dapr sidecar. ```bash @@ -557,6 +584,12 @@ In a terminal window, navigate to the `order-processor` directory. cd state_management/go/sdk/order-processor ``` +Install the dependencies: + +```bash +go build . +``` + Run the `order-processor` service alongside a Dapr sidecar. ```bash From c2a51984a735874cc09365a666ae78bbaf28ed2e Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 26 Jan 2024 16:50:43 -0500 Subject: [PATCH 27/30] add workaround Signed-off-by: Hannah Hunter --- .../getting-started/install-dapr-selfhost.md | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index 135c1458746..55168bb1898 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -23,9 +23,9 @@ Dapr initialization includes: 1. Running a **Dapr placement service container instance** for local actor support. {{% alert title="Docker" color="primary" %}} -The recommended development environment requires [Docker](https://docs.docker.com/install/). While you can [initialize Dapr without a dependency on Docker]({{}})), the next steps in this guide assume the recommended Docker development environment. +The recommended development environment requires [Docker](https://docs.docker.com/install/). While you can [initialize Dapr without a dependency on Docker]({{< ref self-hosted-no-docker.md >}})), the next steps in this guide assume the recommended Docker development environment. -You can also install [Podman](https://podman.io/) in place of Docker. Read more about [initializing Dapr using Podman]({{}}). +You can also install [Podman](https://podman.io/) in place of Docker. Read more about [initializing Dapr using Podman]({{< ref dapr-init.md >}}). {{% /alert %}} ### Step 1: Open an elevated terminal @@ -54,12 +54,35 @@ Run Windows Terminal or command prompt as administrator. ### Step 2: Run the init CLI command +{{< tabs "Linux/MacOS" "Windows">}} + +{{% codetab %}} + +Install the latest Dapr runtime binaries: + +```bash +dapr init +``` + +**If you are installing on Mac OS Silicon with Docker,** you may need to perform the following workaround to enable `dapr init` to talk to Docker without using Kubernetes. +1. Navigate to **Docker Desktop** > **Settings** > **Advanced**. +1. Select the **Enable default Docker socket** checkbox. + +{{% /codetab %}} + +{{% codetab %}} + Install the latest Dapr runtime binaries: ```bash dapr init ``` +{{% /codetab %}} + +{{< /tabs >}} + + ### Step 3: Verify Dapr version ```bash From fab5b197d2c7ec489e10ce1326ad3dbbd1cb14de Mon Sep 17 00:00:00 2001 From: kaibocai <89094811+kaibocai@users.noreply.github.com> Date: Sat, 27 Jan 2024 07:39:40 -0600 Subject: [PATCH 28/30] Update limitation for js Update limitation for js Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com> --- .../workflow/workflow-features-concepts.md | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md index ce39d4bac96..a3dcd7c6bb0 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md @@ -162,7 +162,7 @@ APIs that generate random numbers, random UUIDs, or the current date are _non-de For example, instead of this: -{{< tabs ".NET" Java >}} +{{< tabs ".NET" Java JavaScript >}} {{% codetab %}} @@ -186,6 +186,17 @@ string randomString = GetRandomString(); {{% /codetab %}} +{{% codetab %}} + +```javascript +// DON'T DO THIS! +const currentTime = new Date(); +const newIdentifier = uuidv4(); +const randomString = getRandomString(); +``` + +{{% /codetab %}} + {{< /tabs >}} Do this: @@ -214,6 +225,16 @@ String randomString = context.callActivity(GetRandomString.class.getName(), Stri {{% /codetab %}} +{{% codetab %}} + +```javascript +// Do this!! +const currentTime = context.getCurrentUtcDateTime(); +const randomString = yield context.callActivity(getRandomString); +``` + +{{% /codetab %}} + {{< /tabs >}} @@ -247,6 +268,24 @@ HttpResponse response = HttpClient.newBuilder().build().send(request, Ht {{% /codetab %}} +```javascript +// DON'T DO THIS! +// Accessing an Environment Variable (Node.js) +const configuration = process.env.MY_CONFIGURATION; + +fetch('https://postman-echo.com/get') + .then(response => response.text()) + .then(data => { + console.log(data); + }) + .catch(error => { + console.error('Error:', error); + }); + +``` + +{{% /codetab %}} + {{< /tabs >}} Do this: @@ -273,6 +312,16 @@ String data = ctx.callActivity(MakeHttpCall.class, "https://example.com/api/data {{% /codetab %}} +{{% codetab %}} + +```javascript +// Do this!! +const configuation = workflowInput.getConfiguration(); // imaginary workflow input argument +const data = yield ctx.callActivity(makeHttpCall, "https://example.com/api/data"); +``` + +{{% /codetab %}} + {{< /tabs >}} From da0fd19ce8f02dc1e03d54edf9fb1dc52c967c85 Mon Sep 17 00:00:00 2001 From: kaibocai <89094811+kaibocai@users.noreply.github.com> Date: Sat, 27 Jan 2024 07:42:22 -0600 Subject: [PATCH 29/30] Update workflow-features-concepts.md Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com> --- .../building-blocks/workflow/workflow-features-concepts.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md index a3dcd7c6bb0..ce2000021fc 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md @@ -201,7 +201,7 @@ const randomString = getRandomString(); Do this: -{{< tabs ".NET" Java >}} +{{< tabs ".NET" Java JavaScript >}} {{% codetab %}} @@ -245,7 +245,7 @@ Instead, workflows should interact with external state _indirectly_ using workfl For example, instead of this: -{{< tabs ".NET" Java >}} +{{< tabs ".NET" Java JavaScript >}} {{% codetab %}} @@ -290,7 +290,7 @@ fetch('https://postman-echo.com/get') Do this: -{{< tabs ".NET" Java >}} +{{< tabs ".NET" Java JavaScript >}} {{% codetab %}} From f949c5ae8920e9fbcd02da368629530c4252e4b0 Mon Sep 17 00:00:00 2001 From: kaibocai <89094811+kaibocai@users.noreply.github.com> Date: Wed, 31 Jan 2024 08:46:53 -0600 Subject: [PATCH 30/30] Update daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: kaibocai <89094811+kaibocai@users.noreply.github.com> --- .../building-blocks/workflow/workflow-features-concepts.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md index ce2000021fc..17aec65532b 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md +++ b/daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-features-concepts.md @@ -268,6 +268,8 @@ HttpResponse response = HttpClient.newBuilder().build().send(request, Ht {{% /codetab %}} +{{% codetab %}} + ```javascript // DON'T DO THIS! // Accessing an Environment Variable (Node.js)