+44 07967 557183

Release Managment for AX 2012 on Visual Studio Online

To set up Release Management for AX 2012 I will be utilizing the Build and Release functions of Visual Studio Online. Below image is an overview of the process for releasing the code into our AX platform.

Release Management1 Firstly I need to set up a VSO agent on an AOS Server in the Target Environment. Log into VSO, go into your Default Collection, Agent Queues. Capture Create a new Queue for the Environment. Capture Once you have created the Queue. Download the Agent from the same screen. And extract the ZIP to C:\Agent. Run ConfigureAgent.cmd as Admin. And answer the questions to create the Agent Service. It is a good idea to set up a separate Service Account for it to run as with the appropriate permissions to SQL, AOS and AX. When prompted login to your VSO account to confirm the action. Capture You should now have a VSO Service installed running as the Service Account you specified. Capture2 The new Agent should now register back home to VSO and be visible in the Agent Queues. Capture Now you have a Release Agent installed, you can hook it up to a Release Definition. In VSO, go to the Release menu, then create a New Release Definition. Untitled Below is an example of the definition I have created to Release the Built AXModelStore onto our various Environments.   For each environment I have created, in the definition I have also created an Agent Pool and installed the Agent onto an AOS server. Capture Within the environment I have defined the Default queue as the Agent Pool in that Env. Capture I have also defined Approvers for each Environment, to ensure no one deploys the AXModelStore without the relevant Approval and checks being done first. Capture Each environment has only 1 x Task added which is to run a PowerShell script on the computer where the agent runs. To differentiate between environments the Deploy.PS1 Script uses a pre-defined set which marries up with the VSO online variable _$env:Release_EnvironmentName_  http://go.microsoft.com/fwlink?linkid=615899 The Artifacts tab of the Release Management in Visual Studio Online is where you assign the built artifact of a Full ModelStore. The Full ModelStore built artifacts includes all the Powershell Scripts and Modules, the AX ModelStore and AX Configs required to Release to an environment. Capture The clever part of the Release Management is the PowerShell Script that performs all the required actions. See below script

  1Param(
  2[ValidateSet("local", "dev", "uat", "live", "chdev", "goldsetup", ignoreCase = $true)]
  3[Parameter(Mandatory=$true)]
  4[string] $Target,
  5[switch] $RunHeadless
  6)
  7
  8Unblock-File -Path $PSScriptRoot\CodeCrib.Ax.*.dll
  9Add-Type -Path $PSScriptRoot\CodeCrib.AX.Client.dll
 10Import-Module $PSScriptRoot\CodeCrib.AX.Config.PowerShell.dll
 11Import-Module "C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Modules\AXUtilLib.Powershell\AXUtilLib.PowerShell.dll"
 12Import-Module "C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\Modules\Microsoft.Dynamics.AX.Framework.Management\Microsoft.Dynamics.AX.Framework.Management.dll"
 13Import-Module $PSScriptRoot\axhelpers.psm1
 14###################################################################
 15# Script wide config
 16###################################################################
 17$scriptDirectory = $PSScriptRoot
 18$axUpdatePortalExeLocation = "C:\Program Files\Microsoft Dynamics AX\60\Setup\AXUpdatePortal.exe"
 19$BuildNumber = $env:BUILD_BUILDNUMBER
 20
 21$environments = @{
 22"LOCAL" = @{
 23"aosServers" = @( "localhost" )
 24"aosServiceUser" = "YOURDOMAIN\AXDEVAOS"
 25"enterprisePortalUrl" = ""
 26"reportingServers" = @( "localhost" )
 27"databaseServer" = ".\AXDEV"
 28"configuration" = "build-client.axc"
 29"serverBinDir" = "C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin"
 30}
 31"DEV" = @{
 32"aosServers" = @( "AX-DEV-AOS-01" )
 33"aosServiceUser" = "YOURDOMAIN\AXAOSACC"
 34"enterprisePortalUrl" = "http://ax-uat-ent-01:93/sites/DynamicsAx"
 35"reportingServers" = @( "AX-DEV-RS-01" )
 36"databaseServer" = @( "AX-UAT-SQL-01\SQL_AX_DEV1" )
 37"modelDatabaseName" = "AX63_CDS_DEV_model"
 38"configuration" = "DEV-client.axc"
 39"serverBinDir" = "C:\Program Files\Microsoft Dynamics AX\60\Server\AX63_CDS_DEV\bin"
 40}
 41"UAT" = @{
 42"aosServers" = @( "AX-UAT-AOS-01", "AX-UAT-BAT-01" )
 43"aosServiceUser" = "YOURDOMAIN\AXAOSACC"
 44"enterprisePortalUrl" = "http://ax-uat-ent-01:83/sites/DynamicsAx"
 45"reportingServers" = @( "AX-UAT-RS-01" )
 46"databaseServer" = @( "AX-UAT-SQL-01\SQL_AX_UAT1" )
 47"modelDatabaseName" = "AX63_CDS_UAT_model"
 48"configuration" = "UAT-client.axc"
 49"serverBinDir" = "C:\Program Files\Microsoft Dynamics AX\60\Server\AX63_CDS_UAT\bin"
 50}
 51"LIVE" = @{
 52"aosServers" = @( "AX-AOS-01", "AX-AOS-02", "AX-AOS-03", "AX-AOS-04", "AX-AOS-BAT-01" )
 53"aosServiceUser" = "YOURDOMAIN\AXAOSACC"
 54"enterprisePortalUrl" = "http://ax-ent-01:83/sites/DynamicsAx/"
 55"reportingServers" = @( "AX-RS-01" )
 56"databaseServer" = @( "AX-SQL-01\SQL_AX1" )
 57"modelDatabaseName" = "AX63_CDS_PROD_model"
 58"configuration" = "production.axc"
 59"serverBinDir" = "C:\Program Files\Microsoft Dynamics AX\60\Server\AX63_CDS_PROD\bin"
 60}
 61"GOLDSETUP" = @{
 62"aosServers" = @( "WV-AX-GOLD-S" )
 63"aosServiceUser" = "YOURDOMAIN\AXDEVAOS"
 64"enterprisePortalUrl" = "http://ax-ent-01:83/sites/DynamicsAx/"
 65"reportingServers" = @( "WV-AX-GOLD-S" )
 66"databaseServer" = @( "WV-AX-GOLD-S\AXDEV" )
 67"modelDatabaseName" = "MicrosoftDynamicsAX_model"
 68"configuration" = "AXGOLD.axc"
 69"serverBinDir" = "C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin"
 70}
 71"CHDEV" = @{
 72"aosServers" = @( "AXDEV-AOS-01" )
 73"aosServiceUser" = "YOURDOMAIN\AXDEVAOS"
 74"enterprisePortalUrl" = "http://ax-ent-01:83/sites/DynamicsAx/"
 75"reportingServers" = @( "AXDEV-RS-01" )
 76"databaseServer" = @( "WV-SQL-01\AXDEV" )
 77"modelDatabaseName" = "MicrosoftDynamicsAX_model"
 78"configuration" = "AX_CH_DEV.axc"
 79"serverBinDir" = "C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin"
 80}
 81};
 82
 83###################################################################
 84# functions...
 85###################################################################
 86
 87function Reject-NewAxClients
 88{
 89if($RunHeadless.IsPresent)  { return }
 90
 91Write-Host "*************************************************************************************************************"
 92Write-Host -ForegroundColor Yellow "This is a manual step."
 93Write-Host "Please reject new connections from all AOS instances."
 94Write-Host "Please press enter when this has been completed"
 95Write-Host
 96pause
 97}
 98
 99function Accept-NewAxClients
100{
101if($RunHeadless.IsPresent)  { return }
102
103Write-Host "*************************************************************************************************************"
104Write-Host -ForegroundColor Yellow "This is a manual step."
105Write-Host "Within AX, please go to Administration Online users"
106Write-Host "On the Server Instances tab, select each AOS instance, and then click the 'Accept new clients' button"
107Write-Host
108pause
109}
110
111function Abort-IfUnmetDependencies
112{
113$clientBinDir = "C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin"
114
115if((Test-Path -Path "$clientBinDir\ax32.exe") -eq $false)
116{
117Write-Host -ForegroundColor Red "Error: The AX client is not installed on this machine. It is required to perform database synchronisation"
118exit -1
119}
120}
121
122function Restart-ReportingServers
123{
124Param(
125[Parameter(Mandatory=$true)]
126[string[]] $servers
127)
128
129foreach($server in $servers)
130{
131$service = Get-Service -Name 'ReportServer' -ComputerName $server
132
133if(($service | Select -ExpandProperty "Status") -eq "Running")
134{
135$service | Set-Service -Status Stopped
136$service | Set-Service -Status Running
137}
138}
139}
140
141function Stop-AosInstances
142{
143Param(
144[Parameter(Mandatory=$true)]
145[string[]] $servers
146)
147foreach($server in $servers)
148{
149$service = Get-Service -Name 'AOS60$01' -ComputerName $server
150
151if($service.Status -eq "Running")
152{
153Stop-service -InputObject $service
154}
155}
156}
157
158function Start-AosInstances
159{
160Param(
161[Parameter(Mandatory=$true)]
162[string[]] $servers
163)
164
165foreach($server in $servers)
166{
167$service = Get-Service -Name 'AOS60$01' -ComputerName $server
168
169if($service.Status -eq "Stopped")
170{
171Start-Service -InputObject $service
172}
173}
174}
175
176function Get-LatestModelStore
177{
178$matchingStores = [string[]] (Get-ChildItem -Path "${scriptDirectory}" -filter *.axmodelstore | Select -ExpandProperty Name)
179
180if($matchingStores.Length -eq 0)
181{
182throw "unable to find any AX Model stores in the current directory, aborting"
183}
184
185return ([string[]]($matchingStores | Sort-Object -Descending))[0]
186}
187
188function Deploy-EnterprisePortalUpdates
189{
190Param(
191[string] $url = ""
192)
193
194if($url.Length -gt 0)
195{
196 "$axUpdatePortalExeLocation" -updateall -websiteurl $url
197}
198}
199
200function CleanupMetaData
201{
202param
203(
204[string] $Server,
205[string] $Database,
206[string] $aosServiceUser,
207[string] $tempSchema,
208[string] $backupSchema
209)
210
211if($RunHeadless.IsPresent -eq $false)
212{
213Write-Host "Do you wish to remove the backup schema? [Y/N]"
214$answer = Read-Host
215}
216
217if($RunHeadless.IsPresent -or $answer.ToUpperInvariant() -eq "Y")
218{
219Write-Host "Dropping backup schema"
220Write-Host "Running Initialize-AXModelStore -AOSAccount $aosServiceUser -Drop $backupSchema -Server $Server -Database $Database -NoPrompt"
221Initialize-AXModelStore -AOSAccount $aosServiceUser -Drop $backupSchema -Server $Server -Database $Database -NoPrompt
222}
223else
224{
225Write-Host "Please remember to manually drop the schema '$backupSchemaName' before the next deployment!"
226}
227Write-Host "Dropping the Tempoary Schema and Backup Schema"
228Write-Host "Running Initialize-AXModelStore -AOSAccount $aosServiceUser -Drop $tempSchema and $backupSchema -Server $Server -Database $Database -NoPrompt"
229Initialize-AXModelStore -AOSAccount $aosServiceUser -Drop $tempSchema -Server $Server -Database $Database -NoPrompt
230#Leaving This behind just incase we need to restore .
231#Initialize-AXModelStore -AOSAccount $aosServiceUser -Drop $backupSchema -Server $Server -Database $Database -NoPrompt
232}
233
234function Write-AosShutdownImminentWarning
235{
236if($RunHeadless.IsPresent) { return }
237
238Write-Host "The AOS instances now need to be shut-down before deployment can continue"
239Write-Host -ForegroundColor Red "WARNING: This will terminate all connections to Microsoft Dynamics AX!"
240Write-Host
241$answer = Read-Host -Prompt "Do you wish to continue? [Y/N]"
242
243if($answer.ToUpperInvariant() -ne "Y")
244{
245Write-Host -ForegroundColor Yellow "deployment aborted, cleaning up meta-data."
246CleanupMetaData -Server $dbServer -Database $modelDatabaseName -aosServiceUser $aosUser -tempSchema $schema -backupSchema $backupSchema
247exit -1;
248}
249}
250
251function Create-RoleCentres
252{
253if($RunHeadless.IsPresent) { return }
254
255Write-Host "*************************************************************************************************************"
256Write-Host -Foreground Yellow "The next step is a manual step"
257Write-Host "You will need to create any role centres. Please refer to the deployment notes on how to do this"
258Write-Host
259Read-Host -Prompt "Press enter to continue"
260}
261
262function Deploy-AifPorts
263{
264if($RunHeadless.IsPresent) { return }
265
266Write-Host "*************************************************************************************************************"
267Write-Host "The next step is another manual step"
268Write-Host "You need to deploy any new AIF ports.  Please refer to the deployment notes on how to do this"
269Write-Host
270Read-Host -Prompt "Press enter to continue"
271}
272
273function Publish-Cubes
274{
275if($RunHeadless.IsPresent) { return }
276
277Write-Host "*************************************************************************************************************"
278Write-Host "The next step is another manual step"
279Write-Host "You need to redeploy the SQL cubes.  Please refer to the deployment notes on how to do this"
280Write-Host
281Read-Host -Prompt "Press enter to continue"
282}
283
284function removeCachedItems
285([string] $path, [string] $filePattern)
286{
287$files = [System.IO.Directory]::EnumerateFiles($path, $filePattern)
288foreach($file in $files)
289{
290[System.IO.File]::SetAttributes($file, [System.IO.FileAttributes]::Normal)
291[System.IO.File]::Delete($file);
292}
293}
294
295function removeCachedItemsRecursive
296([string] $path, [string] $pathPattern, [string] $filePattern)
297{
298if(Test-Path -Path $path)
299{
300$folders = [System.IO.Directory]::EnumerateDirectories($path, $pathPattern)
301foreach($folder in $folders)
302{
303removeCachedItems -path $folder -filePattern $filePattern
304}
305}
306}
307
308function Clear-AXCacheFolders
309{
310Param(
311[string] $serverBinDir = $(throw "Please supply the server bin directory location")
312)
313
314FormatBuildEvent -source "Clear-AXCacheFolders" -level "info" -message "Cleaning server label artifacts"
315$dir = [System.IO.Path]::Combine($serverBinDir, "Application\Appl\Standard")
316removeCachedItems -path "$dir" -filePattern "ax*.al?"
317
318FormatBuildEvent -source "Clear-AXCacheFolders" -level "info" -message "Cleaning server XppIL artifacts"
319$dir = [System.IO.Path]::Combine($serverBinDir, "XppIL")
320removeCachedItems -path "$dir" -filePattern "*"
321
322FormatBuildEvent -source "Clear-AXCacheFolders" -level "info" -message "Cleaning server VSAssemblies artifacts"
323$dir = [System.IO.Path]::Combine($serverBinDir, "VSAssemblies")
324removeCachedItems -path "$dir" -filePattern "*"
325
326FormatBuildEvent -source "Clear-AXCacheFolders" -level "info" -message "Cleaning client cache artifacts"
327removeCachedItems -path "$env:LOCALAPPDATA" -filePattern "ax_*.auc"
328removeCachedItems -path "$env:LOCALAPPDATA" -filePattern "ax*.kti"
329
330FormatBuildEvent -source "Clear-AXCacheFolders" -level "info" -message "Cleaning client VSAssemblies artifacts"
331$dir = [System.IO.Path]::Combine($env:LOCALAPPDATA, "Microsoft\Dynamics Ax")
332removeCachedItemsRecursive -path "$dir"  -pathPattern "VSAssemblies*" -filePattern "*"
333}
334
335function Check-OrphanSchemas
336{
337Param(
338[string] $SchemaType = $(throw "Please supply part of the Schema Name to Query")
339)
340Write-Host "Checking for Schema name like $SchemaType"
341$OBS = Invoke-Sqlcmd -QueryTimeout 65535 -ServerInstance $dbServer -Query "
342SELECT schema_name
343FROM [$modelDatabaseName].information_schema.schemata
344WHERE SCHEMA_NAME LIKE '%$SchemaType%'
345"
346$OldBackupSchema = $OBS.schema_name
347
348if ($OldBackupSchema)
349{
350Write-Host "Schema $SchemaType exists, so dropping it"
351Initialize-AXModelStore -AOSAccount $aosUser -Drop $OldBackupSchema -Server $dbServer -Database $modelDatabaseName -NoPrompt
352}
353
354else
355{Write-Host "There is no Schema like $SchemaType"}
356}
357
358###################################################################
359# Execution starts here!
360###################################################################
361# Variables to help us handle auto-rollback on deployment failure
362$hasSchemaCreated = $false
363$hasSchemaApplied = $false
364$hasSyncronised = $false
365
366#Extract Latest ModelStore
367Write-Host "Extracting Latest ModelStore File from ZIP"
368$BackUpPath = "$scriptDirectory\$BuildNumber.axmodelstore.zip"
369$Destination = "$scriptDirectory"
370Add-Type -assembly "system.io.compression.filesystem"
371[io.compression.zipfile]::ExtractToDirectory($BackUpPath, $destination)
372
373# Grab the deployment file version
374$deploymentModelStoreFile = Get-LatestModelStore
375
376# Variables to hold the deployment and backup schema names
377# NOTE WELL: AX Schema names can't have spaces, underscores, and hyphens ... and perhaps others.
378$datestamp = Get-Date -Format "yyyyMMddhhmm"
379$backupSchema = "Backup${datestamp}"
380$schema = "Deployment${datestamp}"
381
382# Configuration options
383$config = $environments[$Target.ToUpperInvariant()]
384$aosInstances = $config.aosServers
385[String]$dbServer = $config.databaseServer
386$aosUser = $config.aosServiceUser
387$reportingServers = $config.reportingServers
388$enterpriseUrl = $config.enterprisePortalUrl
389$modelDatabaseName = $config.modelDatabaseName
390$serverBinDir = $config.serverBinDir
391
392$configurationFile = [System.IO.Path]::Combine($scriptDirectory, "Config", $config.configuration)
393$modelStoreFile = [System.IO.Path]::Combine($scriptDirectory, $deploymentModelStoreFile)
394
395Write-Host "*************************************************************************"
396Write-Host " AX ModelStore Deployment to $Target"
397Write-Host "*************************************************************************"
398Write-Host -ForegroundColor Yellow "Warning: This is a semi-manual process!!"
399Write-Host "You will be prompted to perform actions within AX itself."
400Write-Host "Please ensure you have administrator access before continuing."
401Write-Host
402
403Abort-IfUnmetDependencies
404
405Write-Host "************************************************************************"
406Write-Host "Deployment Settings"
407Write-Host "************************************************************************"
408Write-Host "Target                : $target"
409Write-Host
410Write-Host "Model Store File      : $deploymentModelStoreFile"
411Write-Host "AoS instances         : $aosInstances"
412Write-Host "Aos Service User      : $aosUser"
413Write-Host "Database Server       : $dbServer"
414Write-Host "Reporting Servers     : $reportingServers"
415Write-Host "Enterprise Portal Url : $enterpriseUrl"
416Write-Host "Client Config File    : $configurationFile"
417Write-Host "************************************************************************"
418if($RunHeadless.IsPresent -eq $false)
419{
420Write-Host "Do you wish to continue? [Y/N]"
421$continue = Read-Host
422
423if($continue.ToUpperInvariant() -ne "Y") { exit }
424}
425
426Reject-NewAxClients
427
428# Only restart reporting services / ping enterprise portal if they're used.
429if($config["reportingServers"].Count -gt 0)
430{
431Restart-ReportingServers -servers $config["reportingServers"]
432}
433
434if($config["enterprisePortalServers"].Count -gt 0)
435{
436recycleEnterpriseServers -servers $config["enterprisePortalServers"]
437}
438
439try
440{
441$ErrorActionPreference = "Stop"
442
443#Checking for LeftOver TempSchema And BackupSchema then deleting
444Write-Host "Checking for Orpan Schemas from previous run"
445Check-OrphanSchemas -SchemaType "Backup2"
446Check-OrphanSchemas -SchemaType "Deployment2"
447
448Write-Host "Creating temporary schema '$schema' to hold this deployment"
449Initialize-AXModelStore -AOSAccount $aosUser -SchemaName $schema -Server $dbServer -Database $modelDatabaseName -NoPrompt
450
451Write-Host "Importing new model store into temporary schema"
452Import-AxModelStore -Server $dbServer -Database $modelDatabaseName -SchemaName $schema -File "$modelStoreFile"  -Verbose -NoPrompt
453$hasSchemaCreated = $true;
454
455Write-Host "Stopping AOS Servers"
456Stop-AoSInstances -servers $aosInstances
457
458Write-Host "Applying new schema"
459Import-AxModelStore -Server $dbServer -Database $modelDatabaseName -Apply "$schema" -BackupSchema "$backupSchema" -NoPrompt
460$hasSchemaApplied = $true
461
462Write-Host "Clearing AX Cache Folders"
463Clear-AXCacheFolders -serverBinDir $serverBinDir
464
465# Start first instance so we can perform a database sync
466Write-Host "Starting single AOS instance to perform database synchronisation"
467[string[]] $firstServer = @($aosInstances[0]);
468Start-AosInstances -servers $firstServer
469
470Write-Host "Starting Database Synchronisation"
471Invoke-DatabaseSynchronisation -ClientConfigFile $configurationFile -timeout 60
472$hasSyncronised = $true
473
474# ENTERPRISE PORTAL AND REPORTS DEPLOYMENT WORK, BUT THEY ARE HARDLY EVER DEPLOYED AND IT ADDS AN EXTRA HALF HOUR TO DEPLOYMENT.
475Write-Host "Publishing reports"
476Write-host "Publishing All AX Reports"
477Publish-AXReport -Reportname *
478$ErrorActionPreference = "Continue"
479# Publish-AllAxReports -ConfigurationFile  $configurationFile
480$ErrorActionPreference = "Stop"
481
482Create-RoleCentres
483Publish-Cubes
484Deploy-EnterprisePortalUpdates -url $enterpriseUrl
485Deploy-AifPorts
486# Accept clients
487#Accept-NewAxClients
488
489Write-Host "Cleaning up post-deploy"
490CleanupMetaData -Server $dbServer -Database $modelDatabaseName -aosServiceUser $aosUser -tempSchema $schema -backupSchema $backupSchema
491
492Write-Host "Starting all AoS instances"
493Start-AosInstances -servers $aosInstances
494}
495catch
496{
497Write-Host "Deploy failed with message '$_'"
498Write-Host "Rolling back deployment"
499
500if($hasSchemaApplied)
501{
502Write-Host "Stopping AOS Service"
503Stop-AoSInstances -servers $aosInstances
504
505Write-Host "Importing Backing Schema"
506Import-AxModelStore -Server $dbServer -Database $modelDatabaseName -Apply "$backupSchema" -NoPrompt
507
508Write-Host "Dropping old Backup Schema"
509Initialize-AXModelStore -AOSAccount $aosUser -Drop $backupSchema -Server $dbServer -Database $modelDatabaseName -NoPrompt
510
511Write-Host "Clearing XppIL and Client Cache Files"
512Clear-AXCacheFolders -serverBinDir $serverBinDir
513[string[]] $firstServer = @($aosInstances[0]);
514
515Write-Host "Starting AOS Service"
516Start-AosInstances -servers $firstServer
517}
518
519if($hasSchemaCreated)
520{
521Write-Host "Dropping New Schema since it failed to install!"
522Initialize-AXModelStore -AOSAccount $aosUser -Drop $schema -Server $dbServer -Database $modelDatabaseName -NoPrompt
523}
524
525if($hasSyncronised)
526{
527Write-Host "Re-running DB sync to revert DB changes after failed ModelStore $BuildNumber import"
528Invoke-DatabaseSynchronisation -ClientConfigFile $configurationFile -timeout 60
529}
530
531exit -1
532}

The Script takes a couple of Parameters :

  • Target - The Environment Name or the VSO Variable for it - _$env:Release_EnvironmentName_
  • RunHeadless - If passed will run silently

The Target Name reflects an array of different configurations defined within the Powershell script. Examples : The following will deploy silently to DEV deploy.ps1 -Target DEV -RunHeadless The following will deploy silently to the Environment Name in VSO deploy.ps1 -Target $env:Release_EnvironmentName -RunHeadless    There are a couple of manual steps required after the ModelStore has been automatically deployed.

  • Publish Cubes
  • Deploy Reports (Skipped due to speed)
  • Update Enterprise Portal (Skipped due to speed)
  • Creating Role Centers
  • AIF Endpoints (Will automate import in separate guide)

  Now to test a Release, Click Release, then Create Release. Capture If you have set up approvers, they will receive a notification of a requested Release, until they approve it will not continue. Once approved, go into the Release and from the Logs Tab, you will see the following Output. CaptureCapture

2015-12-17T09:18:20.8190946Z . 'c:\builds\79572c9c9\Full AX Build ModelStore\drop\deploy.ps1' -Target $env:Release_EnvironmentName -RunHeadless
2015-12-17T09:18:20.8659989Z Executing the following powershell script. (workingFolder = c:\builds\79572c9c9)
2015-12-17T09:18:20.8659989Z c:\builds\79572c9c9\Full AX Build ModelStore\drop\deploy.ps1 -Target $env:Release_EnvironmentName -RunHeadless
2015-12-17T09:18:22.6472932Z Extracting Latest ModelStore File from ZIP
2015-12-17T09:19:18.4929285Z *************************************************************************
2015-12-17T09:19:18.4929285Z  AX ModelStore Deployment to DEV
2015-12-17T09:19:18.4929285Z *************************************************************************
2015-12-17T09:19:18.5085645Z ************************************************************************
2015-12-17T09:19:18.5085645Z Deployment Settings
2015-12-17T09:19:18.5085645Z ************************************************************************
2015-12-17T09:19:18.5085645Z Target                : DEV
2015-12-17T09:19:18.5241913Z Model Store File      : 1.0.0.866.axmodelstore
2015-12-17T09:19:18.5241913Z AoS instances         : AX-DEV-AOS-01
2015-12-17T09:19:18.5398245Z Aos Service User      : YOURDOMAIN\AXAOSACC
2015-12-17T09:19:18.5398245Z Database Server       : AX-UAT-SQL-01\SQL_AX_DEV1
2015-12-17T09:19:18.5398245Z Reporting Servers     : AX-DEV-RS-01
2015-12-17T09:19:18.5398245Z Enterprise Portal Url : http://ax-uat-ent-01:93/sites/DynamicsAx
2015-12-17T09:19:18.5398245Z Client Config File    : C:\builds\79572c9c9\Full AX Build ModelStore\drop\Config\DEV-client.axc
2015-12-17T09:19:18.5398245Z ************************************************************************
2015-12-17T09:19:18.5398245Z Checking for Orpan Schemas from previous run
2015-12-17T09:19:18.5398245Z Checking for Schema name like Backup2
2015-12-17T09:19:29.0403495Z There is no Schema like Backup2
2015-12-17T09:19:29.0403495Z Checking for Schema name like Deployment2
2015-12-17T09:19:29.0403495Z There is no Schema like Deployment2
2015-12-17T09:19:29.0403495Z Creating temporary schema 'Deployment201512170919' to hold this deployment
2015-12-17T09:19:38.8530015Z Model store schema successfully created.
2015-12-17T09:19:39.1967884Z Permissions granted for YOURDOMAIN\AXAOSACC.
2015-12-17T09:19:39.2280128Z Importing new model store into temporary schema
2015-12-17T09:19:39.2593165Z VERBOSE: AXUtil 6.3 - Microsoft Dynamics AX Admin Utility (6.3.2000.3868)
2015-12-17T09:19:39.2593165Z (c) Copyright, Microsoft Corporation, 2011. All rights reserved.
2015-12-17T09:19:39.2593165Z VERBOSE:
2015-12-17T09:19:39.2593165Z VERBOSE: The AXUtil command was started in the mode: IMPORTSTORE.
2015-12-17T09:19:39.2593165Z VERBOSE:
2015-12-17T09:19:39.2748933Z VERBOSE: Working against model store AX-UAT-SQL-01\SQL_AX_DEV1/AX63_CDS_DEV_model.
2015-12-17T09:19:39.2748933Z VERBOSE:
2015-12-17T09:28:33.0431444Z The model store file C:\builds\79572c9c9\Full AX Build ModelStore\drop\1.0.0.866.axmodelstore was successfully imported.
2015-12-17T09:28:33.0587220Z Stopping AOS Servers
2015-12-17T09:28:35.3811729Z WARNING: Waiting for service 'Microsoft Dynamics AX Object Server 6.3$01-AX63_CDS_DEV (AOS60$01)' to stop...
2015-12-17T09:49:30.7108490Z WARNING: Waiting for service 'Microsoft Dynamics AX Object Server 6.3$01-AX63_CDS_DEV (AOS60$01)' to stop...
2015-12-17T09:49:32.0546556Z Applying new schema
2015-12-17T09:49:43.7269202Z Model Store schema Deployment201512170919 was successfully applied.
2015-12-17T09:49:43.7269202Z The schema [dbo] was successfully backed up in backup-schema Backup201512170919.
2015-12-17T09:49:43.7269202Z Clearing AX Cache Folders
2015-12-17T09:49:43.8831463Z 12/17/2015 09:49:43 (AOS_Running=False) (Clear-AXCacheFolders) [info]: Cleaning server label artifacts
2015-12-17T09:49:45.7425989Z 12/17/2015 09:49:45 (AOS_Running=False) (Clear-AXCacheFolders) [info]: Cleaning server XppIL artifacts
2015-12-17T09:49:47.7114002Z 12/17/2015 09:49:47 (AOS_Running=False) (Clear-AXCacheFolders) [info]: Cleaning server VSAssemblies artifacts
2015-12-17T09:49:47.7270490Z 12/17/2015 09:49:47 (AOS_Running=False) (Clear-AXCacheFolders) [info]: Cleaning client cache artifacts
2015-12-17T09:49:47.7582703Z 12/17/2015 09:49:47 (AOS_Running=False) (Clear-AXCacheFolders) [info]: Cleaning client VSAssemblies artifacts
2015-12-17T09:49:47.8364382Z Starting single AOS instance to perform database synchronisation
2015-12-17T09:49:50.5552811Z WARNING: Waiting for service 'Microsoft Dynamics AX Object Server 6.3$01-AX63_CDS_DEV (AOS60$01)' to start...
2015-12-17T09:53:59.6731030Z WARNING: Waiting for service 'Microsoft Dynamics AX Object Server 6.3$01-AX63_CDS_DEV (AOS60$01)' to start...
2015-12-17T09:54:01.5327224Z Starting Database Synchronisation
2015-12-17T10:15:30.2951281Z 12/17/2015 10:15:30 (AOS_Running=True) (Invoke-DatabaseSynchronisation) [info]: Log file output------------------------------------------------------------------
2015-12-17T10:15:30.4357606Z 12/17/2015 10:15:30 (AOS_Running=True) (Invoke-DatabaseSynchronisation) [info]:
2015-12-17T10:15:30.4357606Z  Synchronize database Cannot execute a data definition language command on DMPUserMessageView (DMPUserMessageView).
2015-12-17T10:15:30.4357606Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4357606Z  Synchronize database DMPUserMessageTable (User messages ), DMPMessageTable (Messages )
2015-12-17T10:15:30.4357606Z  Synchronize database Cannot execute a data definition language command on MSM_ObjectComponentMeterType (MSM_ObjectComponentMeterType).
2015-12-17T10:15:30.4357606Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4357606Z  Synchronize database MSM_MeterTypeTable (MSM_MeterTypeTable )
2015-12-17T10:15:30.4357606Z  Synchronize database Cannot execute a data definition language command on Component meters (MSM_ComponentTypeMeter).
2015-12-17T10:15:30.4357606Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4357606Z  Synchronize database MSM_MeterTypeTable (MSM_MeterTypeTable )
2015-12-17T10:15:30.4513795Z  Synchronize database Cannot execute a data definition language command on Non-corrective asset transactions (RAssetTransNotCorrectiveView).
2015-12-17T10:15:30.4513795Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4513795Z  Synchronize database RAssetTrans (FA transactions )
2015-12-17T10:15:30.4513795Z  Synchronize database Cannot execute a data definition language command on Corrective asset transactions (RAssetTransCorrectiveView).
2015-12-17T10:15:30.4513795Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4513795Z  Synchronize database RAssetTrans (FA transactions )
2015-12-17T10:15:30.4513795Z  Synchronize database Cannot execute a data definition language command on Asset transactions with reporting date (RAssetTransReportingView).
2015-12-17T10:15:30.4513795Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4513795Z  Synchronize database RAssetTransNotCorrectiveView (Non-corrective asset transactions )
2015-12-17T10:15:30.4513795Z  Synchronize database Cannot execute a data definition language command on the tax codes of the Total compensation statement section (HcmTotalCompStatementSectionTaxCode).
2015-12-17T10:15:30.4513795Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4513795Z  Synchronize database HcmTotalCompStatementSectionTax (the Taxes section of the Total compensation statement section form ), HcmTotalCompStatementSection (the total compensation statement section form ), PayrollTaxCode (Tax code )
2015-12-17T10:15:30.4513795Z  Synchronize database Cannot execute a data definition language command on the tax codes in tax groups of the Total compensation statement section (HcmTotalCompStatementSectionTaxGroup).
2015-12-17T10:15:30.4513795Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4513795Z  Synchronize database HcmTotalCompStatementSectionTax (the Taxes section of the Total compensation statement section form ), HcmTotalCompStatementSection (the total compensation statement section form ), PayrollTaxGroupCode (Tax group code )
2015-12-17T10:15:30.4513795Z  Synchronize database Cannot execute a data definition language command on Payroll US Tax History Consolidated (PrlUSTaxTransactionHistoryConsolidated).
2015-12-17T10:15:30.4513795Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4513795Z  Synchronize database PrlUSTaxTransactionHistory (Payroll tax transaction history ), PayrollPayStatement (Pay statements )
2015-12-17T10:15:30.4513795Z  Synchronize database Cannot execute a data definition language command on Tax region cube (PayrollTaxRegionCube).
2015-12-17T10:15:30.4513795Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4513795Z  Synchronize database PayrollTaxRegion (Tax region )
2015-12-17T10:15:30.4669918Z  Synchronize database Cannot execute a data definition language command on Position detail cube (PayrollPositionDetailCube).
2015-12-17T10:15:30.4669918Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4669918Z  Synchronize database PayrollPositionDetails (Payroll details for positions )
2015-12-17T10:15:30.4669918Z  Synchronize database Cannot execute a data definition language command on Earning code cube (PayrollEarningCodeCube).
2015-12-17T10:15:30.4669918Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4669918Z  Synchronize database PayrollEarningCode (Earning code ), PayrollEarningCodeDetail (Earning code detail )
2015-12-17T10:15:30.4669918Z  Synchronize database Cannot execute a data definition language command on Benefit accruals cube (PayrollBenefitAccrualCube).
2015-12-17T10:15:30.4669918Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4669918Z  Synchronize database PayrollAccrual (Benefit accrual plan ), PayrollWorkerEnrolledAccrual (Worker enrolled benefit accrual )
2015-12-17T10:15:30.4669918Z  Synchronize database Cannot execute a data definition language command on Worker arrears cube (PayrollArrearsCube).
2015-12-17T10:15:30.4669918Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4669918Z  Synchronize database PRLDeductionArrear (Worker arrears ), PayrollPayStatement (Pay statements ), PRLDeductionArrearRecovery (Deduction arrears recovery ), PayrollPayPeriod (Pay period ), PayrollPayCycle (Pay cycle ), PayrollPayStatement (Pay statements ), PayrollPayPeriod (Pay period ), PayrollPayCycle (Pay cycle )
2015-12-17T10:15:30.4669918Z  Synchronize database Cannot execute a data definition language command on Worker enrolled benefits (PayrollWorkerEnrolledBenefitsCube).
2015-12-17T10:15:30.4669918Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4669918Z  Synchronize database PayrollWorkerEnrolledBenefitDetail (Worker benefit enrolled detail ), PayrollBenefitDetail (Payroll benefit detail ), PayrollWorkerGarnishmentDetail (Worker garnishment detail ), PayrollPositionDetails (Payroll details for positions )
2015-12-17T10:15:30.4669918Z  Synchronize database Cannot execute a data definition language command on Pay statement cube (PayrollPayStatementCube).
2015-12-17T10:15:30.4669918Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4669918Z  Synchronize database PayrollPayStatementLine (Pay statement lines ), PayrollPayStatement (Pay statements ), PayrollPayStatementLine (Pay statement lines ), PayrollPayStatementLine (Pay statement lines ), PayrollPayStatementAccrualBalance (Payment benefit accrual balance ), PayrollPayStatementLine (Pay statement lines ), PayrollPayPeriod (Pay period ), PayrollPayStatement (Pay statements ), PayrollPayCycle (Pay cycle ), PayrollWorkerTaxRegion (Worker tax region ), PayrollPositionDetails (Payroll details for positions )
2015-12-17T10:15:30.4669918Z  Synchronize database Cannot execute a data definition language command on Employment cube (PayrollEmploymentCube).
2015-12-17T10:15:30.4669918Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4669918Z  Synchronize database PayrollPositionDetails (Payroll details for positions ), PayrollBankAccountDisbursement (Bank account disbursements )
2015-12-17T10:15:30.4826259Z  Synchronize database Cannot execute a data definition language command on Earnings statement cube (PayrollEarningStatementCube).
2015-12-17T10:15:30.4826259Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4826259Z  Synchronize database PayrollEarningStatementLine (Earnings statement lines ), PayrollEarningStatement (Earnings statements ), PayrollWorkerTaxRegion (Worker tax region ), PayrollPremiumEarningCode (Premium code ), PayrollWorkPeriod (Work period ), PayrollPayPeriod (Pay period ), PayrollPayCycle (Pay cycle ), PayrollPositionDetails (Payroll details for positions ), PayrollWorkCycle (Work cycle )
2015-12-17T10:15:30.4826259Z  Synchronize database Cannot execute a data definition language command on Benefit plan (HcmBenefitPlanCube).
2015-12-17T10:15:30.4826259Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4826259Z  Synchronize database PayrollBenefitTaxRule_US (Benefit Tax Rule US ), PayrollRetirementBenefitPlanDetail_US (Retirement Benefit Plan Detail US ), PayrollBenefitPlanDetail (Benefit plan detail ), PayrollBenefitExternalReporting (Benefit external reporting )
2015-12-17T10:15:30.4826259Z  Synchronize database Cannot execute a data definition language command on Payroll pay statement tax lines manual grouped (PayrollPayStatementTaxLinesManualGrouped).
2015-12-17T10:15:30.4826259Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4826259Z  Synchronize database PayrollPayStatementTaxLinesManual (Payroll pay statement tax lines manual ), PayrollPayStatement (Pay statements )
2015-12-17T10:15:30.4826259Z  Synchronize database Cannot execute a data definition language command on Payroll U.S. tax transaction history cube (PayrollTaxTransHistoryCube).
2015-12-17T10:15:30.4826259Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4826259Z  Synchronize database PayrollTaxTransactionHistoryUnion (Payroll US Tax History Union ), PayrollPayStatement (Pay statements ), PayrollPositionDetails (Payroll details for positions )
2015-12-17T10:15:30.4826259Z  Synchronize database Cannot execute a data definition language command on Total Compensation Statement Section Tax Cube (HcmTotalCompStatementSectionTaxAll).
2015-12-17T10:15:30.4826259Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4826259Z  Synchronize database HcmTotalCompStatementSectionTaxGroup (the tax codes in tax groups of the Total compensation statement section )
2015-12-17T10:15:30.4826259Z  Synchronize database Cannot execute a data definition language command on the benefit codes in benefit group of the Total compensation statement section (HcmTotalCompStatementSectionEarningGroup).
2015-12-17T10:15:30.4826259Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4826259Z  Synchronize database HcmTotalCompStatementSectionEarning (the Benefits section of the Total compensation statement section form ), HcmTotalCompStatementSection (the total compensation statement section form ), PayrollEarningCodeGroupCode (Earning code group earning code )
2015-12-17T10:15:30.4826259Z  Synchronize database Cannot execute a data definition language command on the benefit codes of the Total compensation statement section (HcmTotalCompStatementSectionEarningCode).
2015-12-17T10:15:30.4826259Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4982581Z  Synchronize database HcmTotalCompStatementSectionEarning (the Benefits section of the Total compensation statement section form ), HcmTotalCompStatementSection (the total compensation statement section form )
2015-12-17T10:15:30.4982581Z  Synchronize database Cannot execute a data definition language command on Total Compensation Statement Section Earning Cube (HcmTotalCompStatementSectionEarningAll).
2015-12-17T10:15:30.4982581Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4982581Z  Synchronize database HcmTotalCompStatementSectionEarningGroup (the benefit codes in benefit group of the Total compensation statement section )
2015-12-17T10:15:30.4982581Z  Synchronize database Cannot execute a data definition language command on Total Compensation Statement Section Benefit Cube (HcmTotalCompStatementSectionBenefitAll).
2015-12-17T10:15:30.4982581Z The view has been disabled. Configuration key on following table(s) is off
2015-12-17T10:15:30.4982581Z  Synchronize database HcmTotalCompStatementSectionBenefit (the Benefits section of the Total compensation statement section form ), HcmTotalCompStatementSection (the total compensation statement section form )
2015-12-17T10:15:30.4982581Z 12/17/2015 10:15:30 (AOS_Running=True) (Invoke-DatabaseSynchronisation) [info]: Log file output------------------------------------------------------------------
2015-12-17T10:15:30.5138768Z 12/17/2015 10:15:30 (AOS_Running=True) (Invoke-DatabaseSynchronisation) [info]: database synchronisation took 00:21:28.8831280
2015-12-17T10:15:30.5138768Z Cleaning up post-deploy
2015-12-17T10:15:30.5295063Z Dropping the Tempoary Schema and Backup Schema
2015-12-17T10:15:30.5295063Z Running Initialize-AXModelStore -AOSAccount YOURDOMAIN\AXAOSACC -Drop Deployment201512170919 and Backup201512170919 -Server AX-UAT-SQL-01\SQL_AX_DEV1 -Database AX63_CDS_DEV_model -NoPrompt
2015-12-17T10:15:30.9048261Z Schema Deployment201512170919 successfully dropped.
2015-12-17T10:15:31.0764152Z Starting all AoS instances