How to Create and Process a Deploy
This topic explains how to create and process deploys. This is done in the following order:
- Engineer: Create a deploy.
- Engineer: Send the correct files to the system administrator.
- System administrator: Process the delivered files.
- System administrator: Perform a rollback if necessary.
See also Check Configuration Files for information about migrating configuration files from one version to another.
In This Topic
Create the Deploy
Create a settings.xml for the Target Environment
A deploy is always created with a specific target environment in mind. For example, a deploy can specifically be created for a test environment. For each target environment you need a separate settings.xml
. For a test environment, copy the settings.xml
to settings-test.xml
and then adjust the properties in the settings-test.xml
file. The typical properties you should check to ensure they are correct are:
- Pathnames
- Hostnames
- Database properties
- Usernames/passwords
Build the Deploy using Maven
After the properties have been set in the target environment, execute the following in a Command prompt:
mvn -s settings-test.xml -P build-deploy clean package assembly:assembly
A new folder with the name target
is created which will contain two folders and one ZIP file.
What to Deliver to the System Administrator
After the deploy has been built, a ZIP file is present in the target
folder. The default name of the ZIP file is webmanager-webmanager-1.0-SNAPSHOT.zip
. Send the following files to the system administrator of the target environment:
webmanager-backend-webapp-1.0-SNAPSHOT.war
(present in the root of the ZIP file);webmanager-static-webapp-1.0-SNAPSHOT.war
(present in the root of the ZIP file);- Gather all plugins into one new ZIP file.
- All plugins present in the
edition-bundles
directory of the unzipped archive.
Process the Deploy
After receiving the files from the developer, the system engineer has to perform the following steps in order to process those files:
- Stop the web server (Tomcat, JBoss or WebSphere).
- To support a rollback, back up the following folders and files:
/vol/www/tomcat-mywebsite/deploy/webmanager-backend-webapp-1.0-SNAPSHOT.war
/vol/www/mywebsite/web-docs/wm/
- Create a backup of your relational database,
- Remove the content of the following folders:
/vol/www/mywebsite/work/edition-bundles/
/vol/www/mywebsite/work/osgi/*
/vol/www/<tomcat-installation-dir>/work/*
/vol/www/<tomcat-installation-dir>/temp/*
- Remove the directory
/vol/www/tomcat-mywebsite/deploy/web
. - Copy
webmanager-backend-webapp-1.0-SNAPSHOT.war
to/vol/www/tomcat-mywebsite/deploy/
. - Unzip the
webmanager-static-webapp-1.0-SNAPSHOT.war
to/vol/www/mywebsite/web-docs/
(overwrite all). Copy all files from the
edition-bundles
directory to/vol/www/mywebsite/work/edition-bundles/
.- If one was delivered, unzip the plugin ZIP file to
/vol/www/mywebsite/work/deploy
(overwrite all). - Restart the web server.
How to Roll Back a Deploy
It is possible that XperienCentral will not start correctly after installing a new deploy. Usually this is caused by incorrect configuration settings. To immediately switch back to the last known good configuration, perform these steps:
- Stop Tomcat
- Restore the files from the backup:
- Copy
webmanager-backend-webapp-1.0-SNAPSHOT.war
back to/vol/www/tomcat-mywebsite/deploy/appBase
. - Copy the
wm
folder back to/vol/www/mywebsite/web-docs/
. - Remove all files in the
/vol/www/mywebsite/work/deploy/
folder. - Copy the plugins back to
/vol/www/mywebsite/work/deploy
.
- Copy
- Start Tomcat.
Using a Location Independent WAR
The following applies to XperienCentral versions 10.17 and higher.
Installing and configuring XperienCentral in a DTAP (Development Testing Acceptance Production) environment is made much easier by using a location independent WAR file. This allows you to install XperienCentral on one server, configure it to your specifications and once it is running to your satisfaction, create a WAR file and export it to other servers in your environment. The advantage of this approach is that the XperienCentral deployment can be installed in directories of different names on different servers and also be ported from a Windows environment to a Linux environment and vice versa. Another advantage is that you can install multiple copies of XperienCentral alongside each other on one server for testing/troubleshooting purposes.
To use a location independent WAR archive, follow these steps:
- Open the
settings.xml
file in the root of the XperienCentral installation and define the following property:<webmanager.springproperties.filename>file:${webmanager.configuration.properties}</webmanager.springproperties.filename>
- Build a WAR archive of the XperienCentral project.
You can now extract the WAR file on another server or servers. For each installation, you must do one of the following:
Modify the Configuration Files Manually
Extract the files config.xml
, startup_config.xml
and webmanager.properties
from the archive. Make the following modifications:
config.xml
— definecleansite_location
,file_browser_directories
andwww_root_directory
to match the installation.startup-config.xml
— definebase_directory
andwcb_directory
to match the installation.webmanager.properties
— change the directories to match the installation.
Create New Configuration Files and Change the Catalina Options
Create new versions of the files startup-config.xml
and webmanager.properties
. Change the Catalina startup options (setenv.sh
or setenv.bat
). For example, if the installation location is /vol/www/mywebsite
, the Catalina startup options would be:
CATALINA_OPTS="$CATALINA_OPTS -Dwebmanager.configuration.startup=/vol/www/mywebsite/work/config/startup_config.xml" CATALINA_OPTS="$CATALINA_OPTS -Dwebmanager.configuration.initial=/vol/www/mywebsite/work/config/config.xml"
CATALINA_OPTS="$CATALINA_OPTS -Dwebmanager.configuration.properties=/vol/www/mywebsite/work/config/webmanager.properties"
For JBoss add these 3 JAVA_OPTS to the standalone.conf
and/or standalone.conf.bat
.
The XperienCentral config.xml
file is updated in almost every new release. It contains default values for Setup Tool settings. During an upgrade, values for new settings are read from config.xml
but existing settings are left unchanged. If you define a location for the config.xml
file using a Catalina startup option, you must be sure to upgrade it manually during an upgrade to ensure that the value of new settings is set correctly.