Information Technology Reference
In-Depth Information
change rarely, if at all, this may be good enough for some sites, or at least a good half-
measure on the way to full automation.
Another strategy is to reduce complexity through standardization. Standardizing on a
few hardware configurations makes machines interchangeable. Usually you create one
model for heavy computation with lots of RAM and CPU, and one model for mass storage
with lots of disk. Now all machines in a category can be treated as a pool of machines, al-
locating onewhenneededandreturningittothepoolwhenitisnot.Youcancreate anAPI
that permits such allocations to happen almost as easily as creating virtual machines.
10.4.2 Preparing Virtual Machines
Preparing virtual machines should be a matter of making an API call. That said, having a
few standard sizes can make management easier.
For example, one might allocate VMs in sizes such that either four small, two medium,
or one large VM perfectly fills the physical machine. Then there is less chance that a phys-
ical machine may have some space unused, but not enough to create a new VM.
OnecanalsousemultiplesofFibonaccinumbers.Ifa5-unitmachineisdeallocated, for
example, that leaves room for five 1-unit machines, a 2-unit plus a 3-unit machine, and so
on.
Thisnotonlyhelpsfullyutilizethephysicalmachinesbutalsomakesreorganizingthem
easier.ImagineasituationwhereamediumVMisneededbuttheonlyfreespaceisthesize
of a small VM on one physical machine and a small VM on another physical machine. If
the VM sizes are standardized, it is easy to determine how VMs could be moved to create
amedium-sized spaceononephysicalmachine.IfeachVMisacustomsize,movingVMs
around might still be possible but the movements could be like the Towers of Hanoi prob-
lem, requiring many intermediate steps and inefficiencies.
10.4.3 Installing OS and Services
Installing the operating system and service configuration can be done in many ways. The
two main approaches are an image method and a configuration management method.
The image methodinvolvescreatingadiskimageforeachkindofservice.Thisimageis
then copied onto the disk and, after a reboot, the machine comes up preconfigured. Images
canbedeployedtophysicalmachines,virtualmachines,orcontainers,asdescribedin Sec-
tion3.2 . Theimagecontains theoperatingsystem,allrequiredpackages, andtheservice in
a ready-to-run form. It is known as a baked image because the service is “baked in.”
The configuration management strategy involves using an installer or other mechan-
ism to get a minimal operating system running. Configuration management tools can then
Search WWH ::




Custom Search