From feb648081a0dce090ea2378ed5bc90ebe62f111a Mon Sep 17 00:00:00 2001 From: mikeee Date: Wed, 7 Feb 2024 18:40:24 +0000 Subject: [PATCH 1/7] add init -k --dev docs Signed-off-by: mikeee --- .../getting-started/install-dapr-selfhost.md | 2 + .../hosting/kubernetes/kubernetes-deploy.md | 45 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index 135c1458746..caa7f389446 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -10,6 +10,8 @@ aliases: Now that you've [installed the Dapr CLI]({{}}), use the CLI to initialize Dapr on your local machine. +To initialize dapr in your local (or remote) kubernetes cluster. [How to initialize dapr with redis and zipkin]({{}}) + Dapr runs as a sidecar alongside your application. In self-hosted mode, this means it is a process on your local machine. By initializing Dapr, you: - Fetch and install the Dapr sidecar binaries locally. diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md index d88ec29209d..4973bfd7267 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md @@ -72,6 +72,51 @@ The `-k` flag initializes Dapr on the Kubernetes cluster in your current context dapr dashboard -k -n ``` + + #### Install Dapr from the offical Dapr Helm chart (with development flag) + +Adding the `--dev` flag initializes Dapr on the Kubernetes cluster on your current context with the addition of Redis and Zipkin deployments. + +The steps are similar to the above, save for the inclusion of the `--dev` flag being appended to the init command like so: + + ```bash + dapr init -k --dev + ``` + +The expected output will be: + +```bash +⌛ Making the jump to hyperspace... +ℹ️ Note: To install Dapr using Helm, see here: https://docs.dapr.io/getting-started/install-dapr-kubernetes/#install-with-helm-advanced + +ℹ️ Container images will be pulled from Docker Hub +✅ Deploying the Dapr control plane with latest version to your cluster... +✅ Deploying the Dapr dashboard with latest version to your cluster... +✅ Deploying the Dapr Redis with latest version to your cluster... +✅ Deploying the Dapr Zipkin with latest version to your cluster... +ℹ️ Applying "statestore" component to Kubernetes "default" namespace. +ℹ️ Applying "pubsub" component to Kubernetes "default" namespace. +ℹ️ Applying "appconfig" zipkin configuration to Kubernetes "default" namespace. +✅ Success! Dapr has been installed to namespace dapr-system. To verify, run `dapr status -k' in your terminal. To get started, go here: https://aka.ms/dapr-getting-started + ``` + +After a short period of time (or using the `--wait` flag and specifying an amount of time to wait) you should be able to check that the Redis and Zipkin components have been stood up correctly. + +```bash +kubectl get pods --namespace default +``` + +Expected Output: + +```bash +NAME READY STATUS RESTARTS AGE +dapr-dev-zipkin-bfb4b45bb-sttz7 1/1 Running 0 159m +dapr-dev-redis-master-0 1/1 Running 0 159m +dapr-dev-redis-replicas-0 1/1 Running 0 159m +dapr-dev-redis-replicas-1 1/1 Running 0 159m +dapr-dev-redis-replicas-2 1/1 Running 0 158m + ``` + #### Install Dapr from a private Dapr Helm chart Installing Dapr from a private Helm chart can be helpful for when you: From 470ae2b91b0d5ef36005ca92549c609c95f4755b Mon Sep 17 00:00:00 2001 From: mikeee Date: Wed, 7 Feb 2024 18:59:44 +0000 Subject: [PATCH 2/7] fix syntax issue Signed-off-by: mikeee --- daprdocs/content/en/getting-started/install-dapr-selfhost.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index caa7f389446..a14d4ff20de 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -10,7 +10,7 @@ aliases: Now that you've [installed the Dapr CLI]({{}}), use the CLI to initialize Dapr on your local machine. -To initialize dapr in your local (or remote) kubernetes cluster. [How to initialize dapr with redis and zipkin]({{}}) +To initialize dapr in your local (or remote) kubernetes cluster. [How to initialize dapr with redis and zipkin]({{}}) Dapr runs as a sidecar alongside your application. In self-hosted mode, this means it is a process on your local machine. By initializing Dapr, you: From fa98d6bbae34b026c3f25bdc6f9a4440547d3561 Mon Sep 17 00:00:00 2001 From: mikeee Date: Fri, 9 Feb 2024 13:58:58 +0000 Subject: [PATCH 3/7] Apply suggestions from code review Co-authored-by: Mark Fussell Signed-off-by: mikeee --- .../content/en/getting-started/install-dapr-selfhost.md | 2 +- .../en/operations/hosting/kubernetes/kubernetes-deploy.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index 68a12091852..cd1a5557f4b 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -10,7 +10,7 @@ aliases: Now that you've [installed the Dapr CLI]({{}}), use the CLI to initialize Dapr on your local machine. -To initialize dapr in your local (or remote) kubernetes cluster. [How to initialize dapr with redis and zipkin]({{}}) +To initialize Dapr in your local (or remote) kubernetes cluster for development including the Redis and Zipkin containers listed above see [how to initialize Dapr for development on Kubernetes]({{}}) Dapr runs as a sidecar alongside your application. In self-hosted mode, this means it is a process on your local machine. By initializing Dapr, you: diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md index bfae8b10bdb..6c06de4e3e5 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md @@ -77,13 +77,13 @@ The `-k` flag initializes Dapr on the Kubernetes cluster in your current context Adding the `--dev` flag initializes Dapr on the Kubernetes cluster on your current context with the addition of Redis and Zipkin deployments. -The steps are similar to the above, save for the inclusion of the `--dev` flag being appended to the init command like so: +The steps are similar to the above, save for the inclusion of the `--dev` flag being appended to the init command: ```bash dapr init -k --dev ``` -The expected output will be: +Expected output: ```bash ⌛ Making the jump to hyperspace... @@ -100,13 +100,13 @@ The expected output will be: ✅ Success! Dapr has been installed to namespace dapr-system. To verify, run `dapr status -k' in your terminal. To get started, go here: https://aka.ms/dapr-getting-started ``` -After a short period of time (or using the `--wait` flag and specifying an amount of time to wait) you should be able to check that the Redis and Zipkin components have been stood up correctly. +After a short period of time (or using the `--wait` flag and specifying an amount of time to wait) you can check that the Redis and Zipkin components have been deployed to the cluster. ```bash kubectl get pods --namespace default ``` -Expected Output: +Expected output: ```bash NAME READY STATUS RESTARTS AGE From 443bc6bb0e3e5941ffbb98e7434c055af3f8e279 Mon Sep 17 00:00:00 2001 From: mikeee Date: Fri, 9 Feb 2024 14:19:05 +0000 Subject: [PATCH 4/7] add --dev example to cli init docs Signed-off-by: mikeee --- daprdocs/content/en/reference/cli/dapr-init.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daprdocs/content/en/reference/cli/dapr-init.md b/daprdocs/content/en/reference/cli/dapr-init.md index 7cc2d86ad7d..eeafded3b8a 100644 --- a/daprdocs/content/en/reference/cli/dapr-init.md +++ b/daprdocs/content/en/reference/cli/dapr-init.md @@ -162,6 +162,12 @@ dapr uninstall --all --network mynet dapr init -k ``` +Using the `--dev` flag will initialize dapr in dev mode which includes Zipkin and Redis. +```bash +dapr init -k --dev +``` + + You can wait for the installation to complete its deployment with the `--wait` flag. The default timeout is 300s (5 min), but can be customized with the `--timeout` flag. From 785aaf5615ec4d9f9cb9195c9324eabec3f6e426 Mon Sep 17 00:00:00 2001 From: mikeee Date: Fri, 9 Feb 2024 14:23:55 +0000 Subject: [PATCH 5/7] wrap the kubernetes development environment hint with an alert Signed-off-by: mikeee --- daprdocs/content/en/getting-started/install-dapr-selfhost.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index cd1a5557f4b..fe413e35f6f 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -10,7 +10,9 @@ aliases: Now that you've [installed the Dapr CLI]({{}}), use the CLI to initialize Dapr on your local machine. +{{% alert title="Kubernetes Development Environment" color="primary" %}} To initialize Dapr in your local (or remote) kubernetes cluster for development including the Redis and Zipkin containers listed above see [how to initialize Dapr for development on Kubernetes]({{}}) +{{% /alert %}} Dapr runs as a sidecar alongside your application. In self-hosted mode, this means it is a process on your local machine. By initializing Dapr, you: From 5b8b307be4684003066c920bbe928897ddd449ef Mon Sep 17 00:00:00 2001 From: mikeee Date: Fri, 9 Feb 2024 18:00:03 +0000 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: mikeee --- .../content/en/getting-started/install-dapr-selfhost.md | 2 +- .../en/operations/hosting/kubernetes/kubernetes-deploy.md | 6 +++--- daprdocs/content/en/reference/cli/dapr-init.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index fe413e35f6f..fcaa49282fe 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -11,7 +11,7 @@ aliases: Now that you've [installed the Dapr CLI]({{}}), use the CLI to initialize Dapr on your local machine. {{% alert title="Kubernetes Development Environment" color="primary" %}} -To initialize Dapr in your local (or remote) kubernetes cluster for development including the Redis and Zipkin containers listed above see [how to initialize Dapr for development on Kubernetes]({{}}) +To initialize Dapr in your local or remote Kubernetes cluster for development (including the Redis and Zipkin containers listed above), see [how to initialize Dapr for development on Kubernetes]({{}}) {{% /alert %}} Dapr runs as a sidecar alongside your application. In self-hosted mode, this means it is a process on your local machine. By initializing Dapr, you: diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md index 6c06de4e3e5..8cde9af5a72 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md @@ -75,9 +75,9 @@ The `-k` flag initializes Dapr on the Kubernetes cluster in your current context #### Install Dapr from the offical Dapr Helm chart (with development flag) -Adding the `--dev` flag initializes Dapr on the Kubernetes cluster on your current context with the addition of Redis and Zipkin deployments. +Adding the `--dev` flag initializes Dapr on the Kubernetes cluster on your current context, with the addition of Redis and Zipkin deployments. -The steps are similar to the above, save for the inclusion of the `--dev` flag being appended to the init command: +The steps are similar to [installing from the Dapr Helm chart](#install-dapr-from-an-official-dapr-helm-chart), except for appending the `--dev` flag to the `init` command: ```bash dapr init -k --dev @@ -100,7 +100,7 @@ Expected output: ✅ Success! Dapr has been installed to namespace dapr-system. To verify, run `dapr status -k' in your terminal. To get started, go here: https://aka.ms/dapr-getting-started ``` -After a short period of time (or using the `--wait` flag and specifying an amount of time to wait) you can check that the Redis and Zipkin components have been deployed to the cluster. +After a short period of time (or using the `--wait` flag and specifying an amount of time to wait), you can check that the Redis and Zipkin components have been deployed to the cluster. ```bash kubectl get pods --namespace default diff --git a/daprdocs/content/en/reference/cli/dapr-init.md b/daprdocs/content/en/reference/cli/dapr-init.md index eeafded3b8a..b40af670116 100644 --- a/daprdocs/content/en/reference/cli/dapr-init.md +++ b/daprdocs/content/en/reference/cli/dapr-init.md @@ -162,7 +162,7 @@ dapr uninstall --all --network mynet dapr init -k ``` -Using the `--dev` flag will initialize dapr in dev mode which includes Zipkin and Redis. +Using the `--dev` flag initializes Dapr in dev mode, which includes Zipkin and Redis. ```bash dapr init -k --dev ``` From ea9233c5dc6a97ee9d19e83112ff7f4aab5f5fa0 Mon Sep 17 00:00:00 2001 From: Mark Fussell Date: Tue, 13 Feb 2024 17:19:24 -0800 Subject: [PATCH 7/7] Update install-dapr-selfhost.md Moved the paragraph down Signed-off-by: Mark Fussell --- .../content/en/getting-started/install-dapr-selfhost.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index fcaa49282fe..7ffa33f2c29 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -10,10 +10,6 @@ aliases: Now that you've [installed the Dapr CLI]({{}}), use the CLI to initialize Dapr on your local machine. -{{% alert title="Kubernetes Development Environment" color="primary" %}} -To initialize Dapr in your local or remote Kubernetes cluster for development (including the Redis and Zipkin containers listed above), see [how to initialize Dapr for development on Kubernetes]({{}}) -{{% /alert %}} - Dapr runs as a sidecar alongside your application. In self-hosted mode, this means it is a process on your local machine. By initializing Dapr, you: - Fetch and install the Dapr sidecar binaries locally. @@ -26,6 +22,10 @@ Dapr initialization includes: 1. Creating a **default components folder** with component definitions for the above. 1. Running a **Dapr placement service container instance** for local actor support. +{{% alert title="Kubernetes Development Environment" color="primary" %}} +To initialize Dapr in your local or remote **Kubernetes** cluster for development (including the Redis and Zipkin containers listed above), see [how to initialize Dapr for development on Kubernetes]({{}}) +{{% /alert %}} + {{% 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]({{< ref self-hosted-no-docker.md >}})), the next steps in this guide assume the recommended Docker development environment.