Skip to main content

Notifications

Announcements

No record found.

AX 2012 Model Promotion Steps from DEV to TEST to STAGING to PROD

BorisD Profile Picture BorisD 2,826

These are the steps that should be followed prior to stopping your AOS service.  These steps insure assemblies are properly updated.

Before stopping your AOS service you should go to System administration > Online users > Server instances tab and reject new clients on all your server instances.  

8750.Drain-AOS-Online-Users_5F00_LI.jpg

 

This well send a message out to any logged-on user and notifying them that "The administrator is shutting down the Application Object Server. You must save your work and log off. If your user session is idle, you will be logged off automatically."  

2727.Drain-AOS-Infolog.png

 

Monitor the Online users still connected through the Client sessions tab. Once you see all the users have logged of, proceed to the next step. Allow 5min for the message to pop up for the users. If you see some sessions have not ended after 15min, you can end them manually by placing a check mark next to the user name on the right and clicking End sessions. You can also select all by placing a check mark in the top box.  

2671.Client-sessions.PNG

 

Withhold specific batch jobs that might run during the maintenance period. Not all batch jobs need to be turned off. Example of a batch job that should be turned off is Invoicing batch. If you turn of the batch AOS server during the execution of an invoice batch, the job will error out and some invoices might not print out or get emailed to customers. Or duplicate invoicing can occur. Once servers are back up you can put these jobs into Waiting status and it will run the missed schedule and then put it back on schedule for the next run.  

Now you can stop your AOS Service. 

 

DEV: 

Keep in mind that in DEV you might installing models from ISV's & VAR's as well as maintaining CUS version.  

  1. Stop AOS Service   
  2. Backup Data Base in SQL Management Studio CopyOnly (Be descriptive on naming the backup )  
  3. Run Dynamics AX Management Shell with elevated rights and run Install-model command (after model is installed check to make sure in went in ok optional. Run Get-axmodel command in MS Dynamics Management Shell)   
  4. Run Build (Check the Log to make sure no errors)  
  5. Start AOS Service 
  6. Run full CIL (Make sure no errors)  
  7. Restart AOS Service 
  8. Run Data Dictionary Sync 
  9. Restart AOS Service 
  10. Restart SQL Reporting Service on AOS 
  11. Change Model Version (for CUS layer) 
  12. Export model (for CUS Layer) 

TEST:  

TEST should look just like prod except for its setting on a smaller hardware scale and settings are pointing to test servers instead on prod. This is where the code is completely test.  

  1. Stop AOS Service   
  2. Stop Management Reporter Service (Application & Process)   
  3. Stop ISV application Services  
  4. Backup Data Base in SQL Management Studio (Be descriptive on naming the backup)  
  5. Run Dynamics AX Management Shell with elevated rights and run Install-model command (after model is installed check to make sure in went in ok optional. Run Get-axmodel command in MS Dynamics Management Shell)    
  6. Run Build (Check the Log to make sure no errors) 
  7. Start AOS Service 
  8. Run full CIL (Make sure no errors)  
  9. Restart AOS Service 
  10. Run Data Dictionary Sync 
  11. Publish Reports if there is any modification in reports (if there is a lot of reports run publish-axreport command in MS Dynamics Management Shell. If there are only a few then just deploy through AOT)  
  12. Deploy Web Controls or Web Parts (if there are any) 
  13. Restart AOS Service 
  14. Restart SQL Reporting Service  
  15. Start Management Reporter Service (Application & Process) 
  16. Start ISV Application Services 
  17. Restart IIS (If any Web Controls or Web Parts were deployed) 

STAGING: 

  1. Stop AOS Service   
  2. Backup Data Base in SQL Management Studio (Be descriptive on naming the backup)  
  3. Restore Gold from Prod  
  4. Run Dynamics AX Management Shell with elevated rights and run Install-model command (after model is installed check to make sure in went in ok optional. Run Get-axmodel command in MS Dynamics Management Shell)   
  5. Run Build (Check the Log to make sure no errors) 
  6. Start AOS Service    
  7. Run full CIL (Make sure no errors) 
  8. Restart AOS Service  
  9. Run Data Dictionary Sync 
  10. Publish Reports if there is any modification in reports (if there is a lot of reports run publish-axreport command in MS Dynamics Management Shell. If there are only a few then just deploy through AOT)   
  11. Restart AOS Service 
  12. Export Model Store 

 PROD: 

These steps are if you decide on not using the alternate schema. 

  1. Stop all scheduled batch jobs that might be effect by AOS restarts (For example: Invoice batch jobs) 
  2. Stop AOS Service  
  3. Stop Management Reporter Service (Application & Process)  
  4. Stop ISV Application Services 
  5. Backup Database in SQL Management Studio (Be descriptive on naming the backup) 
  6. Import AX Model Store (optional, but strongly recommended, In the PROD environment, create an alternate schema to import the model store, this is to avoid directly updating the active schema, thus saving you 30min of time) 
  7. Start AOS Service 
  8. Run Data Dictionary Sync 
  9. Publish Reports if there is any modification in reports (if there is a lot of reports run publish-axreport command in MS Dynamics Power Shell. If there are only a few then just deploy through AOT) 
  10. Restart AOS Service 
  11. Restart SQL Reporting Service 
  12. Start Management Reporter Service (Application & Process) 
  13. Start ISV Application Services 
  14. Deploy Web Controls or Web Parts (if there are any) 
  15. Restart IIS (If any Web Controls or Web Parts were deployed) 
  16. Start all scheduled batch jobs that were withheld earlier 
  17. Log off users that have open sessions on RDS/Citrix 

PROD: 

These steps are if you decide to use the alternate schema.  

  1. import the model store into the alternate schema 
    1. Once you are ready to take down PROD

  2. Stop all scheduled batch jobs that might be effect by AOS restarts (For example: Invoice batch jobs) 
  3. Stop AOS service 
  4. Stop Management Reporter Service (Application & Process)  
  5. Stop ISV Application Services 
  6. Backup Database in SQL Management Studio (Be descriptive on naming the backup) 
  7. Swap the imported modelstore into the active schema (this process takes seconds to complete) 
  8. Start AOS service 
  9. Run Data Dictionary Sync 
  10. Publish Reports if there is any modification in reports (if there is a lot of reports run publish-axreport command in MS Dynamics Power Shell. If there are only a few then just deploy through AOT) 
  11. Restart AOS 
  12. Restart SQL Reporting Service 
  13. Start Management Reporter Service (Application & Process) 
  14. Start ISV Application Services 
  15. Deploy Web Controls or Web Parts (if there are any) 
  16. Restart IIS (If any Web Controls or Web Parts were deployed) 
  17. Start all scheduled batch jobs that were withheld earlier 
  18. Log off users that have open sessions on RDS/Citrix 

For additional information on how to and some commonly used commands see links below.

Deploying Customizations and Solutions by using Models and the Model Store [AX 2012]

https://msdn.microsoft.com/en-us/library/hh335181.aspx

AxBuild.exe for Parallel Compile on AOS of X++ to p-code [AX 2012]

https://msdn.microsoft.com/en-us/library/dn528954.aspx

AX 2012 Code Promotion & Environment Refresh

https://community.dynamics.com/ax/b/ax2012administration/archive/2018/05/09/ax-2012-code-promotion-best-practices

Comments

*This post is locked for comments