aps.exe: Application Catalog

The aps utility is used for downloading applications from application catalogs and installing them on websites.

Location

%plesk_cli%

Usage
aps <command> [options] 

Example

To install the WordPress application with package ID 13 at http://example.com/blog:

aps --install "E:\apps\WordPress.xml" -package-id 13 -domain example.com -ssl false -url-prefix blog -db-name WordPress -db-user BlogAdmin -passwd P4$$w0rd

WordPress.xml here is the WordPress application metadata file. Get more information on application metadata files from the Application Packaging Standard (APS) specification at http://www.apsstandard.org/r/doc/package-format-specification-1.2/index.html.

According to the APS, the metadata file must be in the root directory of the application ZIP archive. It is recommended to use the metadata file from the very package you are going to install.

Commands
Command Parameter Description Example

--import-package or -ip

<file name>

Imports an uploaded application package from the specified file and adds it to the Application Catalog in Plesk.

To import the uploaded SugarCRM-5.0.0-16.app.zip package to Plesk:

aps --import-package "C:\Documents and

Settings\Administrator\Desktop\SugarCRM-5.0.0-16.app.zip"

--download or -d

 

Downloads an application package from the Application Catalog to the server and extracts it to the internal application cache to speed up future installations.

To download a package with WordPress application of the latest version and release from Application Catalog at http://apscatalog.com:

aps -d -package-name WordPress -catalog-url http://apscatalog.com

--get-download-status or -g

<task id>

Shows information about package download progress.

To view the status of a download task with ID 1:

aps -g 1

--import-config or -ic

<path to file>

Imports the configuration file where you define the URL of a custom Application Catalog.

The configuration file catalogs.ini should be placed in any of the following directories:

  • The Plesk's temporary directory: %plesk_dir%\tmp.
  • The operating system's temporary directory: C:\WINDOWS\Temp.

The details on the configuration file format are provided below, at the end of this section.

To import the Application Catalog configuration from the file C:\Program Files (x86)\Parallels\Plesk\tmp\catalogs.ini:

aps -ic "C:\Program Files (x86)\Parallels\Plesk\tmp\catalogs.ini"

--get-package-list or -gp

 

Lists the packages currently available from the Application Catalog.

To view the packages available from the Application Catalog:

aps -gp

--install or -i

<filename>|-

Installs an application on a website. Requires an XML-formatted description of application installation settings, which can be read from a file or stdin.

The following command installs application from package with ID 13 on website example.com; the application will be accessible by URL example.com/blog, its settings are defined in the file WordPress.xml, and upon its installation database WordPress will be

created:

aps -i "E:\apps\WordPress.xml" -package-id 13 -domain example.com -ssl

false -url-prefix blog -db-name WordPress -db-user BlogAdmin -passwd

P4$$w0rd

--update-package or -up

<Package ID>

Changes settings for an APS package in the Application Vault.

To make the application with the ID 1 unavailable to customers:

 

aps.exe -up 1 -visible false

--get-install-settings-template or -it

<filename>|-

Creates a settings template for installing applications with the "--install" command.

To create a file /tmp/template.xml containing a settings template for the application with the ID 1:

 

aps.exe -it /tmp/template.xml -package-id 1 -domain example.com -ssl false -url-prefix blog -db-name WordPress -db-user BlogAdmin -passwd P4$$w0rd

--clear-cache or -c

 

Deletes all temporary files that were created during download of application packages and installation of applications.

To delete temporary files:

aps -c

--help or -h

 

Displays help on the utility usage.

To view the help reference for the utility:

aps -h

Options
Option Parameter Description Example

-catalog-url

<URL>

Specifies URL of the Application Catalog. This option can be used only with the -download option.

To download a package with WordPress application of the latest version and release from Application Catalog at http://apscatalog.com:

aps -d -package-name WordPress -catalog-url http://apscatalog.com

-package-name

<name>

Specifies package name.

-package-version

<version>

Specifies package version.

To download a package version 1.10 with ID 3, developed by John Smith, and packaged by John Doe:

aps -d -package-id 3 -package-version 1 -package-release 10 -package-vendor "John Smith" -package-packager "John Doe"

-package-release

<release>

Specifies package release.

-package-vendor

<vendor>

Specifies package vendor.

-package-packager

<packager>

Specifies application packager.

-package-id

<ID>

Specifies package ID.

-domain

<domain name>

Specifies the domain name where you want to install an application.

The following command installs application from package with ID 13 on website example.com and turns on automatic updates for it; the application will be accessible by URL example.com/blog, its settings are defined in the file WordPress.xml, and upon its installation the database WordPress will be created on the server with IP address 10.52.52.67:

aps -i "E:\apps\WordPress.xml" -package-id 13 -domain example.com -ssl false -url-prefix blog -db-server 10.52.52.67:3306 -db-name WordPress -prefix myblog_ -db-user BlogAdmin -passwd P4$$w0rd -aps-force-updates true

 

-subdomain

<subdomain name>

Specifies the subdomain name where you want to install an application.

-ssl

true|false

Specifies whether the application will be accessible via HTTPS protocol or not.

-url-prefix

<prefix>

Specifies the URL relative to the domain/subdomain, by which the installed application will be accessible on the Web.

For example, if you install a blog-engine application and specify the URL prefix "blog", the application will be available at

http://domain-name/blog.

-db-server

<ID>|<host:port>

The database server that will be used by the application.

-db-name

<name>

Specifies name of the database that will be created for the application during its installation.

-db-user

<login

name>

Specifies the name of database user that will be created for the application during its installation.

-passwd

<password>

Specifies password of database user that will be created for the application during its installation.

-prefix

<prefix>

The prefix for the names of the tables used by the application.

For example, if you specify the prefix "myblog_", the tables will be named as follows: myblog_<tablename>.

-visible

true|false

Specifies whether an APS package must be available to customers.

-aps-force-updates

true|false

Turns on/off automatic updates for the app.

 

 

 

About the Application Catalog Configuration File

The Application Catalog configuration file is a text document including the following lines:

[marketplace]
type = marketplace
url = http://catalog.marketplace.parallels.com
protocol = all-app
[apscatalog]
type = apscatalog
url = http://apscatalog.com

http://apscatalog.com is the official address of the Application Catalog maintained by Plesk. If you want Plesk to use an Application Catalog at another location, in the [apscatalog] section of the file, change the url field value to point to another address. After that, import the file to Plesk by using the aps -ic command.

For the customization to work, also create a text file with name panel.ini, and add the following lines there:

[aps]
catalogsCustomization = on

Save the file and place it in the following directory on the Plesk-managed server: %plesk_dir%\admin\conf\