This document will help you deploy the Contoso Traders application in your Azure environment using Azure Pipelines.
-
You'll have to follow the steps in the Deployment Instructions document to set up your Azure subscription and github repository fork.
-
You'll need to have an Azure DevOps organization and project set up. If you don't have one, you can follow the instructions here.
-
Please ensure that the following Azure DevOps marketplace extensions are installed for your organization:
-
Ensure that you provide access to the Azure Devops application in your GitHub account. Specifically ensure that the application has access to your forked GitHub repository.
-
Create a new Azure Pipeline: In your Azure DevOps project, click on
Pipelines
>New pipeline
>GitHub
> Select your GitHub fork >Existing Azure Pipelines YAML file
>contoso-traders-cloud-testing/azure-pipelines.yml
(ensure branch ismain
, path is/.azurepipelines/azure-pipelines.yml
) >Continue
. -
Set up a service connection to Azure: In your Azure DevOps project, click on
Project settings
(bottom left of page) >Service Connections
>New service connection
>Azure Resource Manager
>Service principal (manual)
>Next
.At this point, you'll need the JSON output from the
az ad sp create-for-rbac
command executed earlier.{ "clientId": "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz", "clientSecret": "your-client-secret", "tenantId": "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz", "subscriptionId": "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz" }
On the
New Azure Service Connection
page, enter the following values:- Environment:
Azure Cloud
- Scope Level:
Subscription
- Subscription Id:
subscriptionId
property from the JSON output - Subscription Name: The name of your Azure subscription
- Service Principal Id:
clientId
property from the JSON output - Credential: Choose the
Service principal key
option - Service Principal Key:
clientSecret
property from the JSON output - Tenant ID:
tenantId
property from the JSON output - Service Connection Name:
SERVICEPRINCIPAL
(please use this exact name) - Description:
Service connection to Azure subscription using service principal
- Grant access permission to all pipelines: Ensure this option is checked
Click the
Verify and save
button. - Environment:
-
Set up the variables for your Azure Pipeline. Click on
Pipelines
>Library
>+ Variable Group
. Create a variable group calledcontosotraders-cloudtesting-variable-group
with the following variables:Variable Name Variable Value Is Secret? SQLPASSWORD
8 to 15 characters long, must contain uppercase, lowercase, and numeric characters YES SUFFIX
A unique environment suffix (max 6 characters, alphanumeric, lower case only, no whitespace, no special chars). E.g. 'test51' or '1stg' NO DEPLOYMENTREGION
The Azure region to deploy the application in. Must be one of: australiaeast
,centralus
,eastus
,eastus2
,japaneast
,northcentralus
,uksouth
,westcentralus
,westeurope
,westus2
NO After saving the variable group, click on
Pipeline permissions
and ensure that theazure-pipelines.yml
pipeline has access to the variable group.
-
Go to your Azure Project's
Pipelines
tab, select thecontoso-traders-cloud-testing
pipeline, and click on theRun Pipeline
button. -
The Azure pipeline will provision the necessary infrastructure to your Azure subscription as well as deploy the applications (APIs, UI) to the infrastructure. Note that the pipeline might take about 15 mins to complete.
You may get an error if you do not have free parallel jobs available in your Azure DevOps organization. If you get this error, you'll have to request for more parallel jobs in your Azure DevOps organization.
For any other deployment errors, please check the Troubleshooting Deployment Errors section in the Deployment Instruction document.
You can now proceed to exploring demo scenarios.