Download ECP2.1 Upgrade Client

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Global serializability wikipedia , lookup

Commitment ordering wikipedia , lookup

DBase wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Microsoft Access wikipedia , lookup

Serializability wikipedia , lookup

SQL wikipedia , lookup

IMDb wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Btrieve wikipedia , lookup

Oracle Database wikipedia , lookup

Functional Database Model wikipedia , lookup

PL/SQL wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Ingres (database) wikipedia , lookup

Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Concurrency control wikipedia , lookup

Relational model wikipedia , lookup

Versant Object Database wikipedia , lookup

Database model wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

Transcript
CWE
Energy Communication Platform
Upgrade Guide
ECP Client - from 1.5.6 to 2.1
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
Un ic or n S ys t em s © 2 01 1 – Un ic or n S ys tem s a .s .
J ank o vc o va 10 3 7/ 4 9, Pr ah a 7 , CZ - 17 0 0 0
Title:
CWE
Energy Communication Platform
Upgrade Guide
Author(s):
Version:
Date:
Jiří Dudek
1.2
7.2.2011
Contact:
E-mail: [email protected]
Tel.: (+420) 221 400 111
>2<
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
REVISION HISTORY
Version
Date
Author
Description
1.0
29.1.2011
Jiří Dudek
Created.
1.1
30.1.2011
Martin Kazda
Revised
1.2
7.2.2011
Jiří Neuman
Added procedure for changing collation on
MySQL and MSSQL databases.
>3<
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
TABLE OF CONTENTS
Revision History.................................................................................................................................................. 3
Table of Contents ............................................................................................................................................... 4
1.
Upgrade Installation ................................................................................................................................. 5
1.1
Overview ........................................................................................................................................... 5
1.2
Content of ECP Upgrade Package ................................................................................................... 5
1.3
Upgrade Steps .................................................................................................................................. 5
2.
1.3.1
Backup of ECP ......................................................................................................................... 6
1.3.2
Upgrade of ECP ....................................................................................................................... 6
1.3.3
ECP Configuration .................................................................................................................... 8
1.3.4
Startup Upgraded ECP............................................................................................................. 8
Update of Database to Use Case-sensitive Search ................................................................................ 9
2.1
Motivation .......................................................................................................................................... 9
2.2
Procedure overview .......................................................................................................................... 9
2.3
MySQL database .............................................................................................................................. 9
2.4
MSSQL database ............................................................................................................................ 10
3.
Upgrade Recovery ................................................................................................................................. 11
4.
References ............................................................................................................................................. 12
>4<
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
1.
UPGRADE INSTALLATION
1.1 Overview
This document describes the upgrade of the ECP application for the ECP Client deployed on any of
supported operation systems.
1.2 Content of ECP Upgrade Package
Provided ECP upgrade package contains the structure described in the following table.
Folder
Description
/ant
Apache Ant needed to run update script.
/application
ECP application.
/batches
ECP control batches.
/certificates
Sample certificates and database encryption key.
/config
ECP template configurations.
/db-sql
Installation scripts for installing ECP schema on supported databases.
/documents
Documentation relevant to ECP Client.
/java
Java runtime environment (JRE).
/lib
ECP integration libraries.
/tools
Additional administration tools.
/UserFiles
Temporary storage for installed libraries with used receive and send handlers. The ECP
upgrade updates these libraries automatically.
1.3 Upgrade Steps
The upgrade consists of following steps:
1. Backup of ECP
2. ECP upgrade
3. ECP configuration
4. Startup upgraded ECP
>5<
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
1.3.1 Backup of ECP
The upgrade makes changes into the database, keystore and application. It is required to backup all
these sources to recover in case of failure. The backup has to be performed manually by the application
administrator.
1. Stop the ECP application and also integrated database (if it is used).
2. Backup the whole ECP directory (by default it is c:\Program Files\ECP).
3. If external database is used then backup whole ECP schema using the specific tool for that
database.
4. Startup integrated database if it is used.
1.3.2 Upgrade of ECP
ECP upgrade package is distributed in archive file. Before the upgrade, you will need to unzip provided
archive file by following next steps.
1. Create temporary directory for upgrade (e.g. c:\tmp\ecpupgrade on Windows
/tmp/ecpupgrade on Linux/Solaris) on the server with deployed ECP application.
or
2. Copy delivered upgrade archive to the temporary directory created in the previous step.
3. Unzip the archive (in next steps the path to the unzipped upgrade directory will be called
$UPGRADE_HOME).
4. If you are using MySQL or MSSQL database, update to case-sensitive collation (see chapter 2
Update of Database to Use Case-sensitive Search).
5. Update ECP installation path :
- On Windows - Update $UPGRADE_HOME\upgrade_ecp_client.bat file if you don’t want to
detect the ECP path automatically from registry. Set up :
- installation_path – Path to web application container deploy directory
- On
Linux/Solaris - Update path to
$UPGRADE_HOME\upgrade_ecp_client.sh.
installed
ECP
application
in
batch
6. Update $UPGRADE_HOME\upgrade_node.properties file according to your ECP Node. Update
following properties :
Property
Description
Database
The configuration of this parameter is described in [AdminGuide] chapter
ECP module configuration parameters part Connection to database.
Database.Driver
The configuration of this parameter is described in [AdminGuide] chapter
ECP module configuration parameters part Connection to database.
Database.Dialect
The configuration of this parameter is described in [AdminGuide] chapter
ECP module configuration parameters part Connection to database.
>6<
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
Property
Description
Database.Password
The configuration of this parameter is described in [AdminGuide] chapter
ECP module configuration parameters part Connection to database.
Database.Type
Specify database type. Upgrade script chooses the right sql files
according to it. Use one from following values :
> MySql
> MSSql
> Oracle
> PostgreSql
Database.Schema
The name of database or database schema.
Database.Root.User
Database user with the administration privileges.
Database.Root.Password
Password of database user with the administration privileges.
Keystore.Path
Patch to the keystore of ECP Node.
Keystore.Password
Password to the keystore of ECP Node.
Keystore.EncryptionCert
Password to the encryption certificate private key. It should be the
same as keystore Keystore.Password.
ificate.Password
Keystore.SigningCertifi
cate.Password
Keystore.Authentication
Certificate.Password
Module.Keystore.Encrypt
ion.KeyFile
Password to the signing certificate private key. It should be the same
as keystore Keystore.Password.
Password to the authentication certificate private key. Is should be the
same as keystore Keystore.Password.
Path to the resource which contains database encryption key. This key
is used to encrypt and decrypt all private keys stored into the database.
For more details please see [AdminGuide].
The value has to be in following format :
file:[absolute path to the encryption file]
If you want to use default encryption file then the value should be :
Windows - file:$UPGRADE_HOME\\defaultEncryptionKey
Linux\Solaris - file:$UPGRADE_HOME/defaultEncryptionKey
7. Stop running ECP instance.
8. Backup and delete the ECP log files placed in log directory according to your logger settings in
the module.properties file.
9. Change directory to $UPGRADE_HOME.
10. Execute script
Linux/Solaris.
“upgrade_ecp_client.bat”
on
>7<
Windows
or
“upgrade_ecp_client.sh”
on
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
Please check that script has ended with “BUILD SUCESSFUL”. In case that the script failed
(ended with “BUILD FAILED”) continue please with the “Upgrade recovery” chapter.
1.3.3 ECP Configuration
After the successful installation the ECP configuration needs to be updated. Please perform following
steps:
1. Copy
the
node
template
configuration
from
the
($ECP_HOME\config\sample\module_client_template.properties).
upgrade
package
2. Update the template configuration properties according your current configuration and
instructions in the [AdminGuide].
3. Put the updated configuration into the $ECP_HOME\config\module.properties.
1.3.4 Startup Upgraded ECP
1. Startup the ECP.
2. Check whether the ECP upgrade was successful by displaying the ECP web page and by
sending the test message to your upgraded ECP client.
>8<
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
2. UPDATE OF DATABASE TO USE CASE-SENSITIVE
SEARCH
2.1 Motivation
The main reason to change the case sensitivity for MySQL and MSSQL databases is to unify the
behavior of ECP across all the supported databases. Oracle and PostgreSQL use case sensitive search
by default while MySQL and MSSQL are case insensitive. This can lead to some minor issues during
message transportation when the message passes through databases with different case sensitivity.
Taking this into account, it is recommended to switch MySQL and MSSQL databases to the case
sensitive behavior. Following chapters describe briefly the procedure of changing case sensitivity on
these two databases.
2.2 Procedure overview
To make your existing ECP database use case sensitive searches, you have to follow steps described
in this chapter. Please, keep in mind that this procedure can be done only on ECP database version
1.5.*. If you are upgrading from ECP 1.5 to ECP 2.0 make sure to complete this procedure before
upgrading the ECP.
1.
Backup all the data from your ECP database. Use a tool which is distributed with your database
to dump the ECP data to a file.
2.
Re-create the ECP database using provided SQL scripts for clean installation.
3.
Load the data from the backup file to the newly created database.
4.
Verify that the upgrade was successful.
2.3 MySQL database
This chapter describes how to change the case sensitivity on MySQL database.
1. Use mysqldump tool to export data from the ECP database into a file. The resulting file can
grow very large (up to several gigabytes) depending on the size of your database. Make sure
that you have sufficient space on your hard drive.
Following is a sample command with explanation. Feel free to adjust the parameters according
to your system.

mysqldump --no-create-db --no-create-info -u root -peppsql ecp > ecp_dump.sql

“--no-create-db” and “--no-create-info” parameters mean that the database schema is not
part of the export (i.e. only data will be exported, not the database structure). This can’t be
omitted.
>9<
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient

“-u root” specifies the database root user.

“-peppsql” is a password for database user. -p is a parameter name and the eppsql is the
password.

“ecp” is the name of ECP database.

“ecp_dump.sql” is the path to the file where the data will be dumped.
2. Use the installation scripts to setup the case sensitive database. Look for install_15_CS.sql file
in $UPGRADE_PACKAGE_HOME/db-sql/sql/MySql/upgrade directory. Before running the
script, replace @DATABASE@ with the name of your ECP database (e.g. ecp) and @USER@
with ECP database user login (e.g. ecp).
3. Load the data back to the database. You can do this by executing following command:

mysql -u root -peppsql ecp < ecp_dump.sql

“-u root” specifies the database root user.

“-peppsql” is the password for the user. -p is a parameter name and the eppsql is the
password.

“ecp” is the name of ECP database.

“ecp_dump.sql” is path to the file create in the first step.
2.4 MSSQL database
This chapter describes shortly how to change the case sensitivity on MSSQL database.
1. Use the SQL Server Management Studio to export the data. It has a comprehensive export
wizard which leads you through the whole process of generating scripts. Please consult the
manual to the SQL Server Management Studio for more details. Remember to exclude the DDL
statements from the generated script.
2. Use the installation scripts to install the case sensitive database. Look for install_15_CS.sql file
in $UPGRADE_PACKAGE_HOME/db-sql/sql/MSSql/upgrade directory. Before running the
script, replace @DATABASE@ with the name of your ECP database (e.g. ecp) and @USER@
with ECP database user login (e.g. ecp).
3. Run the SQL script created in the first step on the newly created database. You may use the
SQL Server Management Studio for this step as well.
> 10 <
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
3.
UPGRADE RECOVERY
This chapter describes recovery after upgrade failure:
1. If external database is used then restore the database using the backup created during the ECP
upgrade (Backup of ECP).
2. Shutdown the integrated database if it is used.
3. Restore the ECP directory using the backup created during the ECP upgrade (Backup of ECP).
4. Startup the integrated database if it is used.
After this recovery the ECP is in the same state as it was before the upgrade. Please check the upgrade
logs located in the $UPGRADE_HOME\update\logs file, correct the upgrade configuration according to
stated errors and re-launch the upgrade again.
> 11 <
CWE
Energy Communication Platform
Upgrade Guide - ECPCLient
4.
REFERENCES
[AdminGuide]
ECP Administrator’s Guide, Unicorn
> 12 <