The APP-META.xml
file must define general data about the application
and declare its main components.
In this document:
General data presents an application in the Application Catalog and in the provider control panel (PCP).
Assign an APS application ID by the id
element in the form of URI that must be unique among all packages
published in the Application Catalog and imported to
an APS-compatible platform.
Note
Once you started using the id
for an APS application published in the catalog and installed on some platforms,
do not change it unless you wish to clone the application to another one.
Enter the application name using the name
element.
If necessary, change the package version by means of the version
and release
properties used together to specify
a unique APS package (APS application) version.
Usually, the version
follows the version of the integrated application, and the release
is the internal
property of the APS application that changes more often than the application version
. For example, if your
application current version is 5.0.1, start with version=5.0.1 and release=0.
In the vendor
section, specify the properties of the application owner.
In the packager
section, specify the properties of yourself or your company whoever is responsible
for the APS integration of the application.
Generally, the upgrade section is required not during the development,
but rather in the application upgrade process.
However, even during the development steps, you may need to improve the APS application and increase the package release
.
In this case, you can add temporarily the section that allows any upgrades:
<upgrade match="version=ge=1.0, release=ge=0"/>
This allows you to upgrade any version higher than 1.0.0 to any newer version.
The resource model contains three APS types. Each of them requires declaration of a service.
In a service declaration, you need to specify a source file that contains the APS type definition and an executable file
that defines the service management (provisioning) logic.
In case of using the APS PHP framework on your endpoint host,
the best way is to define both parts in one PHP file. The following example illustrates the vpses
service declaration:
<service id="vpses">
<code engine="php" path="scripts/vpses.php"></code>
<presentation>
<name>Virtual Private Server</name>
<summary>Cloud virtual private server</summary>
</presentation>
</service>
The code
element specifies that the scripts/vpses.php
file declares the APS type and defines the service provisioning logic.
Note
Typically, we assign a name in plural form to a service, for example, vpses
, and a name in singular form
to the respective APS type, for example, vps
. The reason is that a service is a factory of many resources.
This section continues the demo project started in the previous step.
Fill in the empty general elements in your initial APP-META.xml
file following this example:
<id>http://aps-standard.org/samples/vpsdemo</id>
<name>Basic VPS Demo</name>
<version>1.0</version>
<release>0</release>
<homepage>http://doc.apsstandard.org/apps/proc</homepage>
<vendor>
<name>Your team name</name>
<homepage>http://dev.apsstandard.org/</homepage>
</vendor>
<packager>
<name>Your team name</name>
<homepage>http://dev.apsstandard.org/</homepage>
</packager>
<presentation>
<summary>Simplest multi-tenant application</summary>
<description>This is a demo application to demonstrate how to develop APS apps step by step.
It also shows how to use GRID column types and filters.
</description>
...
</presentation>
...
<upgrade match="version=ge=1.0, release=ge=0"/>
Note
The <upgrade> section must be below the <license-agreement> section.
Make sure in the APP-META.xml
file every APS type has a corresponding service declared:
<service id="clouds">
<code engine="php" path="scripts/clouds.php"/>
<presentation>
<name>VPS cloud globals</name>
<summary>VPS cloud application global service</summary>
<infolinks>
<link href="http://doc.apsstandard.org/apps/proc/generic/" class="deployment-guide">
Demo project description
</link>
<link href="http://dev.apsstandard.org/develop/rt/tickets/new/" class="support">
APS support
</link>
</infolinks>
</presentation>
</service>
<service id="contexts">
<code engine="php" path="scripts/contexts.php"/>
<presentation>
<name>VPS Management</name>
<summary>VPS management environment</summary>
</presentation>
</service>
<service id="vpses">
<code engine="php" path="scripts/vpses.php"></code>
<presentation>
<name>Virtual Private Server</name>
<summary>Cloud virtual private server</summary>
</presentation>
</service>
You have completed the project declarations in the file APP-META.xml
that is similar to the respective file in the
sample package
.