Skip to content

Commit c7df92e

Browse files
committed
acrolinx and cleanup
1 parent c7cbe62 commit c7df92e

File tree

1 file changed

+30
-28
lines changed

1 file changed

+30
-28
lines changed

articles/azure-arc/kubernetes/tutorial-gitops-flux2-ci-cd.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
5050
5151
### Connect Azure Container Registry to Kubernetes
5252
53-
Enable your Kubernetes cluster to pull images from your Azure Container Registry. If it's private, authentication will be required.
53+
Enable your Kubernetes cluster to pull images from your Azure Container Registry. If it's private, authentication is required.
5454
5555
#### Connect Azure Container Registry to existing AKS clusters
5656
@@ -74,15 +74,15 @@ kubectl create secret docker-registry <secret-name> \
7474
--docker-password=<service-principal-password>
7575
```
7676

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. 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).
7878

7979
Depending on the CI/CD orchestrator you prefer, you can proceed with instructions either for Azure DevOps or for GitHub.
8080

8181
## Implement CI/CD with Azure DevOps
8282

8383
This tutorial assumes familiarity with Azure DevOps, Azure Repos and Pipelines, and Azure CLI.
8484

85-
Make sure to complete the following:
85+
Make sure to complete the following steps first:
8686

8787
* Sign into [Azure DevOps Services](https://dev.azure.com/).
8888
* 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
9393

9494
* **arc-cicd-demo-src** application repository
9595
* 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.
9797
* Import the repository with name `arc-cicd-demo-src`
9898

9999
* **arc-cicd-demo-gitops** GitOps repository
@@ -118,7 +118,7 @@ The GitOps connection that you create will automatically:
118118
* Sync the manifests in the manifest directory.
119119
* Update the cluster state.
120120

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.
122122

123123
1. [Create a new GitOps connection](./tutorial-use-gitops-flux2.md) to your newly imported **arc-cicd-demo-gitops** repository in Azure Repos.
124124

@@ -142,13 +142,13 @@ The CI/CD workflow will populate the manifest directory with extra manifests to
142142
143143
1. Check the state of the deployment in Azure portal.
144144
* 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.
146146
147147
### Import the CI/CD pipelines
148148
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.
150150
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:
152152
153153
| Pipeline file name | Description |
154154
| ------------- | ------------- |
@@ -158,7 +158,7 @@ The application repository contains a `.pipeline` folder with the pipelines you'
158158
159159
### Connect Azure Container Registry to Azure DevOps
160160
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:
162162
163163
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.
164164
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.
169169
* This option authorizes YAML pipeline files for service connections.
170170
5. Choose **OK** to create the connection.
171171
172-
### Configure PR Service Connection
172+
### Configure PR service connection
173173
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:
175175
176176
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.
177177
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.
279279

280280
#### Create environments
281281

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).
283283

284284
### Give more permissions to the build service
285285

@@ -318,7 +318,7 @@ The CI pipeline:
318318

319319
#### CD pipeline
320320

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.
322322

323323
The successful CI pipeline run triggers the CD pipeline to complete the deployment process. You'll deploy to each environment incrementally.
324324

@@ -329,7 +329,7 @@ The successful CI pipeline run triggers the CD pipeline to complete the deployme
329329
> * It should be `arc-cicd-demo-src CI`.
330330
> 1. Rerun the CI pipeline.
331331
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.
333333

334334
1. Find the PR created by the pipeline to the GitOps repository.
335335
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
338338
1. If everything looks good, approve and complete the PR.
339339

340340
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.
342342
1. Forward the port locally using `kubectl` and ensure the app works correctly using:
343343

344344
```console
@@ -373,8 +373,7 @@ With this baseline set of templates and manifests representing the state on the
373373

374374
2. Since "Cats vs Dogs" isn't getting enough votes, change it to "Tabs vs Spaces" to drive up the vote count.
375375

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.
378377

379378
### PR validation pipeline
380379

@@ -393,17 +392,17 @@ Errors found during pipeline execution appear in the test results section of the
393392
* Find the first commit on which they were detected.
394393
* Stack trace style links to the code sections that caused the error.
395394

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.
397396

398397
> [!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).
400399

401400
### CD process approvals
402401

403402
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.
404403

405404
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.
407406
1. Verify the changes to the GitOps repository. You should see:
408407
* High-level Helm template changes.
409408
* 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
415414
* View the Azure Vote app in your browser at `http://localhost:8080/` and verify the voting choices have changed to Tabs vs Spaces.
416415
1. Repeat steps 1-7 for the `stage` environment.
417416

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+
419421

420422
## Implement CI/CD with GitHub
421423

@@ -444,7 +446,7 @@ The GitOps connection that you create will automatically:
444446
* Sync the manifests in the manifest directory.
445447
* Update the cluster state.
446448

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.
448450

449451
1. [Create a new GitOps connection](./tutorial-use-gitops-flux2.md) to your newly forked **arc-cicd-demo-gitops** repository in GitHub.
450452

@@ -557,7 +559,7 @@ You're now ready to deploy to the `dev` and `stage` environments.
557559

558560
#### CI/CD Dev workflow
559561

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.
561563

562564
The CI/CD Dev workflow:
563565

@@ -566,16 +568,16 @@ The CI/CD Dev workflow:
566568
* Verifies the Docker image has changed and the new image is pushed.
567569
* Publishes the artifacts (Docker image tags, Manifest templates, Utils) that will be used by the following CD stages.
568570
* 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.
571573

572574
1. Find the PR created by the pipeline to the GitOps repository.
573575
1. Verify the changes to the GitOps repository. You should see:
574576
* High-level Helm template changes.
575577
* Low-level Kubernetes manifests that show the underlying changes to the desired state. Flux deploys these manifests.
576578
1. If everything looks good, approve and complete the PR.
577579
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.
579581
1. Forward the port locally using `kubectl` and ensure the app works correctly using:
580582

581583
```console
@@ -596,9 +598,9 @@ The CD Stage workflow:
596598
* Generates manifests to the GitOps repository
597599
* Creates a PR to the GitOps repository for approval
598600

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.
600602

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).
602604

603605
## Clean up resources
604606

0 commit comments

Comments
 (0)