How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2

How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
How to upgrade to
DME 3.6 SP3/SP4
and DME 4.0
SP1/SP2
Steps to ensure a successful upgrade
Installing DME: Upgrade with migration
Applies to DME versions 3.5 SP10 and 3.6 SP1
Document version 1.2
October 16, 2012
How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
Upgrading to DME 3.6 SP3/SP4 and DME 4.0  Prerequisites
Contents
Upgrading to DME 3.6 SP3/SP4 and DME 4.0 .................................. 3
Prerequisites ...................................................................................................... 3
Preparing for upgrade test ................................................................................... 3
Steps to upgrade ............................................................................................... 4
Upgrading DME – initial steps ......................................................................... 5
Backup ..................................................................................................................... 5
Prevent users from connecting to DME............................................................. 5
Database operations ......................................................................................... 6
Script files................................................................................................................ 6
Which script files to run ....................................................................................... 6
Install target DME version ............................................................................... 7
Start DME, and check the migration ................................................................. 8
Note about Apple iOS and DME AppBox ......................................................... 8
2
© 2012 Excitor
How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
Upgrading to DME 3.6 SP3/SP4 and DME 4.0  Prerequisites
Upgrading to DME 3.6
SP3/SP4 and DME 4.0
This document describes how to upgrade your current DME 3.5 SP10 or
DME 3.6 (GA, SP1, and SP2) to DME 3.6 SP3/SP4 or DME 4.0 (including 4.0
SP1 and SP2).
The internal database structure with regard to settings and groups was
improved substantially in 3.6 SP2. For this reason, upgrading from a version
earlier than 3.6 SP2 requires running a migration script as well as the usual
upgrade script(s). The migration script might detect problems in the
database, and must therefore be run manually.
Caution: Due to the complexity of this migration, please do not attempt
this upgrade outside the opening hours of DME Support. If the migration
script fails to complete a step, you may need Support to help you
proceed.
When upgrading, complete the steps outlined in this document in the order
listed.
Prerequisites
Before attempting the upgrade, make sure the following is in order:
1.
DME Support is open.
2.
You have a login to DME Support – this is required to download the
installer.
3.
You are familiar with the release notes for the version of DME you are
running through to the version you are upgrading to – go to
http://install.excitor.dk/documentation/rn/ (login required).
4.
If upgrading to DME 4.0, you have a new license file. The license
model has changed since 3.6, and DME 4.0 will not run with a license file
in the old format.
Preparing for upgrade test
The settings system is quite complex. We have done our utmost to ensure
that the migration will be successful, but there may be combinations of
device types and group structures that we have not been able to test.
In order to be able to ascertain that the upgrade went well, we recommend
that you make note of the settings of a number of devices in the DME web
3
© 2012 Excitor
How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
Upgrading to DME 3.6 SP3/SP4 and DME 4.0  Steps to upgrade
interface before upgrading, and then compare the settings with the same
devices on the upgraded DME system.
From the Devices tab, double-click a device, and click the Settings setup
panel. Note the Status column, which tells where the settings applied to
the device derive from – Default, Group, or Device. Taking some screenshots
is the easiest way.
Do this for a number of devices with different OS and group affiliation, for
instance an Android and an iOS device belonging to group A, and an
Android and an iOS device from group B.
After upgrading, compare the settings. If there are differences, it is an
indication that the upgrade did not go as planned, and you will need to
revert back to your previous DME server and contact Excitor support in
order to analyze your database.
Steps to upgrade
As mentioned, there are several upgrade scenarios. The following graphic
outlines the possible scenarios:
3.5 SP10
Upgrade
Migrate
3.6
SP2/SP3/SP4
Upgrade
4.0 SP1/SP2
3.6 GA/SP1
Upgrade
Migrate
3.6
SP2/SP3/SP4
Upgrade
4.0 SP1/SP2
3.6 SP2
No
upgrade
3.6 SP3/SP4
3.6
SP2/SP3/SP4
Upgrade
Install target DME version
Backup data and disable connections through server.xml
Database operations
4.0 SP1/SP2
The graphic shows you what needs to be done to successfully upgrade DME.
1.
First create a backup of your database, and disable any connections
from devices by editing the server.xml file.
2.
Then perform the required database operations by running upgrade
scripts and migration scripts. Note that if you are running Linux with
4
© 2012 Excitor
How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
Upgrading to DME 3.6 SP3/SP4 and DME 4.0  Upgrading DME – initial
steps
MySQL on localhost, the installer will run the upgrade scripts for you –
but you still need to run the migration script.
3.
Finally, when the database is ready, install the version of DME that you
want to use.
These required steps are outlined in the following.
Upgrading DME – initial steps
Before attempting the upgrade, you need to back up the DME system and
prevent users from connecting to DME while upgrading.
Backup
To be able to roll back to the version you came from, you need to back up
your system.
1.
Stop the DME server and connectors
2.
Back up the following:
2.1. The DME database
2.2. cryptoKeystore
2.3. server.xml
2.4. Wrapper.conf (Windows only)
2.5. SSL certificate: (rootca.pem , sslcertificate.pem ,
sslprivatekey.pem)
For more information about backup, see the Online documentation .
Prevent users from connecting to DME
To prevent users from connection to DME during the upgrade, you should
change the port number to which the devices are set up to connect. This is
done in the file server.xml, which is located on the server:
Windows:
jboss\server\default\deploy\jboss-web.deployer\server.xml
Linux:
etc/jboss/server.xml
In the file, locate the text <!-- Terminal access interface/port -->.
Change the value of the port line from the default value (usually 5011 or
443) to e.g. 5010, and save the file.
Alternatively, you can block the port in question in the local firewall.
5
© 2012 Excitor
How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
Upgrading to DME 3.6 SP3/SP4 and DME 4.0  Database operations
Database operations
DME is now stopped, and no users can connect.
Now you need to run the database upgrade scripts and the database
migration script. Which scripts to run depends on your source and target
versions of DME.
Also, your installer platform (Windows/Linux) and your database system
(MS SQL Server, Remote MySQL, or MySQL on the local machine) are
important in this connection.
Script files
The database script files can be found on the Excitor Install site at
install.excitor.com. The scripts are run on the database server.
Running script files on MS SQL Server
If you are using MS SQL Server, run the scripts using the SQL Server
Management Studio. Connect to the database server, and select the DME
database. Open a new Query window, and paste the content of the script
you want to run into the query window. Click Execute in the toolbar.
Running script files on MySQL
With MySQL, you can select the DME database and execute the script file
from the shell. The name of the DME database is typically the instance name
– usually base:
shell> mysql –u<user> -p base < scriptfile
MySQL will prompt for the password before executing the script.
Which script files to run
The following table shows which script files to run in each scenario.
This applies if you are installing on Windows, or if you are installing on
Linux but connecting to a remote MySQL server.
On Linux using MySQL on localhost, you only need to apply the
migration scripts when the installer tells you to.
Note also that when upgrading to 4.0, you must always go through 3.6 SP2
or SP3 or SP4. Also, there are no database upgrades from 3.6 SP2 to 3.6
SP3/SP4. If you are running 3.6 SP3/SP4, you are running on an SP2 database.
Source
Target
DBMS
Scripts
3.5 SP10
3.6 SP3+
MS SQL Server
dme36sp2_update_ms-sql.sql
migrate_35_to_36SP2_ms-sql.sql
6
© 2012 Excitor
How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
Upgrading to DME 3.6 SP3/SP4 and DME 4.0  Install target DME version
3.5 SP10
3.6 SP3+
Remote MySQL
dme36update_mysql.sql
dme36sp1_update_mysql.sql
dme36sp2_update_mysql.sql
migrate_35_to_36SP2_mysql.sql
3.6 SP1
3.6 SP3+
MS SQL Server
dme36sp2_update_ms-sql.sql
migrate_36SP1_to_36SP2_ms-sql.sql
3.6 GA
3.6 SP3+
Remote MySQL
dme36sp1_update_mysql.sql
dme36sp2_update_mysql.sql
migrate_35_to_36SP2_mysql.sql
3.6 SP1
3.6 SP3+
Remote MySQL
dme36sp2_update_mysql.sql
migrate_36SP1_to_36SP2_mysql.sql
3.6 SP3
4.0
SP1/SP2
MS SQL Server
dme40update_ms-sql.sql
3.6 SP3
4.0
SP1/SP2
Remote MySQL
dme40update_mysql.sql
Say you are upgrading your Windows DME from 3.5 SP10 to 4.0 SP2. In this
case, you must run scripts in the following sequence:
1.
dme36sp2_update_ms-sql.sql
(brings the DB to 3.6 SP2/SP3 level)
2.
migrate_35_to_36SP2_ms-sql.sql
3.
dme40update_ms-sql.sql
(migrates data to new structure)
(brings the DB to 4.0 level)
Note that on Linux, you must run the migration script in a separate
session on the Linux box. Do not interrupt the installer!
After running the migration script with no errors, go back to the Linux
installer, and type Applied. This will resume the installation.
After a successful completion of the migration script, a message says,
“Database migration completed successfully.”
If the migration script does not complete successfully, the script will inform
you about which step in the script that could not be completed. Correct the
error, and run the script again. You may need to contact DME Support in
order to fix any errors. If you cannot fix the errors, you must abort the
installation, roll back the database, which will bring you back to the starting
point, and then contact DME Support. They will request a copy of the
database that could not be migrated.
Install target DME version
After successfully running the required script files and bringing the database
up to the level required for your target DME version, you must upgrade
according to the installation guide for your platform (see DME install site).
7
© 2012 Excitor
How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
Upgrading to DME 3.6 SP3/SP4 and DME 4.0  Install target DME version
On Linux, resume the installation to install DME 3.6 SP3. If you are going to
install DME 4.0, you need to exit the installer after installing 3.6 SP3, and
start it again for the installer to be able to detect that a 4.0 version is
available.
On Windows, run the installer as described in the installation guide.
During the upgrade, the installer will merge the existing server.xml file
into the new one. So if you have made any changes related to connections,
ports, SSL, etc., you do not need to reapply them. There is one exception:
cluster-specific settings must be reinserted in the server.xml file (for
location of this file, see “Prevent users from connecting to DME” above).
After installing the target DME, upgrade all connectors according to the
installation guide. This must be done before you start DME for the first
time.
Start DME, and check the migration
With the connectors upgrade, start your target DME for the first time.
Starting DME will take a while, as the server has to convert a lot of data
initially. Then:
1.
Check that the server is launched properly.
2.
Check the settings for a set of devices in the DME web interface, and
validate that the group or device specific settings from the DME
installation you upgraded from are correctly applied to the devices (as
described in the introduction to this document).
3.
Start all connectors, and test that they are working properly. Use the
test functionality on the connectors.
4.
If everything seems to work properly, shut down DME again.
5.
Change the sync port in the server.xml back to the correct value (or
re-open the port in the local firewall).
6.
Start the DME server.
Enjoy your new version of DME!
Note about Apple iOS and DME AppBox
If you upgrade your DME 3.5 SP10 or 3.6 SP1 server to 4.0 SP1 or SP2, you
might notice that iOS devices do not report support for DME AppBox.
AppBox settings are marked as “0” in the Device settings view in the server
web administration interface:
8
© 2012 Excitor
How to upgrade to DME 3.6 SP3/SP4 and DME 4.0 SP1/SP2
Upgrading to DME 3.6 SP3/SP4 and DME 4.0  Install target DME version
In order to get the proper view and enable AppBox, you must send
an Import sysinfo command to your iOS devices in the following way:
1.
Select the devices in the Devices tab
2.
Click Force synchronization in the page menu
3.
Select the Import tab
4.
Select the Import system info command
5.
Click Send
When the devices have acted upon the command, you will be able to enable
and configure an AppBox server.
9
© 2012 Excitor