| Here is the deployment checklist used by Sabre's team provided here as an example. This is probably too complex for small organization or organization that do not develop xplanner but it will give a good idea of what can be done with a mysql production environment with. |
This page described the checklist we need to perform for any deployment of XPlanner.
This list must be complete and any steps documented there. If you know there are other issues to be tested or steps to be done, please add them here.
Strategy
We use the same Tomcat instance both for production and rehearsal web applications.
The databases are installed on two databases servers; one for production and one for rehearsal. Both of them are run as Windows service.
- Before the migration
- The webapp should be called
xplannerand be deployed in WEBAPP_PRODUCTION_DIR - The database should be installed on MYSQL_PRODUCTION
- The webapp should be called
- During the migration:
- The web applications should be installed in WEBAPP_REHEARSAL_DIR
- The old webapp should be called
xplanner_old - The new webapp should be called
xplanner_new
- The old webapp should be called
- The database should be installed on MYSQL_REHEARSAL
- The web applications should be installed in WEBAPP_REHEARSAL_DIR
- After the migration:
- The webapp should be called
xplannerand be deployed in WEBAPP_PRODUCTION_DIR - The production database should be installed on MYSQL_PRODUCTION
- The backup database should be installed on MYSQL_REHEARSAL
- The webapp should be called
When rolling out we want to do the following to the production tomcat webapps:
- rename
WEBAPP_PRODUCTION_DIR/xplannerwebapp toWEBAPP_REHEARSAL_DIR/xplanner_old - copy
xplanner.warfrom staging toWEBAPP_REHEARSAL_DIR/xplanner_new - test if
xplanner_oldworks ok with a copy of the production database - test if
xplanner_newworks ok with an updated copy of the production database - After we have verified that the rollout is successful, rename
WEBAPP_REHEARSAL_DIR/xplanner_newtoWEBAPP_PRODUCTION_DIR/xplanner, change properties to point at MYSQL_PRODUCTION database
Since InnoDB table space does not support database renaming by renaming the database associated directory: for a database mydb the associated directory is MYSQL_HOME/data/mydb, we will have to switch database
Procedure
Tips
| Scheduling emails in Outlook Consider scheduling the email to be sent automatically 1 hour before you expect to start, especially if you're coming in early. |
| Remote production database access setup If the production databases are not accessible from a remote machine, run the following statement: |
Relevant paths
Variable |
Path |
Description |
|---|---|---|
TOMCAT_PRODUCTION_DIR |
|
Production tomcat dir |
TOMCAT_REHEARSAL_DIR |
|
Reheasal tomcat dir |
WEBAPP_REHEARSAL_DIR |
|
Directory where to copy the new and old release to be tested |
WEBAPP_PRODUCTION_DIR |
|
Directory where to copy the product release |
BACKUP_DIR |
|
Directory where to copy the previous production release webapp and database dump |
TOMCAT_PRODUCTION_WORK_DIR |
|
Directory where tomcat webapp deployment by-products are stored. Make sure it gets cleaned otherwise you could get some stale pages |
TOMCAT_REHEARSAL_WORK_DIR |
|
Directory where tomcat webapp deployment by-products are stored. Make sure it gets cleaned otherwise you could get some stale pages |
MYSQL_PRODUCTION_DATA |
|
Directory used by "MySQL - XPlanner prodution" to store data |
MYSQL_REHEARSAL_DATA |
|
Directory used by "MySQL - XPlanner rehearsal" to store data |
Tomcat instances
Variable |
Running method |
Service name |
Startup script name |
Shutdown script name |
Port |
Webapp path |
Description |
|---|---|---|---|---|---|---|---|
TOMCAT_PRODUCTION |
As service |
Tomcat - XPlanner |
startup-xplanner.bat |
shutdown-xplanner.bat |
8081 |
Production application |
|
TOMCAT_REHEARSAL |
command line |
- |
startup-xplanner-rehearsal.bat |
shutdown-xplanner-rehearsal.bat |
8084 |
Reheasal applications |
Databases
Variable |
Service name |
Port |
Data path |
Description |
|---|---|---|---|---|
MYSQL_PRODUCTION |
MySQL - XPlanner production |
3308 |
Production database |
|
MYSQL_REHEARSAL |
MySQL - XPlanner rehearsal |
3309 |
Rehearsal database |
Steps
- webapp steps
- database steps
- email steps
- very, very important
|
48h before
- Review this procedure and verify you understand ALL steps
- Update [xplanner admin mailing list]
- Send the [48h before upgrade notice email]
24h before
- If mysql server for MYSQL_REHEARSAL has not started yet, start it from Windows Service
- Copy MYSQL_PRODUCTION_DATA to backup directory (BACKUP_DIR)
- Override MYSQL_REHEARSAL_DATA with MYSQL_PRODUCTION_DATA
- Upgrade
xplanneron MYSQL_REHEARSAL
***This usually entails running 0 or more sql scripts and running 0 or more java migration programs - Delete
TOMCAT_REHEARSAL_WORK_DIRdirectory - Copy xplanner war or xplanner_stage from staging as
xplanner_newinto TOMCAT_REHEARSAL_DIR - Rename
xplanner_new/WEB-INF/classes/log4j-production.propertiestolog4j.properties, change the output file. - Rename
xplanner_new/WEB-INF/classes/xplanner-custom-production.propertiestoxplanner-custom.properties - Change
xplanner_new/WEB-INF/classes/xplanner-custom.propertiesto point to MYSQL_REHEARSAL database
If you make any additional changes to xplanner-custom.propertiesplease check it in immediately inresources/xplanner-custom-production.properties - Copy
xplanner_newtoWEBAPP__DIR - Test xplanner at
http://xplan:8084/xplanner_newby following [these test steps]-
- Test all bugs listed as being fixed
-
- If the test is successfull, schedule the rollout for the following day
0h
- Update [xplanner admin mailing list]
- Send the [start upgrade notice email]
- Shutdown xplanner tomcat
- Rename
WEBAPP_PRODUCTION_DIR/xplannertoWEBAPP_REHEARSAL_DIR/xplanner_old - Start xplanner tomcat
- Verify that http://xplan cannot be reached
- Shutdown xplanner tomcat
- Copy MYSQL_PRODUCTION_DATA to backup directory (BACKUP_DIR)
- Override MYSQL_REHEARSAL_DATA with MYSQL_PRODUCTION_DATA
- Change
xplanner_old/WEB-INF/classes/xplanner-custom.propertiesto point to MYSQL_REHEARSAL database - Start rehearsal xplanner tomcat TOMCAT_REHEARSAL
- Test xplanner briefly at
http://xplan:8084/xplanner_oldSteps if xplanner_old works fine with MYSQL_REHEARSAL database
- Shutdown xplanner tomcat
- Upgrade
xplanneron MYSQL_PRODUCTION-
- This usually entails running 0 or more sql scripts and running 0 or more java migration programs
-
- Change
WEBAPP_REHEARSAL_DIR/xplanner_new/WEB-INF/classes/xplanner-custom.propertiesto point to MYSQL_PRODUCTION database - Start rehearsal xplanner tomcat TOMCAT_REHEARSAL
- Test xplanner briefly at
http://xplan:8084/xplanner_new
Steps if xplanner_old does NOT work with MYSQL_REHEARSAL database
- Shutdown xplanner tomcat
- Rename
WEBAPP_REHEARSAL_DIR/xplanner_oldtoWEBAPP_PRODUCTION_DIR/xplanner - Change
xplanner/WEB-INF/classes/xplanner-custom.propertiesto point to MYSQL_PRODUCTION database - Start xplanner tomcat TOMCAT_PRODUCTION
- Send the [cancelled upgrade notice email]
- Let's figure immediately why the recreated database doesn't work properly
- Stop here
|
|