The 1_infra folder contains the Bicep code and modules for deploying the resources needed for this Document Intelligence Solution. After creating a Resource Group and running the Bicep deployments, your resource group will contain the following resources:
- Install latest version of Azure CLI
- Install latest version of Bicep
- Install latest version Azure Functions Core Tools
- Clone this repo
-
Make sure you are in the \1_infra directory in bash
-
Login to your Azure account:
az login
-
Set your Azure subscription ID:
az account set --subscription <subscription id>
-
Create an Azure Resource group:
az group create --name <your resource group name> --location <your resource group location>
-
Run command to get the object id for your email address. This is to give you access needed for deployed resources:
az ad user show --id 'your email' --query id
-
Copy the objectid value returned from the above command.
-
Open the main.bicepparam and paste the object for the parameter value for spObjectId. = 'your-object-id'. Also add the values for resourceLocation, resourceGroupName, prefix, and uniqueSuffix.
-
Save the main.bicepparam file.
az deployment group create --resource-group <your resource group name> --template-file main.bicep --parameters main.bicepparam --name Doc-intelligence-in-a-Box --query 'properties.outputs'
-
Deploy code to function app (the name should be yourprefix-funcapp):
cd .. cd code func azure functionapp publish <your funcapp name> --python