From d669cf5a7492187ca1129da4a366dbecc00e8f76 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Mon, 27 Jun 2022 15:35:01 +0200 Subject: [PATCH] Fixed several wiki issues --- ...etting started - Check NamePrefix availability.md | 2 +- ...io 2 Onboard module library and CI environment.md | 6 +++--- .../The CI environment - Deployment validation.md | 4 ++-- docs/wiki/The CI environment - Pipeline design.md | 12 ++++++------ docs/wiki/The CI environment - Pipeline usage.md | 6 +++--- docs/wiki/The CI environment - Publishing.md | 2 +- docs/wiki/The CI environment - Static validation.md | 2 +- docs/wiki/The CI environment - Token replacement.md | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/wiki/Getting started - Check NamePrefix availability.md b/docs/wiki/Getting started - Check NamePrefix availability.md index d35017e058..03512cb6b9 100644 --- a/docs/wiki/Getting started - Check NamePrefix availability.md +++ b/docs/wiki/Getting started - Check NamePrefix availability.md @@ -1,4 +1,4 @@ -The `'Test-NamePrefixAvailability'` function provides you with the capability to test if the [`namePrefix`](./The%20CI%20environment%20-%20Token%20replacement.md#optional-local-custom-tokens), specified in the [`settings.json`](https://github.com/Azure/ResourceModules/blob/main/settings.json) file, conflicts with any existing resource. +The `'Test-NamePrefixAvailability'` function provides you with the capability to test if the [`namePrefix`](./The%20CI%20environment%20-%20Token%20replacement#optional-local-custom-tokens), specified in the [`settings.json`](https://github.com/Azure/ResourceModules/blob/main/settings.json) file, conflicts with any existing resource. --- diff --git a/docs/wiki/Getting started - Scenario 2 Onboard module library and CI environment.md b/docs/wiki/Getting started - Scenario 2 Onboard module library and CI environment.md index 72b1ccb17e..359a06a380 100644 --- a/docs/wiki/Getting started - Scenario 2 Onboard module library and CI environment.md +++ b/docs/wiki/Getting started - Scenario 2 Onboard module library and CI environment.md @@ -345,7 +345,7 @@ This section will explain what is required to publish the modules to [Azure Arti 1. If you chose the feed to be project-scoped, you will need the Project Build Service account to have `Contributor` access to publish to the Azure Artifacts feed. To set this, follow the [Pipeline permission](https://docs.microsoft.com/en-us/azure/devops/artifacts/feeds/feed-permissions?view=azure-devops#pipelines-permissions) steps. #### Implementation Guidance -Each `./azuredevops/modulePipelines` yaml pipeline already calls [`/.azuredevops/pipelineTemplates/jobs.publishModule.yml`](https://github.com/Azure/ResourceModules/blob/main/.azuredevops/pipelineTemplates/jobs.publishModule.yml). This YAML template contains a method to `Publish module to artifacts feed` via [`utilities\pipelines\resourcePublish\Publish-ModuleToUniversalArtifactFeed.ps1`](https://github.com/Azure/ResourceModules/blob/main/utilities\pipelines\resourcePublish\Publish-ModuleToUniversalArtifactFeed.ps1). +Each `./azuredevops/modulePipelines` YAML pipeline already calls [`/.azuredevops/pipelineTemplates/jobs.publishModule.yml`](https://github.com/Azure/ResourceModules/blob/main/.azuredevops/pipelineTemplates/jobs.publishModule.yml). This YAML template contains a method to `Publish module to artifacts feed` via [`utilities\pipelines\resourcePublish\Publish-ModuleToUniversalArtifactFeed.ps1`](https://github.com/Azure/ResourceModules/blob/main/utilities\pipelines\resourcePublish\Publish-ModuleToUniversalArtifactFeed.ps1). @@ -357,9 +357,9 @@ In order to successfully deploy and test all modules in your desired environment The repository comes with a platform pipeline, i.e., the '*dependencies pipeline*', that deploys a set of Azure services such as Virtual Networks and Key Vaults (along with dummy secrets) to be used by the module pipeline tests. -Run the dependencies pipeline by following instructions provided in the specific [Dependencies pipeline usage](./The%20CI%20environment%20-%20Pipeline%20usage.md#operate-the-dependencies-pipeline) section. +Run the dependencies pipeline by following instructions provided in the specific [Dependencies pipeline usage](./The%20CI%20environment%20-%20Pipeline%20usage#operate-the-dependencies-pipeline) section. -> **Note**: For details about the dependencies pipeline design, please refer to the dedicated [Dependencies pipeline design](./The%20CI%20environment%20-%20Pipeline%20design.md#dependencies-pipeline) section. +> **Note**: For details about the dependencies pipeline design, please refer to the dedicated [Dependencies pipeline design](./The%20CI%20environment%20-%20Pipeline%20design#dependencies-pipeline) section. ## 4.1 Manual Dependencies diff --git a/docs/wiki/The CI environment - Deployment validation.md b/docs/wiki/The CI environment - Deployment validation.md index 25d45a3e34..cd5eb638dd 100644 --- a/docs/wiki/The CI environment - Deployment validation.md +++ b/docs/wiki/The CI environment - Deployment validation.md @@ -31,7 +31,7 @@ The intention of this test is to **fail fast**, before getting to the later depl This step performs the actual Azure deployments using each available & configured module parameter file. The purpose of this step is to prove the module can be deployed in different configurations based on the different parameters provided. Deployments for the different variants happen in parallel. -If any of these parallel deployments require multiple/different/specific resource instances already present, these resources are deployed by the [dependencies pipeline](./The%20CI%20environment%20-%20Pipeline%20design.md#dependencies-pipeline). E.g., for the Azure Firewall to be tested with multiple configurations, the dependencies pipeline deploys multiple VNET instances, with a dedicated "AzureFirewallSubnet" in each. +If any of these parallel deployments require multiple/different/specific resource instances already present, these resources are deployed by the [dependencies pipeline](./The%20CI%20environment%20-%20Pipeline%20design#dependencies-pipeline). E.g., for the Azure Firewall to be tested with multiple configurations, the dependencies pipeline deploys multiple VNET instances, with a dedicated "AzureFirewallSubnet" in each. The parameter files used in this stage should ideally cover as many configurations as possible to validate the template flexibility, i.e., to verify that the module can cover multiple scenarios in which the given Azure resource may be used. Using the example of the CosmosDB module, we may want to have one parameter file for the minimum amount of required parameters, one parameter file for each CosmosDB type to test individual configurations, and at least one parameter file testing the supported extension resources such as RBAC & diagnostic settings. @@ -50,7 +50,7 @@ The removal step is triggered after the deployment completes. It removes all res - Make sure to keep the validation subscription cost as low as possible. - Run test deployments from scratch at every run. -However, the removal step can be skipped in case further investigation on the deployed resource is needed. This can be controlled when running the module pipeline leveraging [Module pipeline inputs](./The%20CI%20environment%20-%20Pipeline%20design.md#module-pipeline-inputs). +However, the removal step can be skipped in case further investigation on the deployed resource is needed. This can be controlled when running the module pipeline leveraging [Module pipeline inputs](./The%20CI%20environment%20-%20Pipeline%20design#module-pipeline-inputs). ### How it works diff --git a/docs/wiki/The CI environment - Pipeline design.md b/docs/wiki/The CI environment - Pipeline design.md index e48f49b75a..ab03f9de8c 100644 --- a/docs/wiki/The CI environment - Pipeline design.md +++ b/docs/wiki/The CI environment - Pipeline design.md @@ -32,7 +32,7 @@ The purpose of each module pipeline is twofold: 1. **Validation**: To ensure the modules hosted by the CARML library are valid and can perform the intended deployments. 1. **Publishing**: To publish _versioned_ and already validated modules to one or multiple target locations, from where they can be referenced by solutions consuming them. -As such, each pipeline can be mapped to `Phases 1 and 2` described in the [Deployment flow](./The%20context%20-%20CARML%20CI%20environment.md#deployment-flow) section. +As such, each pipeline can be mapped to `Phases 1 and 2` described in the [Deployment flow](./The%20context%20-%20CARML%20CI%20environment#deployment-flow) section. Pipeline phases @@ -84,7 +84,7 @@ Technical documentation for each composite action, such as required input and ou Pipeline phases ADO Azure DevOps pipelines map each pipeline phase to a dedicated pipeline template, to maximize code reusability. -The mapping to the specific yaml template file is provided below: +The mapping to the specific YAML template file is provided below: | Template Name | Pipeline phase | | - | - | @@ -169,7 +169,7 @@ This group of resources has a dependency only on the resource group which will h > **Note**: The object ID of the \[user assigned identity] is needed by several dependency parameter files. However, before running the dependencies pipeline for the first time, the \[user assigned identity] resource does not exist yet, thus its object ID is unknown. For this reason, instead of the object ID value, some dependency parameter files contain the `"<>"` token, for which the correct value is retrieved and replaced by the pipeline at runtime. 1. Shared image gallery and definition: These resources are leveraged by the \[image template] resource. 1. Route table: This resource is leveraged by the virtual network subnet dedicated to test \[SQL managed instance]. - >**Note**: This resource is deployed and configured only if sqlmi dependency resources are enabled. + >**Note**: This resource is deployed and configured only if SQL-MI dependency resources are enabled. 1. Route table: This resource is leveraged by a test subnet deployment of the \[Virtual Network] module. 1. Action group: This resource is leveraged by \[activity log alert] and \[metric alert] resources. 1. Application security group: This resource is leveraged by the \[network security group] resource. @@ -187,7 +187,7 @@ This group of resources has a dependency on one or more resources in the group a - '_adp-\<>-az-nsg-x-ase_': NSG with required network security rules to be leveraged by the \[app service environment] subnet. - '_adp-\<>-az-nsg-x-bastion_': NSG with required network security rules to be leveraged by the \[bastion host] subnet. - '_adp-\<>-az-nsg-x-sqlmi_': NSG with required network security rules to be leveraged by the \[sql managed instance] subnet. - >**Note**: This resource is deployed and configured only if sqlmi dependency resources are enabled. + >**Note**: This resource is deployed and configured only if SQL-MI dependency resources are enabled. - '_adp-\<>-az-nsg-x-001_': default NSG leveraged by all other subnets. 1. Application insight: This resource supports monitoring, hence it has a dependency on the \[storage account], \[log analytics workspace] and \[event hub] deployed in the group above. This resource is leveraged by the \[machine learning service] resource. 1. Automation account: This resource supports monitoring, hence it has a dependency on the \[storage account], \[log analytics workspace] and \[event hub] deployed in the group above. This resource is leveraged by the \[log analytics workspace] resource. @@ -202,7 +202,7 @@ This group of resources has a dependency on one or more resources in the group a - '_adp-\<>-az-kv-x-001_': KV with required secrets, keys, certificates and access policies to be leveraged by all resources requiring access to a Key Vault key, secret and/or certificate, i.e., \[application gateway], \[azure NetApp file], \[azure SQL server], \[disk encryption set], \[machine learning service], \[virtual machine], \[virtual machine scale set], \[virtual network gateway connection]. - '_adp-\<>-az-kv-x-pe_': KV to be leveraged by the \[private endpoint] resource. - '_adp-\<>-az-kv-x-sqlmi_': KV with required secrets, keys and access policies to be leveraged by the \[SQL managed instance] resource. - >**Note**: This resource is deployed and configured only if sqlmi dependency resources are enabled. + >**Note**: This resource is deployed and configured only if SQL-MI dependency resources are enabled. >**Note**: This resource has a global scope name. 1. Recovery services vault: This resource supports monitoring, hence it has a dependency on the \[storage account], \[log analytics workspace] and \[event hub] deployed in the group above. This resource is leveraged by the \[virtual machine] resource when backup is enabled. @@ -220,7 +220,7 @@ This group of resources has a dependency on one or more resources in the groups >**Note**: This resource is deployed and configured only if sqlmi dependency resources are enabled. - '_adp-\<>-az-vnet-x-001_': Hosting multiple subnets to be leveraged by \[virtual machine], \[virtual machine scale set], \[service bus], \[azure NetApp files], \[azure bastion], \[private endpoints], \[app service environment] and \[application gateway] resources. 1. Azure Image Builder template: This resource triggers the build and distribution of a VHD in a storage account. The VHD file is copied to a known storage account blob container and leveraged by \[compute disks] and \[compute images] resources. - >**Note**: This resource is deployed and configured only if the 'Enable deployment of a vhd stored in a blob container' option is selected. + >**Note**: This resource is deployed and configured only if the 'Enable deployment of a VHD stored in a blob container' option is selected. #### **5th level resources** diff --git a/docs/wiki/The CI environment - Pipeline usage.md b/docs/wiki/The CI environment - Pipeline usage.md index 016d9420fc..b80157ea72 100644 --- a/docs/wiki/The CI environment - Pipeline usage.md +++ b/docs/wiki/The CI environment - Pipeline usage.md @@ -61,7 +61,7 @@ To run the dependencies pipeline you can perform the following steps: By default, i.e., by keeping the optional flags disables, the dependencies pipeline may take up to 30 minutes to run. -> **Note:** For details about the dependencies pipeline design, please refer to the dedicated [Dependencies pipeline design](./The%20CI%20environment%20-%20Pipeline%20design.md#dependencies-pipeline) section. +> **Note:** For details about the dependencies pipeline design, please refer to the dedicated [Dependencies pipeline design](./The%20CI%20environment%20-%20Pipeline%20design#dependencies-pipeline) section. ## Add a new dependency @@ -92,7 +92,7 @@ This section focuses on _GitHub_ Actions & Workflows. Run workflow - >**Note**: Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch. An outline can be found in the [Module pipeline inputs](./The%20CI%20environment%20-%20Pipeline%20design.md#module-pipeline-inputs) section. + >**Note**: Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch. An outline can be found in the [Module pipeline inputs](./The%20CI%20environment%20-%20Pipeline%20design#module-pipeline-inputs) section. ### Register a workflow @@ -124,7 +124,7 @@ This section focuses on _Azure DevOps_ pipelines. Pipeline start step 3 - >**Note**: Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch. An outline can be found in the [Module pipeline inputs](./The%20CI%20environment%20-%20Pipeline%20design.md#module-pipeline-inputs) section. + >**Note**: Depending on the pipeline you selected you may have additional input parameters you can provide aside from the branch. An outline can be found in the [Module pipeline inputs](./The%20CI%20environment%20-%20Pipeline%20design#module-pipeline-inputs) section. ### Register a pipeline diff --git a/docs/wiki/The CI environment - Publishing.md b/docs/wiki/The CI environment - Publishing.md index 0000085bfd..3285064422 100644 --- a/docs/wiki/The CI environment - Publishing.md +++ b/docs/wiki/The CI environment - Publishing.md @@ -15,7 +15,7 @@ The publishing phase concludes each module's pipeline. If all previous tests suc - _[Azure DevOps universal packages](https://docs.microsoft.com/en-us/azure/devops/artifacts/concepts/feeds?view=azure-devops)_. > Note: this is only available if using Azure DevOps pipelines. -Besides the publishing phase's runtime, there is also the possibility to set the switch `Publish prerelease module`. This switch makes it possible to publish a prerelease version in every workflow run that is not based on `main` or `master`. This can be controlled when running the module pipeline leveraging [Module pipeline inputs](./The%20CI%20environment%20-%20Pipeline%20design.md#module-pipeline-inputs). +Besides the publishing phase's runtime, there is also the possibility to set the switch `Publish prerelease module`. This switch makes it possible to publish a prerelease version in every workflow run that is not based on `main` or `master`. This can be controlled when running the module pipeline leveraging [Module pipeline inputs](./The%20CI%20environment%20-%20Pipeline%20design#module-pipeline-inputs). > **Note**
> The `version` used for publishing any artifact is the same for all three target locations, which reduces the maintenance effort. diff --git a/docs/wiki/The CI environment - Static validation.md b/docs/wiki/The CI environment - Static validation.md index 0396ce7f4c..9b244925b5 100644 --- a/docs/wiki/The CI environment - Static validation.md +++ b/docs/wiki/The CI environment - Static validation.md @@ -23,7 +23,7 @@ The following activities are performed by the [`arm/.global/global.module.tests. - **Deployment template tests** check the template's structure and elements for errors as well as consistency matters, e.g.: - template file (or the built bicep template) converts from JSON and has all expected properties - variable names are camelCase - - the minimum set of outputs is returned (see [module design](./The%20library%20-%20Module%20design.md#outputs)) + - the minimum set of outputs is returned (see [module design](./The%20library%20-%20Module%20design#outputs)) - **Module (readme) documentation** contains all required sections, e.g.: - is not empty - contains all the mandatory sections diff --git a/docs/wiki/The CI environment - Token replacement.md b/docs/wiki/The CI environment - Token replacement.md index bb2abf053c..1874be559e 100644 --- a/docs/wiki/The CI environment - Token replacement.md +++ b/docs/wiki/The CI environment - Token replacement.md @@ -17,7 +17,7 @@ This section provides details on the tokens replacement functionality that enabl Tokens allow you to test deploying modules in your own environment (i.e., using tokens for your naming conventions), or apply other customizations to your resources (i.e., injecting a subscription ID inside a Resource ID string). -The [module pipelines](./The%20CI%20environment%20-%20Pipeline%20design.md#module-pipelines) leverage a token replacement function that enables parameter files to contain tokens (i.e., `<>`, `<>`) instead of using static values. This helps with the following: +The [module pipelines](./The%20CI%20environment%20-%20Pipeline%20design#module-pipelines) leverage a token replacement function that enables parameter files to contain tokens (i.e., `<>`, `<>`) instead of using static values. This helps with the following: - Allows the repository to be portable without having static values from where it was cloned. - Enables dynamic updates of the tokens from single locations without having to modify all files. @@ -69,7 +69,7 @@ Once the Key Vault is deployed, you'll notice that the Key Vault name in Azure w The token prefix `'<<'` and suffix `'>>'` in the above example are also configurable in the [Settings.json](https://github.com/Azure/ResourceModules/blob/main/settings.json) file. -The solution comes with one predefined local token `namePrefix`. When validating modules through the CI environment, you must update it to a custom value as described in the [Update default nameprefix](./Getting%20started%20-%20Scenario%202%20Onboard%20module%20library%20and%20CI%20environment.md#31-update-default-nameprefix) paragraph. This is done to avoid conflicts with resources requiring a globally unique name, such as storage accounts or Key Vaults. +The solution comes with one predefined local token `namePrefix`. When validating modules through the CI environment, you must update it to a custom value as described in the [Update default nameprefix](./Getting%20started%20-%20Scenario%202%20Onboard%20module%20library%20and%20CI%20environment#31-update-default-nameprefix) paragraph. This is done to avoid conflicts with resources requiring a globally unique name, such as storage accounts or Key Vaults. > **Note**: Do not store sensitive information in this location as they will be present in your Git History. Follow best [practices and guidelines](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/best-practices#security-recommendations-for-parameters) on how to handle secrets in template deployments.