Note that these instructions will only work for RHQ > 4.2.0 since the EAP 5 plugin bundled with RHQ 4.2.0 will fail to properly discover EPP 5.2. If you're using RHQ 4.2.0, please use the attached EAP 5 plugin and follow the same process with it as you did to install the GateIn plugin. Do not forget to update the plugins on the agent!
Installing the RHQ server
- Download RHQ from http://rhq-project.org/display/RHQ/Download
- Unzip it, let's call the resulting directory
- Go to: http://localhost:7080/installer/
- Click on "Click here to continue the installation"
- Use the appropriate database from the "Database Type" dropdown. For quick testing, use the unsupported H2 (embedded)
- Input your database information. If you used the H2 version, nothing else is needed. If you test your database connection, your password will be lost, make sure to re-input it in the field!
- Once you're set, click on "Install server"
- Wait for the install process to finish and click on the "Done! Click here to get started!" link. It might not work (i.e. loop forever on the welcome page). If that happens, go directly to http://localhost:7080/coregui
- Log in with
- If everything went well, you should see the RHQ dashboard.
Installing the GateIn JON plugin
- Get the code from https://github.com/gatein/gatein-rhq
- Choose right portal platform
- GateIn 3.5 on as7 or EPP 6.x:
git checkout master
- GateIn 3.x on as5/6 or EPP 5.2.x:
git checkout as5-plugin
- GateIn 3.5 on as7 or EPP 6.x:
- Compile using:
- Copy jar in
target/gatein-as7-rhq-plugin.jarfor GateIn 3.5 on as7 or EPP 6.x
target/gatein-rhq-plugin.jarfor GateIn 3.x on as5/6 or EPP 5.2.x
- If the server was running, you can upload the plugin jar from the Administration tab, selecting Configuration/Agent Plugins in the left pane and then clicking on the "Choose File" button at the bottom of the main pane. Alternatively, if you copied the plugin jar to the server plugins directory while it was running, you can do a Scan For Updates on that same screen.
Installing the RHQ agent
- With the RHQ server running, go to http://localhost:7080/agentupdate/download. This will download the agent installer.
java -jar <agent-download.jar> --install[=<new agent directory>]This command will install a new agent. If you do not specify the new agent directory, the default will be "." and will create a new directory called
./rhq-agent.shand wait for the prompt to appear. You can type
helpat the prompt to see the available commands. Tab completion also works when inputting commands.
plugins updateat the prompt. You should see something like "The plugin [GateIn] has been updated at [gatein-jon-plugin.jar].".
Preparing GateIn / EPP
GateIn 3.5 on as7 or EPP 6.x
By default the admin console is secured and you need to allow RHQ/JON to access it. Easiest way to add a managed user is to startup the sever and then run the
$JBOSS_HOME/bin/add-user.sh|bat script and follow the instructions to add a managed user.
GateIn 3.x on as5/6 or EPP 5.2.x
By default, the JMX console is secured and you need to allow RHQ/JON to acces it. This can easily be done by uncommenting
$JBOSS_HOME/server/default/conf/props/jmx-console-users.properties. After this has been done startup up the server.
Accessing the GateIn plugin from RHQ
- After the instance is running, it should appear in the Autodiscovery Queue (http://localhost:7080/coregui/#Inventory/Resources/AutodiscoveryQueue) of the RHQ GUI. This will be the one having the proper Resource Key (path to your GateIn/EPP install).
- For GateIn 3.x / EPP 5.2.x several plugins will recognize the instance so be sure to select the one that says "JBoss Application Server 5" in its descriptions. The other one actually uses the AS 4 plugin and that won't work.
- Select the recognized instance by clicking on the checkbox for it and then click on "Import" at the bottom.
- The GateIn/EPP instance should now be available as a "Servers" resource at http://localhost:7080/coregui/#Inventory/Resources/Servers.
- If the instance is not available (i.e. you see it under the Unavailable Servers resources in the Inventory), please make sure that you followed instructions Preparing GateIn / EPP
- Go to the Inventory tab in RHQ and locate your unavailable EPP instance in the list of unavailable servers.
- Right-click on it in the left pane to display the contextual menu and select "Connection Settings" (or go to http://localhost:7080/coregui/#Resource/<resource id>/Inventory/ConnectionSettings if you know the resource id for your server).
- Uncheck the "Unset?" checkboxes for the "Principal" and "Credentials" properties in the "Connection Info" section and put in the credentials you added to the GateIn/EPP instance either via jmx-console-users.properties or add-user script.
- Click on "Save" at the top.
- Your GateIn/EPP instance should now be available!
- Select the instance at http://localhost:7080/coregui/#Inventory/Resources/Servers by clicking on it in the main pane. It should now be displayed in the main pane while the left pane should have changed to display the currently selected resource.
- You should see a child resource for the GateIn/EPP instance which should list all available portal instances. Clicking on one should display information for that particular portal!
- For GateIn 3.x / EPP 5.2.x the child resource is named "Portals"
- For GateIn 3.5 / EPP 6.x the child resource is named gatein and under that is "Portals".