You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
az group create --name myResourceGroup --location eastus
69
+
az acr create --resource-group myResourceGroup --name acrName --sku Basic
70
+
az acr login --name acrName
71
+
az acr list --resource-group myResourceGroup --query "[].{acrLoginServer:loginServer}" --output table
72
+
acrName.azurecr.io
65
73
```
66
74
67
-
## Install Dapr on your AKS cluster
75
+
Tag the [Docker image](#prepare-the-docker-image) you prepared earlier to your new ACR.
76
+
77
+
```sh
78
+
docker tag ghcr.io/<your-repo>/dwf-sample:0.1.0 acrName.azurecr.io/dwf-sample:0.1.0
79
+
docker push acrName.azurecr.io/dwf-sample:0.1.0
80
+
```
68
81
69
-
Once you've built the Docker image, install the Dapr extension on your AKS cluster. Before you do this, make sure you've [installed or updated the `k8s-extension`][k8s-ext].
82
+
For more details, see the [Deploy and use ACR][acr] tutorial.
83
+
84
+
### Create a Kubernetes cluster
85
+
86
+
Create an AKS cluster and attach to your ACR:
70
87
71
88
```sh
72
-
az k8s-extension create --cluster-type managedClusters \
73
-
--cluster-name <myAKSCluster> \
74
-
--resource-group <myResourceGroup> \
75
-
--name dapr \
76
-
--extension-type Microsoft.Dapr
89
+
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 2 --generate-ssh-keys --attach-acr acrName
77
90
```
78
91
79
-
## Deploy to AKS
92
+
Make sure `kubectl` is installed and pointed to your AKS cluster.
93
+
94
+
For more information, see the [Deploy an AKS cluster][cluster] tutorial.
80
95
81
-
Run the following commands to the cluster:
96
+
## Deploy the application to AKS
82
97
83
-
- Install the Redis state store component and the sample app
84
-
- Expose the Dapr sidecar and the sample app
98
+
### Update the containers for deployment
85
99
86
-
**Install Redis**
100
+
Navigate to the [`deployment.yaml` file in your fork of the sample project][deployment-yaml] and open in your chosen code editor.
101
+
102
+
```sh
103
+
cd Deploy
104
+
code .
105
+
```
106
+
107
+
In the `deployment.yaml` file, update the `containers` spec value to your new ACR name and image:
108
+
109
+
```yaml
110
+
containers:
111
+
- name: dwf-sample
112
+
image: acrName.azurecr.io/dwf-sample:0.1.0
113
+
```
114
+
115
+
Save and close the `deployment.yaml` file.
116
+
117
+
### Install Dapr on your AKS cluster
118
+
119
+
Install the Dapr extension on your AKS cluster. Before you do this, make sure you've:
120
+
- [Installed or updated the `k8s-extension`][k8s-ext].
121
+
- [Registered the `Microsoft.KubernetesConfiguration` service provider][k8s-sp]
export SAMPLE_APP_URL=$(kubectl get svc/workflows-sample -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
164
+
export DAPR_URL=$(kubectl get svc/workflows-sample-dapr -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
98
165
```
99
166
100
-
**Expose the Dapr sidecar and the sample app**
167
+
Verify that the above commands were exported:
101
168
102
169
```sh
103
-
k apply -f Deploy/service.yaml
104
-
export SAMPLE_APP_URL=$(k get svc/workflows-sample -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
105
-
export DAPR_URL=$(k get svc/workflows-sample-dapr -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
170
+
echo $SAMPLE_APP_URL
171
+
echo $DAPR_URL
106
172
```
107
173
108
-
## Run the workflow
174
+
## Start the workflow
109
175
110
176
Now that the application and Dapr have been deployed to the AKS cluster, you can now start and query workflow instances. Begin by making an API call to the sample app to restock items in the inventory:
111
177
@@ -121,18 +187,50 @@ curl -i -X POST $DAPR_URL/v1.0-alpha1/workflows/dapr/OrderProcessingWorkflow/123
0 commit comments