Creating virtual machine work units required an easy method for users to place there grid application within an environment suited for their needs. Grid virtual appliances can be constructed using a very simplistic process that provides flexibility for the grid application giving it complete control of its environment.
The most simple approach for tailoring the application execution environment is to allow the user to select a base image to be run the application within. This base image is defined by its operating system.
A Grid Virtual Appliance is made up of five components:
- Base - The base image is a virtual machine disk with an operating system installed with the execution environment suitable for an application. Base images can be created with any operating system and its environment can be tailored as required, however the only requirement is that the grid virtual appliance daemon is installed. This is to facilitate the ability to launch scripts passed in externally for the virtual appliance. This is pre-selected by the user and/or found by specifying the operating system requirements of the application.
- Application - The application is provided by the user and is to be executed within the virtual machine. This application needs to be compatible with the base operating system. The application is provided by the user. It can be as simple as a single executable or can be as complex as a fully fledged application with dependancies and installation requirements.
- Data - This can be passed in either at the creation of the virtual appliance or when the grid virtual appliance is instantiated. This is provided by the user at execution and/or creation time.
- Autorun Script - The autorun script is a launching script that is specific for the application. This includes any initialisation required before the application is executed, how data is passed to the application either by piping or command-line, and any post processing required on the output from the application. This is generated by the packager however the user can modify the autorun script to tailor their needs.
- Output Destination - A specific place where the output of the application can be stored. This allows the output to then be accessed externally without requiring the entire grid virtual appliance package being copied. This is generated by the packager however the packager needs an estimate for the size of the output.
Packaging Process
The above diagram details the process of packaging a grid virtual appliance.
- The GVAP initialises creating temporary directories for each GVA component.
- The user then passes an application to the packager. That is, the user provides a file listing and diretory structure to the packager. This is copied into the application virtual machine disk image. The user also specifies the estimated output size of the application, and the command used to launch the application within the virtual machine.
- The user then selects the base image or provides the GVAP with the requirements of the application to then determine the most suitable base image. This base image is copied to the temporary directory to ensure that base images remain untouched.
- Given the application and base image, the GVAP generates the script required to execute the application within the virtual machine. This script can be modified by the user to allow for pre-processing and post-processing.
- The script and application are then pushed to an application / input virtual machine disk image.
- The output virtual machine disk image is then created given an estimate output size provided by the user.
- Given all the generated virtual machine disk images as well as the base image and application requirements, a open virtualisation format (OVF) XML configuration file is generated.
- Finally all the generated content is pushed into a single package (OVA).
The package generated can now be executed like any other virtual appliance.