JBoss: Capturing an Image and Creating a Tier
Intended for use with Cassatt Active Response Premium Edition and Data Center Edition V5.1.
This blueprint describes how to install, configure, and deploy JBoss Application Server to run in the Cassatt Active Response environment. If you haven't read Understanding Blueprints for Deploying Applications, read that first for background and context.
Prerequisites
 |
Application node hardware requirements:
- Make sure enough nodes in your Cassatt Active Response environment have local disk to satisfy the max nodes for both tiers. Consider any other tiers in your domain that may also require local disk.
- If you are installing a 64-bit version of the OS, follow these steps to set a custom attribute to identify x86_64 servers and ensure they are the only nodes allocated to run the image:
- Identify all of the x86_64 nodes.
- Add a custom attribute to each of those nodes that indicates the nodes can be allocated to run images that require a 64-bit-capable architecture. Refer to the online help topic entitled "Using custom hardware attributes to specify hardware for your software" for information.
- When you capture the JBOSS image, assign the same custom attribute to the image as you assigned to the nodes.
- When you create the JBOSS tier, the custom attribute is assigned by default. Do not remove the custom attribute.
If you intend to run a 64-bit version of the OS in VMware ESX 3.0 VMs, you must have set up your VMware host tier with a custom attribute for supported x86_64 nodes. See also VMware KB 1901, Hardware and Firmware Requirements for 64-Bit Guest Operating Systems for supported 64-bit–capable processors. You must also have set a custom attribute on the VMs created by the host tier to indicate that the VMs are running on an x86_64 host.
|
 |
Image host requirements: If you are installing a 64-bit version of the OS, select a node with the x86_64 custom attribute. |
 |
Software requirements:
- Red Hat ELAS 3 (x86 only) or 4 (x86 or X86_64)
- An up-to-date version of the Java Virtual Machine (JVM) is the minimum requirement to run JBoss; if you are using JBoss with other applications, the Java Developer's Kit (JDK) may be necessary to get JBoss to work with those.
Cassatt-tested versions: JBoss 3.2.7 with J2EE SDK V1.3.1 and Java Standard Edition 1.4, or JBoss 4.0.2 with JDK/JRE 1.5
|
 |
Tier Settings:
- SLA: Determine the SLA type and settings for the tier. To understand SLAs, see Understanding
Tier Configuration and Personalization.
- If your JBoss tier will run in a VM guest tier, determine which VMware host tier (or tiers) will provide the VMs for your JBoss tier.
- Tier Dependencies: If this tier will run only in VMs, and not on physical hardware, select at least one of the VMware host tiers as a tier dependency to ensure that VMs are available for this tier. For more information, read about tier dependencies.
- Custom Attributes:
To ensure that VMware VMs are assigned to the tier, use the vmware custom attribute, which Cassatt Active Response assigns to VMware VMs automatically.
Also, use the custom attribute that designates storage for the VMs in the host tier (or tiers). Because the custom attribute represents the storage access, use only one storage custom attribute to ensure that all VMs allocated to the tier have the same storage access.
- HBA key: FC SAN only—use the HBA key from the VMs in the host tier (or tiers).
|

|
Network Requirements: Determine the network to associate with the tier. Make sure it has adequate IP addresses free to accommodate maximum nodes for the tier. |
top
The blueprint steps
This blueprint follows the standard high-level blueprint steps.
Step 1: Reserve a node from the free pool to use as an image host
- From the Controller, click the Free Pool.
- Select a physical node to reserve.
You can differentiate between physical and virtual node by looking at the ID; virtual node IDs are appended with _vnodeN, for example, node003_vnode1.
Be sure to select a node with the architecture required for your operating system; that is, Sparc for Solaris or IA32 for Linux or Windows.
- Select Node Actions > Reserve for Image Capture.
- Note the node's IP address, which you will use when you install the OS and capture the image.
Step 2: Install and configure the operating system
Follow instructions to install and configure ELAS 3 (32-bit only) or 4 (32-bit or 64-bit): Red Hat ELAS.
Red Hat Enterprise Linux 5 is not supported for this blueprint.
If this image will run in VMware VMs, make sure your Red Hat ELAS version and update level are supported by VMware. For more information, refer to your VMware documentation.
top
Step 3: Install and configure your software
Follow these steps to install the Java platform and JBoss software on the image host.
- If necessary, download the Java platform.
http://java.sun.com/j2se/1.5.0/download.jsp
- If necessary, download the JBoss software; the platform- independent binary version of
JBoss is recommended.
http://labs.jboss.com/portal/jbossas/download
- Install the Java platform on the image host. For example:
chmod a+x jdk-1_5_0 version-linux-i586-rpm.bin
chmod a+x jre-1_5_0 version-linux-i586-rpm.bin
./jre-1-5_0version-linux-i586-rpm.bin
./jdk-1-5_0version-linux-i586-rpm.bin
rpm -iv jdk-1_5_0version-linux-i586.rpm
rpm -iv jre-1_5_0version-linux-i586.rpm
- Follow the steps in the JBoss installation documentation. To ensure a successful
installation, follow these additional tips in the sections for installing JBoss, starting the
server, and running the server as a service:
- After downloading JBoss, unpack the archive to your machine. For example:
cd /opt
mkdir apps
cd apps
tar xzvf jboss-4.0.2.tar.gz
- To start JBoss on the image host, execute the run script using the cluster mode
command:
run.sh -c all
- When editing the startup script (jboss_init_redhat.sh), the following edits are required or JBoss will not run properly:
- Add the location where JBoss was installed ($JBOSS_HOME)
- Set java path variable (JAVAPTH):
JAVAPTH=${JAVAPTH:-"/usr/java/j2sdk1.5.0/bin"}
- Set the start script to run JBoss cluster:
JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c all"}
- Add the correct the command to shutdown JBoss:
JBOSSSH2=${JBOSSSH2:-"$JBOSS_HOME/bin/shutdown.sh -S"}
CMD_STOP="cd $JBOSS_HOME/bin; $JBOSSSH2"
- Set the console log message variable to "/var/log/jboss_console":
JBOSS_CONSOLE=/var/log/jboss_console
- Set the "RUNAS" variable to "RUNASIS" (see comments in script):
JBOSSUS=${JBOSSUS:-"RUNASIS"}
- Modify the $PATH variable making sure that the location of the Java binary
precedes the $PATH variable:
export PATH=$JAVAPTH:$PATH
- Add a “sleep” command to the "restart" option. JBoss may take a few seconds
to completely shut down; restarting immediately causes JBoss to not start correctly:
restart)
$0 stop
sleep 20
$0 start
;;
- To configure JBoss as a service:
cp jboss_init_redhat.sh /etc/init.d/jboss
chkconfig --add jboss
chkconfig jboss on
- Stop JBOSS before proceeding to the next step.
top
Step 4: Capture the image
In this step, you will capture the base image from the image host using the cccapture command—an interactive script. Although you can change the values later, it is most efficient
to supply valid values now.
Prerequisites
Follow these steps:
- Log into the active control node as root.
- Enter the following command to start the capture of the base image from the image host:
/opt/cassatt/bin/cccapture
- Answer each prompt.
The next table lists the suggested values for the JBoss blueprint; unless you have site-specific
reasons, you can accept the default values for other cccapture prompts.
For names,
descriptions, and other discretionary fields, use values that are meaningful to you. In the
image name, do not use spaces or characters (for example, /) special to Unix-based file systems such as Linux and Solaris.
For file system selection: selecting unneeded file systems wastes space but is otherwise harmless.
At this prompt... |
Enter... |
Notes |
| Enter the image type (linux,vmhost,windows,solaris): |
linux |
|
If a tier using this image must always run on a specific set of nodes,
custom attributes can be specified for the tier. These same attributes
must then be specified on each node that will be reserved for the tier.
The Cassatt system will then match on these attributes to ensure that
those nodes are always allocated for a tier with this image.
Do you want to specify any custom attributes for tiers using this image? [n] |
y or n |
If you installed a 64-bit version of the OS, use one of these custom attributes:
- If the image will run on 64-bit capable hardware, specify the x86_64 server architecture custom attribute.
- If this image will run in in VMware ESX 3.0 VMs, then specify the custom attribute you set on the VMs to indicate that the VMs are running on an x86_64 host.
|
| Enter an attribute value for nodes to use: |
x86_64attribute |
Enter the hardware architecture for this image
(ia32): [ia32] |
ia32 |
Select "ia32" even when your image requires a 64-bit-capable server. A custom attribute is required to ensure allocation of 64-bit-capable servers. |
Should this image be installed on the local disk (allowing the node to boot locally)? [n] y |
y or n |
See Alternatives to NFS: Image on Local Disk for details. |
Do your applications need write
access to any directories in the
image other than /etc, /dev, /var, /
tmp, and /root? [n] |
y |
|
Enter the absolute directory
pathname: |
/opt/apps |
|
OS Monitoring Options
Specify the operating system
monitoring that will be used
for this image (at least one
monitoring option must be
configured):
Monitor via SNMP? [n] |
y |
Cassatt recommends monitoring
the OS with both SNMP and
ping. |
Monitor via ping? [n] |
y |
Cassatt recommends monitoring
the OS with both SNMP and
ping. |
- In the Controller, release the image host back to the free pool by selecting the node using the checkbox, then select Node Actions > Release from Image Capture.
top
Step 5: Create the tier
Return to the Controller to define the JBoss tier. Cassatt Active Response prepopulates tier values with the parameters you set during image capture. If necessary, you can change them during tier creation.
- On the left navigation pane, click Tiers to display the Tier List.
- On the Tier List page, click the New Tier button (on the right).
- On the Properties page, set the properties for the JBoss tier.
- On the SLA page, select the SLA type and set as needed.
- On the Requirements page, set the hardware requirements for the tier.
Unless you have site-specific reasons, you can accept the defaults in fields not listed.
Prompt or Parameter |
Value or Selection |
Notes |
| HBA |
HBAKey |
If your JBoss tier will run in VMs—FC SAN only: select the checkbox and use the same HBA key that's assigned to the VMs that you want Cassatt Active Response to allocate to this tier. |
Custom Requirements |
CustomAttribute |
If your JBoss tier will run in VMs: Assign the vmware custom attribute and the same custom attribute you assigned to the VMs that you want Cassatt Active Response to allocate to this tier. |
Dependencies |
VMBaseTier |
If this tier will run only in VMs, and not on physical hardware, specify at least one VMware host tier. Note that:
- If you select more than one, every tier you select must be activated for this tier to activate.
- If you have multiple ESX host tiers that access different storage locations, you must select only ESX host tiers that access the same storage location.
- If you installed a 64-bit operating system, be sure to select a VMware host tier that runs supported x86_64 nodes.
|
- On the networks page, select a primary network.
- On the IPs and Hostnames page, assign IP addresses or host names, or accept the default settings.
- You can close the Creating Tier Progress page and continue with the next section.
top
Step 6: Personalize the image instances
The blueprint does not require personalization.
Step 7: Allocate nodes and activate the tier
Follow these steps to allocate nodes and activate the tier.
- From the Tiers table on the Domain page, select the checkbox for the JBoss tier.
- From the Tier Actions dropdown menu, select Allocate Nodes. Click Allocate Nodes on the confirmation page.
Cassatt Active Response allocates nodes and displays the Tiers table.
- Again, select the checkbox for the JBoss tier.
- From the Tier Actions dropdown menu, select Activate. Click Activate on the confirmation page.
Cassatt Active Response starts the operating system and the applications on each node in the tier.
This completes the procedure to create and deploy a JBoss image.
Was this article useful? Tell us what you think.
Email infocentral@cassatt.com.
|