Adding Custom Software Components¶
There are two ways to add 3rd party software components or your own software to an appliance template.
- Using the
Project Catalog. This catalog is public to all the users on UForge and is maintained by the privileged users and administrators.
- If the catalog does not contain the software component you are looking for, you can upload the software into the
My Softwarelibrary. This is your own private software library, allowing you to upload any software into UForge and be able to add it to any of your appliance templates.
Adding Software from the Project Catalog¶
The following describes how to add MySQL and Apache to an appliance.
Select the appliance to modify and go to the
Click on the
Projectsin the toolbox. This displays the Project Catalog. The top table lists which projects have already been added to the appliance.
Add the projects to your appliance either by clicking their
addbutton or by selecting them and clicking the
add selectedbutton. You can scroll through the available projects or enter a search string to filter the list. The changes are automatically saved.
Adding Software from Your Software Library¶
You can add your own custom software either using the
Software Library or by including boot scripts. My Software overlay files (for example
/etc/profile.d/xxx.sh) will be run before bootscripts when the machine is booted.
The following is a list of supported file formats:
Linux only, note by default .rpm and .deb files will be installed at generation. This can be modified when you upload the files (see procedure below):
- .rpm (“rpm i” will be executed)
- .deb (“dpkg -i” will be executed)
- Windows only:
- Linux and Windows compatible:
To add custom software components to an appliance:
Appstab, click on
Software Libraryin the top left hand side of the UI. This opens your private Software Library.
Click on the
add softwarein the top right hand side.
You are now prompted for the name, version and maintainer of the software component you would like to add. You can also set a tag and category. Click
If you want to create specific software bundle with the VirtIO drivers which will allow you to publish Windows images to Red Hat, then the name must begin with
Overviewpage will now open. You can modify the name and version, and add a description.
To upload the files, go to the
If you want to group a set of files, you can create a folder by clicking
create folder. Then enter a folder name and click
create folder. Now if you want to put files in this folder, click on the upload icon next to the folder name.
If you create a folder, you can then click on the pencil icon to edit the file properties. Here you can select to apply the same owner and rights to all the files added to the folder.
Folders are not supported if you are uploading VirtIO drivers for publishing Windows images to Red Hat.
- You can now upload the files as follows:
uploadto select the files you want to add and click
fetchto set an archive location where the files should be retrieved. When using the
fetchoption you can indicate a remote URL or artifact account (for information on artifact accounts, refer to Managing Your Artifact Accounts). You can also select to have the files uploaded to the UForge by checking
If you are uploading VirtIO drivers for publishing Windows images to Red Hat, archive files such as zip or tar are not supported.
Optionally, you can modify the
default install paththat will be used. If you have modified the name of your appliance, it may not be reflected in the install path.
- By default
.rpmfiles will be installed at generation time. Optionally you can edit the settings for those files:
- Click on the pencil on the right hand side of your uploaded file.
Install this native package as part of the generation.
- Click the check mark to save your changes.
In this case, the
.rpmarchive file will be in the directory but will not be installed at generation time.
- Optionally, you can select to unzip archives as part of the generation. To do so:
Click on the pencil on the right hand side of your uploaded file.
You can then edit the install path and select if it should be extracted.
Click the check mark to save your changes.
Optionally, you can restrict the distribution or target format that the software applies to, from the
Restrictionspage. The restriction rule is set as a regular expression. For more information, refer to Restricting Software Components for OSes and Formats.
Repository Packagespage, you can set the packages with which your software is compatible. This page will only be visible if the restriction rule matches only one distribution. You can search for packages. Select and click the down arrow to add them. Click
- From the
Boot Scriptspage, upload any boot scripts you want to add to this software. You can either:
- Upload an existing boot script file by using the
- Create a new boot script by clicking
In both cases, you must select the type. If you select
first boot, then the boot script will be launched once, the first time the instance is launched. If you select
every boot, then the boot script will be launched every time the instance is rebooted. You must also set the boot order.
Licensespage, select a standard licence, or select
Customand then click
uploadto upload any licenses you want to add to this software. Changes will be automatically saved.
Add the uploaded software component to the appliance. Click on the
Appliance Libraryto view your Appliance Library. Double-click on the appliance template you want to add the software to.
Go to the
Stackpage and click on the
My Softwarebutton in the toolbox.
Select the software components you want to add.
You can create a Docker image directly from a software using the UForge UI. Refer to Generating a Docker Image from Software Components.
Restricting Software Components for OSes and Formats¶
My Software you can restrict the usage of a software bundle based on a distribution name, family, architecture or for a specific machine image format.
To set restriction rules:
- Under the
Appsgo to the
- Select the sofware you want to modify.
- Go to the
Restrictionstab. Enter the restriction rule. The restriction rule is represented by a logical expression with format
versionmust be a major version.
valueis the value you want to match with the fields. For example,
CentOSfor Distribution name,
linuxfor Distribution family,
x86_64for Distribution arch,
VirtualBoxfor TargetFormat name,
cloudfor TargetFormat type.
- logical operator is
||for OR and
- carriage return is not authorized
For example, if the software bundle is designed only for distributions CentOS 7 x86_64 or Debian 8 x86_64, or for image format with type virtual, then you would note the Restriction rule as follows:
(Distribution#arch=x86_64 && ((Distribution#name=CentOS && Distribution#version=7) || (Distribution#name=Debian && Distribution#version=8))) || TargetFormat#type=virtual
Once you have set a restriction rule, you will see a cube next to the software component, under the column
If your software bundle is limited to a certain target format and you generate an image in another format, your appliance will be generated but the software bundle will not be part of the final image. A note indicating this will appear when you select to generate the machine image, as in the following image.
Restriction Rule Values
By using the command-line tool hammr, you are able to retrieve available distributions:
$ hammr os list --url https://uforge.example.com/api -u username -p password
Distributionfields possible values are:
name: the value listed in the Name column
version: the value listed in the Version column
arch: the value listed in the Architecture column
family: can be one of the following
pkgType: can be either
By using the command-line tool hammr, you are able to retrieve available machine image formats:
$ hammr format list --url https://uforge.example.com/api -u username -p password
TargetFormatfields possible values are:
name: the value listed in the Builder Type column
type: can be one of the following