Apache: Capturing an Image to run in a Xen VM and Creating a Tier
Intended for use with Cassatt Active Response Premium Edition and Data Center Edition V5.1.
This blueprint describes how to deploy Apache in a Xen VM
within the Cassatt Active Response environment. If you haven't read Understanding the Cross Virtualization Manager and Understanding
Blueprints for Deploying Applications, read that first for
background and context.
Prerequisites

|
Software requirements:
- Red Hat ELAS 4.1 or 4.4: Set up a Red Hat installation server as described in Appendix E of the XenEnterprise user guide, Getting Started With XenEnterprise.
- Apache Web Server
- XenEnterprise Administrator Console 3.2:
Follow the installation instructions provided in the XenEnterprise user guide, Getting Started With XenEnterprise, to install the XenEnterprise Administrator Console on a workstation outside the Cassatt Active Response environment. You will need the Administrator Console to create a VM to use as the virtual image host.
|
 |
Image host requirements:
|

|
Capture/deployment method:
This blueprint includes two methods for capturing and deploying Apache in XenEnterprise VMs—both methods leverage Xen storage mechanisms: virtual block device (VBD) file and NFS root.
Use the method that works best for your site based on how Cassatt Active Response serves the images:
|
Advantages |
Disadvantages |
VBD: Cassatt Active Response copies the entire file into the VM each time a VM is booted. |
Fast disk IO |
Volatility: Any changes made to the VBD file are lost when the guest VM is rebooted (and when the host application node is rebooted, since rebooting the host also reboots the VMs)
Power on is slow because the entire
VBD image (possibly multiple gigabytes in size) is copied from the image matrix every time a VM is powered on |
NFS root: Cassatt Active Response serves the image in the usual way via NFS. |
Persistence: Any changes made to the image are saved and used across VM (and host node) reboots.
Fast boot |
Slower net IO |
|
 |
Tier Settings:
|

|
Network Requirements (Data Center Edition Only): XenEnterprise does not support VLAN interfaces within VMs, and Xen VMs are limited to three NICs. Consequently, this tier is limited to a primary network plus two additional networks, which must have dedicated NICs.
In addition, Xen guest tiers are limited to those networks you selected for the XenEnterprise host tier. From the networks selected for the host tier, select a primary network and up to two additional networks. |
The blueprint steps
This blueprint differs somewhat from the standard high-level
blueprint steps.
- For this blueprint, reserving the physical image host
is a prerequisite because XenEnterprise must already be running
before starting this blueprint. Instead, you must create a XenEnterprise VM to serve as the virtual image host.
- Installing Apache is part of installing the operating system.
- This blueprint includes two capture methods: virtual block device (VBD) file and NFS root.
Step 1: Create a XenEnterprise VM to be the virtual image host
- Log into the XenEnterprise Administrator Console on your workstation using the IP address of your physical image host for the XenEnterprise Server.
- Install a XenEnterprise VM using the instructions provided in the XenEnterprise user guide, Getting Started With XenEnterprise.
- In the Install From field, select your preferred Red Hat Enterprise Linux repository (4.1 or 4.4).
- Use your own values for all other fields.
The VM you create in this step serves only as a container; the VM itself is not copied during image capture. Values you specify during VM creation are used only while installing the operating system and configuring Apache.
Step 2: Install the operating system
When the Red Hat installation begins, use the following settings; for fields not listed, use values appropriate for your site:
- IP configuration: use the static IP address from the last step and the default gateway and DNS server for your Cassatt Active Response environment
- Packages: make sure the GNU Compiler and Apache Web Server are installed
Step 3: Configure your software
Follow these steps to set up the Apache configuration on the virtual image host.
- Log into the VM:
- Connect to the physical image host via ssh.
- List the VMs:
xm list
- Identify your VM ID (only one should be listed) and log in:
xm console ID
- Set the firewall to off:
chkconfig iptables off
- To facilitate http monitoring, configure Apache to start automatically when the system is rebooted, as follows:
chkconfig httpd on
- If you have web content ready to deploy, do so now.
If you do not have web content to deploy, you need to put a placeholder index.html file in /var/www/html for Cassatt Active Response to use in monitoring the Apache service. A simple way to create a blank file that serves this function is to navigate to /var/www/html:
cd /var/www/html
Then issue the touch command to create a blank file called index.html:
touch index.html
- Edit the network configuration as follows, deleting the lines for HWADDR, NETMASK, IPADDR, and GATEWAY:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
TYPE=Ethernet
ONBOOT=yes
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.
NFS root capture
Follow these steps:
- Using the XenEnterprise Administrator Console, check to make sure your VM is running.
- Log into the active Cassatt Active Response 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 suggested values for the Apache 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.
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, xenhost, xenguest, windows, solaris): |
xenguest |
|
Enter the IP address or hostname of the image host: |
ipaddress |
Use the IP address of the XenEnterprise VM you created as the virtual image host. |
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 |
|
Monitor via ping? [n]
Ping Timeout (seconds): [15] |
y
30 |
|
- 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
VBD capture
Follow these steps:
- Using the XenEnterprise Administrator Console, shut down your VM.
- 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 suggested values for the Apache 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.
At this prompt... |
Enter... |
Notes |
Enter the image type (linux, vmhost, xenhost, xenguest, windows, solaris): |
xenguest |
|
Enter the IP address or hostname of the image host: |
ipaddress |
Use the IP address of the physical image host. |
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 |
|
Monitor via ping? [n]
Ping Timeout (seconds): [15] |
y
30 |
|
- 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 Apache 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 Apache 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.
At this prompt... |
Enter... |
Notes |
Dependencies |
XenHostTier |
Note: If you select more than one tier, every tier you select must be activated for this tier to activate. |
- On the networks page, select a primary network. Data Center Edition only: Select up to two additional networks, and select the Dedicated checkbox for the additional networks. Make sure all networks you select are assigned to the host tier that is providing the VMs.
- 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.
Do not personalize images captured as VBD files: all changes are lost when the VMs are rebooted.
top
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 Apache 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 Apache 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 an Apache image.
Was this article useful? Tell us what you think.
Email infocentral@cassatt.com.
|