Template-Repository Documentation

What is Template-Repository?

Template-Repository is a side-project developed to work with Abiquo. It provides a user-friendly interface for generating an ovfindex.xml file that can be used with a remote repository. It is implemented with play framework, a lightweight Java Web framework that provides functionality for MVC applications.

Installing the Application and Its Dependencies

These instructions explain how to install Template-Repository from scratch. However, it is possible to run Template-Repository with a Tomcat server. If you need instructions, check out the readme file on the code repository.

First of all we need to install the dependencies, which are two packages:

  • Play framework, the tool Template-Repository was developed with. You need to download and unzip it, because you will need the binaries to execute the application.
  • Java runtime environment, required by Play Framework.
  • A MySQL database, used to store the repository data.
  • Git, to download the code from the repository.
It is possible to use Template-Repository without a MySQL database. Check out the readme file on the code repository for further instructions.

After the dependencies are installed, you need to open a shell and go to the directory where you unzipped play framework. Then run the following command:

git clone git://github.com/abiquo/template-repository.git

This should download the code necessary to run Template-Repository. Note that the instructions in this guide are for Unix operating systems, but Play Framework can also be installed on Windows.

Starting the Webapp

The steps in this section are specifically for Play Framework installs. If you installed Template-Repository as a Tomcat webapp, you only need to configure and start Tomcat.

Go to the directory where you installed the Play Framework and execute the following command:

$ ./play start Template-Repository

This will run the application in the background, and generate a .pid file. The management of this .pid file can be a bit messy: if the machine shuts down ungracefully, the .pid file will still exist on startup, so the application will not be able to start up again, even if it is currently stopped, because of the existing .pid file. To erase it, just run the following command:

$ ./play stop Template-Repository

Then the application will be able to start again.

Administration Interface

The default route of the application has this appearance:

The components shown in this screen are the following:

  • Title Located in the upper left corner of the screen. Contains a link to the /ovfindex.xml route, the file containing all ovf indexes added in the model.
  • "List Packages" button Located in the upper right corner of the screen, contains a link to a loopback to the current screen.
  • "Upload new package" button Located in the upper right corner of the screen, contains a link to the screen used to add new images to the OVF catalog.
  • "Render without save" button Located in the upper right corner of the screen, contains a link to the screen used to generate an ovf description for an image, without adding it to the catalog.
  • Package list In the rest of the screen, a list with all package entries is shown, containing the most important fields for every package. The Package name field is a link to the edit screen for every package.

Upload new package

A dialog similar to the one shown below will open. Select the image to download.

After you select the image, Template-Repository will determine the size of the image file using diskid.

Then a form will open for you to complete the details of the template.

The values of the fields are as follows:

Field Value
Format Format of the virtual image you are uploading. Required field
Name Name of the OVF package. It is not necessary for it to match the file name. Required field
Description Short description of the package. Usually also includes information such as the login credentials of the virtual image
Category Shows us which category the image belongs to. Typical values are OS, Firewall, Abiquo, etc.
Icon URL Points to a URL containing an image, which will be used as an icon for the package.
CPU Number of CPUs the image requires. Required and numeric.
RAM Amount of memory the image requires. Required and numeric.
Disk Size Total size of the virtual disk image. For Flat images, this value matches the image file size.

After entering values for all the fields, click "Save". The image will be uploaded and, if there is not any problem during this process, the package will be created.

Edit an Existing Package

Every package listed in the main screen of Template-Repository contains a link (in its name field) that leads to a screen similar to this:

You can edit the OVF package on this screen. There are some additional fields that were not shown on the upload package screen, because they were set automatically:

Field Value
Path 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
Size Size of the file associated to this package. It is best not to change this field, but if you do need to change it, please do so extremely carefully, because this field is used when downloading the image and you could be changing its bounds

As well as the section for editing the existing values (commit changes by clicking "Save"), there are three new buttons in the upper right corner.

  • Delete package Removes the OVF package from the catalog and deletes the uploaded file.
  • Get the OVF Opens the desc.ovf file associated with the package, an XML file containing the description of the virtual image.
  • Get Disk File4 Downloads the image file associated with this package.

Render Without Save

This option allows you to generate an OVF file without adding a package to the repository. Follow the same steps that you did in the Upload new package section, but instead of a "Save" button, you get a "save .ovf" button, which allows you to download the resulting OVF file to disk, rather than storing it in the repository.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.