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
* Configure *Infrastructure Pipeline Variables* as the first of two variable groups
233
-
* Select Pipelines tab from within side-navigation menu then select Library tab
234
-
* Click [+Variable group] and name it "Infrastructure Pipeline Variables"
235
-
* Add the following variables:
236
-
237
-
| Name | Value | Var Description |
238
-
|-------------|-----------|-----------|
239
-
|`AGENT_POOL`| Hosted Ubuntu 1604 | The type of build agent used for your deployment. |
240
-
|`ARM_PROVIDER_STRICT`| false | Terraform ARM provider modification |
241
-
|`BUILD_ARTIFACT_NAME`| drop | Name to identity the folder containing artifacts output by a build. |
242
-
|`GO_VERSION`| 1.12.5 | The version of Go terraform deployments are bound to. |
243
-
|`PIPELINE_ROOT_DIR`| devops/providers/azure-devops/templates/ | A path for finding Cobalt templates. |
244
-
|`REMOTE_STATE_CONTAINER`|`<CONTAINER_NAME>`| The remote blob storage container name for managing the state of a Cobalt Template's deployed infrastructure. Also is used as a naming convention for partitioning state into multiple workspaces. This name was created in an earlier step from within the azure portal. |
245
-
|`SCRIPTS_DIR`| infrastructure/scripts | Path to scripts used at runtime for composing build and release jobs at various pipeline stages. |
246
-
|`TEST_HARNESS_DIR`| test-harness/ | A path to the cobalt test harness for running integration and unit tests written in Docker and Golang. |
247
-
|`TF_ROOT_DIR`| infra | The primary path for all Cobalt templates and the modules they are composed of. |
248
-
|`TF_VERSION`| 0.12.4 | The version of terraform deployments are bound to. |
249
-
|`TF_WARN_OUTPUT_ERRORS`| 1 | The severity level of errors to report. |
250
-
251
-
> Important: Every targeted environment specified within the build pipeline expects a
252
-
> variable group specified with the naming convention `<ENVIRONMENT_NAME> Environment Variables`
230
+
* Configure the variables needed by the pipeline. The latest configuration values are described in the [pipeline documentation](../devops/providers/azure-devops/README.md)
253
231
254
-
> The following CLI command(s) can be run as an alternative to using the portal-based instructions:
255
-
256
-
```bash
257
-
# IMPORTANT: Replace these values as necessary to fit your environment.
258
-
az pipelines variable-group create --authorize true --name "$COBALT_VAR_GROUP_INFRA" --variables \
* Configure *DevInt Environment Variables* as the final variable group
276
-
* Environment-specific variables have no default values and must be assigned
277
-
* Return to the Library tab
278
-
* Click [+Variable group] and name it *DevInt Environment Variables*
279
-
* Add the following variables:
280
-
281
-
| Name | Value | Var Description |
282
-
|-------------|-----------|-----------|
283
-
|`ARM_SUBSCRIPTION_ID`|`<ARM_SUBSCRIPTION_ID>`| The Azure subscription ID for which all resources will be deployed. Refer to the Azure subscription chosen in Azure portal for Cobalt deployments. |
284
-
|`REMOTE_STATE_ACCOUNT`|`<AZURE_STORAGE_ACCOUNT_NAME>`| The storage container account name created in a previous step that is used to manage the state of this deployment pipeline. The storage Account is shared among all non-prod deployment stages. |
285
-
|`SERVICE_CONNECTION_NAME`| ex. Cobalt Deployment Administrator-`<TenantName>`| The custom name of the service connection configured in a previous Azure Devops step that establishes a connection between the Service Principal and the Azure subscription that it's permissioned for. |
286
-
|`TF_CLI_ARGS`| "-refresh=false" | specify additional arguments to the command-line. This allows easier automation in CI environments as well as modifying default behavior of Terraform |
287
-
288
-
> The following CLI command(s) can be run as an alternative to using the portal-based instructions:
232
+
> **Note**: The following CLI command can be run as an alternative to using the portal-based instructions:
289
233
290
234
```bash
291
-
# IMPORTANT: Replace these values as necessary to fit your environment.
Variable groups are utilized by the pipeline to configure how the Cobalt template will be tested and deployed. The `az pipelines variable-group create``--variables` flag expects a list of space-delimited key value pairs (e.g., `KEY1='val1' KEY2=true`).
113
+
Variable groups are utilized by the pipeline to configure how the Cobalt template will be tested and deployed. The latest configuration values are described in the [pipeline documentation](../devops/providers/azure-devops/README.md) and they will need to be configured in order for the CICD pipeline to effectively run.
116
114
117
-
The following *Infrastructure Pipeline Variables* are used by all possible environment-specific executions for the Cobalt pipelines.
115
+
> **Note**: The following CLI command can be run as an alternative to using the portal-based instructions:
118
116
119
117
```bash
120
-
# IMPORTANT: Replace these values as necessary to fit your environment.
121
-
az pipelines variable-group create --authorize true --name "$COBALT_VAR_GROUP_INFRA" --variables \
> NOTE: The TF_DEPLOYMENT_TEMPLATE_ROOT and TF_DEPLOYMENT_WORKSPACE_PREFIX values are not used by all templates. If targeting the Isolated Service Single Region template, you will want to set these values; however, they will not have an effect on the Hello World template.
138
120
139
121
Within the pipeline build definition you may specify the number of environments that will be targed for deployment. For each environment specified, you will need a variable group that defines the Azure Subscription ID to where the infrastructure will be provisioned. You will also need to set a Service Connection that has permissions to provision resources on that subscription.
140
122
141
-
For this walkthrough, we will only create a single environment -- *devint*. The following commands will create the required *DevInt Environment Variables* variable group.
142
-
```bash
143
-
# IMPORTANT: Replace these values as necessary to fit your environment.
For this walkthrough, we will only create a single environment -- *devint*. Follow the documentation linked above and create the necessary variable groups for devint.
151
124
152
125
> NOTE: The Service Connection name should be provided by someone in your organziation with the *Global administrator* permission for your Azure Active Directory tenant. If it has not been provisisioned for you, you may create another by following the directions outlined in the [Getting Started - Advocated Pattern Onwer documentation](./GETTING_STARTED_ADD_PAT_OWNER.md)
0 commit comments