Skip to content

Commit

Permalink
address review comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
  • Loading branch information
mukundansundar committed Oct 3, 2023
1 parent b576945 commit a66386e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
7 changes: 7 additions & 0 deletions tutorials/distributed-calculator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,13 @@ kubectl apply -f .
<!-- END_STEP -->
> **Note**: If you had previously installed, dapr using the `dapr init -k --dev` command, the `appconfig` previously installed, would have changed with the above command to point to a different zipkin collector. To point it back to the zipkin collector installed during `dapr init -k --dev`, replace the `endpointAddress` in `appconfig.yaml` with the following:
`endpointAddress: "http://dapr-dev-zipkin.default.svc.cluster.local:9411/api/v2/spans"`
and run the following command:
```bash
kubectl apply -f appconfig.yaml
```
> **Note**: Services could also be deployed one-by-one by specifying the .yaml file: `kubectl apply -f go-adder.yaml`.
Each of the services will spin up a pod with two containers: one for your service and one for the Dapr sidecar. It will also configure a service for each sidecar and an external IP for the front-end, which allows us to connect to it externally.
Expand Down
21 changes: 11 additions & 10 deletions tutorials/hello-kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,22 @@ cd quickstarts/tutorials/hello-kubernetes
The first thing you need is an RBAC enabled Kubernetes cluster. This could be running on your machine using Minikube, or it could be a fully-fledged cluster in Azure using [AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/).

## Using Dapr Mutli-app run
## Using Dapr Multi-app run with Dapr `dev` mode deployment

### Step 1 - Setup Dapr dev mode on your Kubernetes cluster

Follow the steps below to deploy Dapr to Kubernetes. For more details, see [Deploy Dapr on a Kubernetes cluster](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/).
Follow the steps below to deploy Dapr to Kubernetes using the `--dev` flag. For more details, see [Deploy Dapr on a Kubernetes cluster](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/).

> **Note**: Any previous Dapr installations in the Kubernetes cluster need to be uninstalled first. You can use `dapr uninstall -k ` to remove Dapr
With the `dapr init -k --dev` command, the CLI will also install he Redis and Zipkin containers `dapr-dev-redis` and `dapr-dev-zipkin` in the `default` namespace apart from the `Dapr` control plane in `dapr-system` namespace. The `statestore`, `pubsub` and `appconfig` default components and configuration are applied in the `default` Kubernetes namespace if they do not exist. You can use `dapr components -k` and `dapr configurations -k`to see these.

> Please note, any previous Dapr installations in the Kubernetes cluster need to be uninstalled first.
> Please note, the CLI will install to the dapr-system namespace by default. If this namespace does not exist, the CLI will create it.
> If you need to deploy to a different namespace, you can use `-n mynamespace`.
> Please note, the CLI will install `dapr-dev-redis` and `dapr-dev-zipkin` in the `default` namespace.
> Please note, the `statestore`, `pubsub` and `appconfig` default components and configuration will be applied in the `default` Kubernetes namespace only if they do not exist.

```bash
dapr init -k --dev
```

Expected output
Expected output in a fresh Kubernetes cluster without Dapr installed:
```
⌛ 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
Expand Down Expand Up @@ -127,7 +126,7 @@ This spins down the Kubernetes resources that were deployed in the previous step
## Using the `kubectl` CLI
### Step 1 - Setup Dapr on your Kubernetes cluster

> Note: This step can be skipped if already done above.
> **Note**: This step can be skipped if already done above.
Follow the steps below to deploy Dapr to Kubernetes. For more details, see [Deploy Dapr on a Kubernetes cluster](https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/).

Expand Down Expand Up @@ -203,7 +202,7 @@ kubectl apply -f ./deploy/redis.yaml
component.dapr.io/statestore created
```

> Note: If you installed Dapr in the Dev mode in Kubernetes, then the statestore component will be created automatically in the `default` namespace. The above commmand will output `component.dapr.io/statestore configured` instead of `component.dapr.io/statestore created`.
> **Note**: If you installed Dapr using the `--dev` flag in Kubernetes, then the statestore component will be created automatically in the `default` namespace. The above commmand will output `component.dapr.io/statestore configured` instead of `component.dapr.io/statestore created`. If the `--dev` flag was used for Dapr init, and you want to use the `dapr-dev-redis` deployment as state store, replace the `redisHost` value inside `./deploy/redis.yaml` with `dapr-dev-redis-master:6379` and also the `secretKeyRef`, `name` with `dapr-dev-redis`. Then run the command `kubectl apply -f ./deploy/redis.yaml`, to apply the file again. This will create a `statestore` Dapr component pointing to `dapr-dev-redis` deployment.
### Step 3 - Deploy the Node.js app with the Dapr sidecar

Expand Down Expand Up @@ -506,6 +505,8 @@ kubectl delete -f .

This will spin down each resource defined by the `.yaml` files in the `deploy` directory, including the state component.

> **Note**: This will also delete the state store component. If the `--dev` flag was used for Dapr init, and you want to use the `dapr-dev-redis` deployment as state store, replace the `redisHost` value inside `./deploy/redis.yaml` with `dapr-dev-redis-master:6379` and also the `secretKeyRef`, `name` with `dapr-dev-redis`. Then run the command `kubectl apply -f ./deploy/redis.yaml`, to apply the file again. This will create a `statestore` Dapr component pointing to `dapr-dev-redis` deployment.
## Deploying your code

Now that you're successfully working with Dapr, you probably want to update the code to fit your scenario. The Node.js and Python apps that make up this quickstart are deployed from container images hosted on a private [Azure Container Registry](https://azure.microsoft.com/en-us/services/container-registry/). To create new images with updated code, you'll first need to install docker on your machine. Next, follow these steps:
Expand Down

0 comments on commit a66386e

Please sign in to comment.