Skip to content

Commit f2318e9

Browse files
Add AVM Post Deployment Guide
1 parent d652aab commit f2318e9

File tree

1 file changed

+164
-0
lines changed

1 file changed

+164
-0
lines changed

docs/AVMPostDeploymentGuide.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# AVM Post Deployment Guide
2+
3+
This document provides guidance on post-deployment steps after deploying the Content processing solution accelerator from the [AVM (Azure Verified Modules) repository](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/sa/content-processing).
4+
5+
## Overview
6+
7+
After successfully deploying the Content Processing Solution Accelerator using the AVM template, you'll need to complete some configuration steps to make the solution fully operational. This guide walks you through:
8+
9+
- Setting up schema definitions for document processing
10+
- Importing sample data to test the solution
11+
- Configuring authentication for secure access
12+
- Verifying your deployment is working correctly
13+
14+
## Prerequisites
15+
16+
Before starting the post-deployment process, ensure you have the following:
17+
18+
### Required Software
19+
20+
1. **[PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.4)** <small>(v7.0+ recommended)</small> - Available for Windows, macOS, and Linux
21+
22+
2. **[Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)** <small>(v2.50+)</small> - Command-line tool for managing Azure resources
23+
24+
3. **[Git](https://git-scm.com/downloads/)** - Version control system for cloning the repository
25+
26+
4. **Deployed Infrastructure** - A successful Content processing solution accelerator deployment from the [AVM repository](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/sa/content-processing)
27+
28+
#### Important Note for PowerShell Users
29+
30+
If you encounter issues running PowerShell scripts due to execution policy restrictions, you can temporarily adjust the `ExecutionPolicy` by running the following command in an elevated PowerShell session:
31+
32+
```powershell
33+
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
34+
```
35+
36+
This will allow the scripts to run for the current session without permanently changing your system's policy.
37+
38+
## Post-Deployment Steps
39+
40+
### Step 1: Clone the Repository
41+
42+
First, clone this repository to access the post-deployment scripts:
43+
44+
```powershell
45+
git clone https://github.com/microsoft/content-processing-solution-accelerator.git
46+
cd content-processing-solution-accelerator
47+
```
48+
49+
### Step 2: Verify Your Deployment
50+
51+
Before proceeding, verify that your AVM deployment completed successfully:
52+
53+
1. **Check Resource Group**: Confirm all expected resources are present in your Azure resource group
54+
2. **Verify Container Apps**: Ensure both API and Web container apps are running
55+
3. **Test Connectivity**: Verify you can access the container app URLs
56+
57+
### Step 3: Optional - Rebuild and Push Container Images
58+
59+
If you need to rebuild the source code and push updated containers to the deployed Azure Container Registry:
60+
61+
**Linux/macOS**:
62+
```bash
63+
cd ./infra/scripts/
64+
./docker-build.sh
65+
```
66+
67+
**Windows (PowerShell)**:
68+
```powershell
69+
cd .\infra\scripts\
70+
.\docker-build.ps1
71+
```
72+
73+
> **Note**: This step is only necessary if you've modified the source code or need to update the container images.
74+
75+
### Step 4: Register Schema Files
76+
77+
Configure the solution with sample schemas for document processing:
78+
79+
> 💡 **Want to customize schemas?** [Learn more about adding your own schemas here](./CustomizeSchemaData.md)
80+
81+
#### 4.1 Get API Service Endpoint
82+
83+
1. Navigate to your Azure portal and find your resource group
84+
2. Locate the API container app (named **ca-**_\<environmentName\>_**-api**)
85+
3. Copy the Application URL from the Overview page
86+
87+
![Check API Service Url](./images/CheckAPIService.png)
88+
89+
#### 4.2 Register Sample Schemas
90+
91+
Navigate to the schemas directory and run the registration script:
92+
93+
```powershell
94+
cd src/ContentProcessorAPI/samples/schemas
95+
```
96+
97+
**Linux/macOS**:
98+
```bash
99+
./register_schema.sh https://<YOUR_API_ENDPOINT>/schemavault/ schema_info_sh.json
100+
```
101+
102+
**Windows**:
103+
```powershell
104+
./register_schema.ps1 https://<YOUR_API_ENDPOINT>/schemavault/ .\schema_info_ps1.json
105+
```
106+
107+
#### 4.3 Verify Schema Registration
108+
109+
Check that schemas were registered successfully:
110+
![Schema file registration](./images/SchemaFileRegistration.png)
111+
112+
### Step 5: Import Sample Data
113+
114+
Upload sample documents to test the solution:
115+
116+
#### 5.1 Get Schema IDs
117+
118+
Note down the Schema IDs for "Invoice" and "Property Loss Damage Claim Form" from the previous step.
119+
120+
#### 5.2 Upload Sample Documents
121+
122+
Navigate to the samples directory:
123+
124+
```powershell
125+
cd src/ContentProcessorAPI/samples/
126+
```
127+
128+
**Upload Invoice samples (Linux/macOS)**:
129+
```bash
130+
./upload_files.sh https://<YOUR_API_ENDPOINT>/contentprocessor/submit ./invoices <INVOICE_SCHEMA_ID>
131+
```
132+
133+
**Upload Property Claims samples (Linux/macOS)**:
134+
```bash
135+
./upload_files.sh https://<YOUR_API_ENDPOINT>/contentprocessor/submit ./propertyclaims <PROPERTY_CLAIM_SCHEMA_ID>
136+
```
137+
138+
**Upload Invoice samples (Windows)**:
139+
```powershell
140+
./upload_files.ps1 https://<YOUR_API_ENDPOINT>/contentprocessor/submit .\invoices <INVOICE_SCHEMA_ID>
141+
```
142+
143+
**Upload Property Claims samples (Windows)**:
144+
```powershell
145+
./upload_files.ps1 https://<YOUR_API_ENDPOINT>/contentprocessor/submit .\propertyclaims <PROPERTY_CLAIM_SCHEMA_ID>
146+
```
147+
148+
### Step 6: Configure Authentication
149+
150+
Set up secure access to your application:
151+
152+
1. Follow the detailed steps in [Configure App Authentication](./ConfigureAppAuthentication.md)
153+
2. **Important**: Authentication changes can take up to 10 minutes to take effect
154+
155+
## Next Steps
156+
157+
Now that you've completed your deployment, you can start using the solution. Try out these things to start getting familiar with the capabilities:
158+
* Open the web container app URL in your browser and explore the web user interface and upload your own invoices.
159+
* [Create your own schema definition](./CustomizeSchemaData.md), so you can upload and process your own types of documents.
160+
* [Ingest the API](API.md) for processing documents programmatically.
161+
162+
---
163+
164+
> **📋 Note**: This guide is specifically for post-deployment steps after using the AVM template. For complete deployment from scratch, see the main [Deployment Guide](./DeploymentGuide.md).

0 commit comments

Comments
 (0)