JBoss.orgCommunity Documentation

Chapter 2. Installation

2.1. Setup Target Environment
2.1.1. JBoss EAP or Wildfly
2.2. Further Configuration
2.2.1. Common Properties
2.2.2. Properties specific to the full installation
2.2.3. Properties specific to the client only installation
2.2.4. Database
2.3. Test the installation using the samples
2.3.1. JBoss EAP
2.4. JBoss EAP Specific Information
2.4.1. SQL Database
2.4.2. Caching

This section will describe how to install Overlord Runtime Governance in different environments.

  • Download the App Server: JBoss EAP distribution (version 6.1 and 6.3 are currently supported) or Wildfly distribution (version 8.1), and unpack it in a suitable location.
  • If using rtgov with switchyard, then download SwitchYard (version 2.0.0.Final or higher) and install it into the JBoss EAP/Wildfly environment. We recommend using the switchyard installer, which can be unpacked in a temporary location, and run ant in the root folder to be prompted for the location of the JBoss EAP or Wildfly environment.

Note

If switchyard is not installed, then you won’t be able to use the quickstarts, which are based around providing runtime governance for a switchyard application.

  • Download the latest release of RTGov from the Overlord website, choosing the appropriate distribution for the target container and installation type (e.g. client only or all). Unpack the distribution into a suitable location.

Note: The difference between the installation types is,

ValueDescription

client

This will result in only the activity collector functionality being installed, using a RESTful client to communicate with a remote Runtime Governance server.

all

This will result in the full server configuration being installed into the server, including activity collector (for obtaining activities generated within that server), activity server (for receiving activity information whether from a remote client or internal activity collector), event processor network (to analyse the events), active collections (to maintain result information) and a collection of REST services to support remote access to the information. This is the default value.

  • The final step is to perform the installation of Overlord Runtime Governance. To do the installation, use the following command from the root folder of the installation:
./install.sh [ -Dpath=<location> ]

The <location> represents the folder where the JBoss EAP or Wildfly environment exists. If the <location> is not explicitly provided on the command line, then the user will be prompted for the information.

To uninstall, simply perform the following command in the root folder of the installation:

./uninstall.sh [ -Dpath=<location> ]

To start the server, go to the EAP/Wildfly bin folder and run:

./standalone.sh -c standalone-full.xml

The final step is to configure KeyCloak with the Governance realm. This is achieved by following these steps:

  • Enter the URL http://localhost:8080/auth/admin/master/console/#/create/realm into your browser
  • If first time using KeyCloak on the server, then enter the username admin and password 'admin. You will then be prompted to enter a new password (twice) for the admin user.
  • When the create realm page is displayed, it will offer the ability to upload a realm definition. Select the button and when a file dialog appears, navigate to the dist folder within the RTGov distribution and select the governance-realm.json file.

You can also import this governance realm by providing the file as an option when starting the server, e.g.

./standalone.sh -c standalone-full.xml -Dkeycloak.import=<path-to-distribution>/dist/governance-realm.json
  • Once the realm has been uploaded successfully, you will be able to log in to the RTGov UI (http://localhost:8080/rtgov-ui) using the username admin and password admin

The configuration properties for the Runtime Governance capability are found in the <root>/standalone/configuration/overlord-rtgov.properties file.

Although there will be some properties that are independent of the installation type, some will be specific and therefore are listed in separate sections below.

PropertyDescription

ActiveCollectionManager.houseKeepingInterval

Time interval (in milliseconds) between house keeping tasks being invoked.

ActivityStore.class

The class associated with the Activity Store implementation to be used.

Elasticsearch.server

URL to the Elasticsearch server (HTTP port).

infinispan.container

The infinispan container to use.

MVELSeverityAnalyzer.scriptLocation

Optional location of a MVEL script used to determine severity levels for nodes and links within the service overview diagram.

SituationStore.class

The class associated with the Situation Store implementation to be used.

Note

Activity and Situation Store implementation specific properties will be discussed in the database section below.

As part of the full installation, the RTGov UI is also installed, and includes the following additional properties:

PropertyDescription

SwitchYardServicesProvider.serverURLs

A comma separated list of URLs that can be used to resubmit messages to a SwitchYard server. The URLs are used with a round robin strategy. (The default values is http://localhost:8080)

SwitchYardServicesProvider.jmxURL

The URL for the remote MBeanServer connection. If no value is provided, then a local MBeanServer connection will be used.

SwitchYardServicesProvider.jmxUsername

Username for the remote MBeanServer connection.

SwitchYardServicesProvider.jmxPassword

Password for the remote MBeanServer connection.

UI.manualResolution

Resolution state will automatically be changed based on the outcome of a resubmission, but this boolean property determines whether resolution state change buttons should be included on the Situation details page, to allow a user to manually change the state. The default value is "true".

This section described the configuration of the supported database options.

Note

This is the default "out of the box" configuration.

To use Elasticsearch as the Activity and Situation Store implementation, the following property values need to be defined:

ActivityStore.class=org.overlord.rtgov.activity.store.elasticsearch.ElasticsearchActivityStore
SituationStore.class=org.overlord.rtgov.analytics.situation.store.elasticsearch.ElasticsearchSituationStore

with the additional support properties:

PropertyDescription

Elasticsearch.hosts

Either has value "embedded" (the default), or a list of <host>:<port> values representing nodes in the Elasticsearch cluster, the port representing the TCP transport connection.

Elasticsearch.schedule

When using batched mode, the interval (in milliseconds) between updates being sent to the Elasticsearch server.

Elasticsearch.ActivityStore.responseSize

Maximum size for the response (default value 100000).

Elasticsearch.ActivityStore.timeout

"Best effort" timeout value (milliseconds) (default value 10000ms).

Elasticsearch.SituationStore.responseSize

Maximum size for the response (default value 100000).

Elasticsearch.SituationStore.timeout

"Best effort" timeout value (milliseconds) (default value 10000ms).

The following information describes the Elasticsearch clustering options that are supported with RTGov. For more information please see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-node.html

Out of the box, RTGov starts up with an in-VM Elasticsearch node for convenience. Such a setup is not recommended for a production environment for the following reasons:

  • Elasticsearch running on the same JVM could result in resource contention, e.g. memory or cpu, which could impact the application performance
  • In a clustered or load-balanced environment we would require Elasticsearch to persist the data to the same cluster

RTGov does not attempt to wrap or hide the standard Elasticsearch configurations. If you know how to tweak and tune an Elasticsearch node then these configuration changes can be applied to the appropriate location (dependent upon platform):

ValueDescription

EAP or Wildfly

The configuration properties for the Runtime Governance capability are found in the <root>/standalone/configuration/overlord-rtgov.properties file.

If you want to learn how to configure and tune Elasticsearch then please reference the Elasticsearch documentation at http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html

Some of those configuration properties that may need to be changed include:

  • cluster.name: Cluster name identifies your cluster for auto-discovery. If you’re running multiple clusters on the same network, make sure you’re using unique names
  • node.name: Node names are generated dynamically on startup, so you’re relieved from configuring them manually. However you can tie a node to a specific name
  • path.data: Path to directory where to store index data allocated for this node

There are 3 ways Elasticsearch cluster communication can be configured within RTGov:

Local Elasticsearch embedded server

node.local=true

This configuration does not communicate outside of the VM, only performing discovery of Elasticsearch nodes started on the same same VM.

Client only with no local data

When you start an Elasticsearch client, the most important decision is whether it should hold data or not. In other words, should indices and shards be allocated to it. Many times we would like to have the clients just be clients, without shards being allocated to them. This is simple to configure by setting either:

node.data=false

and/or

node.client=true

With this configuration, the client is cluster aware and can route its data to the responsible shards avoiding a double hop.

Clustered client with local data

This is the default "out of the box" configuration for RTGov. This starts a simple Elasticsearch node that can hold data and also join other Elasticsearch nodes in a cluster.

node.data=true
node.client=false
node.local=true

When RTGov has been installed, try out the samples to get an understanding of its capabilities, and check that your environment has been correctly installed/configured.

To install the samples into JBoss EAP go to the samples folder in the distribution. You will need to install Apache Maven to be able to use the examples.

The key examples are explained below. Each quickstart also has a readme providing the instructions for use.

The database is defined by the datasource configuration located here: $JBOSS_HOME/standalone/deployment/overlord-rtgov/rtgov-ds.xml as part of the server installation type.

The default SQL database is the H2 file based database, and is created during the installation of the all type.

Note

The following sections discuss changes to the standalone-full.xml configuration file. If using a clustered environment, then these changes should be applied to the standalone-full-ha.xml instead.

MySQL

  • Create the folder $JBossAS/modules/mysql/main.
  • Put the MySQL driver jar in the $JBossAS/modules/mysql/main folder, e.g. mysql-connector-java-5.1.12.jar.
  • Create a module.xml file, within the $JBossAS/modules/mysql/main folder, with the contents:
<module xmlns="urn:jboss:module:1.1" name="mysql">
   <resources>
     <resource-root path="mysql-connector-java-5.1.12.jar"/>
   </resources>
   <dependencies>
     <module name="javax.api"/>
     <module name="javax.transaction.api"/>
   </dependencies>
</module>
  • Edit the $JBossAS/standalone/configuration/standalone-full.xml file to include the MySQL driver:

<subsystem xmlns="urn:jboss:domain:datasources:1.0">
        <datasources>
            .....
            <drivers>
                ...
                <driver name="mysql" module="mysql">
                    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                </driver>
            </drivers>
        </datasources>
    </subsystem>
  • Update the rtgov datasource file, $JBossAS/standalone/deployments/overlord-rtgov/rtgov-ds.xml, the contents should be:

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
    <datasource jndi-name="java:jboss/datasource/OverlordRTGov" pool-name="OverlordRTGov" enabled="true" use-java-context="true">
        <connection-url>jdbc:mysql://localhost:3306/rtgov</connection-url>
        <driver>mysql</driver>
        <security>
            <user-name>root</user-name>
            <password></password>
        </security>
    </datasource>
</datasources>

Postgres

  • Create the $JBossAS/modules/org/postgresql/main folder.
  • Put the postgresql driver jar in the $JBossAS/modules/org/postgresql/main folder, e.g. postgresql-9.1-902.jdbc4.jar.
  • Create a module.xml file, within the $JBossAS/modules/org/postgresql/main folder, with the contents:
<module xmlns="urn:jboss:module:1.1" name="org.postgresql">
   <resources>
     <resource-root path="postgresql-9.1-902.jdbc4.jar"/>
   </resources>
   <dependencies>
     <module name="javax.api"/>
     <module name="javax.transaction.api"/>
   </dependencies>
</module>
  • Edit the $JBossAS/standalone/configuration/standalone-full.xml file to include the PostgresSQL driver:

<subsystem xmlns="urn:jboss:domain:datasources:1.0">
        <datasources>
            .....
            <drivers>
                ...
                <driver name="postgresql" module="org.postgresql">
                    <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
                </driver>
            </drivers>
        </datasources>
    </subsystem>
  • Update the rtgov datasource file, $JBossAS/standalone/deployments/overlord-rtgov/rtgov-ds.xml, the contents should be:

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
        <datasource jndi-name="java:jboss/datasource/OverlordRTGov" pool-name="OverlordRTGov" enabled="true" use-java-context="true">
        <connection-url>jdbc:postgresql://localhost:5432/rtgov</connection-url>
        <driver>postgresql</driver>
        <security>
            <user-name>....</user-name>
            <password>....</password>
        </security>
    </datasource>
</datasources>