From 9f36a810e0f76e263e01a9a5e69c5d10dff617a0 Mon Sep 17 00:00:00 2001 From: Hal Spang Date: Mon, 24 Jan 2022 11:42:33 -0800 Subject: [PATCH 1/7] Update .NET SDK docs reference Signed-off-by: Hal Spang --- sdkdocs/dotnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdkdocs/dotnet b/sdkdocs/dotnet index 20ef37382..b47c63ac1 160000 --- a/sdkdocs/dotnet +++ b/sdkdocs/dotnet @@ -1 +1 @@ -Subproject commit 20ef37382cf3e3e4ef74475c72772733abb21922 +Subproject commit b47c63ac140845b178a1b29b1e988e30e4c7b579 From d5cfef545c92daab1f917b9cc42487ac113489b1 Mon Sep 17 00:00:00 2001 From: Ryuji Iwata Date: Tue, 1 Feb 2022 02:18:30 +0900 Subject: [PATCH 2/7] Fix typo (#2169) Fix typo one word. Signed-off-by: Ryuji Iwata --- daprdocs/content/en/concepts/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/concepts/overview.md b/daprdocs/content/en/concepts/overview.md index deb611d5b..f7a009d85 100644 --- a/daprdocs/content/en/concepts/overview.md +++ b/daprdocs/content/en/concepts/overview.md @@ -21,7 +21,7 @@ Today we are experiencing a wave of cloud adoption. Developers are comfortable w This is where Dapr comes in. Dapr codifies the *best practices* for building microservice applications into open, independent APIs called building blocks, that enable you to build portable applications with the language and framework of your choice. Each building block is completely independent and you can use one, some, or all of them in your application. -Using Dapr you can incrementally migrate your existing applications to a microserivces architecture, thereby adopting cloud native patterns such scale out/in, resilency and independent deployments. +Using Dapr you can incrementally migrate your existing applications to a microserivces architecture, thereby adopting cloud native patterns such scale out/in, resiliency and independent deployments. In addition, Dapr is platform agnostic, meaning you can run your applications locally, on any Kubernetes cluster, on virtual or physical machines and in other hosting environments that Dapr integrates with. This enables you to build microservice applications that can run on the cloud and edge. From ccb993b0b3b3d74113cd66f8aaaaa85946f431d0 Mon Sep 17 00:00:00 2001 From: Nick Greenfield Date: Mon, 31 Jan 2022 13:49:29 -0800 Subject: [PATCH 3/7] Revert gRPC examples back for config how-to Signed-off-by: Nick Greenfield --- .../howto-manage-configuration.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md b/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md index 8c072c37f..e21d0c092 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md +++ b/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md @@ -156,6 +156,41 @@ dapr run --app-id orderprocessing --components-path ./components python3 OrderPr {{< /tabs >}} +### Get configuration items using gRPC API + +Using your [favorite language](https://grpc.io/docs/languages/), create a Dapr gRPC client from the [Dapr proto](https://github.com/dapr/dapr/blob/master/dapr/proto/runtime/v1/dapr.proto). The following examples show Java, C#, Python and Javascript clients. + +{{< tabs Java Dotnet Python Javascript >}} + +{{% codetab %}} +```java + +Dapr.ServiceBlockingStub stub = Dapr.newBlockingStub(channel); +stub.GetConfigurationAlpha1(new GetConfigurationRequest{ StoreName = "redisconfigstore", Keys = new String[]{"myconfig"} }); +``` +{{% /codetab %}} + +{{% codetab %}} +```csharp + +var call = client.GetConfigurationAlpha1(new GetConfigurationRequest { StoreName = "redisconfigstore", Keys = new String[]{"myconfig"} }); +``` +{{% /codetab %}} + +{{% codetab %}} +```python +response = stub.GetConfigurationAlpha1(request={ StoreName: 'redisconfigstore', Keys = ['myconfig'] }) +``` +{{% /codetab %}} + +{{% codetab %}} +```javascript +client.GetConfigurationAlpha1({ StoreName: 'redisconfigstore', Keys = ['myconfig'] }) +``` +{{% /codetab %}} + +{{< /tabs >}} + ### Watch configuration items Create a Dapr gRPC client from the [Dapr proto](https://github.com/dapr/dapr/blob/master/dapr/proto/runtime/v1/dapr.proto) using your [preferred language](https://grpc.io/docs/languages/). Then use the proto method `SubscribeConfigurationAlpha1` on your client stub to start subscribing to events. The method accepts the following request object: From ed5ee475051491a0a786f9ce57cf4387086f65a3 Mon Sep 17 00:00:00 2001 From: Nick Greenfield Date: Mon, 31 Jan 2022 14:46:02 -0800 Subject: [PATCH 4/7] Move watch conf and stop watch config sub headings Signed-off-by: Nick Greenfield --- .../configuration/howto-manage-configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md b/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md index e21d0c092..03a39298c 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md +++ b/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md @@ -191,7 +191,7 @@ client.GetConfigurationAlpha1({ StoreName: 'redisconfigstore', Keys = ['myconfig {{< /tabs >}} -### Watch configuration items +##### Watch configuration items Create a Dapr gRPC client from the [Dapr proto](https://github.com/dapr/dapr/blob/master/dapr/proto/runtime/v1/dapr.proto) using your [preferred language](https://grpc.io/docs/languages/). Then use the proto method `SubscribeConfigurationAlpha1` on your client stub to start subscribing to events. The method accepts the following request object: @@ -212,7 +212,7 @@ message SubscribeConfigurationRequest { Using this method, you can subscribe to changes in specific keys for a given configuration store. gRPC streaming varies widely based on language - see the [gRPC examples here](https://grpc.io/docs/languages/) for usage. -### Stop watching configuration items +##### Stop watching configuration items After you have subscribed to watch configuration items, the gRPC-server stream starts. This stream thread does not close itself, and you have to do by explicitly call the `UnSubscribeConfigurationRequest` API. This method accepts the following request object: From d7c7cd068ccf1271338290592c0b4eeb3e1f580d Mon Sep 17 00:00:00 2001 From: greenie-msft <56556602+greenie-msft@users.noreply.github.com> Date: Fri, 4 Feb 2022 14:39:37 -0800 Subject: [PATCH 5/7] Add integration doc for AKS Dapr extension and clean up hosting k8s pages (#2173) * Add integration doc for AKS Dapr extension Signed-off-by: Nick Greenfield * Address PR feedback Signed-off-by: Nick Greenfield --- .../azure-kubernetes-service-extension.md | 89 +++++++++++++++++++ .../hosting/kubernetes/cluster/_index.md | 2 +- .../hosting/kubernetes/kubernetes-deploy.md | 3 +- 3 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 daprdocs/content/en/developing-applications/integrations/Azure/azure-kubernetes-service-extension.md diff --git a/daprdocs/content/en/developing-applications/integrations/Azure/azure-kubernetes-service-extension.md b/daprdocs/content/en/developing-applications/integrations/Azure/azure-kubernetes-service-extension.md new file mode 100644 index 000000000..eaecef865 --- /dev/null +++ b/daprdocs/content/en/developing-applications/integrations/Azure/azure-kubernetes-service-extension.md @@ -0,0 +1,89 @@ +--- +type: docs +title: "Dapr extension for Azure Kubernetes Service (AKS)" +linkTitle: "Dapr extension for Azure Kubernetes Service (AKS)" +description: "Provision Dapr on your Azure Kubernetes Service (AKS) cluster with the Dapr extension" +weight: 4000 +--- + +# Prerequisites +- [Azure subscription](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) +- [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli-windows?tabs=azure-cli) and the ***aks-preview*** extension. +- [Azure Kubernetes Service (AKS) cluster](https://docs.microsoft.com/azure/aks/tutorial-kubernetes-deploy-cluster?tabs=azure-cli) + +## Install Dapr using the AKS Dapr extension +The recommended approach for installing Dapr on AKS is to use the AKS Dapr extension. The extension offers support for all native Dapr configuration capabilities through command-line arguments via the Azure CLI and offers the option of opting into automatic minor version upgrades of the Dapr runtime. + +{{% alert title="Note" color="warning" %}} +If you install Dapr through the AKS extension, our recommendation is to continue using the extension for future management of Dapr instead of the Dapr CLI. Combining the two tools can cause conflicts and result in undesired behavior. +{{% /alert %}} + +### How the extension works +The Dapr extension works by provisioning the Dapr control plane on your AKS cluster through the Azure CLI. The dapr control plane consists of: + +- **dapr-operator**: Manages component updates and Kubernetes services endpoints for Dapr (state stores, pub/subs, etc.) +- **dapr-sidecar-injector**: Injects Dapr into annotated deployment pods and adds the environment variables `DAPR_HTTP_PORT` and `DAPR_GRPC_PORT`. This enables user-defined applications to communicate with Dapr without the need to hard-code Dapr port values. +- **dapr-placement**: Used for actors only. Creates mapping tables that map actor instances to pods +- **dapr-sentry**: Manages mTLS between services and acts as a certificate authority. For more information read the security overview. + +### Extension Prerequisites +In order to use the AKS Dapr extension, you must first enable the `AKS-ExtensionManager` and `AKS-Dapr` feature flags on your Azure subscription. + +The below command will register the `AKS-ExtensionManager` and `AKS-Dapr` feature flags on your Azure subscription: + +```bash +az feature register --namespace "Microsoft.ContainerService" --name "AKS-ExtensionManager" +az feature register --namespace "Microsoft.ContainerService" --name "AKS-Dapr" +``` + +After a few minutes, check the status to show `Registered`. Confirm the registration status by using the az feature list command: + +```bash +az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/AKS-ExtensionManager')].{Name:name,State:properties.state}" +az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/AKS-Dapr')].{Name:name,State:properties.state}" +``` + +Next, refresh the registration of the `Microsoft.KubernetesConfiguration` and `Microsoft.ContainerService` resource providers by using the az provider register command: + +```bash +az provider register --namespace Microsoft.KubernetesConfiguration +az provider register --namespace Microsoft.ContainerService +``` + +#### Enable the Azure CLI extension for cluster extensions +You will also need the `k8s-extension` Azure CLI extension. Install this by running the following commands: + +```bash +az extension add --name k8s-extension +``` + +If the `k8s-extension` extension is already present, you can update it to the latest version using the below command: + +```bash +az extension update --name k8s-extension +``` + +#### Create the extension and install Dapr on your AKS cluster +After your subscription is registered to use Kubernetes extensions, install Dapr on your cluster by creating the Dapr extension. For example: + +```bash +az k8s-extension create --cluster-type managedClusters \ +--cluster-name myAKSCluster \ +--resource-group myResourceGroup \ +--name myDaprExtension \ +--extension-type Microsoft.Dapr +``` + +Additionally, Dapr can automatically update its minor version. To enable this, set the `--auto-upgrade-minor-version` parameter to true: + +```bash +--auto-upgrade-minor-version true +``` + +Once the k8-extension finishes provisioning, you can confirm that the Dapr control plane is installed on your AKS cluster by running: + +```bash +kubectl get pods -n dapr-system +``` + +For further information such as configuration options and targeting specific versions of Dapr, please see the official [AKS Dapr Extension Docs](https://docs.microsoft.com/azure/aks/dapr). \ No newline at end of file diff --git a/daprdocs/content/en/operations/hosting/kubernetes/cluster/_index.md b/daprdocs/content/en/operations/hosting/kubernetes/cluster/_index.md index ce3cad39c..1aa788f29 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/cluster/_index.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/cluster/_index.md @@ -2,7 +2,7 @@ type: docs title: "Kubernetes cluster setup" linkTitle: "How-to: Setup clusters" -weight: 80000 +weight: 15000 description: > How to create a Kubernetes cluster --- \ No newline at end of file diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md index 81b62d716..749672a92 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md @@ -22,9 +22,10 @@ For more information on what is deployed to your Kubernetes cluster read the [Ku You can install Dapr on any Kubernetes cluster. Here are some helpful links: +- [Setup KiNd Cluster]({{< ref setup-kind.md >}}) - [Setup Minikube Cluster]({{< ref setup-minikube.md >}}) - [Setup Azure Kubernetes Service Cluster]({{< ref setup-aks.md >}}) -- [Setup Google Cloud Kubernetes Engine](https://cloud.google.com/kubernetes-engine/docs/quickstart) +- [Setup Google Cloud Kubernetes Engine](https://docs.dapr.io/operations/hosting/kubernetes/cluster/setup-gke/) - [Setup Amazon Elastic Kubernetes Service](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html) {{% alert title="Hybrid clusters" color="primary" %}} From a8b76851ba7d115ff9b429e458897800d84971f0 Mon Sep 17 00:00:00 2001 From: greenie-msft <56556602+greenie-msft@users.noreply.github.com> Date: Fri, 4 Feb 2022 15:14:32 -0800 Subject: [PATCH 6/7] Update jaeger.md --- .../monitoring/tracing/supported-tracing-backends/jaeger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/jaeger.md b/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/jaeger.md index e4e6b4903..b61d93dac 100644 --- a/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/jaeger.md +++ b/daprdocs/content/en/operations/monitoring/tracing/supported-tracing-backends/jaeger.md @@ -83,7 +83,7 @@ spec: #### Production -Jaeger uses Elasticsearch as the backend storage, and you can create a secret in k8s cluster to access Elasticsearch server with access control. See [Configuring and Deploying Jaeger](https://docs.openshift.com/container-platform/4.9/distr_tracing/distr_tracing_install/distr-tracing-deploying.html) +Jaeger uses Elasticsearch as the backend storage, and you can create a secret in k8s cluster to access Elasticsearch server with access control. ```shell kubectl create secret generic jaeger-secret --from-literal=ES_PASSWORD='xxx' --from-literal=ES_USERNAME='xxx' -n ${NAMESPACE} From 00e8aa1e72f5642bb4d6189222271b736b23a5d3 Mon Sep 17 00:00:00 2001 From: Derrick Burns Date: Sun, 6 Feb 2022 22:32:18 -0800 Subject: [PATCH 7/7] Update pubsub_api.md (#2178) Fixed typo. --- daprdocs/content/en/reference/api/pubsub_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/api/pubsub_api.md b/daprdocs/content/en/reference/api/pubsub_api.md index eed507d1a..c88448050 100644 --- a/daprdocs/content/en/reference/api/pubsub_api.md +++ b/daprdocs/content/en/reference/api/pubsub_api.md @@ -51,7 +51,7 @@ The `Content-Type` header tells Dapr which content type your data adheres to whe The value of the `Content-Type` header populates the `datacontenttype` field in the CloudEvent. Unless specified, Dapr assumes `text/plain`. If your content type is JSON, use a `Content-Type` header with the value of `application/json`. -If you want to send your own custom CloundEvent, use the `application/cloudevents+json` value for the `Content-Type` header. +If you want to send your own custom CloudEvent, use the `application/cloudevents+json` value for the `Content-Type` header. #### Metadata