From 51108827bbf894d7f0b1153274523b322b93471b Mon Sep 17 00:00:00 2001 From: xavier geerinck Date: Tue, 23 Feb 2021 15:55:53 +0100 Subject: [PATCH 1/8] Fixing Blob Storage Documentation some mistakes where made when adding codetabs, fixed those closing tags. Also fixed title tags for examples --- .../supported-bindings/blobstorage.md | 104 +++++++++--------- 1 file changed, 54 insertions(+), 50 deletions(-) diff --git a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md index 7721dfb7e..e6c34d75b 100644 --- a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md @@ -68,47 +68,48 @@ To perform a create blob operation, invoke the Azure Blob Storage binding with a #### Examples + +##### Saving to a random generated UUID file + {{< tabs Windows Linux >}} + {{% codetab %}} + On Windows, utilize cmd prompt (PowerShell has different escaping mechanism) + ```bash + curl -d "{ \"operation\": \"create\", \"data\": \"Hello World\" }" http://localhost:/v1.0/bindings/ + ``` + {{% /codetab %}} -**Saving to a random generated UUID file** -{{% codetab %}} -On Windows, utilize cmd prompt (PowerShell has different escaping mechanism) -```bash -curl -d "{ \"operation\": \"create\", \"data\": \"Hello World\" }" http://localhost:/v1.0/bindings/ -``` -{{% /codetab %}} - -{{% codetab %}} -```bash -curl -d '{ "operation": "create", "data": "Hello World" }' \ - http://localhost:/v1.0/bindings/ -``` -{{% /codetab %}} + {{% codetab %}} + ```bash + curl -d '{ "operation": "create", "data": "Hello World" }' \ + http://localhost:/v1.0/bindings/ + ``` + {{% /codetab %}} {{< /tabs >}} -**Saving to a specific file** +##### Saving to a specific file {{< tabs Windows Linux >}} -{{% codetab %}} -```bash -curl -d "{ \"operation\": \"create\", \"data\": \"Hello World\", \"metadata\": { \"blobName\": \"my-test-file.txt\" } }" \ - http://localhost:/v1.0/bindings/ -``` -{{% /codetab %}} + {{% codetab %}} + ```bash + curl -d "{ \"operation\": \"create\", \"data\": \"Hello World\", \"metadata\": { \"blobName\": \"my-test-file.txt\" } }" \ + http://localhost:/v1.0/bindings/ + ``` + {{% /codetab %}} -{{% codetab %}} -```bash -curl -d '{ "operation": "create", "data": "Hello World", "metadata": { "blobName": "my-test-file.txt" } }' \ - http://localhost:/v1.0/bindings/ -``` -{{% /codetab %}} + {{% codetab %}} + ```bash + curl -d '{ "operation": "create", "data": "Hello World", "metadata": { "blobName": "my-test-file.txt" } }' \ + http://localhost:/v1.0/bindings/ + ``` + {{% /codetab %}} {{< /tabs >}} -**Saving a file** +##### Saving a file To upload a file, encode it as Base64 and let the Binding know to deserialize it: @@ -136,18 +137,18 @@ Then you can upload it as you would normally: {{< tabs Windows Linux >}} -{{% codetab %}} -```bash -curl -d "{ \"operation\": \"create\", \"data\": \"YOUR_BASE_64_CONTENT\", \"metadata\": { \"blobName\": \"my-test-file.jpg\" } }" http://localhost:/v1.0/bindings/ -``` -{{% /codetab %}} + {{% codetab %}} + ```bash + curl -d "{ \"operation\": \"create\", \"data\": \"YOUR_BASE_64_CONTENT\", \"metadata\": { \"blobName\": \"my-test-file.jpg\" } }" http://localhost:/v1.0/bindings/ + ``` + {{% /codetab %}} -{{% codetab %}} -```bash -curl -d '{ "operation": "create", "data": "YOUR_BASE_64_CONTENT", "metadata": { "blobName": "my-test-file.jpg" } }' \ - http://localhost:/v1.0/bindings/ -``` -{{% /codetab %}} + {{% codetab %}} + ```bash + curl -d '{ "operation": "create", "data": "YOUR_BASE_64_CONTENT", "metadata": { "blobName": "my-test-file.jpg" } }' \ + http://localhost:/v1.0/bindings/ + ``` + {{% /codetab %}} {{< /tabs >}} @@ -179,18 +180,20 @@ To perform a get blob operation, invoke the Azure Blob Storage binding with a `P {{< tabs Windows Linux >}} -{{% codetab %}} -```bash -curl -d '{ \"operation\": \"get\", \"metadata\": { \"blobName\": \"myblob\" }}' http://localhost:/v1.0/bindings/ -``` -{{% /codetab %}} + {{% codetab %}} + ```bash + curl -d '{ \"operation\": \"get\", \"metadata\": { \"blobName\": \"myblob\" }}' http://localhost:/v1.0/bindings/ + ``` + {{% /codetab %}} -{{% codetab %}} -```bash -curl -d '{ "operation": "get", "metadata": { "blobName": "myblob" }}' \ - http://localhost:/v1.0/bindings/ -``` -{{% /codetab %}} + {{% codetab %}} + ```bash + curl -d '{ "operation": "get", "metadata": { "blobName": "myblob" }}' \ + http://localhost:/v1.0/bindings/ + ``` + {{% /codetab %}} + +{{< /tabs >}} #### Response @@ -201,6 +204,7 @@ The response body contains the value stored in the blob object. By default the Azure Blob Storage output binding auto generates a UUID as the blob filename and is not assigned any system or custom metadata to it. It is configurable in the metadata property of the message (all optional). Applications publishing to an Azure Blob Storage output binding should send a message with the following format: + ```json { "data": "file content", From 5067042e9b732dd1d49410037fd00a31a0550457 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 3 Mar 2021 22:24:27 +0100 Subject: [PATCH 2/8] At "list" permission for non-default namespace List permission is necessary to perform bulk secret read. If not present Dapr sidecar will crash and restart on a new different gprc port. --- daprdocs/content/en/operations/components/component-secrets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/components/component-secrets.md b/daprdocs/content/en/operations/components/component-secrets.md index f535ac5ee..f494b89bd 100644 --- a/daprdocs/content/en/operations/components/component-secrets.md +++ b/daprdocs/content/en/operations/components/component-secrets.md @@ -121,7 +121,7 @@ metadata: rules: - apiGroups: [""] resources: ["secrets"] - verbs: ["get"] + verbs: ["get", "list"] --- kind: RoleBinding From ff0f90dd5a2ae8830058569d9086aebc075fcca9 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 3 Mar 2021 22:32:15 +0100 Subject: [PATCH 3/8] Fix link --- daprdocs/content/en/contributing/contributing-docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/contributing/contributing-docs.md b/daprdocs/content/en/contributing/contributing-docs.md index fd671fd02..ae8c6dfd7 100644 --- a/daprdocs/content/en/contributing/contributing-docs.md +++ b/daprdocs/content/en/contributing/contributing-docs.md @@ -22,7 +22,7 @@ Follow the instructions in the repository [README.md](https://github.com/dapr/do The Dapr docs handles branching differently than most code repositories. Instead of having a `master` or `main` branch, every branch is labeled to match the major and minor version of a runtime release. For the full list visit the [Docs repo](https://github.com/dapr/docs#branch-guidance) -Overall, all updates should go into the docs branch for the latest release of Dapr. You can find this directly at https://github.com/dapr/docs, as the latest release will be the default branch. For any docs changes that are applicable to a release candidate or a pre-release version of the docs, make your changes into that particular branch. +Overall, all updates should go into the docs branch for the latest release of Dapr. You can find this directly at [https://github.com/dapr/docs](https://github.com/dapr/docs), as the latest release will be the default branch. For any docs changes that are applicable to a release candidate or a pre-release version of the docs, make your changes into that particular branch. For example, if you are fixing a typo, adding notes, or clarifying a point, make your changes into the default Dapr branch. If you are documenting an upcoming change to a component or the runtime, make your changes to the pre-release branch. Branches can be found in the [Docs repo](https://github.com/dapr/docs#branch-guidance) From f1c48c1fd9586916262f10cce9f463cfc22f10d7 Mon Sep 17 00:00:00 2001 From: xavier geerinck Date: Thu, 4 Mar 2021 22:11:36 +0100 Subject: [PATCH 4/8] Update daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md Co-authored-by: Aaron Crawfis --- .../components/setup-bindings/supported-bindings/blobstorage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md index e6c34d75b..cacf8769c 100644 --- a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md @@ -69,7 +69,7 @@ To perform a create blob operation, invoke the Azure Blob Storage binding with a #### Examples -##### Saving to a random generated UUID file +##### Save text to a random generated UUID blob {{< tabs Windows Linux >}} {{% codetab %}} From 088cf1f922ec32bf75d44d086e27d0678927c672 Mon Sep 17 00:00:00 2001 From: xavier geerinck Date: Thu, 4 Mar 2021 22:11:40 +0100 Subject: [PATCH 5/8] Update daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md Co-authored-by: Aaron Crawfis --- .../components/setup-bindings/supported-bindings/blobstorage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md index cacf8769c..aa678a058 100644 --- a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md @@ -88,7 +88,7 @@ To perform a create blob operation, invoke the Azure Blob Storage binding with a {{< /tabs >}} -##### Saving to a specific file +##### Save text to a specific blob {{< tabs Windows Linux >}} From 5303bfdccc5b43bcbff6b118bcea62986307c129 Mon Sep 17 00:00:00 2001 From: xavier geerinck Date: Thu, 4 Mar 2021 22:11:43 +0100 Subject: [PATCH 6/8] Update daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md Co-authored-by: Aaron Crawfis --- .../components/setup-bindings/supported-bindings/blobstorage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md index aa678a058..409f8efe0 100644 --- a/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/operations/components/setup-bindings/supported-bindings/blobstorage.md @@ -109,7 +109,7 @@ To perform a create blob operation, invoke the Azure Blob Storage binding with a {{< /tabs >}} -##### Saving a file +##### Save a file to a blob To upload a file, encode it as Base64 and let the Binding know to deserialize it: From 06e05fd7da6dd66549bb49f30e2f945d47dffb8b Mon Sep 17 00:00:00 2001 From: Ori Zohar Date: Thu, 4 Mar 2021 14:29:33 -0800 Subject: [PATCH 7/8] Fixing typo --- daprdocs/content/en/concepts/security-concept.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/concepts/security-concept.md b/daprdocs/content/en/concepts/security-concept.md index c130d0fe4..dd097337e 100644 --- a/daprdocs/content/en/concepts/security-concept.md +++ b/daprdocs/content/en/concepts/security-concept.md @@ -11,7 +11,7 @@ This article addresses multiple security considerations when using Dapr in a dis Several of the areas above are addressed through encryption of data in transit. One of the security mechanisms that Dapr employs for encrypting data in transit is [mutual authentication TLS](https://en.wikipedia.org/wiki/Mutual_authentication) or mTLS. mTLS offers a few key features for network traffic inside your application: -- Two way authentication - the client proving its identify to the server, and vice-versa +- Two way authentication - the client proving its identity to the server, and vice-versa - An encrypted channel for all in-flight communication, after two-way authentication is established Mutual TLS is useful in almost all scenarios, but especially so for systems subject to regulations such as [HIPAA](https://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act) and [PCI](https://en.wikipedia.org/wiki/Payment_Card_Industry_Data_Security_Standard). From 5472fe260464f96e71d99a72377d8a43bc1add64 Mon Sep 17 00:00:00 2001 From: Charlie Stanley Date: Tue, 23 Feb 2021 15:32:14 -0800 Subject: [PATCH 8/8] Adding automatic link validation --- .github/workflows/link_validation.yaml | 29 +++++++++++++++++++ daprdocs/content/en/concepts/faq.md | 2 +- .../en/contributing/contributing-overview.md | 2 +- .../setup-pubsub/pubsub-namespaces.md | 4 +-- .../azure-keyvault-managed-identity.md | 2 +- .../supported-state-stores/setup-redis.md | 2 +- .../self-hosted/self-hosted-no-docker.md | 4 +-- 7 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/link_validation.yaml diff --git a/.github/workflows/link_validation.yaml b/.github/workflows/link_validation.yaml new file mode 100644 index 000000000..e0bcbfae7 --- /dev/null +++ b/.github/workflows/link_validation.yaml @@ -0,0 +1,29 @@ +name: validate-links + +on: + push: + branches: + - v* + tags: + - v* + pull_request: + branches: + - v* +jobs: + validate: + runs-on: ubuntu-latest + env: + PYTHON_VER: 3.7 + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ env.PYTHON_VER }} + uses: actions/setup-python@v2 + with: + python-version: ${{ env.PYTHON_VER }} + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip3 install setuptools wheel twine tox mechanical-markdown + - name: Check Markdown Files + run: | + for name in `find . -name "*.md"`; do echo -e "------\n$name" ; mm.py -l $name || exit 1 ;done diff --git a/daprdocs/content/en/concepts/faq.md b/daprdocs/content/en/concepts/faq.md index aaad28c0b..8106ef646 100644 --- a/daprdocs/content/en/concepts/faq.md +++ b/daprdocs/content/en/concepts/faq.md @@ -36,7 +36,7 @@ The Dapr project is focused on performance due to the inherent discussion of Dap ### What is the relationship between Dapr, Orleans and Service Fabric Reliable Actors? The actors in Dapr are based on the same virtual actor concept that [Orleans](https://www.microsoft.com/research/project/orleans-virtual-actors/) started, meaning that they are activated when called and deactivated after a period of time. If you are familiar with Orleans, Dapr C# actors will be familiar. Dapr C# actors are based on [Service Fabric Reliable Actors](https://docs.microsoft.com/azure/service-fabric/service-fabric-reliable-actors-introduction) (which also came from Orleans) and enable you to take Reliable Actors in Service Fabric and migrate them to other hosting platforms such as Kubernetes or other on-premise environments. -Also Dapr is about more than just actors. It provides you with a set of best practice building blocks to build into any microservices application. See [Dapr overview](https://github.com/dapr/docs/blob/master/overview/README.md). +Also Dapr is about more than just actors. It provides you with a set of best practice building blocks to build into any microservices application. See [Dapr overview]({{< ref overview.md >}}). ### Differences between Dapr from an actor framework diff --git a/daprdocs/content/en/contributing/contributing-overview.md b/daprdocs/content/en/contributing/contributing-overview.md index cc9c81cd2..c8b72c60b 100644 --- a/daprdocs/content/en/contributing/contributing-overview.md +++ b/daprdocs/content/en/contributing/contributing-overview.md @@ -38,7 +38,7 @@ Before you submit an issue, make sure you've checked the following: - 👎 down-vote 1. For bugs - Check it's not an environment issue. For example, if running on Kubernetes, make sure prerequisites are in place. (state stores, bindings, etc.) - - You have as much data as possible. This usually comes in the form of logs and/or stacktrace. If running on Kubernetes or other environment, look at the logs of the Dapr services (runtime, operator, placement service). More details on how to get logs can be found [here](https://github.com/dapr/docs/tree/master/best-practices/troubleshooting/logs.md). + - You have as much data as possible. This usually comes in the form of logs and/or stacktrace. If running on Kubernetes or other environment, look at the logs of the Dapr services (runtime, operator, placement service). More details on how to get logs can be found [here]({{< ref "logs-troubleshooting.md" >}}). 1. For proposals - Many changes to the Dapr runtime may require changes to the API. In that case, the best place to discuss the potential feature is the main [Dapr repo](https://github.com/dapr/dapr). - Other examples could include bindings, state stores or entirely new components. diff --git a/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md b/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md index fa186b403..a845e545b 100644 --- a/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md +++ b/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md @@ -43,7 +43,7 @@ kubectl create namespace namespace-a kubectl config set-context --current --namespace=namespace-a ``` -Install Redis (master and slave) on `namespace-a`, following [these instructions](https://github.com/dapr/docs/blob/master/howto/setup-pub-sub-message-broker/setup-redis.md). +Install Redis (master and slave) on `namespace-a`, following [these instructions]({{< ref "configure-state-pubsub.md" >}}). Now, configure `deploy/redis.yaml`, paying attention to the hostname containing `namespace-a`. @@ -125,4 +125,4 @@ kubectl delete namespace namespace-b - [Scope components to one or more applications]({{< ref "component-scopes.md" >}}) - [Use secret scoping]({{< ref "secrets-scopes.md" >}}) -- [Limit the secrets that can be read from secret stores]({{< ref "secret-scope.md" >}}) \ No newline at end of file +- [Limit the secrets that can be read from secret stores]({{< ref "secret-scope.md" >}}) diff --git a/daprdocs/content/en/operations/components/setup-secret-store/supported-secret-stores/azure-keyvault-managed-identity.md b/daprdocs/content/en/operations/components/setup-secret-store/supported-secret-stores/azure-keyvault-managed-identity.md index a95890410..fa1e015fe 100644 --- a/daprdocs/content/en/operations/components/setup-secret-store/supported-secret-stores/azure-keyvault-managed-identity.md +++ b/daprdocs/content/en/operations/components/setup-secret-store/supported-secret-stores/azure-keyvault-managed-identity.md @@ -78,7 +78,7 @@ The above example uses secrets as plain strings. It is recommended to use a loca ```bash az aks show -g -n ``` - For more detail about the roles to assign to integrate AKS with Azure Services [Role Assignment](https://github.com/Azure/aad-pod-identity/blob/master/docs/readmes/README.role-assignment.md). + For more detail about the roles to assign to integrate AKS with Azure Services [Role Assignment](https://azure.github.io/aad-pod-identity/docs/getting-started/role-assignment/). 4. Retrieve Managed Identity ID diff --git a/daprdocs/content/en/operations/components/setup-state-store/supported-state-stores/setup-redis.md b/daprdocs/content/en/operations/components/setup-state-store/supported-state-stores/setup-redis.md index 79810ee1f..bfdd6f94a 100644 --- a/daprdocs/content/en/operations/components/setup-state-store/supported-state-stores/setup-redis.md +++ b/daprdocs/content/en/operations/components/setup-state-store/supported-state-stores/setup-redis.md @@ -112,7 +112,7 @@ We can use [Helm](https://helm.sh/) to quickly create a Redis instance in our Ku 4. Once your instance is created, you'll need to grab the Host name (FQDN) and your access key. - for the Host name navigate to the resources "Overview" and copy "Host name" - for your access key navigate to "Access Keys" under "Settings" and copy your key. -5. Finally, we need to add our key and our host to a `redis.yaml` file that Dapr can apply to our cluster. If you're running a sample, you'll add the host and key to the provided `redis.yaml`. If you're creating a project from the ground up, you'll create a `redis.yaml` file as specified in [Configuration](#configuration). Set the `redisHost` key to `[HOST NAME FROM PREVIOUS STEP]:6379` and the `redisPassword` key to the key you copied in step 4. **Note:** In a production-grade application, follow [secret management](https://github.com/dapr/docs/blob/master/concepts/components/secrets.md) instructions to securely manage your secrets. +5. Finally, we need to add our key and our host to a `redis.yaml` file that Dapr can apply to our cluster. If you're running a sample, you'll add the host and key to the provided `redis.yaml`. If you're creating a project from the ground up, you'll create a `redis.yaml` file as specified in [Configuration](#configuration). Set the `redisHost` key to `[HOST NAME FROM PREVIOUS STEP]:6379` and the `redisPassword` key to the key you copied in step 4. **Note:** In a production-grade application, follow [secret management]({{< ref component-secrets.md >}}) instructions to securely manage your secrets. > **NOTE:** Dapr pub/sub uses [Redis Streams](https://redis.io/topics/streams-intro) that was introduced by Redis 5.0, which isn't currently available on Azure Managed Redis Cache. Consequently, you can use Azure Managed Redis Cache only for state persistence. {{% /codetab %}} diff --git a/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-no-docker.md b/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-no-docker.md index 4c550ad06..355452b3a 100644 --- a/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-no-docker.md +++ b/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-no-docker.md @@ -51,9 +51,9 @@ INFO[0001] leader is established. instance=Nicoletaz-L10. ``` -From here on you can follow the sample example created for the [java-sdk](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/actors/http), [python-sdk](https://github.com/dapr/python-sdk/tree/master/examples/demo_actor) or [dotnet-sdk](https://github.com/dapr/dotnet-sdk/tree/master/samples/Actor) for running an application with Actors enabled. +From here on you can follow the sample example created for the [java-sdk](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/actors), [python-sdk](https://github.com/dapr/python-sdk/tree/master/examples/demo_actor) or [dotnet-sdk]({{< ref "dotnet-actor-howto.md" >}}) for running an application with Actors enabled. -Update the state store configuration files to have the Redis host and password match the setup that you have. Additionally to enable it as a actor state store have the metadata piece added similar to the [sample Java Redis component](https://github.com/dapr/java-sdk/blob/master/examples/components/redis.yaml) definition. +Update the state store configuration files to have the Redis host and password match the setup that you have. Additionally to enable it as a actor state store have the metadata piece added similar to the [sample Java Redis component](https://github.com/dapr/java-sdk/blob/master/examples/components/state/redis.yaml) definition. ```yaml - name: actorStateStore