Chapter 18. Example: Managing Grouped Servers (JBoss EAP 5)

A lot of enterprise servers have a concept of managed servers. A managed server means that there is a central instance that deploys content or sends configuration to all registered application servers. Using managed servers helps administrators ensure that all active application servers have the same version of the deployed packages and configuration.
JBoss ON can imitate the behavior of managed or clustered servers for applications like Tomcat or JBoss EAP 5 by creating a management script that can be invoked to perform actions simultaneously on all members of a JBoss ON group. All of the EAP 5 instances are functionally managed servers, while JBoss ON itself acts as the domain controller.
NOTE
JBoss EAP 6 has a very different server topology than JBoss EAP 5, so domain controllers, managed servers, and domain configuration are defined and manageable by default.

18.1. The Plan for the Scripts

The JBoss ON CLI can run defined JavaScripts using the -f parameter. The idea here is to create a series of small management scripts that perform specific tasks on a group of JBoss EAP servers. This example has seven scripts for:
  • Creating a group
  • Adding EAP instances to the group
  • Checking EAP status
  • Starting the EAP instance
  • Scheduling an operation
  • Deploying new content to the group
  • Checking metrics
A wrapper script and configuration file will be set up so that only one command needs to be run; the wrapper invokes the appropriate JBoss ON CLI script depending on the command passed to the wrapper.