Alert.png The wiki is deprecated and due to be decommissioned by the end of September 2022.
The content is being migrated to other supports, new updates will be ignored and lost.
If needed you can get in touch with EGI SDIS team using operations @ egi.eu.

Federated Cloud Virtual Machine Image Preparation

From EGIWiki
Jump to navigation Jump to search
Overview For users For resource providers Infrastructure status Site-specific configuration Architecture




Overview

Packaging your application in a custom VM image is a suggested solution in one of the following cases:

  • your particular OS flavor is not available into the existing image catalogue
  • installation of your application is very complex and time-consuming for being performed during contextualization
  • you want to reduce the number of 'moving-parts' of your software stack and follow an immutable infrastructure approach for deploying your application.

Custom VM images can be crafted in different ways. The two main possibilities are:

* start from scratch, creating a virtual machine, installing an OS and the software on top of it, then taking the virtual machine OS disk as custom image, or 
  • dump an existing disk from a VM or physical server and modify it, if needed, to run on a virtualization platform.

In this guide we will focus on the first option, because it tends to produce cleaner images and reduces the risks of hardware conflicts. Snapshotting may be also restricted by the cloud providers or by security policies.

Advantages

  • Possibility to build the virtual disk directly from a legacy machine, dumping the contents of the disk.
  • Possibility to speed-up the deployment for applications with complex and big installation packages. This because you do not need to install the application at startup, but the application is already included in the machine.

Disadvantages

  • Build a virtual disk directly from a legacy machine poses a set of compatibility issues with hardware drivers, which usually differs from a virtual and physical environment and even between different virtual environments.
  • You need to keep updated your machine. Outdated VM disk images may take long time to startup due to the need to download and install the latest OS updates.
  • If you are using special drivers or you are not packaging correctly the disk, your custom VM image may not run (or run slowly) on different cloud providers based on different virtualization technologies.
  • VM images images on public clouds are sometimes public, thus be aware of installing proprietary software on custom S images, since other users may be able to run the image or download it.
  • In general, the effort to implement this solution is higher than the basic contextualization.

Image size and layout

Contextualization and credentials

You can prepare fully customised Virtual Appliances and make them available to the sites supporting your VO.

  1. First, prepare a Virtual Machine Image (VMI) that encapsulates your application.
  2. Make the VMI available online, for example in the EGI Appliance Repository
  3. Register the VMI as a new Virtual Appliance in the EGI Applications Database
  4. Once your VA is published, inform your VO through Applications Database about it.
  5. Once your appliance is in the VO-wide image list, it will be deployed on the Federated Cloud sites of your VO.

Security

Workflow

Add-context-disk.png