Difference between revisions of "Installing the Messaging Server: DEPRECATED"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 8: Line 8:
'''To install HornetQ
'''To install HornetQ
# Download the release specified in the [[Software Requirements]] from<br>http://www.jboss.org/hornetq/downloads.html
# Download the release specified in the [[Software Requirements]] from<br>http://www.jboss.org/hornetq/downloads.html
# Unpack the archive to the desired location (for example, to <tt>/mnt</tt>).
# Unpack the archive to the desired location. For example:
# Edit <tt>{hornetq-folder}/config/stand-alone/non-clustered/hornetq-users.xml</tt>
#: <tt>cd /mnt</tt>
#: <tt>tar xfz hornetQ-{version}.tar</tt>
# Edit <tt>{hornetq_install}/config/stand-alone/non-clustered/hornetq-users.xml</tt>
# Create a new user by adding the following code to the <tt><configuration></tt> section:
# Create a new user by adding the following code to the <tt><configuration></tt> section:
#:<syntaxhighlight lang="xml" enclose="div">
#:<syntaxhighlight lang="xml" enclose="div">
Line 16: Line 18:
</user>
</user>
</syntaxhighlight>
</syntaxhighlight>
# Edit <tt>{hornetq-folder}/config/stand-alone/non-clustered/hornetq-configuration.xml</tt>
# Edit <tt>{hornetq_install}/config/stand-alone/non-clustered/hornetq-configuration.xml</tt>
# Replace the <tt><security>...</security></tt> section with the following:
# Replace the <tt><security>...</security></tt> section with the following:
#:<syntaxhighlight lang="xml" enclose="div">
#:<syntaxhighlight lang="xml" enclose="div">
Line 33: Line 35:


{{Note|
{{Note|
:HornetQ is started using <tt>[hornetq-folder]/bin/start.sh</tt>.
:HornetQ is started using <tt>[hornetq_install]/bin/start.sh</tt>.
:It should be started before launching the platform's messaging server.
:It should be started before launching the platform's messaging server.
:''Learn more: [[Server Restart Sequence]]}}
:''Learn more: [[Server Restart Sequence]]}}

Revision as of 00:16, 29 January 2014

Prerequisites

Before starting the Messaging Server installation, the Application Server (appserver) should be installed.

Installing HornetQ

HornetQ is the Message Queue engine used by the Messaging Server.

To install HornetQ

  1. Download the release specified in the Software Requirements from
    http://www.jboss.org/hornetq/downloads.html
  2. Unpack the archive to the desired location. For example:
    cd /mnt
    tar xfz hornetQ-{version}.tar
  3. Edit {hornetq_install}/config/stand-alone/non-clustered/hornetq-users.xml
  4. Create a new user by adding the following code to the <configuration> section:
    <syntaxhighlight lang="xml" enclose="div">

<user name="[USER_NAME]" password="[PASSWORD]">

  <role name="admin"/>

</user> </syntaxhighlight>

  1. Edit {hornetq_install}/config/stand-alone/non-clustered/hornetq-configuration.xml
  2. Replace the <security>...</security> section with the following:
    <syntaxhighlight lang="xml" enclose="div">

<security-settings>

  <security-setting match="#">
     <permission type="createNonDurableQueue" roles="guest, admin"/>
     <permission type="deleteNonDurableQueue" roles="guest, admin"/>
     <permission type="createDurableQueue" roles="admin"/>
     <permission type="deleteDurableQueue" roles="admin"/>
     <permission type="consume" roles="guest, admin"/>
     <permission type="send" roles="guest, admin"/>
     <permission type="manage" roles="admin"/>
  </security-setting>

</security-settings> </syntaxhighlight>

Notepad.png

Note:

HornetQ is started using [hornetq_install]/bin/start.sh.
It should be started before launching the platform's messaging server.
Learn more: Server Restart Sequence

Configuring the Platform's Service Provider Settings

  1. Go to the Service Provider URL: http://{yourDomain}/networking/Service?t=1&targetpage=ViewPort.jsp
  2. Log in as the admin user
  3. Go to Settings > Service Provider Settings > Service Configuration
  4. Set values for the following parameters:
HornetQ Host  IP address of the server where HornetQ is installed (default: localhost)
HornetQ Port  Default: 5445.
 Needs to be specified only if the port specified for the netty acceptor
 was changed in hornetq-configuration.xml  
HornetQ User
HornetQ Password
 Use the same credentials you specified in hornetq-users.xml
HornetQ QoS  The number of simultaneously working Message Queue listeners.
5. Click [Save]

Creating an SSL Keystore

The Messaging Server accepts only SSL-encrypted connections. It needs a valid SSL certificate to perform a Handshake and data exchange with client systems.

__TBD: Which of the following two paragraphs is correct?__
The same Java keystore, SSL certificate, and private key used for the application server can be used for the Messaging Server.

The same Java keystore used for the application server can be used for the Messaging Server. You can create the SSL certificate and private key in that keystore.

Learn more: Managing SSL Certificates.

Configuring the Messaging Server

  1. Go to {appserver_installation}/messaging-server/conf/.
    That directory contains two configuration files:
    • log4j.properties – standard Apache Log4J configuration file.
    • server.properties – Messaging Server configuration file.
  2. In server.properties, configure the following parameters:
    • netty_port
      Use 443 if it is on a standalone system.
      If is on the same system as the appserver, then:
      • Use the default value (7007)
      • Add Apache Web Server proxy instructions (see end of document)
    • debug – set value to 1 to see content of all incoming HTTP requests in the log.
      Otherwise, use the default value (0).
    • ssl_keystore – absolute or relative path to your SSL keystore
    • ssl_keystore_password – password for your SSL keystore
AppServer Installation

Follow these steps when running the Messaging Server on the same system as an appserver:

  1. In {appserver_installation}/tomcat/webapps/networking/servicedesk/js/msg_server_link.js, replace the content of the file with:
    var messagingServerHost = "[YOUR_LONGJUMP_HOST_NAME_OR_IP]";
  2. Copy the messaging script to its target destination:
    cp {appserver_installation}/messaging-server/messaging /etc/init.d/
  3. Make messaging an autostart script:
    cd /etc/init.d/
    chkconfig –add messaging
Standalone Installation

For maximum performance, follow these steps to run the Messaging Server on a standalone system:

  1. Install MySQL on Messaging Server instance. Use the same MySQL credentials as on the appserver.
  2. Import messagingdb.sql into MySQL on the Messaging Server system.
    Note:
    The MySQL instance used by the Messaging Server contains real-time data, only. There is no need for backups or database replication, as the data structures can be easily restored by re-running that SQL script.
  3. Copy these files from the appserver system to the Messaging Server system:
    • The entire tomcat/lib directory. __TBD: To where?__
    • The entire messaging-server directory. __TBD: To where?__
    • The SSL keystore file directory. __TBD: To where?__
  4. Go to the messaging-server/ directory. __TBD: Where is it?__
  5. In conf/server.properties, change the customer_db_server connection string to link to the MySQL instance used by the appserver(s). __TBD: value format?__
  6. In startmessaging.sh, correct the path for each JAR used in Java classpath. __TBD: where are the jars?__
  7. In the messaging script, correct the path for the cd command. __TBD: to go where?__
  8. In tomcat/webapps/networking/servicedesk/js/msg_server_link.js, replace the content of the file with:
    var messagingServerHost = "[YOUR_MESSAGING_SERVER_HOST_NAME_OR_IP]";
  9. Copy the messaging script to its target destination:
    cp messaging-server/messaging /etc/init.d/
  10. Make messaging an autostart script:
    cd /etc/init.d/
    chkconfig –add messaging