Skip to content

Commit

Permalink
Merge pull request #563 from microsoft/dayland/add-tf-backend-when-in…
Browse files Browse the repository at this point in the history
…-automation

Update environment variables and pipeline templates
  • Loading branch information
dayland committed Mar 13, 2024
2 parents 9f9835b + 4c9a5ea commit bbaba3d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 114 deletions.
7 changes: 6 additions & 1 deletion docs/deployment/setting_up_sandbox_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@ To set up an Azure DevOps CI/CD pipeline for deploying code from a GitHub reposi
CLIENT_ID<br />CLIENT_SECRET<br />SERVICE_PRINCIPAL_ID | These are used for the deployment scripts to login to Azure. This is typically a service principal and will need Contributor and User Access Administrator roles.
SUBSCRIPTION_ID | The ID of the subscription that should be deployed to.
TENANT_ID | The ID of the tenant that should be deployed to.
AZURE_STORAGE_ACCOUNT<br/>AZURE_STORAGE_ACCOUNT_KEY | Bicep is used to create Infrastructure as Code. This is the storage account that the Bicep State is stored.
CONTAINER_REGISTRY_ADDRESS | Azure Container Registry where the Info Assistant development container will be cached during pipeline runs
AZURE_OPENAI_SERVICE_NAME<br/>AZURE_OPENAI_SERVICE_KEY<br/>AZURE_OPENAI_CHATGPT_DEPLOYMENT<br/>AZURE_OPENAI_GPT_DEPLOYMENT | It is recommended to point the pipeline to an existing installation of Azure OpenAI. These values will be used to target that instance.
environment | The environment name that matches an environment variable file located in `./scripts/environments`. For example if the pipeline parameter is set to "demo" there needs to be a corresponding file at `/scripts/environment/demo.env`
TF_BACKEND_ACCESS_KEY | Terraform is used to create Infrastructure as Code. This is the key to the Terraform State in a Storage Account.
TF_BACKEND_CONTAINER | Terraform is used to create Infrastructure as Code. This is the container that the Terraform State is stored within a Storage Account.
TF_BACKEND_RESOURCE_GROUP | Terraform is used to create Infrastructure as Code. This is the resource group that the Terraform State is stored within a Storage Account.
TF_BACKEND_STORAGE_ACCOUNT | Terraform is used to create Infrastructure as Code. This is the storage account that the Terraform State is stored.
AD_MGMT_SERVICE_PRINCIPAL_ID<br />AD_MGMTAPP_CLIENT_ID<br />AD_MGMTAPP_CLIENT_SECRET | These are for an Azure AD App Registration and Enterprise Application that will be used to query details about the Azure OpenAI deployments you target.
AD_WEBAPP_CLIENT_ID | This will be the Azure AD App Registration that will be used for authentication in the Azure App Service that host the Information Assistant Web Application

2. **Save your pipeline:** After updating the variable, save your pipeline configuration.

Expand Down
8 changes: 5 additions & 3 deletions pipelines/devcontainer-ci.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ AD_WEBAPP_CLIENT_ID
AD_MGMTAPP_CLIENT_ID
AD_MGMTAPP_CLIENT_SECRET
AD_MGMT_SERVICE_PRINCIPAL_ID
AZURE_STORAGE_ACCOUNT
AZURE_STORAGE_ACCOUNT_KEY
AZURE_OPENAI_SERVICE_NAME
AZURE_OPENAI_SERVICE_KEY
AZURE_OPENAI_RESOURCE_GROUP
AZURE_OPENAI_CHATGPT_DEPLOYMENT
AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME
AZURE_ENVIRONMENT
BUILD_BUILDID
BUILD_BUILDNUMBER
BUILD_BUILDNUMBER
TF_BACKEND_RESOURCE_GROUP
TF_BACKEND_STORAGE_ACCOUNT
TF_BACKEND_CONTAINER
TF_BACKEND_ACCESS_KEY
6 changes: 4 additions & 2 deletions pipelines/templates/make-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ steps:
ARM_TENANT_ID: $(TENANT_ID)
ARM_SUBSCRIPTION_ID: $(SUBSCRIPTION_ID)
AD_WEBAPP_CLIENT_ID: $(WEBAPP_CLIENT_ID)
AZURE_STORAGE_ACCOUNT: $(AZURE_STORAGE_ACCOUNT)
AZURE_STORAGE_ACCOUNT_KEY: $(AZURE_STORAGE_ACCOUNT_KEY)
AZURE_OPENAI_SERVICE_NAME: $(AZURE_OPENAI_SERVICE_NAME)
AZURE_OPENAI_SERVICE_KEY: $(AZURE_OPENAI_SERVICE_KEY)
AZURE_OPENAI_RESOURCE_GROUP: $(AZURE_OPENAI_RESOURCE_GROUP)
Expand All @@ -45,3 +43,7 @@ steps:
AD_MGMT_SERVICE_PRINCIPAL_ID: $(AD_MGMT_SERVICE_PRINCIPAL_ID)
BUILD_BUILDID: $(Build.BuildId)
BUILD_BUILDNUMBER: $(Build.BuildNumber)
TF_BACKEND_RESOURCE_GROUP: $(TF_BACKEND_RESOURCE_GROUP)
TF_BACKEND_STORAGE_ACCOUNT: $(TF_BACKEND_STORAGE_ACCOUNT)
TF_BACKEND_CONTAINER: $(TF_BACKEND_CONTAINER)
TF_BACKEND_ACCESS_KEY: $(TF_BACKEND_ACCESS_KEY)
108 changes: 0 additions & 108 deletions scripts/create-ad-objs-for-deployment.sh

This file was deleted.

0 comments on commit bbaba3d

Please sign in to comment.