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
To avoid having to set an imagePullSecret for every Pod, consider adding the imagePullSecret to the Service account in the `dev` and `stage` namespaces. See the [Kubernetes tutorial](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account) for more information.
77
+
To avoid having to set an imagePullSecret for every Pod, consider adding the imagePullSecret to the Service account in the `dev` and `stage` namespaces. For more information, see the [Kubernetes tutorial](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account).
78
78
79
79
Depending on the CI/CD orchestrator you prefer, you can proceed with instructions either for Azure DevOps or for GitHub.
80
80
81
81
## Implement CI/CD with Azure DevOps
82
82
83
83
This tutorial assumes familiarity with Azure DevOps, Azure Repos and Pipelines, and Azure CLI.
84
84
85
-
Make sure to complete the following:
85
+
Make sure to complete the following steps first:
86
86
87
87
* Sign into [Azure DevOps Services](https://dev.azure.com/).
88
88
* Verify you have "Build Admin" and "Project Admin" permissions for [Azure Repos](/azure/devops/repos/get-started/what-is-repos) and [Azure Pipelines](/azure/devops/pipelines/get-started/pipelines-get-started).
@@ -93,7 +93,7 @@ Import an [application repository](./conceptual-gitops-ci-cd.md#application-repo
93
93
94
94
***arc-cicd-demo-src** application repository
95
95
* URL: https://github.com/Azure/arc-cicd-demo-src
96
-
* Contains the example Azure Vote App that you will deploy using GitOps.
96
+
* Contains the example Azure Vote App that you'll deploy using GitOps.
97
97
* Import the repository with name `arc-cicd-demo-src`
98
98
99
99
***arc-cicd-demo-gitops** GitOps repository
@@ -118,7 +118,7 @@ The GitOps connection that you create will automatically:
118
118
* Sync the manifests in the manifest directory.
119
119
* Update the cluster state.
120
120
121
-
The CI/CD workflow will populate the manifest directory with extra manifests to deploy the app.
121
+
The CI/CD workflow populates the manifest directory with extra manifests to deploy the app.
122
122
123
123
1.[Create a new GitOps connection](./tutorial-use-gitops-flux2.md) to your newly imported **arc-cicd-demo-gitops** repository in Azure Repos.
124
124
@@ -142,13 +142,13 @@ The CI/CD workflow will populate the manifest directory with extra manifests to
142
142
143
143
1. Check the state of the deployment in Azure portal.
144
144
* If successful, you'll see both `dev` and `stage` namespaces created in your cluster.
145
-
* You can also check on Azure Portal page of your K8s cluster on `GitOps` tab a configuration `cluster-config` is created.
145
+
* You can also confirm that on the Azure portal page of your cluster, a configuration `cluster-config` is created on the f`GitOps` tab.
146
146
147
147
### Import the CI/CD pipelines
148
148
149
-
Now that you've synced a GitOps connection, you'll need to import the CI/CD pipelines that create the manifests.
149
+
Now that you've synced a GitOps connection, you need to import the CI/CD pipelines that create the manifests.
150
150
151
-
The application repository contains a `.pipeline` folder with the pipelines you'll use for PRs, CI, and CD. Import and rename the three pipelines provided in the sample repository:
151
+
The application repository contains a `.pipeline` folder with pipelines used for PRs, CI, and CD. Import and rename the three pipelines provided in the sample repository:
152
152
153
153
| Pipeline file name | Description |
154
154
| ------------- | ------------- |
@@ -158,7 +158,7 @@ The application repository contains a `.pipeline` folder with the pipelines you'
158
158
159
159
### Connect Azure Container Registry to Azure DevOps
160
160
161
-
During the CI process, you'll deploy your application containers to a registry. Start by creating an Azure service connection:
161
+
During the CI process, you deploy your application containers to a registry. Start by creating an Azure service connection:
162
162
163
163
1. In Azure DevOps, open the **Service connections** page from the project settings page. In TFS, open the **Services** page from the **settings** icon in the top menu bar.
164
164
2. Choose **+ New service connection** and select the type of service connection you need.
@@ -169,9 +169,9 @@ During the CI process, you'll deploy your application containers to a registry.
169
169
* This option authorizes YAML pipeline files for service connections.
170
170
5. Choose **OK** to create the connection.
171
171
172
-
### Configure PR Service Connection
172
+
### Configure PR service connection
173
173
174
-
CD pipeline manipulates PRs in the GitOps repository. It needs a Service Connection for that:
174
+
CD pipeline manipulates PRs in the GitOps repository. It needs a service connection in order to do this. To configure this connection:
175
175
176
176
1. In Azure DevOps, open the **Service connections** page from the project settings page. In TFS, open the **Services** page from the **settings** icon in the top menu bar.
177
177
2. Choose **+ New service connection** and select `Generic` type.
@@ -279,7 +279,7 @@ You're now ready to deploy to the `dev` and `stage` environments.
279
279
280
280
#### Create environments
281
281
282
-
In Azure DevOps project create `Dev` and `Stage` environments. See [Create and target an environment](/azure/devops/pipelines/process/environments) for more details.
282
+
In your Azure DevOps project, create `Dev` and `Stage` environments. For details, see [Create and target an environment](/azure/devops/pipelines/process/environments).
283
283
284
284
### Give more permissions to the build service
285
285
@@ -318,7 +318,7 @@ The CI pipeline:
318
318
319
319
#### CD pipeline
320
320
321
-
During the initial CD pipeline run, you'll be asked to give the pipeline access to the GitOps repository. Select View when prompted that the pipeline needs permission to access a resource. Then, select Permit to grant permission to use the GitOps repository for the current and future runs of the pipeline.
321
+
During the initial CD pipeline run, you need to give the pipeline access to the GitOps repository. Select **View** when prompted that the pipeline needs permission to access a resource. Then, select **Permit** to grant permission to use the GitOps repository for the current and future runs of the pipeline.
322
322
323
323
The successful CI pipeline run triggers the CD pipeline to complete the deployment process. You'll deploy to each environment incrementally.
324
324
@@ -329,7 +329,7 @@ The successful CI pipeline run triggers the CD pipeline to complete the deployme
329
329
> * It should be `arc-cicd-demo-src CI`.
330
330
> 1. Rerun the CI pipeline.
331
331
332
-
Once the template and manifest changes to the GitOps repository have been generated, the CD pipeline will create a commit, push it, and create a PR for approval.
332
+
Once the template and manifest changes to the GitOps repository have been generated, the CD pipeline creates a commit, pushes it, and creates a PR for approval.
333
333
334
334
1. Find the PR created by the pipeline to the GitOps repository.
335
335
1. Verify the changes to the GitOps repository. You should see:
@@ -338,7 +338,7 @@ Once the template and manifest changes to the GitOps repository have been genera
338
338
1. If everything looks good, approve and complete the PR.
339
339
340
340
1. After a few minutes, Flux picks up the change and starts the deployment.
341
-
1. Monitor the Git Commit status on the Commit history tab. Once it is `succeeded` the CD pipeline will go ahead and start automated testing
341
+
1. Monitor the Git Commit status on the Commit history tab. Once it is `succeeded`, the CD pipeline starts automated testing.
342
342
1. Forward the port locally using `kubectl` and ensure the app works correctly using:
343
343
344
344
```console
@@ -373,8 +373,7 @@ With this baseline set of templates and manifests representing the state on the
373
373
374
374
2. Since "Cats vs Dogs" isn't getting enough votes, change it to "Tabs vs Spaces" to drive up the vote count.
375
375
376
-
3. Commit the change in a new branch, push it, and create a pull request.
377
-
* This is the typical developer flow that will start the CI/CD lifecycle.
376
+
3. Commit the change in a new branch, push it, and create a pull request. This sequence of steps is the typical developer flow that starts the CI/CD lifecycle.
378
377
379
378
### PR validation pipeline
380
379
@@ -393,17 +392,17 @@ Errors found during pipeline execution appear in the test results section of the
393
392
* Find the first commit on which they were detected.
394
393
* Stack trace style links to the code sections that caused the error.
395
394
396
-
Once the pipeline run has finished, you have assured the quality of the application code and the template that will deploy it. You can now approve and complete the PR. The CI will run again, regenerating the templates and manifests, before triggering the CD pipeline.
395
+
Once the pipeline run has finished, you have assured the quality of the application code and the template that deploys it. You can now approve and complete the PR. The CI will run again, regenerating the templates and manifests, before triggering the CD pipeline.
397
396
398
397
> [!TIP]
399
-
> In a real environment, don't forget to set branch policies to ensure the PR passes your quality checks. For more information, see the [Set branch policies](/azure/devops/repos/git/branch-policies) article.
398
+
> In a real environment, don't forget to set branch policies to ensure the PR passes your quality checks. For more information, see [Set branch policies](/azure/devops/repos/git/branch-policies).
400
399
401
400
### CD process approvals
402
401
403
402
A successful CI pipeline run triggers the CD pipeline to complete the deployment process. This time, the pipeline requires you to approve each deployment environment.
404
403
405
404
1. Approve the deployment to the `dev` environment.
406
-
1. Once the template and manifest changes to the GitOps repository have been generated, the CD pipeline will create a commit, push it, and create a PR for approval.
405
+
1. Once the template and manifest changes to the GitOps repository have been generated, the CD pipeline creates a commit, pushes it, and creates a PR for approval.
407
406
1. Verify the changes to the GitOps repository. You should see:
408
407
* High-level Helm template changes.
409
408
* Low-level Kubernetes manifests that show the underlying changes to the desired state.
@@ -415,7 +414,10 @@ A successful CI pipeline run triggers the CD pipeline to complete the deployment
415
414
* View the Azure Vote app in your browser at `http://localhost:8080/` and verify the voting choices have changed to Tabs vs Spaces.
416
415
1. Repeat steps 1-7 for the `stage` environment.
417
416
418
-
Your deployment is now complete. This ends the CI/CD workflow. Refer to the [Azure DevOps GitOps Flow diagram](https://github.com/Azure/arc-cicd-demo-src/blob/master/docs/azdo-gitops.md) in the application repository that explains in details the steps and techniques implemented in the CI/CD pipelines used in this tutorial.
417
+
The deployment is now complete.
418
+
419
+
For a detailed overview of all the steps and techniques implemented in the CI/CD workflows used in this tutorial, see the [Azure DevOps GitOps Flow diagram](https://github.com/Azure/arc-cicd-demo-src/blob/master/docs/azdo-gitops.md).
420
+
419
421
420
422
## Implement CI/CD with GitHub
421
423
@@ -444,7 +446,7 @@ The GitOps connection that you create will automatically:
444
446
* Sync the manifests in the manifest directory.
445
447
* Update the cluster state.
446
448
447
-
The CI/CD workflow will populate the manifest directory with extra manifests to deploy the app.
449
+
The CI/CD workflow populates the manifest directory with extra manifests to deploy the app.
448
450
449
451
1. [Create a new GitOps connection](./tutorial-use-gitops-flux2.md) to your newly forked **arc-cicd-demo-gitops** repository in GitHub.
450
452
@@ -557,7 +559,7 @@ You're now ready to deploy to the `dev` and `stage` environments.
557
559
558
560
#### CI/CD Dev workflow
559
561
560
-
To start the CI/CD Dev workflow change the source code. In the application repository, update values in `.azure-vote/src/azure-vote-front/config_file.cfg` file and push the changes to the repository.
562
+
To start the CI/CD Dev workflow, change the source code. In the application repository, update values in `.azure-vote/src/azure-vote-front/config_file.cfg` file and push the changes to the repository.
561
563
562
564
The CI/CD Dev workflow:
563
565
@@ -566,16 +568,16 @@ The CI/CD Dev workflow:
566
568
* Verifies the Docker image has changed and the new image is pushed.
567
569
* Publishes the artifacts (Docker image tags, Manifest templates, Utils) that will be used by the following CD stages.
568
570
* Deploys the application to Dev environment.
569
-
* Generates manifests to the GitOps repository
570
-
* Creates a PR to the GitOps repository for approval
571
+
* Generates manifests to the GitOps repository.
572
+
* Creates a PR to the GitOps repository for approval.
571
573
572
574
1. Find the PR created by the pipeline to the GitOps repository.
573
575
1. Verify the changes to the GitOps repository. You should see:
574
576
* High-level Helm template changes.
575
577
* Low-level Kubernetes manifests that show the underlying changes to the desired state. Flux deploys these manifests.
576
578
1. If everything looks good, approve and complete the PR.
577
579
1. After a few minutes, Flux picks up the change and starts the deployment.
578
-
1. Monitor the Git Commit status on the Commit history tab. Once it is `succeeded` the `CD Stage` workflow will start
580
+
1. Monitor the Git Commit status on the Commit history tab. Once it is `succeeded`, the `CD Stage` workflow will start.
579
581
1. Forward the port locally using `kubectl` and ensure the app works correctly using:
580
582
581
583
```console
@@ -596,9 +598,9 @@ The CD Stage workflow:
596
598
* Generates manifests to the GitOps repository
597
599
* Creates a PR to the GitOps repository for approval
598
600
599
-
Once the manifests PR to the Stage environment is merged and Flux successfully applied all the changes, it updates Git commit status in the GitOps repository.
601
+
Once the manifests PR to the Stage environment is merged and Flux successfully applies all the changes, the Git commit status is updated in the GitOps repository. The deployment is now complete.
600
602
601
-
Your deployment is now complete. This ends the CI/CD workflow. Refer to the [GitHub GitOps Flow diagram](https://github.com/Azure/arc-cicd-demo-src/blob/master/docs/azdo-gitops-githubfluxv2.md) in the application repository that explains in details the steps and techniques implemented in the CI/CD workflows used in this tutorial.
603
+
For a detailed overview of all the steps and techniques implemented in the CI/CD workflows used in this tutorial, see the [GitHub GitOps Flow diagram](https://github.com/Azure/arc-cicd-demo-src/blob/master/docs/azdo-gitops-githubfluxv2.md).
0 commit comments