Skip to main content Link Menu Expand (external link) Document Search Copy Copied

1. Prepare the configuration

Fill the configuration file according to your environment.

Step by step guidance

  1. If you want to use azd to deploy from a new environment, prepare your images in Azure Container Registry

     APPNAME=petclinic
     RESOURCE_GROUP=rg-$APPNAME
    
     # prepare ACR
     MYACR=acr$APPNAME
     az acr create \
         -n $MYACR \
         -g $RESOURCE_GROUP \
         --sku Basic \
         --admin-enabled true
    
     ACR_ID=$(az acr show -n $MYACR -g $RESOURCE_GROUP --query id -o tsv)
    
     # create user managed identity
     ACR_IDENTITY=uid-acr-$APPNAME
    
     az identity create --resource-group $RESOURCE_GROUP --name $ACR_IDENTITY
     ACR_UMID=$(az identity show --resource-group $RESOURCE_GROUP --name $ACR_IDENTITY --query id --output tsv)
     SP_ID=$(az identity show --resource-group $RESOURCE_GROUP --name $ACR_IDENTITY --query principalId --output tsv)
    
     # assign role
     az role assignment create --assignee $SP_ID --scope $ACR_ID --role acrpull
    
  2. Prepare your images to Azure Container Registry You may use the ACR createed in Lab 3, and the user managed identity too. Please build your passwordless image after Lab 4.

  3. In your local repo, open file infra/bicep/main.parameters.json, fill the parameters

    • vnetEndpointInternal: is the container apps subnet internal-only?
    • sqlAdmin: the admin user for sql server
    • sqlAdminPassword: the admin password for sql server
    • configGitRepo: Default to this repo https://github.com/Azure-Samples/spring-petclinic-microservices-config
    • configGitPath: passwordless profile default to directory config in this repo
    • acrRegistry: The ACR address with your build images, $MYACR.azurecr.io
    • acrIdentityId: The user mananged identity id with AcrPull access, $ACR_UMID
    • apiGatewayImage: The API gateway image with tag
    • customerServiceImage: The customer service image with tag
    • vetsServiceImage: The vets service image with tag
    • visitsServiceImage: The visits service image with tag
    • adminServerImage: The admin server image with tag
    • applicationInsightsConnString: The connection string of your AI instance