Template Repository Reference
Work in Progress
We are currently working to improve this documentation
What is a Remote Template Repository?
Template Disk Support
A Remote Template Repository contains different virtual machine template definitions ready to download. These appliances are defined by a simplified version of the OVF standard.
A template repository space contains an index of virtual machine template definitions. It can be published on the Internet, for public access, or on your company intranet, for controlled and secured access. The creators of virtual machine templates can use a repository to share their templates with other Abiquo users.
This document provides information about the structure and contents of a basic template repository using a system of flat files. This information is provided in case you wish to build your own template repository. However, building your own template repository is not supported by Abiquo. Abiquo recommends using the template-repository application. The template-repository application uses a filesystem or SQL database, so it has a different structure to the one described here.
Structure of a Basic Template Repository
The basic template repository contains:
- Root folder: the initial folder that contains all the template definition folders and the OVF index file.
- OVF index file (ovfindex.xml): an XML file that contains the summary of all the virtual machine template definitions that will be shared
- Template Definition Folders for each template containing:
- OVF descriptor file (e.g. mydisk.ovf): an XML file that contains the information about the virtual machine
- Virtual Disk file (e.g. mydisk.vmdk): the disk file referenced in the OVF descriptor
- Icon Disk file (optional, e.g. myicon.png): an icon file referenced in the OVF descriptor
Root Folder
This folder will be shared by the Play Framework or your chosen web/application server (Tomcat, JBoss, Apache, etc.). The ''Root Folder'' holds the virtual machine template definitions in the template definition folders. It also contains the ovfindex.xml file.
OVF Index File - ovfindex.xml
- This is a file called ovfindex.xml in the root folder.
- It lists all the available OVF packages in the file system (relative to ''root folder''), each .ovf has its OVF Description: brief description (based on its ProductSection) of the OVF description file, which also includes:
- OVF File: ''root folder'' relative path to the .ovf document.
- Disk Format type: the Template Format as described in the Template Compatibility Table e.g. VMDK_FLAT, VMDK_SPARSE, RAW, VHD_FLAT, STREAM_OPTIMIZED.
- Disk size: optionally specifies the disc capacity in bytes.
- Categories: tag organization. Used to filter the repository list (''Others'' is the default).
- ProductSection elements: Info, Product, Vendor, Version, ProductURL. This information can be completed to allow other users to read the virtual machine template details. It should be the same information as that contained in the OVF descriptor.
- Icon: allows you to include an icon in the template information. If you use an online icon, the URL must be accessible to Abiquo if the user wishes to see the icon. Otherwise you can upload your own icons to the Appliance Library. and make use of the Abiquo Tomcat server for the icon URLs.
Additionally the ovfindex includes:
- RepositoryName: human description ("myRepository").
- RepositoryURI: contains the URL where the repository will be exposed ("http://rs.bcn.abiquo.com").
<?xml version='1.0' encoding='UTF-8'?> <ns2:RepositorySpace xmlns:ns5="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ns4="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:ns3="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:ns2="http://www.abiquo.com/appliancemanager/repositoryspace" xmlns:ns1="http://schemas.dmtf.org/ovf/envelope/1" ns2:RepositoryURI="http://rs.abiquo.com" ns2:RepositoryName="REPOSITORY NAME"> <ns2:OVFDescription ns2:OVFCategories="Operative Systems" ns2:OVFFile="centos-5-rpath-1-x86/description.ovf" ns2:DiskFormat="VMDK_FLAT"> <ns1:Product>Centos 5.0</ns1:Product> <ns1:Vendor>Debian Fundation</ns1:Vendor> <ns1:Version>5.0</ns1:Version> <ns1:ProductUrl>[http://www.centos.org/]</ns1:ProductUrl> <ns1:Icon ns1:fileRef="http://icons.abiquo.com/centos_logo.png"/> </ns2:OVFDescription> </ns2:RepositorySpace>
OVFFile
The OVFindex file should be in the ''root folder'' making the ''RepositoryURI + OVFFile'' a valid URL for downloading the OVF file. http://rs.abiquo.com/centos-5-rpath-1-x86/description.ovf
Generate an ovfindex.xml
You should use Template-Repository to manage the template repository. It will automatically generate an ovfindex.xml file for your repository.
To view this file in template-repository, enter the file URL in the format http://my.template.repository.URL:PORT/ovfindex.xml.
To save this file on your machine, go to the browser main menu and select "Save page as" or similar. You can also view the source code and then cut and paste the page.
Template Definitions
OVF Descriptor File
A Template Definition contains a metadata file (OVF descriptor file, see OVF Reference) and all its required referenced files. All the FileRefs in the ''References'' element for the .ovf descriptor should be valid relative paths. See the OVF Reference section in this VM Template Guide for information about the OVF descriptor file.
The template-repository application will automatically create an Abiquo OVF descriptor file.
Virtual Disk File
See Template Compatibility Table for information about compatible disk formats.
Alternative Ways of Publishing a Repository
You can host a public repository with a web server such as an Apache HTTP server or Amazon S3.
Amazon S3 is an object storage system that can expose objects as a classic static HTTP server. This means that if you want to host your repository in S3, you only need to create the same structure described for an Apache HTTP Server in Amazon S3. You can do it directly using their APIs, or with a wide range of consoles and tools. Just remember that you have to permit access to your users (or 'Everyone' for a public repository) and you should control the use of your repository, because it will contain large files that will consume a great amount of bandwidth.
Copyright © 2006-2022, Abiquo Holdings SL. All rights reserved