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
Copy file name to clipboardExpand all lines: articles/azure-arc/kubernetes/tutorial-workload-management.md
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Created AKS clusters in kalypso-rg resource group:
74
74
75
75
This deployment script created an infrastructure shown on the following diagram:
76
76
77
-
:::image type="content" source="tutorial-workload-management/infra-diagram.png" alt-text="Diagram showing the infrastructure of the sample.":::
77
+
:::image type="content" source="media/tutorial-workload-management/infra-diagram.png" alt-text="Diagram showing the infrastructure of the sample.":::
78
78
79
79
There are a few Platform Team repositories:
80
80
@@ -266,13 +266,13 @@ The second policy states that all deployment targets from the `kaizen-app-team`
266
266
267
267
This push to the `dev` branch triggers the scheduling process and creates a PR to the `dev` branch in the `Platform GitOps` repository:
268
268
269
-
:::image type="content" source="tutorial-workload-management/pr-to-dev-with-app-assignment.png" alt-text="Screenshot showing a PR to dev environment with application assignment.":::
269
+
:::image type="content" source="media/tutorial-workload-management/pr-to-dev-with-app-assignment.png" alt-text="Screenshot showing a PR to dev environment with application assignment.":::
270
270
271
271
Besides `Promoted_Commit_id`, which is just tracking information for the promotion CD flow, the PR contains assignment manifests. The `functional-test` deployment target is assigned to the `drone` cluster type, and the `performance-test` deployment target is assigned to the `large` cluster type. Those manifests are going to be landed in `drone` and `large` folders that contain all assignments to these cluster types in the `Dev` environment.
272
272
273
273
Note that there are `command-center` and `small` cluster types as well in the `Dev` environment:
274
274
275
-
:::image type="content" source="tutorial-workload-management/dev-cluster-types.png" alt-text="Screenshot showing acluster types in the Dev environment.":::
275
+
:::image type="content" source="media/tutorial-workload-management/dev-cluster-types.png" alt-text="Screenshot showing acluster types in the Dev environment.":::
276
276
277
277
However, only the `drone` and `large` cluster types were selected by the scheduling policies that you defined.
278
278
@@ -349,16 +349,16 @@ spec:
349
349
350
350
Once we have approved and merged the PR to the `Platform GitOps` repository, the `drone` and `large` AKS clusters that represent corresponding cluster types start fetching the assignment manifests. The `drone` cluster has Azure Arc GitOps configuration installed, pointing to the `Platform GitOps` repository. It reports its `compliance` status:
351
351
352
-
:::image type="content" source="tutorial-workload-management/drone-compliance-state.png" alt-text="Screenshot showing compliance state details for the drone cluster.":::
352
+
:::image type="content" source="media/tutorial-workload-management/drone-compliance-state.png" alt-text="Screenshot showing compliance state details for the drone cluster.":::
353
353
354
354
The PR merging event starts a GitHub workflow `checkpromote` in the `control plane` repository that waits until all Azure Arc-enabled clusters looking at the `dev` branch in the `Platform GitOps` repository are compliant with the PR commit. In this tutorial, the only such cluster is `drone`.
355
355
356
-
:::image type="content" source="tutorial-workload-management/checkpromote-to-dev.png" alt-text="Screenshot showing promotion to dev.":::
356
+
:::image type="content" source="media/tutorial-workload-management/checkpromote-to-dev.png" alt-text="Screenshot showing promotion to dev.":::
357
357
358
358
Once the `checkpromote` is successful, it starts the `cd` workflow that promotes the change (application registration) to the `Stage` environment. For better visibility, it also updates the git commit status in the `control plane` repository:
359
359
360
360

361
-
:::image type="content" source="tutorial-workload-management/dev-git-commit-status.png" alt-text="Screenshot showing git commit status deploying to dev.":::
361
+
:::image type="content" source="media/tutorial-workload-management/dev-git-commit-status.png" alt-text="Screenshot showing git commit status deploying to dev.":::
362
362
363
363
> [!NOTE]
364
364
> If the `drone` cluster fails to reconcile the assignment manifests for any reason, the promotion flow will fail. The commit status will be marked as failed, and the application registration will not be promoted to the `Stage` environment.
@@ -399,29 +399,29 @@ Pushing this policy to the `stage` branch triggers the scheduling process, which
399
399
400
400
As in the case with the `Dev` environment, after reviewing and merging the PR to the `Platform GitOps` repository, the `checkpromote` workflow in the `control plane` repository waits until Azure Arc-enabled clusters with Flux (`drone`) reconcile the assignment manifests:
401
401
402
-
:::image type="content" source="tutorial-workload-management/check-promote-to-stage.png" alt-text="Screenshot showing promotion to stage.":::
402
+
:::image type="content" source="media/tutorial-workload-management/check-promote-to-stage.png" alt-text="Screenshot showing promotion to stage.":::
403
403
404
404
On successful execution, the commit status is updated:
## 3 - Application Dev Team: Build and deploy application
409
409
410
410
The Application Team regularly submits pull requests to the `main` branch in the `Application Source` repository. Once a PR is merged to `main`, it starts a CI/CD workflow. In this tutorial, the workflow will be started manually.
411
411
412
412
Go to the `Application Source` repository in GitHub. On the `Actions` tab, select `Run workflow`:
413
413
414
-
:::image type="content" source="tutorial-workload-management/run-workflow-button.png" alt-text="Screenshot showing the Run workflow option.":::
414
+
:::image type="content" source="media/tutorial-workload-management/run-workflow-button.png" alt-text="Screenshot showing the Run workflow option.":::
415
415
416
416
The workflow does the following:
417
417
418
-
:::image type="content" source="tutorial-workload-management/cicd-workflow.png" alt-text="Screenshot showing the CI/CD workflow.":::
418
+
:::image type="content" source="media/tutorial-workload-management/cicd-workflow.png" alt-text="Screenshot showing the CI/CD workflow.":::
419
419
420
420
- Builds application Docker image and pushes it to the GitHub repository package.
421
421
- Generates manifests for the `functional-test` and `performance-test` deployment targets. It uses configuration values from the `dev-configs` branch. The generated manifests are PRed and auto-merged in the `dev` branch.
422
422
- Generates manifests for the `uat-test` deployment target. It uses configuration values from the `stage-configs` branch. The generated manifests are PRed to the `stage` branch waiting for approval:
423
423
424
-
:::image type="content" source="tutorial-workload-management/app-pr-to-stage.png" alt-text="Screenshot showing a PR to stage.":::
424
+
:::image type="content" source="media/tutorial-workload-management/app-pr-to-stage.png" alt-text="Screenshot showing a PR to stage.":::
425
425
426
426
To test the application manually on the `Dev` environment before approving the PR to the `Stage` environment, first verify how the `functional-tesl` application instance works on the `drone` cluster:
The application instance on the `large` cluster shows the following greeting page:
472
472
473
-
:::image type="content" source="tutorial-workload-management/stage-greeting-page.png" alt-text="Screenshot showing the greeting page on stage.":::
473
+
:::image type="content" source="media/tutorial-workload-management/stage-greeting-page.png" alt-text="Screenshot showing the greeting page on stage.":::
474
474
475
475
## 4 - Platform Team: Provide platform configurations
476
476
@@ -505,7 +505,7 @@ The scheduler scans all config maps in the environment and collects values for e
505
505
506
506
In a few seconds, a new PR to the `stage` branch in the `Platform GitOps` repository appears:
507
507
508
-
:::image type="content" source="tutorial-workload-management/stage-db-url-update-pr.png" alt-text="Screenshot showing a PR to update the database URL on stage.":::
508
+
:::image type="content" source="media/tutorial-workload-management/stage-db-url-update-pr.png" alt-text="Screenshot showing a PR to update the database URL on stage.":::
Next, open `localhost:8080` in your browser and provide the username and password printed by the script. You'll see a web page similar to this one:
526
526
527
-
:::image type="content" source="tutorial-workload-management/argocd-ui.png" alt-text="Screenshot showing the Argo CD user interface web page.":::
527
+
:::image type="content" source="media/tutorial-workload-management/argocd-ui.png" alt-text="Screenshot showing the Argo CD user interface web page.":::
528
528
529
529
Select the `stage` tile to see more details on the reconciliation state from the `stage` branch to this cluster. You can select the `SYNC` buttons to force the reconciliation and speed up the process.

542
-
:::image type="content" source="tutorial-workload-management/updated-db-url.png" alt-text="Screenshot showing a page with updated database url.":::
541
+
:::image type="content" source="media/tutorial-workload-management/updated-db-url.png" alt-text="Screenshot showing a page with updated database url.":::
543
542
544
543
## 5 - Platform Team: Add cluster type to environment
545
544
@@ -573,7 +572,7 @@ git push
573
572
574
573
In a few seconds, the scheduler submits a PR to the `Platform GitOps` repository. According to the `uat-test-policy` that you created, it assigns the `uat-test` deployment target to the new cluster type, as it is supposed to work on all available cluster types in the environment.
575
574
576
-
:::image type="content" source="tutorial-workload-management/small-cluster-type-assignment.png" alt-text="Screenshot showing the assignment for the small cluster type.":::
575
+
:::image type="content" source="media/tutorial-workload-management/small-cluster-type-assignment.png" alt-text="Screenshot showing the assignment for the small cluster type.":::
577
576
578
577
## Clean up resources
579
578
When no longer needed, delete the resources that you created for this tutorial. To do so, run the following command:
0 commit comments