@khester/create-dynamics-app 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifacts/registry.d.ts +4 -3
- package/dist/artifacts/registry.d.ts.map +1 -1
- package/dist/artifacts/registry.js +121 -11
- package/dist/artifacts/registry.js.map +1 -1
- package/dist/artifacts/types.d.ts +1 -1
- package/dist/artifacts/types.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/injectDevTools.d.ts.map +1 -1
- package/dist/injectDevTools.js +4 -2
- package/dist/injectDevTools.js.map +1 -1
- package/dist/scaffold.d.ts +1 -0
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/scaffold.js +3 -1
- package/dist/scaffold.js.map +1 -1
- package/package.json +3 -2
- package/templates/grid-starter/ARCHITECTURE.md +66 -0
- package/templates/grid-starter/README.md +122 -0
- package/templates/grid-starter/env.example +16 -0
- package/templates/grid-starter/gitignore +6 -0
- package/templates/grid-starter/index.html +16 -0
- package/templates/grid-starter/package.json +39 -0
- package/templates/grid-starter/src/App.tsx +23 -0
- package/templates/grid-starter/src/core/services/FetchApiService.ts +117 -0
- package/templates/grid-starter/src/core/services/IApiService.ts +37 -0
- package/templates/grid-starter/src/core/services/MockApiService.ts +72 -0
- package/templates/grid-starter/src/core/services/ServiceFactory.ts +58 -0
- package/templates/grid-starter/src/core/services/XrmApiService.ts +135 -0
- package/templates/grid-starter/src/core/services/crudLogging.ts +52 -0
- package/templates/grid-starter/src/dev-tools/DevPanel.tsx +239 -0
- package/templates/grid-starter/src/grid/GridPage.tsx +119 -0
- package/templates/grid-starter/src/index.tsx +18 -0
- package/templates/grid-starter/src/vite-env.d.ts +15 -0
- package/templates/grid-starter/tools/deploy/deploy-webresource.cjs +117 -0
- package/templates/grid-starter/tsconfig.json +19 -0
- package/templates/grid-starter/vite.config.ts +76 -0
- package/templates/pcf-field/_variants/ValueInput.boolean.tsx +2 -0
- package/templates/pcf-field/_variants/ValueInput.date.tsx +2 -0
- package/templates/pcf-field/_variants/ValueInput.number.tsx +2 -0
- package/templates/pcf-field/_variants/ValueInput.optionset.tsx +77 -0
- package/templates/pcf-field/_variants/ValueInput.text.tsx +2 -0
- package/templates/pcf-field/index.ts +1 -1
- package/templates/pcf-field/package.json +3 -1
- package/templates/pcf-field/{{componentName}}Component.tsx +2 -0
- package/templates/react-custom-page/ARCHITECTURE.md +75 -0
- package/templates/react-custom-page/README.md +74 -568
- package/templates/react-custom-page/env.example +16 -0
- package/templates/react-custom-page/gitignore +1 -0
- package/templates/react-custom-page/index.html +16 -0
- package/templates/react-custom-page/package.json +21 -49
- package/templates/react-custom-page/src/App.tsx +26 -0
- package/templates/react-custom-page/src/core/recordContext.test.ts +30 -0
- package/templates/react-custom-page/src/core/recordContext.ts +51 -0
- package/templates/react-custom-page/src/core/services/FetchApiService.ts +117 -0
- package/templates/react-custom-page/src/core/services/IApiService.ts +37 -0
- package/templates/react-custom-page/src/core/services/MockApiService.ts +73 -0
- package/templates/react-custom-page/src/core/services/ServiceFactory.ts +58 -0
- package/templates/react-custom-page/src/core/services/XrmApiService.ts +135 -0
- package/templates/react-custom-page/src/core/services/crudLogging.ts +52 -0
- package/templates/react-custom-page/src/dev-tools/DevPanel.tsx +238 -0
- package/templates/react-custom-page/src/domain/diff.test.ts +87 -0
- package/templates/react-custom-page/src/domain/diff.ts +38 -0
- package/templates/react-custom-page/src/example/ExamplePage.tsx +140 -0
- package/templates/react-custom-page/src/example/exampleError.ts +36 -0
- package/templates/react-custom-page/src/example/hooks/useExampleData.ts +40 -0
- package/templates/react-custom-page/src/example/hooks/useExampleForm.ts +99 -0
- package/templates/react-custom-page/src/example/mappers/accountMapper.test.ts +38 -0
- package/templates/react-custom-page/src/example/mappers/accountMapper.ts +55 -0
- package/templates/react-custom-page/src/example/models/Account.ts +74 -0
- package/templates/react-custom-page/src/index.tsx +18 -128
- package/templates/react-custom-page/src/vite-env.d.ts +15 -0
- package/templates/react-custom-page/tools/deploy/deploy-webresource.cjs +117 -0
- package/templates/react-custom-page/tsconfig.json +12 -22
- package/templates/react-custom-page/vite.config.ts +76 -0
- package/templates/starter-page/README.md +38 -0
- package/templates/starter-page/_variants/App.dashboard.v8.tsx +46 -0
- package/templates/starter-page/_variants/App.form.v8.tsx +59 -0
- package/templates/starter-page/_variants/App.master-detail.v8.tsx +61 -0
- package/templates/starter-page/_variants/App.panel.v8.tsx +99 -0
- package/templates/starter-page/gitignore +5 -0
- package/templates/starter-page/package.json +27 -0
- package/templates/starter-page/public/index.html +11 -0
- package/templates/starter-page/src/index.tsx +10 -0
- package/templates/starter-page/src/services/dataverse.ts +30 -0
- package/templates/starter-page/tsconfig.json +15 -0
- package/templates/starter-page/webpack.config.js +17 -0
- package/templates/react-custom-page/deployment/README.md +0 -484
- package/templates/react-custom-page/docs/ARCHITECTURE_OVERVIEW.md +0 -506
- package/templates/react-custom-page/docs/BEST_PRACTICES.md +0 -723
- package/templates/react-custom-page/docs/MIGRATION_GUIDE.md +0 -447
- package/templates/react-custom-page/public/index.html +0 -15
- package/templates/react-custom-page/scripts/custom-build.js +0 -255
- package/templates/react-custom-page/src/components/AccountForm.css +0 -71
- package/templates/react-custom-page/src/components/AccountForm.tsx +0 -541
- package/templates/react-custom-page/src/components/AccountManagement.css +0 -86
- package/templates/react-custom-page/src/components/AccountManagement.tsx +0 -370
- package/templates/react-custom-page/src/components/ContactForm.css +0 -48
- package/templates/react-custom-page/src/components/ContactForm.tsx +0 -327
- package/templates/react-custom-page/src/components/ContactManagement.css +0 -86
- package/templates/react-custom-page/src/components/ContactManagement.tsx +0 -357
- package/templates/react-custom-page/src/components/Logging/LogDialog.tsx +0 -291
- package/templates/react-custom-page/src/components/Logging/LoggingContext.tsx +0 -166
- package/templates/react-custom-page/src/components/Logging/LoggingDebugPanel.css +0 -192
- package/templates/react-custom-page/src/components/Logging/LoggingDebugPanel.tsx +0 -177
- package/templates/react-custom-page/src/components/Logging/LoggingProvider.tsx +0 -3
- package/templates/react-custom-page/src/components/Logging/logger.ts +0 -193
- package/templates/react-custom-page/src/constants/account.ts +0 -410
- package/templates/react-custom-page/src/constants/contact.ts +0 -362
- package/templates/react-custom-page/src/models/Account.ts +0 -480
- package/templates/react-custom-page/src/models/BaseEntity.ts +0 -204
- package/templates/react-custom-page/src/models/Contact.ts +0 -580
- package/templates/react-custom-page/src/pcf/ContactControlWrapper.tsx +0 -107
- package/templates/react-custom-page/src/pcf/MultiEntityControlWrapper.tsx +0 -205
- package/templates/react-custom-page/src/providers/DynamicsProvider.tsx +0 -353
- package/templates/react-custom-page/src/services/MockApiService.ts +0 -260
- package/templates/react-custom-page/src/services/ServiceFactory.ts +0 -65
- package/templates/react-custom-page/src/services/XrmApiService.ts +0 -213
- package/templates/react-custom-page/src/styles/index.css +0 -171
- package/templates/react-custom-page/tools/metadata-sync/index.js +0 -152
- package/templates/react-custom-page/webpack.config.js +0 -57
- /package/templates/_shared/dev-tools/auth/{get-token.js → get-token.cjs} +0 -0
|
@@ -1,484 +0,0 @@
|
|
|
1
|
-
# Deployment Automation Suite
|
|
2
|
-
|
|
3
|
-
This directory contains comprehensive deployment automation tools for Dynamics 365 consulting
|
|
4
|
-
projects.
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
The deployment automation suite provides:
|
|
9
|
-
|
|
10
|
-
- **Cross-platform deployment scripts** (PowerShell and Bash)
|
|
11
|
-
- **Environment-specific configuration management**
|
|
12
|
-
- **Automated backup and rollback capabilities**
|
|
13
|
-
- **Web resource and solution deployment**
|
|
14
|
-
- **Post-deployment testing and validation**
|
|
15
|
-
- **Notification and reporting systems**
|
|
16
|
-
|
|
17
|
-
## Directory Structure
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
deployment/
|
|
21
|
-
├── scripts/
|
|
22
|
-
│ ├── deploy.ps1 # PowerShell deployment script (Windows)
|
|
23
|
-
│ ├── deploy.sh # Bash deployment script (Linux/macOS)
|
|
24
|
-
│ ├── rollback.ps1 # Rollback automation
|
|
25
|
-
│ └── health-check.ps1 # Environment health monitoring
|
|
26
|
-
├── templates/
|
|
27
|
-
│ ├── solution-template.xml # Solution deployment template
|
|
28
|
-
│ └── web-resource-config.json # Web resource configuration
|
|
29
|
-
├── logs/ # Deployment logs (auto-created)
|
|
30
|
-
├── backups/ # Environment backups (auto-created)
|
|
31
|
-
├── pipelines/
|
|
32
|
-
│ ├── azure-pipelines.yml # Azure DevOps pipeline
|
|
33
|
-
│ ├── github-actions.yml # GitHub Actions workflow
|
|
34
|
-
│ └── jenkins.groovy # Jenkins pipeline
|
|
35
|
-
└── README.md # This file
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Quick Start
|
|
39
|
-
|
|
40
|
-
### Prerequisites
|
|
41
|
-
|
|
42
|
-
#### For PowerShell (Windows)
|
|
43
|
-
|
|
44
|
-
```powershell
|
|
45
|
-
# Install required PowerShell modules
|
|
46
|
-
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
|
|
47
|
-
Install-Module -Name Microsoft.PowerApps.PowerShell
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
#### For Bash (Linux/macOS)
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
# Install required tools
|
|
54
|
-
brew install jq curl node npm # macOS
|
|
55
|
-
# or
|
|
56
|
-
apt-get install jq curl nodejs npm # Ubuntu/Debian
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Basic Deployment
|
|
60
|
-
|
|
61
|
-
#### Windows (PowerShell)
|
|
62
|
-
|
|
63
|
-
```powershell
|
|
64
|
-
# Deploy to development
|
|
65
|
-
.\deployment\scripts\deploy.ps1 -Environment dev
|
|
66
|
-
|
|
67
|
-
# Deploy to production with backup
|
|
68
|
-
.\deployment\scripts\deploy.ps1 -Environment prod
|
|
69
|
-
|
|
70
|
-
# Dry run for testing
|
|
71
|
-
.\deployment\scripts\deploy.ps1 -Environment prod -DryRun
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
#### Linux/macOS (Bash)
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
# Deploy to development
|
|
78
|
-
./deployment/scripts/deploy.sh dev
|
|
79
|
-
|
|
80
|
-
# Deploy to production with backup
|
|
81
|
-
./deployment/scripts/deploy.sh prod
|
|
82
|
-
|
|
83
|
-
# Dry run for testing
|
|
84
|
-
./deployment/scripts/deploy.sh prod --dry-run
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Configuration
|
|
88
|
-
|
|
89
|
-
### Environment Configuration
|
|
90
|
-
|
|
91
|
-
Each environment requires a configuration file in `config/environments/`:
|
|
92
|
-
|
|
93
|
-
```json
|
|
94
|
-
{
|
|
95
|
-
"name": "Production",
|
|
96
|
-
"dynamics365": {
|
|
97
|
-
"orgUrl": "https://client.crm.dynamics.com",
|
|
98
|
-
"webApiUrl": "https://client.api.crm.dynamics.com/api/data/v9.2",
|
|
99
|
-
"tenantId": "your-tenant-id",
|
|
100
|
-
"environmentId": "your-environment-id"
|
|
101
|
-
},
|
|
102
|
-
"authentication": {
|
|
103
|
-
"type": "oauth2",
|
|
104
|
-
"clientId": "your-client-id",
|
|
105
|
-
"clientSecret": "your-client-secret"
|
|
106
|
-
},
|
|
107
|
-
"deployment": {
|
|
108
|
-
"strategy": "blue-green",
|
|
109
|
-
"rollbackEnabled": true,
|
|
110
|
-
"approvalRequired": true
|
|
111
|
-
},
|
|
112
|
-
"notifications": {
|
|
113
|
-
"deploymentSuccess": {
|
|
114
|
-
"enabled": true,
|
|
115
|
-
"channels": ["email", "teams"]
|
|
116
|
-
},
|
|
117
|
-
"deploymentFailure": {
|
|
118
|
-
"enabled": true,
|
|
119
|
-
"channels": ["email", "teams", "sms"]
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Solution Configuration
|
|
126
|
-
|
|
127
|
-
For solution-based deployments, place solution files in the `solutions/` directory:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
solutions/
|
|
131
|
-
├── 01-DynamicsUIKit_Base_1_0_0_0.zip
|
|
132
|
-
├── 02-DynamicsUIKit_Components_1_0_0_0.zip
|
|
133
|
-
└── 03-ClientCustomizations_1_0_0_0.zip
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Deployment Options
|
|
137
|
-
|
|
138
|
-
### PowerShell Deployment Options
|
|
139
|
-
|
|
140
|
-
```powershell
|
|
141
|
-
# Basic deployment
|
|
142
|
-
.\deploy.ps1 -Environment <env>
|
|
143
|
-
|
|
144
|
-
# Advanced options
|
|
145
|
-
.\deploy.ps1 -Environment <env> [OPTIONS]
|
|
146
|
-
|
|
147
|
-
Options:
|
|
148
|
-
-Environment <string> Target environment (dev, test, staging, prod)
|
|
149
|
-
-ConfigPath <string> Configuration directory path
|
|
150
|
-
-DryRun Perform dry run without changes
|
|
151
|
-
-Force Force deployment even if errors occur
|
|
152
|
-
-SolutionPath <string> Solution files directory
|
|
153
|
-
-SkipBackup Skip environment backup
|
|
154
|
-
-Verbose Enable verbose output
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
### Bash Deployment Options
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
# Basic deployment
|
|
161
|
-
./deploy.sh <environment>
|
|
162
|
-
|
|
163
|
-
# Advanced options
|
|
164
|
-
./deploy.sh [OPTIONS] <environment>
|
|
165
|
-
|
|
166
|
-
Options:
|
|
167
|
-
-c, --config-path PATH Configuration directory path
|
|
168
|
-
-s, --solution-path PATH Solution files directory path
|
|
169
|
-
-n, --dry-run Perform dry run without changes
|
|
170
|
-
-f, --force Force deployment even if errors occur
|
|
171
|
-
--skip-backup Skip environment backup
|
|
172
|
-
-v, --verbose Enable verbose output
|
|
173
|
-
-h, --help Show help message
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## Deployment Process
|
|
177
|
-
|
|
178
|
-
### 1. Pre-Deployment Phase
|
|
179
|
-
|
|
180
|
-
- ✅ Load environment configuration
|
|
181
|
-
- ✅ Validate prerequisites and dependencies
|
|
182
|
-
- ✅ Check authentication and permissions
|
|
183
|
-
- ✅ Create environment backup (optional)
|
|
184
|
-
- ✅ Run pre-deployment tests
|
|
185
|
-
|
|
186
|
-
### 2. Build Phase
|
|
187
|
-
|
|
188
|
-
- ✅ Build application with `npm run build:prod`
|
|
189
|
-
- ✅ Validate build artifacts
|
|
190
|
-
- ✅ Prepare web resources for deployment
|
|
191
|
-
- ✅ Package solutions (if applicable)
|
|
192
|
-
|
|
193
|
-
### 3. Deployment Phase
|
|
194
|
-
|
|
195
|
-
- ✅ Deploy web resources to Dynamics 365
|
|
196
|
-
- ✅ Import and activate solutions
|
|
197
|
-
- ✅ Publish all customizations
|
|
198
|
-
- ✅ Configure security roles and permissions
|
|
199
|
-
- ✅ Update system configurations
|
|
200
|
-
|
|
201
|
-
### 4. Post-Deployment Phase
|
|
202
|
-
|
|
203
|
-
- ✅ Run health checks and validation tests
|
|
204
|
-
- ✅ Verify web resource accessibility
|
|
205
|
-
- ✅ Test critical functionality
|
|
206
|
-
- ✅ Send deployment notifications
|
|
207
|
-
- ✅ Generate deployment report
|
|
208
|
-
|
|
209
|
-
### 5. Monitoring Phase
|
|
210
|
-
|
|
211
|
-
- ✅ Monitor system performance
|
|
212
|
-
- ✅ Track user adoption metrics
|
|
213
|
-
- ✅ Alert on any issues or errors
|
|
214
|
-
- ✅ Schedule maintenance tasks
|
|
215
|
-
|
|
216
|
-
## CI/CD Integration
|
|
217
|
-
|
|
218
|
-
### Azure DevOps Pipeline
|
|
219
|
-
|
|
220
|
-
```yaml
|
|
221
|
-
# azure-pipelines.yml
|
|
222
|
-
trigger:
|
|
223
|
-
branches:
|
|
224
|
-
include:
|
|
225
|
-
- main
|
|
226
|
-
- develop
|
|
227
|
-
|
|
228
|
-
pool:
|
|
229
|
-
vmImage: 'windows-latest'
|
|
230
|
-
|
|
231
|
-
stages:
|
|
232
|
-
- stage: Build
|
|
233
|
-
jobs:
|
|
234
|
-
- job: BuildJob
|
|
235
|
-
steps:
|
|
236
|
-
- task: NodeTool@0
|
|
237
|
-
inputs:
|
|
238
|
-
versionSpec: '18.x'
|
|
239
|
-
- script: npm ci
|
|
240
|
-
- script: npm run build:prod
|
|
241
|
-
- task: PublishBuildArtifacts@1
|
|
242
|
-
|
|
243
|
-
- stage: DeployDev
|
|
244
|
-
condition: eq(variables['Build.SourceBranch'], 'refs/heads/develop')
|
|
245
|
-
jobs:
|
|
246
|
-
- deployment: DeployToDev
|
|
247
|
-
environment: 'Dynamics365-Dev'
|
|
248
|
-
strategy:
|
|
249
|
-
runOnce:
|
|
250
|
-
deploy:
|
|
251
|
-
steps:
|
|
252
|
-
- task: PowerShell@2
|
|
253
|
-
inputs:
|
|
254
|
-
filePath: '$(Pipeline.Workspace)/drop/deployment/scripts/deploy.ps1'
|
|
255
|
-
arguments: '-Environment dev'
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### GitHub Actions Workflow
|
|
259
|
-
|
|
260
|
-
```yaml
|
|
261
|
-
# .github/workflows/deploy.yml
|
|
262
|
-
name: Deploy to Dynamics 365
|
|
263
|
-
|
|
264
|
-
on:
|
|
265
|
-
push:
|
|
266
|
-
branches: [main, develop]
|
|
267
|
-
pull_request:
|
|
268
|
-
branches: [main]
|
|
269
|
-
|
|
270
|
-
jobs:
|
|
271
|
-
build:
|
|
272
|
-
runs-on: ubuntu-latest
|
|
273
|
-
steps:
|
|
274
|
-
- uses: actions/checkout@v3
|
|
275
|
-
- uses: actions/setup-node@v3
|
|
276
|
-
with:
|
|
277
|
-
node-version: '18'
|
|
278
|
-
cache: 'npm'
|
|
279
|
-
- run: npm ci
|
|
280
|
-
- run: npm run build:prod
|
|
281
|
-
- uses: actions/upload-artifact@v3
|
|
282
|
-
with:
|
|
283
|
-
name: build-artifacts
|
|
284
|
-
path: dist/
|
|
285
|
-
|
|
286
|
-
deploy-dev:
|
|
287
|
-
if: github.ref == 'refs/heads/develop'
|
|
288
|
-
needs: build
|
|
289
|
-
runs-on: ubuntu-latest
|
|
290
|
-
environment: development
|
|
291
|
-
steps:
|
|
292
|
-
- uses: actions/checkout@v3
|
|
293
|
-
- uses: actions/download-artifact@v3
|
|
294
|
-
with:
|
|
295
|
-
name: build-artifacts
|
|
296
|
-
path: dist/
|
|
297
|
-
- name: Deploy to Development
|
|
298
|
-
run: ./deployment/scripts/deploy.sh dev
|
|
299
|
-
env:
|
|
300
|
-
D365_CLIENT_ID: ${{ secrets.D365_DEV_CLIENT_ID }}
|
|
301
|
-
D365_CLIENT_SECRET: ${{ secrets.D365_DEV_CLIENT_SECRET }}
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
## Backup and Rollback
|
|
305
|
-
|
|
306
|
-
### Automatic Backup
|
|
307
|
-
|
|
308
|
-
The deployment scripts automatically create backups before deployment:
|
|
309
|
-
|
|
310
|
-
```bash
|
|
311
|
-
# Backups are stored in deployment/backups/
|
|
312
|
-
backup-prod-20231201-143022.tar.gz
|
|
313
|
-
backup-test-20231201-120045.tar.gz
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
### Manual Rollback
|
|
317
|
-
|
|
318
|
-
```powershell
|
|
319
|
-
# PowerShell rollback
|
|
320
|
-
.\deployment\scripts\rollback.ps1 -Environment prod -BackupFile "backup-prod-20231201-143022.tar.gz"
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
```bash
|
|
324
|
-
# Bash rollback
|
|
325
|
-
./deployment/scripts/rollback.sh prod backup-prod-20231201-143022.tar.gz
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
## Monitoring and Health Checks
|
|
329
|
-
|
|
330
|
-
### Automated Health Monitoring
|
|
331
|
-
|
|
332
|
-
```powershell
|
|
333
|
-
# Run health checks
|
|
334
|
-
.\deployment\scripts\health-check.ps1 -Environment prod
|
|
335
|
-
|
|
336
|
-
# Schedule regular health checks
|
|
337
|
-
Register-ScheduledTask -TaskName "D365HealthCheck" -Trigger (New-ScheduledTaskTrigger -Daily -At 2am)
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
### Monitoring Endpoints
|
|
341
|
-
|
|
342
|
-
The deployment includes health check endpoints:
|
|
343
|
-
|
|
344
|
-
- `/api/health` - Basic health status
|
|
345
|
-
- `/api/health/detailed` - Detailed system information
|
|
346
|
-
- `/api/health/dependencies` - External dependency status
|
|
347
|
-
|
|
348
|
-
## Troubleshooting
|
|
349
|
-
|
|
350
|
-
### Common Issues
|
|
351
|
-
|
|
352
|
-
#### Authentication Failures
|
|
353
|
-
|
|
354
|
-
```bash
|
|
355
|
-
# Check service principal permissions
|
|
356
|
-
./deployment/scripts/test-auth.sh prod
|
|
357
|
-
|
|
358
|
-
# Verify configuration
|
|
359
|
-
./deployment/scripts/validate-config.sh prod
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
#### Web Resource Deployment Issues
|
|
363
|
-
|
|
364
|
-
```powershell
|
|
365
|
-
# Check file permissions and sizes
|
|
366
|
-
.\deployment\scripts\validate-webresources.ps1
|
|
367
|
-
|
|
368
|
-
# Test individual web resource deployment
|
|
369
|
-
.\deployment\scripts\deploy-webresource.ps1 -Name "dynamics_ui_kit_index_js" -File "dist/index.js"
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
#### Solution Import Failures
|
|
373
|
-
|
|
374
|
-
```bash
|
|
375
|
-
# Validate solution file
|
|
376
|
-
./deployment/scripts/validate-solution.sh solutions/MyApp_1_0_0_0.zip
|
|
377
|
-
|
|
378
|
-
# Check dependencies
|
|
379
|
-
./deployment/scripts/check-dependencies.sh prod
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
### Debug Mode
|
|
383
|
-
|
|
384
|
-
Enable verbose logging for troubleshooting:
|
|
385
|
-
|
|
386
|
-
```bash
|
|
387
|
-
# Enable debug mode
|
|
388
|
-
./deployment/scripts/deploy.sh prod --verbose
|
|
389
|
-
|
|
390
|
-
# Check deployment logs
|
|
391
|
-
tail -f deployment/logs/deploy-prod-*.log
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
### Log Analysis
|
|
395
|
-
|
|
396
|
-
```bash
|
|
397
|
-
# Search for errors in logs
|
|
398
|
-
grep "ERROR" deployment/logs/deploy-prod-*.log
|
|
399
|
-
|
|
400
|
-
# Check deployment timing
|
|
401
|
-
grep "completed" deployment/logs/deploy-prod-*.log
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
## Security Best Practices
|
|
405
|
-
|
|
406
|
-
### Secure Configuration Management
|
|
407
|
-
|
|
408
|
-
1. **Never commit secrets** to version control
|
|
409
|
-
2. **Use Azure Key Vault** for production secrets
|
|
410
|
-
3. **Implement least privilege** access policies
|
|
411
|
-
4. **Enable audit logging** for all operations
|
|
412
|
-
5. **Use managed identities** where possible
|
|
413
|
-
|
|
414
|
-
### Environment Isolation
|
|
415
|
-
|
|
416
|
-
```json
|
|
417
|
-
{
|
|
418
|
-
"security": {
|
|
419
|
-
"enableAuditLogging": true,
|
|
420
|
-
"requireMFA": true,
|
|
421
|
-
"sessionTimeout": 480,
|
|
422
|
-
"enableConditionalAccess": true,
|
|
423
|
-
"allowedIPs": ["203.0.113.0/24"],
|
|
424
|
-
"dataLossPreventionEnabled": true
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
## Performance Optimization
|
|
430
|
-
|
|
431
|
-
### Deployment Speed Optimization
|
|
432
|
-
|
|
433
|
-
1. **Parallel web resource uploads**
|
|
434
|
-
2. **Incremental solution deployments**
|
|
435
|
-
3. **Delta-only updates**
|
|
436
|
-
4. **Compressed file transfers**
|
|
437
|
-
5. **Cached build artifacts**
|
|
438
|
-
|
|
439
|
-
### Resource Optimization
|
|
440
|
-
|
|
441
|
-
```json
|
|
442
|
-
{
|
|
443
|
-
"performance": {
|
|
444
|
-
"enableCaching": true,
|
|
445
|
-
"cacheTimeout": 300,
|
|
446
|
-
"batchSize": 100,
|
|
447
|
-
"timeoutMs": 30000,
|
|
448
|
-
"retryAttempts": 3,
|
|
449
|
-
"enableCompression": true
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
## Support and Maintenance
|
|
455
|
-
|
|
456
|
-
### Regular Maintenance Tasks
|
|
457
|
-
|
|
458
|
-
1. **Clean up old backups** (automated)
|
|
459
|
-
2. **Monitor deployment metrics**
|
|
460
|
-
3. **Update deployment scripts**
|
|
461
|
-
4. **Review security configurations**
|
|
462
|
-
5. **Test disaster recovery procedures**
|
|
463
|
-
|
|
464
|
-
### Getting Help
|
|
465
|
-
|
|
466
|
-
- **Documentation**: Check this README and inline script comments
|
|
467
|
-
- **Logs**: Review deployment logs in `deployment/logs/`
|
|
468
|
-
- **Support**: Contact the development team with log files
|
|
469
|
-
- **Community**: Check GitHub issues and discussions
|
|
470
|
-
|
|
471
|
-
## Contributing
|
|
472
|
-
|
|
473
|
-
When contributing to the deployment automation:
|
|
474
|
-
|
|
475
|
-
1. **Test thoroughly** in development environment
|
|
476
|
-
2. **Follow naming conventions** for scripts and configurations
|
|
477
|
-
3. **Document all parameters** and options
|
|
478
|
-
4. **Include error handling** and validation
|
|
479
|
-
5. **Update this README** with any changes
|
|
480
|
-
|
|
481
|
-
---
|
|
482
|
-
|
|
483
|
-
This deployment automation suite enables reliable, repeatable, and scalable deployments for Dynamics
|
|
484
|
-
365 consulting projects across multiple clients and environments.
|