- Docutune:prep, Docutune:formatting
- Use Markdown syntax for image references.
- Resize images to consistent width.
- Fix Markdown inconsistencies.
- Fixed typo 'Depoloys' in infra/Policies/General/params.policyDefinition.Deploy-BudgetSandbox.json
- cropped docs/images/InstallButtonGH.png to relevant area
This commit is contained in:
Rick Hallihan 2021-05-06 16:04:26 -04:00 коммит произвёл GitHub
Родитель 930b4bcd4f
Коммит 862957d9cc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 71 добавлений и 75 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -349,3 +349,6 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
#General
.DS_Store

141
README.md
Просмотреть файл

@ -14,9 +14,7 @@ By default, all the services which come under Data Management Zone are enabled,
> **Note:** Before deploying the resources, we recommend to check registration status of the required resource providers in your subscription. For more information, see [Resource providers for Azure services](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-providers-and-types).
<p align="center">
<img src="./docs/images/DataHub.png" alt="Data Management Zone" width="500"/>
</p>
![Data Management Zone](./docs/images/DataHub.png)
- [Virtual Network](https://docs.microsoft.com/azure/virtual-network/virtual-networks-overview)
- [Network Security Groups](https://docs.microsoft.com/azure/virtual-network/network-security-groups-overview)
@ -47,26 +45,28 @@ The following prerequisites are required to make this repository work:
- [User Access Administrator](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#user-access-administrator) or [Owner](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#owner) access to the subscription to be able to create a service principal and role assignments for it.
- For deployment, please choose one of the below **Supported Regions** list.
#### **Supported Regions:**
- Asia Southeast
- Europe North
- Europe West
- France Central
- Japan East
- South Africa North
- UK South
- US Central
- US East
- US East 2
- US West 2
### **Supported Regions:**
If you dont have an Azure subscription, [create your Azure free account today](https://azure.microsoft.com/free/).
- Asia Southeast
- Europe North
- Europe West
- France Central
- Japan East
- South Africa North
- UK South
- US Central
- US East
- US East 2
- US West 2
If you don't have an Azure subscription, [create your Azure free account today](https://azure.microsoft.com/free/).
## Option 1: Deploy to Azure - Quickstart (Coming soon ...)
| Data Management Zone |
|:---------------------|
<!-- [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fdata-management-zone%2Fmain%2Fdocs%2Freference%2Fdeploy.dataHub.json) -->
![Deploy to Azure](/docs/images/deploytoazuregrey.png)
## Option 2: GitHub Actions or Azure DevOps Pipelines
@ -75,13 +75,13 @@ If you dont have an Azure subscription, [create your Azure free account today
1. On GitHub, navigate to the main page of this repository.
1. Above the file list, click **Use this template**
<p align="center">
<img src="docs/images/UseThisTemplateGH.png" alt="GitHub Template repository" width="600"/>
</p>
![GitHub Template repository](docs/images/UseThisTemplateGH.png)
1. Use the **Owner** drop-down menu and select the account you want to own the repository.
<p align="center">
<img src="docs/images/CreateRepoGH.png" alt="Create Repository from Template" width="600"/>
</p>
![Create Repository from Template](docs/images/CreateRepoGH.png)
1. Type a name for your repository and an optional description.
1. Choose a repository visibility. For more information, see "[About repository visibility](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility)."
1. Optionally, to include the directory structure and files from all branches in the template and not just the default branch, select **Include all branches**.
@ -93,8 +93,8 @@ A service principal with *Contributor* role needs to be generated for authentica
#### Azure CLI
```Sh
# Replace {service-principal-name} and {subscription-id} with your
```sh
# Replace {service-principal-name} and {subscription-id} with your
# Azure subscription id and any name for your service principal.
az ad sp create-for-rbac \
--name "{service-principal-name}" \
@ -105,7 +105,7 @@ az ad sp create-for-rbac \
This will generate the following JSON output:
```JSON
```json
{
"clientId": "<GUID>",
"clientSecret": "<GUID>",
@ -115,12 +115,11 @@ This will generate the following JSON output:
}
```
>**Note:** Take note of the output. It will be required for the next steps.
> **Note:** Take note of the output. It will be required for the next steps.
### 3. Resource Deployment
Now that you have set up the Service Principal, you need to choose how would you like to deploy the resources.
Deployment options:
Now that you have set up the Service Principal, you need to choose how would you like to deploy the resources. Deployment options:
1. [GitHub Actions](#github-actions)
1. [Azure DevOps](#azure-devops)
@ -128,9 +127,8 @@ Deployment options:
#### GitHub Actions
If you want to use GitHub Actions for deploying the resources, add the previous JSON output as a [repository secret](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) with the name `AZURE_CREDENTIALS` in your GitHub repository:
<p align="center">
<img src="docs/images/AzureCredentialsGH.png" alt="GitHub Secrets" width="600"/>
</p>
![GitHub Secrets](docs/images/AzureCredentialsGH.png)
To do so, execute the following steps:
@ -150,9 +148,8 @@ If you want to use Azure DevOps Pipelines for deploying the resources, you need
1. In Azure DevOps, open the **Project settings**.
1. Now, select the **Service connections** page from the project settings page.
1. Choose **New service connection** and select **Azure Resource Manager**.
<p align="center">
<img src="docs/images/ARMConnectionDevOps.png" alt="ARM Connection" width="600"/>
</p>
![ARM Connection](docs/images/ARMConnectionDevOps.png)
1. On the next page select **Service principal (manual)**.
1. Select the appropriate environment to which you would like to deploy the templates. Only the default option **Azure Cloud** is currently supported.
@ -161,28 +158,29 @@ If you want to use Azure DevOps Pipelines for deploying the resources, you need
1. Enter a user-friendly **Connection name** to use when referring to this service connection. Take note of the name because this will be required in the parameter update process.
1. Optionally, enter a **Description**.
1. Click on **Verify and save**.
<p align="center">
<img src="docs/images/ConnectionDevOps.png" alt="Connection DevOps" width="300"/>
</p>
![Connection DevOps](docs/images/ConnectionDevOps.png)
More information can be found [here](https://docs.microsoft.com/azure/devops/pipelines/library/connect-to-azure?view=azure-devops#create-an-azure-resource-manager-service-connection-with-an-existing-service-principal).
### 4. Parameter Update Process
>**Note:** This section applies for both **Azure DevOps** and **GitHub** Deployment
> **Note:** This section applies for both **Azure DevOps** and **GitHub** Deployment
In order to deploy the ARM templates in this repository to the desired Azure subscription, you will need to modify some parameters in the forked repository, which will be used for updating the files which will be used during the deployment. Therefor, **this step should not be skipped for neither Azure DevOps/GitHub options**. As updating each parameter file manually is a time-consuming and potentially error-prone process, we have simplified the task with a GitHub Action workflow. You can update your deployment parameters by completing three steps:
In order to deploy the ARM templates in this repository to the desired Azure subscription, you will need to modify some parameters in the forked repository, which will be used for updating the files which will be used during the deployment. Therefor, **this step should not be skipped for neither Azure DevOps/GitHub options**. As updating each parameter file manually is a time-consuming and potentially error-prone process, we have simplified the task with a GitHub Action workflow. You can update your deployment parameters by completing three steps:
1. Configure the `updateParameters` workflow
1. Execute the `updateParameters` workflow
1. Configure the deployment pipeline
1. Merge these changes back to the `main` branch of your repo
#### Configure the `updateParameters` workflow
>**Note:** There is only one 'updateParametes.yml', which can be found under the '.github' folder and this one will be used also for setting up the Azure DevOps Deployment
To begin, please open the [.github/workflows/updateParameters.yml](/.github/workflows/updateParameters.yml). In this file you need to update the environment variables. Just click on [.github/workflows/updateParameters.yml](/.github/workflows/updateParameters.yml) and edit the following section:
> **Note:** There is only one 'updateParameters.yml', which can be found under the '.github' folder and this one will be used also for setting up the Azure DevOps Deployment
```YAML
To begin, please open the [.github/workflows/updateParameters.yml](/.github/workflows/updateParameters.yml). In this file you need to update the environment variables. Just click on [.github/workflows/updateParameters.yml](/.github/workflows/updateParameters.yml) and edit the following section:
```yaml
env:
DATA_HUB_SUBSCRIPTION_ID: '{dataHubSubscriptionId}'
DATA_HUB_NAME: '{dataHubName}' # Choose max. 11 characters. They will be used as a prefix for all services. If not unique, deployment can fail for some services.
@ -194,7 +192,7 @@ The following table explains each of the parameters:
| Parameter | Description | Sample value |
|:-----------------------------------------|:-------------|:-------------|
| **DATA_HUB_SUBSCRIPTION_ID** | Specifies the subscription ID of the Data Management Zone where all the resources will be deployed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
| **DATA_HUB_SUBSCRIPTION_ID** | Specifies the subscription ID of the Data Management Zone where all the resources will be deployed | <div style="width: 36ch">`xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`</div> |
| **DATA_HUB_NAME** | Specifies the name of your Data Management Zone. The value should consist of alphanumeric characters (A-Z, a-z, 0-9) and should not contain any special characters like `-`, `_`, `.`, etc. Special characters will be removed in the renaming process. | `myhub01` |
| **LOCATION** | Specifies the region where you want the resources to be deployed. Please check [Supported Regions](#supported-regions) | `northeurope` |
| **AZURE_RESOURCE_MANAGER _CONNECTION_NAME** | Specifies the resource manager connection name in Azure DevOps. You can leave the default value if you want to use GitHub Actions for your deployment. More details on how to create the resource manager connection in Azure DevOps can be found in step 4. b) or [here](https://docs.microsoft.com/azure/devops/pipelines/library/connect-to-azure?view=azure-devops#create-an-azure-resource-manager-service-connection-with-an-existing-service-principal). | `my-connection-name` |
@ -202,16 +200,19 @@ The following table explains each of the parameters:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
#### Execute the `updateParameters` workflow
After updating the values, please commit the updated version to the `main` branch of your repository. This will kick off a GitHub Action workflow, which will appear under the **Actions** tab of the main page of the repository. The `Update Parameter Files` workflow will update all parameters in your repository according to a pre-defined naming convention.
#### Configure the deployment pipeline
The workflow above will make changes to all of the ARM config files. These changes will be stored in a new branch. Once the process has finished, it will open a new pull request in your repository where you can review the changes made by the workflow. The pull request will also provide the values you need to use to configure the deployment pipeline. Please follow the instructions in the pull request to complete the parameter update process.
If you are using GitHub Actions for your deployment, you will need to modify the `.github/workflows/dataHubDeployment.yml` file. If you are using Azure Pipelines, you only need to modify the `.ado/workflows/dataHubDeployment.yml` file. **You only need to modify one of these files. You do not need to modify both of them.**
The workflow above will make changes to all of the ARM config files. These changes will be stored in a new branch. Once the process has finished, it will open a new pull request in your repository where you can review the changes made by the workflow. The pull request will also provide the values you need to use to configure the deployment pipeline. Please follow the instructions in the pull request to complete the parameter update process.
>**Note:** We are not renaming the environment variables in the workflow files because this could lead to an infinite loop of workflow runs being started.
If you are using GitHub Actions for your deployment, you will need to modify the `.github/workflows/dataHubDeployment.yml` file. If you are using Azure Pipelines, you only need to modify the `.ado/workflows/dataHubDeployment.yml` file. **You only need to modify one of these files. You do not need to modify both of them.**
> **Note:** We are not renaming the environment variables in the workflow files because this could lead to an infinite loop of workflow runs being started.
#### Merge these changes back to the `main` branch of your repo
After following the instructions in the pull request, you can merge the pull request back into the `main` branch of your repository by clicking on **Merge pull request**. Finally, you can click on **Delete branch** to clean up your repository.
### 5. (not applicable for GH Actions) Reference pipeline from GitHub repository in Azure DevOps Pipelines
@ -221,14 +222,14 @@ After following the instructions in the pull request, you can merge the pull req
First you need to add and install the Azure Pipelines GitHub App to your GitHub account. To do so, execute the following steps:
1. Click on **Marketplace** in the top navigation bar on GitHub.
1. In the Marketplace, search for **Azure Pipelines**. The Azure Pipelines offering is free for anyone to use for public repositories and free for a single build queue if youre using a private repository.
<p align="center">
<img src="docs/images/AzurePipelinesGH.png" alt="Install Azure Pipelines on GitHub" width="600"/>
</p>
1. In the Marketplace, search for **Azure Pipelines**. The Azure Pipelines offering is free for anyone to use for public repositories and free for a single build queue if you're using a private repository.
![Install Azure Pipelines on GitHub](docs/images/AzurePipelinesGH.png)
1. Select it and click on **Install it for free**.
<p align="center">
<img src="docs/images/InstallButtonGH.png" alt="GitHub Template repository" width="600"/>
</p>
![GitHub Template repository](docs/images/InstallButtonGH.png)
1. If you are part of multiple **GitHub** organizations, you may need to use the **Switch billing account** dropdown to select the one into which you forked this repository.
1. You may be prompted to confirm your GitHub password to continue.
1. You may be prompted to log in to your Microsoft account. Make sure you log in with the one that is associated with your Azure DevOps account.
@ -239,19 +240,19 @@ As a last step, you need to create an Azure DevOps pipeline in your project base
1. Select the Azure DevOps project where you have setup your `Resource Manager Connection`.
1. Select **Pipelines** and then **New Pipeline** in order to create a new pipeline.
<p align="center">
<img src="docs/images/CreatePipelineDevOps.png" alt="Create Pipeline in DevOps" width="600"/>
</p>
![Create Pipeline in DevOps](docs/images/CreatePipelineDevOps.png)
1. Choose **GitHub YAML** and search for your repository (e.g. "`GitHubUserName/RepositoryName`").
<p align="center">
<img src="docs/images/CodeDevOps.png" alt="Choose code source in DevOps Pipeline" width="600"/>
</p>
![Choose code source in DevOps Pipeline](docs/images/CodeDevOps.png)
1. Select your repository.
1. Click on **Existing Azure Pipelines in YAML file**
1. Select `main` as branch and `/.ado/workflows/dataHubDeployment.yml` as path.
<p align="center">
<img src="docs/images/ConfigurePipelineDevOps.png" alt="Configure Pipeline in DevOps" width="600"/>
</p>
![Configure Pipeline in DevOps](docs/images/ConfigurePipelineDevOps.png)
1. Click on **Continue** and then on **Run**.
### 6. Follow the workflow deployment
@ -305,7 +306,7 @@ ERROR: Deployment failed. Correlation ID: ***
"code": "MissingSubscriptionRegistration",
"target": "Microsoft.DocumentDB",
"message": "The subscription is not registered to use namespace 'Microsoft.DocumentDB'. See https://aka.ms/rps-not-found for how to register subscriptions."
```
**Solution:**
@ -318,24 +319,16 @@ This error message appears, in case during the deployment it tries to create a t
"statusMessage": "{\"error\":{\"code\":\"InvalidTemplateDeployment\",\"message\":\"The template deployment 'deploy.purview' is not valid according to the validation procedure. The tracking id is '9e22893b-1e0a-48ba-800c-77a27a86cade'. See inner errors for details.\",\"details\":[{\"code\":\"1000\",\"message\":\"Failed to list providers from ARM. Exception: The client '38a6ed90-8590-42fb-b09f-fbcf6f6849c3' with object id '38a6ed90-8590-42fb-b09f-fbcf6f6849c3' does not have authorization to perform action 'Microsoft.Resources/subscriptions/providers/read' over scope '/subscriptions/9ae0dd4c-d127-4901-bb76-46d39676a2cc' or the scope is invalid. If access was recently granted, please refresh your credentials.\"}]}}"
"eventCategory": "Administrative",
```
**Solution:**
**Error Purview Specific** This error message appears during the deployment of Purview in case it was not registered inside the subscription. We recommend to check prior the deployment whether the 'purview' resource providers is registered for your subscription and if needed, register it through the `Azure Portal`, `Azure Powershell` or `Azure CLI` as mentioned [here](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-providers-and-types).
## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repositories using our CLA.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

Двоичные данные
docs/images/ARMConnectionDevOps.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 312 KiB

После

Ширина:  |  Высота:  |  Размер: 61 KiB

Двоичные данные
docs/images/AzureCredentialsGH.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 229 KiB

После

Ширина:  |  Высота:  |  Размер: 64 KiB

Двоичные данные
docs/images/AzurePipelinesGH.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 351 KiB

После

Ширина:  |  Высота:  |  Размер: 69 KiB

Двоичные данные
docs/images/CodeDevOps.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 197 KiB

После

Ширина:  |  Высота:  |  Размер: 61 KiB

Двоичные данные
docs/images/ConfigurePipelineDevOps.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 326 KiB

После

Ширина:  |  Высота:  |  Размер: 67 KiB

Двоичные данные
docs/images/ConnectionDevOps.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 145 KiB

После

Ширина:  |  Высота:  |  Размер: 80 KiB

Двоичные данные
docs/images/CreateRepoGH.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 270 KiB

После

Ширина:  |  Высота:  |  Размер: 66 KiB

Двоичные данные
docs/images/DataHub.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 99 KiB

После

Ширина:  |  Высота:  |  Размер: 133 KiB

Двоичные данные
docs/images/InstallButtonGH.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 255 KiB

После

Ширина:  |  Высота:  |  Размер: 43 KiB

Двоичные данные
docs/images/UseThisTemplateGH.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 40 KiB

После

Ширина:  |  Высота:  |  Размер: 28 KiB

Просмотреть файл

@ -6,7 +6,7 @@
"value": "Audit-Budget-Sandbox"
},
"policyDescription": {
"value": "Depoloys a default budget on all subscriptions under the assigned scope."
"value": "Deploys a default budget on all subscriptions under the assigned scope."
},
"policyMode": {
"value": "All"