Skip to content

Commit 90fa399

Browse files
author
Mike Swantek
committed
harden Fabric mirroring automation and align docs with Microsoft Foundry
1 parent 60bcbd0 commit 90fa399

26 files changed

Lines changed: 3004 additions & 1336 deletions

CHANGELOG.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [Unreleased] - 2026-03-06
5+
## [2026-03-20]
6+
### Added
7+
- Read-only PostgreSQL mirroring preflight script for validating runner prerequisites before mirror setup
8+
- PostgreSQL mirroring follow-up wrapper to run preflight, preparation, and mirror creation as a deliberate post-deployment flow
9+
- Shared AI Search helper module for OneLake indexing scripts to centralize public network access toggles and tokenized REST calls
10+
11+
### Changed
12+
- PostgreSQL mirroring guidance now treats mirroring as a follow-up step after `azd up`, with clearer public-access versus private-network paths
13+
- Postprovision now restores only PostgreSQL mirroring readiness preparation instead of attempting full mirror creation during the main deployment run
14+
- Fabric connection and workspace automation now resolve more values from deployment outputs, azd environment values, and deployed resources when transient hook context is incomplete
15+
- PostgreSQL mirroring scripts now support explicit connection-mode outputs, stronger credential handling, clearer network-path failures, and gateway-aware Fabric connection creation
16+
- Purview collection and Fabric datasource registration scripts now derive default names and deployment context more reliably from outputs and environment values
17+
- Post-deployment and mirroring documentation consolidated the mirror workflow into a single primary runbook and clarified when mirroring should be deferred
18+
19+
### Removed
20+
- Temporary PostgreSQL mirroring prep wrapper that toggled public access as a separate script
21+
- Fabric connection probe debug script and the redundant PostgreSQL mirroring opt-in guide
22+
23+
## [2026-03-18]
624
### Added
725
- Parameter to override Log Analytics workspace resource ID and output mapping for automation scripts
826
- Optional `SKIP_PURVIEW_INTEGRATION` guard for Purview automation scripts (used by hooks when Purview is disabled)
@@ -12,17 +30,18 @@ All notable changes to this project will be documented in this file.
1230
- Preprovision error output simplified with concise failure reason and optional verbose diagnostics
1331
- Main parameter file reordered into required/optional/defaulted sections with clearer comments
1432
- OneLake indexing scripts prefer outputs, include AAD-only auth, and handle transient 409 run conflicts
33+
- Post-deployment steps now include Fabric mirroring checklist items and Key Vault networking guidance for retrieving the `fabric_user` password
1534

16-
### Fixed
17-
- Power BI headers initialization in Log Analytics linkage script to resolve workspace ID lookups
35+
### Removed
36+
- Log Analytics linkage script `scripts/automationScripts/FabricPurviewAutomation/connect_log_analytics.ps1`
1837

1938
## [1.3] - 2025-12-09
2039
### Added
2140
- Microsoft Fabric integration with automatic capacity creation and management
2241
- Microsoft Purview integration for governance and data cataloging
2342
- OneLake indexing pipeline connecting Fabric lakehouses to AI Search
2443
- Comprehensive post-provision automation (22 hooks for Fabric/Purview/Search setup)
25-
- New documentation: `deploy_app_from_foundry.md` for publishing apps from AI Foundry
44+
- New documentation: `deploy_app_from_foundry.md` for publishing apps from Microsoft Foundry
2645
- New documentation: `TRANSPARENCY_FAQ.md` for responsible AI transparency
2746
- New documentation: `NewUserGuide.md` for first-time users
2847
- Header icons matching GSA standard format

README.md

Lines changed: 122 additions & 103 deletions
Large diffs are not rendered by default.

azure.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ hooks:
5555
continueOnError: false
5656

5757
# Stage 5: Purview Collection Creation
58-
- run: "$env:SKIP_PURVIEW_INTEGRATION='true'; ./scripts/automationScripts/FabricPurviewAutomation/create_purview_collection.ps1"
58+
- run: ./scripts/automationScripts/FabricPurviewAutomation/create_purview_collection.ps1
5959
interactive: false
6060
shell: pwsh
6161
continueOnError: false
6262

6363
# Stage 6: Register Fabric as Purview Data Source
64-
- run: "$env:SKIP_PURVIEW_INTEGRATION='true'; ./scripts/automationScripts/FabricWorkspace/CreateWorkspace/register_fabric_datasource.ps1"
64+
- run: ./scripts/automationScripts/FabricWorkspace/CreateWorkspace/register_fabric_datasource.ps1
6565
interactive: false
6666
shell: pwsh
6767
continueOnError: false
@@ -72,14 +72,8 @@ hooks:
7272
shell: pwsh
7373
continueOnError: false
7474

75-
# Stage 7.4: Prepare PostgreSQL for Fabric mirroring (server params + role)
76-
- run: ./scripts/automationScripts/FabricWorkspace/Mirror/run_postgresql_mirroring_prep_with_public_access.ps1
77-
interactive: false
78-
shell: pwsh
79-
continueOnError: false
80-
81-
# Stage 7.5: Create PostgreSQL Mirrored Database (if PostgreSQL is provisioned)
82-
- run: ./scripts/automationScripts/FabricWorkspace/Mirror/create_postgresql_mirror.ps1
75+
# Stage 7.5: Prepare PostgreSQL server for Fabric mirroring readiness
76+
- run: ./scripts/automationScripts/FabricWorkspace/mirror/prepare_postgresql_for_mirroring.ps1
8377
interactive: false
8478
shell: pwsh
8579
continueOnError: false
@@ -139,7 +133,7 @@ hooks:
139133
continueOnError: false
140134

141135
# Stage 17: Trigger Purview Scan (if Purview enabled)
142-
- run: "$env:SKIP_PURVIEW_INTEGRATION='true'; ./scripts/automationScripts/FabricPurviewAutomation/trigger_purview_scan_for_fabric_workspace.ps1"
136+
- run: ./scripts/automationScripts/FabricPurviewAutomation/trigger_purview_scan_for_fabric_workspace.ps1
143137
interactive: false
144138
shell: pwsh
145139
continueOnError: false

docs/post_deployment_steps.md

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ After running `azd up` or `azd provision` followed by `azd hooks run postprovisi
1010
|-----------|---------------|----------------|
1111
| Fabric Capacity | Azure Portal → Microsoft Fabric capacities | **Active** (not Paused) |
1212
| Fabric Workspace | [app.fabric.microsoft.com](https://app.fabric.microsoft.com) | Workspace visible with 3 lakehouses |
13-
| PostgreSQL Mirroring (if enabled) | Fabric → Workspace → Connections/Mirror | Connection saved and mirror running |
14-
| AI Foundry Project | [ai.azure.com](https://ai.azure.com) | Project accessible, models deployed |
13+
| Microsoft Foundry project | [ai.azure.com](https://ai.azure.com) | Project accessible, models deployed |
1514
| AI Search Index | Azure Portal → AI Search → Indexes | `onelake-index` exists with documents |
1615
| Purview Scan | Purview Portal → Data Map → Sources | Fabric data source registered |
1716

@@ -48,35 +47,46 @@ az fabric capacity resume --capacity-name <capacity-name> --resource-group <rg-n
4847
5. Open the **bronze** lakehouse and verify the `Files/documents` folder structure exists
4948
6. In the workspace, check each lakehouse (**bronze**, **silver**, **gold**) and confirm the **Sensitivity label** matches the value set in the parameter file.
5049

51-
### PostgreSQL Mirroring (if enabled)
50+
### Optional PostgreSQL Mirroring Follow-Up
5251

53-
Use these short steps to verify the automatic Fabric connection and mirroring flow. For full details and troubleshooting, see [PostgreSQL mirroring](./postgresql_mirroring.md).
52+
Use these short steps to verify the PostgreSQL mirroring follow-up flow. For full details and troubleshooting, see [PostgreSQL mirroring](./postgresql_mirroring.md).
53+
54+
Mirroring in the current branch is a separate follow-up activity. Fabric connection creation and mirrored database creation are not part of `azd up`.
55+
56+
For post-deployment verification, the important distinction is simple:
57+
58+
- If you did not intentionally run the mirroring follow-up, treat mirroring as deferred and do not use it as a deployment success criterion.
59+
- If you did run the mirroring follow-up, verify the Fabric connection and mirrored database from the workspace.
60+
61+
If you need to complete mirroring after deployment, use the dedicated steps in [PostgreSQL mirroring](./postgresql_mirroring.md).
62+
63+
The PostgreSQL server's **Fabric Mirroring** page only covers the source-server prerequisite preparation. It does not replace the Fabric workspace connection and mirrored database creation steps.
5464

55-
0. In **Azure Portal****Key Vault** → your vault → **Networking**, set **Public access** to **Allow public access from specific virtual networks and IP addresses**, add your client IP, then **Apply**. This lets you read the PostgreSQL connection password from the vault.
56-
After you retrieve the secret, remove your IP and **Apply** again to re-lock the vault.
5765
1. Check the resolved mirroring identity instead of hardcoding it:
5866
- `azd env get-value postgreSqlMirrorConnectionModeOut`
5967
- `azd env get-value postgreSqlMirrorConnectionUserNameOut`
6068
- `azd env get-value postgreSqlMirrorConnectionSecretNameOut`
61-
2. Run `pwsh ./scripts/automationScripts/FabricWorkspace/Mirror/create_postgresql_mirror.ps1` if Stage 7.5 did not already complete it.
62-
3. Verify `azd env get-value fabricPostgresConnectionId` now returns a Fabric connection ID.
63-
4. In Fabric, confirm the PostgreSQL connection exists under **Connections** and that the mirrored database is running.
64-
5. If your PostgreSQL source requires a Fabric VNet gateway, set `azd env set-value fabricPostgresGatewayId "<gateway-id>"` and rerun the script.
69+
2. If you have not run the separate mirroring follow-up, stop here for this test cycle.
70+
- The deployment can still be considered successful for Fabric workspace, PostgreSQL server, and Purview automation.
71+
- PostgreSQL mirroring remains a documented follow-up item, not a same-run success criterion.
72+
3. If you want mirroring now, follow the current runbook in [PostgreSQL mirroring](./postgresql_mirroring.md).
73+
4. After the follow-up completes, verify `azd env get-value fabricPostgresConnectionId` returns a Fabric connection ID.
74+
5. In Fabric, confirm the PostgreSQL connection exists under **Connections** and that the mirrored database is running.
6575

6676
---
6777

68-
## 3. Verify AI Foundry Project
78+
## 3. Verify Microsoft Foundry Project
6979

7080
1. Navigate to [ai.azure.com](https://ai.azure.com)
71-
2. Sign in and select your AI Foundry project
81+
2. Sign in and select your Microsoft Foundry project
7282
3. Verify:
7383
- **Models** — Check that GPT-4o and text-embedding-ada-002 (or configured models) are deployed
7484
- **Connections** — AI Search connection should be listed
7585
- **Playground** — Test the chat playground with a sample query
7686

7787
### Testing AI Search Connection in Playground
7888

79-
1. In AI Foundry, go to **Playgrounds****Chat**
89+
1. In Microsoft Foundry, go to **Playgrounds****Chat**
8090
2. Click **Add your data**
8191
3. Select your AI Search index (`onelake-index`)
8292
4. Ask a question about your indexed documents
@@ -113,6 +123,16 @@ If no documents appear, check:
113123
3. Verify the Fabric data source is registered (e.g., `Fabric-Workspace-<id>`)
114124
4. Check **Scans** to see if the initial scan completed
115125

126+
If `purviewCollectionName` is left empty in [infra/main.bicepparam](../infra/main.bicepparam), the automation now uses `collection-<AZURE_ENV_NAME>`.
127+
128+
If you need to rerun the Purview steps after provisioning:
129+
130+
```powershell
131+
pwsh ./scripts/automationScripts/FabricPurviewAutomation/create_purview_collection.ps1
132+
pwsh ./scripts/automationScripts/FabricWorkspace/CreateWorkspace/register_fabric_datasource.ps1
133+
pwsh ./scripts/automationScripts/FabricPurviewAutomation/trigger_purview_scan_for_fabric_workspace.ps1
134+
```
135+
116136
### Data Lineage
117137

118138
1. In Purview, go to **Data Catalog****Browse**
@@ -125,23 +145,23 @@ If no documents appear, check:
125145

126146
When `networkIsolation` is set to `true`:
127147

128-
### Check AI Foundry Network Settings
148+
### Check Microsoft Foundry Network Settings
129149

130-
1. Go to **Azure Portal****Azure AI Foundry** → your account
150+
1. Go to **Azure Portal****Microsoft Foundry** → your account
131151
2. Click **Settings****Networking**
132152
3. Verify:
133153
- **Public network access**: Disabled (if fully isolated)
134154
- **Private endpoints**: Active connections listed
135155

136-
![Image showing the Azure Portal for AI Foundry and the settings blade](../img/provisioning/checkNetworkIsolation1.png)
156+
![Image showing the Azure Portal for Microsoft Foundry and the settings blade](../img/provisioning/checkNetworkIsolation1.png)
137157

138158
4. Open the **Workspace managed outbound access** tab to see private endpoints
139159

140160
![Image showing managed outbound access](../img/provisioning/checkNetworkIsolation2.png)
141161

142162
### Test Isolation
143163

144-
When accessing AI Foundry from outside the virtual network, you should see an access denied message:
164+
When accessing Microsoft Foundry from outside the virtual network, you should see an access denied message:
145165

146166
![Image showing access denied from public network](../img/provisioning/checkNetworkIsolation4.png)
147167

@@ -170,7 +190,7 @@ For network-isolated deployments, use Azure Bastion to access resources:
170190
![Image showing bastion login](../img/provisioning/checkNetworkIsolation8.png)
171191

172192
5. Once connected, open **Edge browser** and navigate to:
173-
- [ai.azure.com](https://ai.azure.com)AI Foundry
193+
- [ai.azure.com](https://ai.azure.com)Microsoft Foundry
174194
- [app.fabric.microsoft.com](https://app.fabric.microsoft.com) — Fabric
175195

176196
6. Complete MFA if prompted
@@ -195,9 +215,9 @@ az resource show --ids /subscriptions/<sub>/resourceGroups/<rg>/providers/Micros
195215
az fabric capacity resume --capacity-name <name> --resource-group <rg>
196216
```
197217

198-
### AI Search Connection Fails in AI Foundry Playground
218+
### AI Search Connection Fails in Microsoft Foundry Playground
199219

200-
Verify RBAC roles are assigned to the AI Foundry identities:
220+
Verify RBAC roles are assigned to the Microsoft Foundry identities:
201221

202222
```bash
203223
# Get the AI Search resource ID
@@ -208,7 +228,7 @@ az role assignment list --scope $SEARCH_ID --output table
208228
```
209229

210230
Required roles on the AI Search service:
211-
- **Search Service Contributor** — For the AI Foundry account and project managed identities
231+
- **Search Service Contributor** — For the Microsoft Foundry account and project managed identities
212232
- **Search Index Data Contributor** — For read/write access to index data
213233
- **Search Index Data Reader** — For read access to index data
214234

@@ -266,7 +286,7 @@ pwsh ./scripts/automationScripts/<path-to-script>.ps1
266286
Once verification is complete:
267287

268288
1. **Upload documents** to the bronze lakehouse for indexing
269-
2. **Test the AI Foundry playground** with your indexed content
289+
2. **Test the Microsoft Foundry playground** with your indexed content
270290
3. **Configure additional models** if needed
271-
4. **[Deploy your app](./deploy_app_from_foundry.md)** from the AI Foundry playground
291+
4. **[Deploy your app](./deploy_app_from_foundry.md)** from the Microsoft Foundry playground
272292
5. **Review governance** in Microsoft Purview

0 commit comments

Comments
 (0)