Guide de migration de JMap 4.0 à JMap 5.0 / JMap 4.0 to JMap 5.0 Migration Guide

 

Produit concerné / Related product

JMap

Versions

4.0, 5.0



Jump to English version

 

Le passage de JMap 4.0 vers JMap 5.0 se fait en utilisant les fonctionnalités d’import/export de JMap. Toutes les configurations existantes peuvent être conservées lors de la migration. La stratégie consiste à installer parallèlement une instance de JMap 5.0 dans laquelle la configuration entière de JMap 4.0 y sera importée. Une fois l’importation terminée, le serveur JMap 4.0 est arrêté et JMap 5.0 devient le serveur principal. Il est à noter que la migration ne recréé pas les applications déployées, ces dernières seront donc à recréer à la fin de la procédure.

Guide étape par étape

  1. Exportation de la configuration de JMap 4.0
     

    Afin de migrer une instance de JMap 4.0 à JMap 5.0, l’administrateur doit dans un premier temps effectuer une exportation de la configuration entière à partir de JMapAdmin 4.0. Le processus d'exportation crée quatre fichiers. Le fichier .properties est le principal fichier d'exportation et il contient l'information de configuration. Tous les fichiers seront nécessaires lors de l'importation.
     

  2. Installation de JMap 5.0

    Installer JMap 5.0 dans un répertoire différent à celui de JMap 4.0 en prenant soin de modifier les ports de communication par défaut (JMap, Tomcat, AJP13). Il sera impossible de faire fonctionner JMap 4.0 et JMap 5.0 simultanément si ceux-ci utilisent les mêmes ports de communication.

    Se référer au guide d’installation de JMap 5.0 à l’adresse suivante :

    http://k2geospatial.com/wp-content/uploads/2013/05/Guide-Installation-JMap-5.0-V1-FR.pdf

     

  3. Base de données System

    JMap 5.0 devrait avoir sa propre instance de base de données System, différente de celle de JMap 4.0. Il est donc important de prévoir la création d’une instance de base de données pour JMap 5.0. Par contre, si vous souhaitez utiliser Apache Derby comme moteur de base de données System de JMap 5.0, vous n’avez pas à vous occuper de cela, car une nouvelle instance est automatiquement crée durant l’installation de JMap 5.0. Si vous devez créer une nouvelle instance, assurez-vous d’utiliser un nom différent de celle de JMap 4.0 (p.e. jmap5sysdb).

     

  4. Édition du fichier de configuration

    Ouvrir  à l’aide d’un éditeur texte le fichier .properties obtenu préalablement à l’exportation de la configuration entière de JMap 4.0. Exemple : jmap/backup/ jmap_export_full_2013-02-08.properties.  Trouver la portion suivante en cherchant ‘server.systemDB’. Il est à noter que si la migration se fait entre deux instances de JMap utilisant Apache Derby comme moteur de base de données System, cette étape n’est pas nécessaire. Les lignes en rouge sont à modifier dans le cas contraire:

    server.systemDB.configfile= mySQLConfig.xml

    server.systemDB.initpoolsize=5

    server.systemDB.maxpoolsize=-1

    server.systemDB.maxupdatingthreads=3

    server.systemDB.password= C9618624335896FA6D4

    server.systemDB.path=${JMAP_HOME}/db

    server.systemDB.recycleperiod=172800000

    server.systemDB.url=jdbc\:mysql\://localhost\:3306/jmap40sysdb?useCursorFetch\=true

    server.systemDB.user= jmap

    La  ligne  server.systemDB.url contient l’URL de connexion, l’adresse du serveur et le nom de la base de données. Il faut donc modifier celle-ci, puis s’assurer que les lignes contenant le mot de passe (password) et nom d’usager (user) soient aussi correctes.  Le mot de passe sera encodé. S’il n’a pas changé, aucune modification n’est requise, mais si le mot de passe a changé, remplacer le mot de passe encodé par password(nouveauMotDePasse)

    server.systemDB.configfile= mySQLConfig.xml

    server.systemDB.initpoolsize=5

    server.systemDB.maxpoolsize=-1

    server.systemDB.maxupdatingthreads=3

    server.systemDB.password=password(nouveauMotDePasse)

    server.systemDB.path=${JMAP_HOME}/db

    server.systemDB.recycleperiod=172800000

    server.systemDB.url=jdbc\:mysql\://localhost\:3306/jmap50sysdb?useCursorFetch\=true

    server.systemDB.user=jmap



    Dans l’exemple précédent, le mot de passe de la base de données System de JMap 5.0 est différent de celui de JMap 4.0.

    Toujours dans le fichier .properties, il faut modifier les différents ports de communication afin de correspondre à ceux de l’installation JMap 5.0. Il faut donc localiser et modifier les paramètres suivants :

    •  Port Tomcat (server.tomcat.port=80)

    • Server port (server.port=7003)

    • Port AJP13(server.tomcat.ajp13port=8006) 

    Finalement, le client doit modifier les paramètres de journalisation et de cache 

    • Répertoire log (server.log.main.path= C\:\\jmap5.0/logs)

    • Répertoires cache raster pour chacun des datasource (cachePath)

     

  5. Importation du fichier de configuration

    Dans JMap 5.0, aller à la section Outils puis Import/Export et appuyer sur le bouton Importer sous Importation / Exportation des configurations. Spécifier le chemin vers le fichier .properties créé lors de l’exportation de la configuration entière de JMap 4.0.

    Lorsque vous effectuez une importation entière, toute configuration existante dans JMapServer est supprimée et remplacée par la configuration importée. Lorsqu'une importation entière est terminée, vous êtes automatiquement retourné à la page de connexion de JMapAdmin.

     

  6. Migration des données utilisateur

    Si les utilisateurs de JMap 4.0 ont créé des contextes et des couches personnelles, appelées données utilisateur, l’extension Migration pour JMap 4.0 permet de les exporter afin de les migrer dans JMap 5.0.

    Une fois l’extension Migration installée sur le serveur JMap 4.0, aller dans Extensions puis Migration. Sélectionner une des 3 options disponibles, soit :

    • Couches personnelles et Contextes

    • Couches personnelles

    • Contextes

    Plusieurs fichiers seront exportés. Le fichier .properties est le principal fichier d'exportation et il contient l'information de migration.

    Dans JMap 5.0, aller à la section Outils puis Import/Export. Sélectionner le bouton Importer sous Importation / Exportation des données utilisateurs. Spécifier le chemin vers le fichier .properties créé lors de la migration  de JMap 4.0.

    Le fichier .mapping représente une correspondance de projets entre 2 instances de JMap et est crée lors d’une importation de partielle. Ce fichier sera nécessaire lors de la migration de couches personnelles et contextes suivant une importation partielle. Ignorer ce paramètre si vous venez d’effectuer une importation de configuration entière. 

     

  7. Mise en service de JMap 5.0 et substitution des ports

    Lorsque la migration est complétée et que JMap 5.0 est prêt à devenir le serveur de  production, il faut arrêter le serveur JMap 4.0. Afin que la transition entre JMap 4.0 et JMap 5.0 soit transparente aux utilisateurs, les ports de communications de JMap 5.0 doivent être substitués avec les valeurs des ports de communications de JMap 4.0.

    • Port Tomcat

    • Server port

    • Port AJP13

    Afin de modifier ces ports, ouvrir le fichier jmap\conf\jmapserver.properties et modifier les paramètres suivants :

    • server.tomcat.port=80

    • server.port=7003

    • server.tomcat.ajp13port=8006

    Vous devez également modifier les paramètres de connexion de chacun des déploiements pour qu’ils soient identiques aux déploiements de JMap 4.0. Aller dans Outils puis Déploiement et éditer chacun des déploiements de la liste.

    Finalement, chacun des fichiers suivant doit être modifié avec le paramètre suivant :

    <OBJECT PROPERTY="port" class="Integer" VALUE="7003"/> où 7003 est le Server port de JMap.

    • ./applications/deployed/jmap/WEB-INF/jmsconnections.xml

    • ./jmapadmin/WEB-INF/jmsconnections.xml

    • ./reports/WEB-INF/jmsconnections.xml

    Une fois ces modifications appliquées, redémarrer JMap 5.0.


English version

Transitioning from JMap 4.0 to JMap 5.0 is done by using JMap’s import/export functionality. All existing configurations can be maintained during the migration process. The strategy consists of installing a JMap 5.0 instance in parallel, and the entire JMap 4.0 configuration will be imported into this JMap 5.0 instance. Once the importation is finished, the JMap 4.0 server is stopped, and JMap 5.0 becomes the main server. It should be noted that migration does not recreate deployed applications, these will be therefore recreate at the end of the procedure.

Step-by-step guide

  1. Exporting the JMap 4.0 configuration

    In order to migrate a JMap 4.0 instance to JMap 5.0, the administrator must start by exporting the entire configuration from JMapAdmin 4.0. The export process creates four files. The .properties file is the main export file, and it contains the configuration information. All files will be needed during the importation process.


  2. Installing JMap 5.0

    Install JMap 5.0 in a different directory than the one used for JMap 4.0, taking care to modify the default communication ports (JMap, Tomcat, AJP13). It will be impossible to run JMap 4.0 and JMap 5.0 simultaneously if they use the same communication ports.

    Refer to JMap 5.0’s installation guide here:

    http://k2geospatial.com/wp-content/uploads/2013/06/Guide-Installation-JMap-5.0-V1-EN.pdf


  3. System database

    JMap 5.0 should have its own System database instance, which must be different from that of JMap 4.0. It is therefore important to create a database instance for JMap 5.0. However, if you wish to use Apache Derby as the System database engine for JMap 5.0, you do not have to take this into consideration, as a new instance will be automatically created during the installation of JMap 5.0. If you must create a new instance, make sure that its name is different from the JMap 4.0 instance (e.g. jmap5sysdb).


  4. Editing the configuration file

    Using a text editor, open the .properties file obtained before exporting the entire JMap 4.0 configuration. For example: jmap/backup/ jmap_export_full_2013-02-08.properties. Find the following portion by searching for ‘server.systemDB’. Note that if the migration involves two JMap instances using Apache Derby as the System database engine, this step is not required. Otherwise, the lines highlighted below must be modified:

    server.systemDB.configfile= mySQLConfig.xml

    server.systemDB.initpoolsize=5

    server.systemDB.maxpoolsize=-1

    server.systemDB.maxupdatingthreads=3

    server.systemDB.password= C9618624335896FA6D4

    server.systemDB.path=${JMAP_HOME}/db

    server.systemDB.recycleperiod=172800000

    server.systemDB.url=jdbc\:mysql\://localhost\:3306/jmap40sysdb?useCursorFetch\=true

    server.systemDB.user= jmap

    The server.systemDB.url line contains the connection URL, the server address and the name of the database. You must therefore modify this line and also make sure the lines containing the password and user name are correct. The password will be encoded. If it has not been modified, no changes are required, but if it has been modified, replace the encoded password with the password (newPassword).

    server.systemDB.configfile= mySQLConfig.xml

    server.systemDB.initpoolsize=5

    server.systemDB.maxpoolsize=-1

    server.systemDB.maxupdatingthreads=3

    server.systemDB.password=password(nouveauMotDePasse)

    server.systemDB.path=${JMAP_HOME}/db

    server.systemDB.recycleperiod=172800000

    server.systemDB.url=jdbc\:mysql\://localhost\:3306/jmap50sysdb?useCursorFetch\=true

    server.systemDB.user=jmap



    In the previous example, the JMap 5.0 System database password is different from the one used in JMap 4.0. 

    Also, in the .properties file, the communication ports must be modified to match the ones used for the JMap 5.0 installation. Therefore, the following parameters must be located and modified:

    • Tomcat port (server.tomcat.port=80)

    • Server port (server.port=7003)

    • AJP13 port (server.tomcat.ajp13port=8006) 

    Lastly, the client must modify the log and cache settings

    • Log directory (server.log.main.path= C\:\\jmap5.0/logs)

    • Raster cache directories for each datasource (cachePath)


  5. Importing the configuration file

    In JMap 5.0, go to Tools, then Import/Export, and click on the Import button underneath Configuration Importation / Exportation. Specify the path towards the .properties file created when exporting the entire JMap 4.0 configuration. 

    When you perform a full importation, any existing configuration in JMapServer is deleted and replaced with the imported configuration. When an entire configuration finishes, you are automatically brought back to the JMapAdmin connection page.


  6. User data migration 

    If the JMap 4.0 users created contexts and personal layers (i.e. user data), the JMap 4.0 Migration extension allows you to export these in order to migrate them towards JMap 5.0.

    Once the Migration extension has been installed on the JMap 4.0 server, go to Extensions, and then Migration. Select one of the 3 available options:

    • Personal layers and Contexts

    • Personal layers

    • Contexts

    Several files will be exported. The .properties file is the main export file and it contains the migration information.

    In JMap 5.0, go to Tools, then Import / Export. Select the Import button under User data Importation / Exportation. Specify the path towards the .properties file created during the JMap 4.0 migration.

    The .mapping file represents a project correlation between 2 JMap instances and is created when a partial importation is performed. This file will be needed when personal layers and contexts are migrated following a partial importation. Ignore this parameter if you have just imported an entire configuration.


  7. JMap 5.0 implementation and port substitution

When the migration is completed and JMap 5.0 is ready to become the production server, the JMap 4.0 server must be stopped. In order for the JMap 4.0 to JMap 5.0 migration to be seamless to users, the JMap 5.0 communication ports must be substituted with the values of the JMap 4.0 communication ports.

  •  

    • Tomcat port

    • Server port

    • AJP13 port

In order to modify these ports, open the jmap\conf\jmapserver.properties file and modify the following parameters:

  •  

    • server.tomcat.port=80

    • server.port=7003

    • server.tomcat.ajp13port=8006

You must also modify the connection parameters of each deployment to make sure these are identical to the JMap 4.0 deployments. Go to Tools, then Deployment, and edit each of the deployments in the list.

 

Lastly, each of the following files must be modified with the following parameter:

<OBJECT PROPERTY="port" class="Integer" VALUE="7003"/> where 7003 is the JMap Server port.

  • ./applications/deployed/jmap/WEB-INF/jmsconnections.xml

  • ./jmapadmin/WEB-INF/jmsconnections.xml

  • ./reports/WEB-INF/jmsconnections.xml

Once these modifications have been applied, restart JMap 5.0.