RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Prototype Complex Enterprise Solutions with Just Your Workstation : Page 2

Before embarking on a hardware purchasing spree to prototype and test that clustered backend solution you're planning, learn how virtualization enables you to build a prototype right on your desktop.


Establish the Virtual Environment

This section elaborates on the steps required to establish a multi-machine virtual cluster that could run pairs of Web servers, application servers, and databases (see Sidebar 1: Requirements for Virtual Cluster Prototype). It describes what it takes to establish the cluster topologies with and without hardware firewalls, as well as load balancers simulated through virtual machines (see Sidebar 2: Prototyping Strategy).

Step 1: Determine Guest Machine Template
To save time and expedite the effort, you should establish a "template machine" that contains all the required components for your virtual machines. The example prototype uses MySQL 5.1 with cluster extensions installed on the template machine.

Your configuration depends on your needs and the nature of the prototype (security, size, performance requirements, etc.). You could select a "hardened" installation with only the smallest, safest set of operating system components. In that event, you should still have at least one file-transfer protocol available, so that you can add components to your virtual machines later if needed. Another approach is installing the operating system with all the options you can imagine. This installation would certainly require more resources from the virtual machine.

Click to enlarge 
Figure 1. Virtual CD Drive Mapped to ISO Image

Step 2: Install Guest Machine
VMware Workstation offers two convenient ways to install the operating system:
  1. From the host machine's physical CD/DVD drive
  2. From the virtual CD/DVD drive (i.e., from the ISO image on the physical machine's hard drive)

Virtual drive installation is very quick. You may find it more convenient to have ISO images for your operating system, but keep in mind that if you have a multi-CD installation you will need to remap the virtual CD (ISO image) every time you are asked to continue installation from the next CD. For this reason, I found downloading the Server ISO or DVD ISO images for Linux distributions (e.g., CentOS) very convenient (see Figure 1).

Each CentOS Linux 3 guest will be installed in a non-graphic mode, which occupies about 1GB of space on the hard drive and runs minimal kernel services requiring between 192MB and 256MB of memory per virtual machine.

When you install the guest operating system, VMware requires you to specify all the basic parameters for your virtual machine: memory, network, allocated drive storage. For the template operating system, I usually select the default options and NAT (Network Address Translation) networking. You can customize these options later.

Click to enlarge 
Figure 2. Specifying the Type of the Clone

Step 3: Create Clones
The ability to clone the virtual machines is the primary reason for having a template operating system in the first place. You will use it to create clone machines (i.e., other members in the cluster).

With VMware 5.5, creating clones of the virtual guests is generally a simple process. It enables you to create a linked or a full clone (see Figure 2). Linked clone is an especially convenient feature for the type of prototype discussed here. As the name implies, it creates a clone whose installation files are linked to a "parent", an original virtual machine, and for which VMware creates only the specific configuration files. If you do not plan to move these clone machines around, linked clones are probably the best solution. If you plan on moving the guest machines across multiple host machines, I recommend going with the full clone option. It creates a full replica of the parent virtual machine.

For the example, I created three clones of the templated Linux-with-MySQL installation.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date