Skip to content

Commit

Permalink
Merge pull request #4023 from mikeee/mikeee-init-docs
Browse files Browse the repository at this point in the history
add (init) --dev documentation
  • Loading branch information
hhunter-ms authored Feb 14, 2024
2 parents 42c2b50 + ea9233c commit d326c1b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
4 changes: 4 additions & 0 deletions daprdocs/content/en/getting-started/install-dapr-selfhost.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,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]({{<ref "kubernetes-deploy.md#install-dapr-from-the-official-dapr-helm-chart-with-development-flag">}})
{{% /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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,51 @@ The `-k` flag initializes Dapr on the Kubernetes cluster in your current context
dapr dashboard -k -n <your-namespace>
```


#### 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 [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
```

Expected output:

```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 can check that the Redis and Zipkin components have been deployed to the cluster.
```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:
Expand Down
6 changes: 6 additions & 0 deletions daprdocs/content/en/reference/cli/dapr-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ dapr uninstall --all --network mynet
dapr init -k
```

Using the `--dev` flag initializes 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.

Expand Down

0 comments on commit d326c1b

Please sign in to comment.