Work In Progress
We are currently working to improve this documentation
A Template Repository contains different virtual machine template definitions ready to download. These appliances are defined by a simplified OVF file. For practical purposes, a template repository space is an index of virtual machine template definitions. This index can be published on the Internet, for public access, or within the Intranet of your company, for secure, controlled access. A template repository allows virtual machine template creators to share their templates with other Abiquo users in multiple datacenters.
For general information about the structure and content of a template repository, see Template Repository Reference.
The template-repository application is a side-project developed to work with Abiquo. It provides a user-friendly interface for creating and managing a template repository. The template repository's contents are described in the ovfindex.xml file, which is created and maintained in a database by the template-repository application.
The template-repository application is implemented with version 1.2.4 of the Play! Framework, a lightweight Java Web framework that provides functionality for MVC applications.
Please see Play Framework deployment documentation for more information about deployment options for Play! Framework applications.
The template-repository application makes it easier to work with virtual machine templates in Abiquo. It is easy to upload a virtual machine template disk file to the template-repository. The template repository automatically detects the disk format and size. Your virtual machine template is now ready for Abiquo users to download directly from the repository.
The template repository application creates an Abiquo .ovf file as described in this table.
Abiquo OVF Section
Abiquo Usage and Notes
Details displayed in the Abiquo Appliance Library
Used to provision the virtual machine. The Ethernet Driver is written to the .ovf file but Abiquo currently uses E1000 only on all hypervisors except ESX/ESXi
Virtual Disk File
DiskSection and fileRef to disk file
Used to provision the virtual machine. You should not change these values.
For more information see OVF Reference
Feature not yet implemented
To download the .ovf file, click the Download OVF button on the Edit screen.
To install template-repository you can perform one of these installs:
A full installation requires the following dependencies:
The following instructions are for Unix operating systems, but the Play Framework can also be installed on Windows.
Abiquo recommends that you install the template repository on CentOS 6. However, for convenience, we provide the following instructions on How to install the Template Repository on Abiquo Linux, which is based on CentOS 5.
Install the file using the package manager, for example:
Check the java version
Download, for example, while logged in to the server
Install unzip and unzip Play! Framework
Export Play! Framework path
Test play is installed correctly
Create a repo file. Edit /etc/yum.repos.d/epel.repo and copy and paste the following
Add the key for the repo
Install git using yum
After you install the dependencies, open a shell and go to the directory where you unzipped play framework. More information on the template-repository application can be found on GIT https://github.com/abiquo/template-repository Download the code for the template-repository using the following command:
Either go to the directory where you installed the Play Framework and run the template-repository or execute from the template-repository directory with the following commands.
This will run the application in the background and generate a .pid file (above example pid 12728).
You must manage the .pid file carefully because if the machine shuts down ungracefully, the .pid file will still exist when it restarts. This will mean that the application will not be able to start up again, even if it is currently stopped, because a .pid file exists. To delete the .pid file, run the following command:
Then the application will be able to start again.
You can deploy the template repository with a web application server. Abiquo recommends Apache Tomcat.
For example, to use a Tomcat server to deploy the template-repository:
Create the repository main folder. To create the default main folder (/opt/template_repository) use the following command.
You can configure the main folder in the application.conf file. See #Configuring the main folder
By default the configuration is stored in the template-repository/conf/application.conf file. This file contains more information about the configuration options.
See also the Play! Framework configuration documentation.
The directory where the disk files are stored and be configured by the following setting ovfcatalog.repositoryPath by default /opt/template_repository is the deafult setting.
By default uses embedded filesystem database (db=fs) you can use MySQL by changing the application.conf file in the directory /template-repository/conf to db=mysql:root:root@templaterepository also use ''jpa.ddl=create'' for the first run use use of the database.
Default port is 9000 edit the application.conf file in the directory /template-repository/conf if you require a different port. For example to set the port the 80 the setting would look like the following.
By default the template repository application uses Open-ID authentication, edit the application.conf file in the directory /template-repository/conf to change or remove Open-ID authentication. Find the line containing the text "organization.domain". Change the domain information to the value of the organization.domain as required or ADD "#" character to comment this line out for NO authentication. Default example is for abiquo.com, set '#' to comment out the line would look like this.
Allow access to the port configured to access the application in your firewall. By default this is port 9000 but you can configure a different port.
Unsupported Example for Guidance Only
This information is provided for guidance only. Firewall configuration should be performed by a security expert.
Run this command as root to list the firewall rules
Modify the rules to allow tcp access to port 9000 (or replace 9000 with your chosen port) and save the configuration
Check the access using the command
Look for the port that you have configured for template-repository and check that it will accept connections
To test the repository in your browser, go to the address
To test the repository in Abiquo, add the repository to the Appliance Library and check that you can see the appliances. Add the address of the new remote repository URL such as http://my.repository.URL:myPORT/ovfindex.xml . By default the 'name' of the repository will be called 'playrepo' in the Remote Template Repositories list in Abiquo. This can be changed by editing the ovfindex.xml file in the path /opt/template_repository/template-repository/app/views/OVFPackages/ovfindex.xml specifically the RepositoryName="playrepo" setting.
After testing your template-repository deployment, change the following configuration options before going into production. By default the configuration is stored in the template-repository/conf/application.conf file.
Change the appplication.mode parameter from dev (development) to prod (production).
To improve security, use a new secret key. Generate one using the play framework (./play secret template-repository) or use another means to generate a new random string of the same length as the one in application.conf.
If the template-repository has been configured to use OpenID, log in using your google login.
The main screen of the template-repository contains a menu for access to template-repository functions and lists the available templates. Click to enlarge the image below.
The top menu provides the following functions.
On the left side of the screen:
If using OpenID, on the right side of the screen:
The Package list is a list of all templates with the following information:
Click any of the headings of the columns of the package list to order by that column. Click again to change between ascending and descending order.
Click New in the main menu to add a new package.
The following dialog will appear:
Select the disk file to upload or enter the URL for the disk file.
The following screen with the Product Description and System Requirements panels will appear. Enter the details in the Product Description and System Requirements panels for the fields as described in the tables below.
Format of the virtual template you are uploading. Required field
Name of the OVF package. It is not necessary for it to match the file name. Required field
Short description of the package. Usually also includes information such as the login credentials of the template
Shows which category the template belongs to. Typical values are OS, Firewall, Abiquo, etc
Points to a URL containing an template, which will be used as an icon for the package
Number of CPUs the template requires. Required and numeric
Amount of memory the template requires. Required and numeric
MB or GB
Unit of RAM memory
Required. Default: E1000. This option will be recorded in the .ovf file. However, Abiquo currently uses E1000 for all hypervisors except ESX/ESXi. For ESX/ESXi, select from E1000, PCNet32, VMXNET3
After completing these forms, click "Create Template".
Template-repository will use diskid to determine the virtual disk file size.
DiskId is accessed at a IP public address http://diskid.frameos.org/?format=json
If the template repository cannot access this service, follow the instructions in the git rubiojr/diskid repository to start the webservice (based on qemu_img).
A new Virtual Disk File panel will appear at the bottom of the screen for you to confirm the virtual disk file details.
Path of the file associated with this package. It is best not to change this field, but if you do need to change it, please do so extremely carefully, because an incorrect value could result in an invalid package. This can be a URL or a filename on the local filesystem
Click to download the virtual disk file to your machine
Size of the file associated to this package. It is best not to change this field. If you do need to change it, please do so extremely carefully because this field is used when downloading the template and you could be changing its bounds (start and end point of the disk file).
One of the Abiquo virtual disk formats. See Template Compatibility Table
Confirm the virtual disk file details.
Create a template
Save and continue editing
Save the template and continue editing
Remove the current template and DELETE the uploaded file
To edit a template, click the template name in the template list.
The edit screen will appear with three edit panels.
These edit panels are the same as those for adding a template: Product Description, System Requirements, Virtual Disk File. The buttons also work in the same way.
The fields and buttons are the same as the ones described above
From the Edit screen, go to the Virtual Disk File panel and click the blue Download button beside the Path field to download the virtual disk file to your system.
On the Edit screen, go to the Virtual Disk File panel and click the Download OVF button near the Path field to download the virtual disk file to your system.
Enter text in the search box to find templates with that text in the template details fields.
For example, the image below shows a search for "win". The result includes several Windows templates and a template without Windows in the name but included in the category Windows.