Professional Documents
Culture Documents
Student Guide
Version 1.0.3
Copyright 1999-2012 Parallels Holdings, Ltd. and its affiliates. All rights reserved.
ISBN: N/A Parallels 500 SW 39th Street Suite 200 Renton, WA 98057 USA Tel: +1 (703) 815 5670 Fax: +1 (703) 815 5675 1999-2012 Parallels. All rights reserved. Distribution of this work or derivative of this work in any form is prohibited unless prior written permission is obtained from the copyright holder
Contents
Preface ....................................................................................................................... 7
Documentation Conventions............................................................................................ 7
Typographical Conventions ......................................................................................................7 Shell Prompts in Command Examples......................................................................................8 General Conventions ................................................................................................................8
Introduction ............................................................................................................... 9
APS Overview ............................................................................................................... 10 SaaS Business Model ................................................................................................... 11 APS Application Life Cycle............................................................................................. 12 Provisioning Types ........................................................................................................ 13 Check Your Progress .................................................................................................... 15
Contents
Packaging Application for Dedicated Environment.......................................................... 58 Packaging Application for External Environment ............................................................. 60
Demo: Creating SpamExperts APS Package......................................................................... 61
Service Template .......................................................................................................... 83 Service Plan .................................................................................................................. 85 Check Your Progress .................................................................................................... 86
Integration with Service Users........................................................................................ 91 Integration with Domains ............................................................................................... 92 Integration with Mailboxes ............................................................................................. 93 Check Your Progress .................................................................................................... 94
Contents
Preface
Documentation Conventions
Before you start using this guide, please familiarize yourself with its documentation conventions.
Typographical Conventions
The following formatting conventions in the text identify special information.
Formatting convention Special Bold Type of Information Items you must select, such as menu options, command buttons, or items in a list. Titles of modules, sections, and subsections. Italics Used to emphasize the importance of a point, to introduce a term or to designate a command-line placeholder, which is to be replaced with a real name or value. The names of commands, files, and directories. On-screen computer output in your command-line sessions; source code in XML, C++, or other programming languages. Example Navigate to the QoS tab.
Read the Basic Administration module. These are the so-called shared containers. To destroy a container, type pctl delete CTID
Monospace
Preformatted
What you type, contrasted with on-screen # rpm V virtuozzo-release computer output. Names of keyboard keys. Key combinations - user must press and hold down one key and then press another. SHIFT, CTRL, ALT CTRL+P, ALT+F4
Preface
$ #
General Conventions
Be aware of the following conventions used in this book. The content of this guide is divided into modules which, in turn, are subdivided into sub modules. When following steps or using examples, be sure to type double-quotes ("), left singlequotes (`), and right single-quotes (') exactly as shown. The key referred to as RETURN is labeled ENTER on some keyboards. Commands in directories included in a PATH variable are used without absolute path names. Steps that use commands in other, less common, directories show the absolute paths in the examples.
MODULE 1
Introduction
In This Module
APS Overview ........................................................................................................ 10 SaaS Business Model............................................................................................. 11 APS Application Life Cycle ...................................................................................... 12 Provisioning Types ................................................................................................. 13 Check Your Progress ............................................................................................. 15
Introduction
APS Overview
APS (Application Packaging Standard) is a unified open standard that defines the package structure and rules of processing packages. A package is a file that contains application files and metadata required to provision and manage instances of an application. APS increases business opportunities for the entire hosting ecosystem, bringing together application vendors and hosting service providers. By implementing APS, application vendors get access to the vast sales and marketing channel of APS-enabled hosting providers. In turn, hosting service providers, by implementing APS, gain access to a great variety of APS applications. Application vendors implement APS by creating application packages in full compliance with the rules defined by the standard. Currently, there are more than 700,000 instances of APS packages. For providers, there are publicly available catalogs of APS packages, for example, http://apscatalog.com and http://www.apsstandard.org/app.
10
Introduction
The SaaS model includes three object types: SaaS Application is a software application packaged by an ISV (independent service vendor) using the APS technology. SaaS Service is an application service that is defined in an APS package and provisioned for a customer on demand. To process APS packages, the provider environment must have an APS controller compatible with the APS requirements. SaaS Client is a company or an individual who can subscribe to an application and get access to its services.
11
Introduction
12
Introduction
Provisioning Types
Depending on the way an application is going to be provisioned, the following provisioning types are singled out. Shared web environment. Files are installed in a web server and this web server is shared for multiple instances of APS application.
Dedicated environment. Files are placed in a virtual private server (VPS) based on the Parallels Virtuozzo Containers technology. The VPS is dedicated to a single instance of the application:
External application (Open-Xchange, SpamExperts, Backup Agent, etc.). The APS package does not contain any application files inside and represents a connector to an external service. Application files and user data are located outside of the customer's environment, in a multi-tenant application server or group of servers. The servers may be located either on the Internet or inside the hosted infrastructure:
13
Introduction
When deciding how to deliver an APS-enabled application, consider the overall sales model and the necessary supporting technologies. For example, a Java-based application cannot be deployed in a web space and requires a dedicated container. In this case, the application should be packed as a dedicated APS package. If the application supports multi-tenancy, the better choice is to pack it as an external APS package.
14
Introduction
15
MODULE 2
Package Structure
This module describes generic objects of the APS specification that can be declared in APS packages. The exact structure of a package may vary depending on the application nature and its provisioning type.
In This Module
Structure of APS Package ...................................................................................... 18 APS Metadata ........................................................................................................ 19 Provisioning Logic .................................................................................................. 30 Check Your Progress ............................................................................................. 33
17
Package Structure
Typically, an APS package includes the following components: 1 2 3 4 Application definition file APP-META.xml. A directory containing application native files or Parallels Virtuozzo Containers (PVC) templates. For the shared web provisioning type, the document root is usually htdocs. The Scripts directory with scripts implementing the provisioning logic of the application: Install, Remove, Configure and other operations. List file APP-LIST.xml containing the list of all files in the package but itself. The size in bytes and the SHA256 digest are specified for each file in the list to determine the package integrity and to protect from fake packages. As an alternative, a certification authority (for example, the APS organization) may sign a package; in such a case the package contains a certificate additionally. Optionally, the package may contain additional directories, such as Images (for storing images presenting the package itself in provisioning systems).
Note: An APS package must comply with the Application Packaging Standard (APS) Format Specification available at http://www.apsstandard.org/isv/documentation/.
18
Package Structure
APS Metadata
The APP-META.xml file contains all the declarations required to provision and manage an application. A part of declarations describes package information and others services that the application brings (the <service> tag). Services can form a hierarchy with up to three levels. There is alway a root service at the top level that can have sub-services, i.e. services of the second level, etc. Each service has its own additional declarations included, such as presentation information, configuration parameters, requirements, and references to the provision logic scripts. The typical structure of the APP-META.xml file is as follows:
19
Package Structure
20
Package Structure
The package can be described in details with a number of other presentation parameters, for example, changelog history, screenshots, etc., under the <presentation> tag. One of them, namely a category into which the APS package is included, is a mandatory one.
Services
Each application service is represented by a service meta-data object. An application might include several services.
21
Package Structure
Each service must be declared as a particular element in APP-META.xml and might have its own parameters, resources, requirements, and provisioning scripts. A sub-service can be one of the following classes defined by the class attribute. service defines a discrete function of the application. account allows assigning a user account to the parent service, i.e. always exists as a subservice. ecommerce defines an e-commerce service.
APS services are structured in a hierarchy that reflects the logical structure of the application: The top-level (root) service. Sub-services (second level) that are presented as application objects for customers. In addition, applications can declare a number of object features (third-level services). Such services are available for users only if they are nested inside a second-level service of the account class.
Requirements
An application service may contain a list of requirements to be satisfied during the package provisioning. The <requirements> tag is used to contain all the requirements. For instance, the following code requires PHP of version not less than 4.0 to be presented in the provisioning environment:
<requirements xmlns:php="http://apstandard.com/ns/1/php"> <php:version min="5.0"/> </requirements>
At a provisioning system, the requirements must be processed by the APS controller. For example: If PHP is required, the PHP of the proper version must be installed in the provisioning environment. If a database is required, the APS controller must install a database with a name assigned by a certain rule and create a database owner with a random password.
22
Package Structure
Configuration Settings
Configuration settings are settings needed to create a service. While most of the settings are provided to the APS controller without user interaction, some settings need to be entered by a user to pass them to configuration and update scripts. Such parameters are defined using the <settings> tag. A setting has a number of attributes. Some of them are explained here. 1 2 id is used to make reference to the setting from other tags by means of the value-ofsetting attribute. Class is needed for APS controllers to assign a certain processing for the setting, e.g.: login will be processed as a login name. locale defines a language supported by the application. Settings without the class attribute are not processed by APS controllers. 3 4 Type defines defines a data type: string, number, enum, etc. Its value usually must be selected depending on the setting class. In case a setting is supposed to be configurable during the service provisioning only, it should be marked with the installation-only attribute. If settings are optional, then they should be marked with the optional attribute, otherwise they are considered to be mandatory by the APS controller and cannot be left empty. The Protected attribute informs the APS controller that a user is not allowed to change such a parameter. If a setting needs to be hidden from the application subscriber, the visibility attribute should be set as hidden. The value of a setting can be required to be unique within a scope. The uniq attribute must be specified for that. For instance, uniq="global" means that the value of such a setting must be unique within the global scope, that is, among all the resource types that are created for the same application. If a setting value must be generated automatically, use the generate attribute with one of the values: sequence, uuid, random, or password. A child service can request a setting value from its hierarchical parents (from bottom to top) by using the value-of-setting attribute.
7 8
A setting may have a number of parameters specified as tags: name, description, default-value, and error-message. A service can also contain settings in groups with certain group classes as follows: authn relates to user authentication parameters, i.e. login name and password. presentation caries presentation and user interface information, e.g. locale. web defines a web site title an its description. vcard is needed to gather personal data in the hCard format.
23
Package Structure
<setting id="admin_name" type="string" default-value="admin" class="login" min-length="1" max-length="32" regex="^[a-zA-Z][0-9a-zA-Z_]*"> <name>Administrator's login</name> <error-message>Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens. </error-message> </setting> <setting id="admin_password" type="password" class="password" min-length="1" > <name>Password</name> </setting> </group> <group class="vcard"> <name>Main configuration</name> <group class="email"> <setting id="admin_email" type="email" class="value"> <name>Administrator's email</name> </setting> </group> <group class="fn n"> <setting id="title" type="string" default-value="My CMS" min-length="1" class="organization-name"> <name>Site name</name> </setting> </group> </group> <group class="web"> <setting id="locale" class="locale" type="enum" default-value="en-US"> <name>Interface language</name> <choice id="nl-NL" > <name>Dutch</name> </choice> <choice id="de-DE" > <name>German</name> </choice> <choice id="en-US" > <name>English</name> </choice> </setting> </group> </settings>
24
Package Structure
Resources
Generally, resource objects are declared inside the particular service definition and prescribe what usage values should be reported by the application. The APS controller can use them for monitoring applications and accounting resources. The <resource> tag is used to define each new usage object, for instance:
<resources> <resource id="filestore_diskusage" class="mb" limitingsetting="filestore_quota"> <name>Disk space used by Open-Xchange context infostore files. </name> </resource> </resources>
A resource is identified by the id attribute. The class attribute defines the units of measurement for a given resource (item, b, kb, mb, gb). The resource limit may be specified through the limiting-setting attribute. Resource usage reporting is implemented inside a resource script.
Entry Points
Entry points are application access links presented in a customer control panel. Each new entry point is defined using the <entry> tag. Additionally, variables can be defined within each entry point to pass values inside the request when an entry point is clicked, for example:
... <entry-points> <entry dst="/wp-login.php" method="POST"> <label>Administrative interface</label> <variable name="log" value-of-setting="admin_name" class="login"/> <variable name="pwd" value-of-setting="admin_password class="password"/> </entry> </entry-points> ...
The class attribute of the variables may be used, to inform the APS controller about a requested variable meaning: login - a requested variable contains a login password - a requested variable contains a password locale - a requested variable carries localization information
25
Package Structure
Provisioning Logic
In APS, two programming approaches are implemented. Declarative programming is used to require from the APS controller to create some objects required in the package. This works towards object often required by various applications. For example, the APS controller is able to setup PHP in a shared web environment, or create a database with an owner of the database, and other. Imperative programming allows the packagers to be flexible in processing APS packages in order to meet application specific requirements, e.g. set certain specific variables in certain installation files. This is possible due to different types of custom scripts that are considered in this topic.
The <provision> section specifies two provisioning mechanisms for installing an application instance in a web site: passive configuration by URL mapping and active configuration by means of configuration scripts. Normally, both of them are used. URL mapping mechanism processes the package in the following way. 1 2 It copies the hierarchy of files from the Files directory to a web site directory defined at the provisioning stage. It configures the virtual web host in accordance with URL mapping rules containing the following XML elements. Default prefix specifies the directory of the application instance document root. Mapping URL sets the mapping between a site directory and a URL suffix by means of aliases in a web server. It also requires files with a certain extension to be processed by a certain script engine, e.g. PHP, Perl, or Python. Additionally, it can set the write permission to configured directories. There are a few types of scripts that can be specified in the metadata: Configuration script - <configuration-script> tag. It implements install, configure, upgrade, and remove operations over an application instance requested from a control panel. Resource script - the <resource-script> tag. It reports the application's current resource usage to the APS controller.
Note: For details on resource scripts, refer to the APS Standard Specification 5.3.4 Resource Script. http://www.apsstandard.org/r/doc/package-format-specification-1.2/
Verification script - the <verify-script> tag. This script verifies the service settings for consistency, but it should never change the application state or its instances. License script - the <l:license-script xmlns:l="http://apstandard.com/ns/1/licensing"> tag. It is invoked when a new license is issued for the application, or the old license is updated or removed. The script should be able to get the instance-related license information, install the issued license and remove it on demand.
26
Package Structure Backup script - the <backup-script> tag. It serves to preserve and restore user data. The APS controller invokes it when the application instance backup or restore is requested. The script should be able to back up all sensitive application data and all involved resources to a specified file, and restore backed up data to a specified location.
27
Package Structure
<group> <name>Virtual MX record</name> <setting id="mx1" class="title" type="string" default-value="" min-length="1"> <name>Primary MX</name> <description> This is the MX record used to deliver to the spamcluster, preferably a Round Robin DNS entry containing all servers. </description> </setting> </group>
To modify used domains, the DNS aspect (xmlns:dns="http://apstandard.com/ns/1/dns") must be specified with the dns:record in the <requirements> section of a service. The most typical modification is the MX record substitute to redirect mail:
<dns:record> <dns:id>MX1</dns:id> <dns:mx> <dns:src> <dns:external value-of-setting="domains"/> </dns:src> <dns:dst> <dns:external value-of-setting="mx1"></dns:external> </dns:dst> <dns:substitute/> </dns:mx> </dns:record>
28
Package Structure
This is an example:
<requirements xmlns:mail="http://apstandard.com/ns/1/mail" xmlns:php="http://apstandard.com/ns/1/php"> <php:version min="5.2" /> <php:extension>openssl</php:extension> <php:extension>curl</php:extension> <mail:mailbox> <mail:id>account</mail:id> <mail:access> <mail:imap/> </mail:access> <mail:outgoing> <mail:smtp/> </mail:outgoing> </mail:mailbox> </requirements>
29
Package Structure
Provisioning Logic
In a provisioning environment, some operations over application instances are processed by the APS controller that implements the declarative logic contained in the APS package. The following operations are performed by APS controllers. 1 2 3 4 Copying files in accordance with the URL mapping. Creating HTTP links, e.g. entry points. Creating requested objects, such as databases and database owners. Running the configuration script that must process settings and other parameters passed through environment variables.
Application specific configuration is to be processed by configuration scripts implementing the imperative logic. In the following sections, you will find description of environment variables and configuration scripts.
Environment Variables
1 URL mapping variables are needed when the shared web provisioning type is used. They are presented in the following list: BASE_URL_SCHEMA can be either http or https. BASE_URL_HOST is the host domain name. BASE_URL_PORT is the TCP port, e.g. 80 or 443. BASE_URL_PATH is the URL path including the trailing slash. WEB_<ID>_DIR is the full path to a directory on the provisioning host. For the document root, the <ID> is replaced with one ;more '_'. In addition to the document root, multiple variables of the same type can define other directories with own <ID>. 2 3 4 Every declared global setting or service setting must be passed as the SETTING_<ID> variable, where <ID> is the ID of the declared setting. For each setting with the track-old-value attribute, the corresponding OLDSETTING_<ID> variable must be passed to configuration scripts. APS aspects, if used, specify own environment variables that must be passed to configuration scripts.
30
Package Structure
Configuration Scripts
As a best practice approach, for APS packages of the web shared provisioning type you may use script files copied from existing APS packages. The following script files are often used. 1 configure or configure.php file contains the main script started by the runner.sh script from inside the web site directory. In some parts, it is application specific. It performs the following operations. It defines some application specific parameters and creates a hash from each set of parameters, e.g.: Array of configuration files Database schema files It defines the required command (install, configure, upgrade, or remove) and calls the function (respectively configure, configure, upgrade_app, or remove_app) for processing the command. It passes the needed hashed parameters to the function. 2 app-util.php file contains definitions of common high-level functions. Function configure uses database schema files to create or modify database tables by calling the import_sql_scripts_to_databases function. It also creates or modifies the application configuration file (e.g. wp-config.php for WordPress) from the configuration template (e.g. wp-config.php.in for WordPress). Therefore, it calls the write_config_files function. Function import_sql_scripts_to_databases. Function write_config_files. Function set_write_permissions sets the read, write, and execute permissions for a file. Function set_write_permissions_list sets the read, write, and execute permissions for a list of files. 3 upgrade-app.php contains the definition of the application specific high-level function upgrade_app needed for upgrading application instances. The upgrade may substantially depend on the application release and package version. db-util.php file contains definitions of common low-level functions for working with SQL databases. file-util.php file contains definitions of common low-level functions for working with files and directories. env-parser.php file contains definitions of common low-level functions for working with environment variables. The functions are needed for the following operations. Fetching environment variables Defining values for placeholders used in the configuration template Creating a hash for a set of parameters that are used in the configure script
4 5 6
31
Package Structure
Application Updates
There are two types of updates. 1 Upgrade implies major changes in application instances including updates of files, database, settings, and requirements. It implies that in the provisioning system, some operations are performed by the APS controller, and after that the configuration script with the update command is started. The following operations are performed by the APS controller: Update and removal of files
NOTE: Files in the Scripts directory are updated after the application files are updated (usually in the htdocs directory).
Reconfiguration of PHP if needed, e.g. update from version 4 to version 5 Restart of the web server 2 Patch implies minor changes in application instances, such as update of files. This operation is processed by the APS controller in a provisioning system. In some cases, the configuration utility can also be started, e.g. the APS controller in POA works this way.
32
Package Structure
33
MODULE 3
In This Module
Planning APS Package ........................................................................................... 36 Developing APS Package ....................................................................................... 37 Development Tools................................................................................................. 38 Packaging Application for Shared Web Environment ............................................... 39 Packaging Application for Dedicated Environment ................................................... 58 Packaging Application for External Environment ...................................................... 60 Package Certification.............................................................................................. 71 Check Your Progress ............................................................................................. 73
35
36
3 4 5 6 7
37
Development Tools
To create an APS package in the most developer-friendly way, the APS team issued the APS plug-in for the Eclipse IDE (Integrated Development Environment) to create, validate, deploy, and publish APS packages from a single place, reducing a number of operations that might require the application developer involvement.
Eclipse IDE
Eclipse IDE is an open source software development environment written in Java, and it is an OS-independent IDE. Eclipse can be used for different classes of development projects by using corresponding plug-in modules. To install Eclipse IDE: 1 2 3 Make sure Sun Java SE JRE is setup on your system. Navigate to http://www.eclipse.org/downloads/ and download the Eclipse Classic archive. Unpack the archive into a disk directory. No actual installation is required.
APS Plug-in
APS plug-in is intended to extend Eclipse IDE to easily create APS-compatible packages and automate their subsequent deployment and publishing. To install the APS plug-in: 1 2 3 4 5 6 7 8 Run the Eclipse executable. Navigate to Help > Install New Software. Type http://www.apsstandard.org/r/doc/sdk/eclipse-plugin in the Work with combobox and then press Enter. Select the Application Packaging Standard checkbox and click Next. Eclipse will check dependencies of the selected software. Click Next, read and accept license agreement. Click Finish and wait until installation is complete. Restart Eclipse. Close the Welcome page and switch to the APS perspective by navigating to Window > Open Perspective > Other.
38
39
6 7
40
41
The structure of the project is shown in the Project Explorer View and looks as follows:
42
APS Package Creation Files folder. All the application files should be placed here. Unpack the downloaded WordPress archive into the htdocs sub folder (should be created manually) of the APS project directory (/home/APS/projects/APS_WordPress). Images folder. All the image files are stored here. Scripts folder. All the scripts implementing the provisioning logic should be placed here. APS Package folder. All the package versions are stored here. Due to the APS plug-in, the project files are automatically compressed to become an APS package. Each time the application version or package release is changed, a new separate package version will be created upon saving. APP-LIST.xml. The file contains the list of all files in the package except itself. Size in bytes and SHA256 digest value are specified for each file in the list. APP-META.xml. The file contains application definitions and is automatically opened in the Editor.
The Editor simplifies the procedure of defining the application metadata by means of GUI fields, although the XML code is still available to edit it manually. Let us define the metadata file adhering to the GUI, sequentially switching between the corresponding tabs. The very last tab contains the XML code itself and might be useful to trace the new elements that will appear in the APP-META.xml file, as new values are specified through the GUI fields. Overview tab GUI interaction steps: Specify the following mandatory values. Application ID: http://wordpress.org/. A unique value that impacts successful updating from previous versions to the current one. Name: APS_WordPress. Version: 3.2.1. This is a WorrdPress version. Release: 1. This is the APS package release. Application version and package release are united for the package version: 3.2.1-1. To avoid conflicts between APS packages that have the same name, we recommend specifying a unique packager URI value as well.
43
XML code: GUI actions executed generate the following code that could be typed manually:
<id>http://wordpress.org/</id> <name>APS_WordPress</name> <version>3.2.1</version> <release>1</release>
Presentation tab The tab area contains top sub-tabs. Two of them, Changelog and Other include mandatory definitions: GUI interaction steps Switch to the Changelog sub-tab, click the Add button, and then specify Version: 3.2.1, Release: 1, Entry: WordPress release notes: http://codex.wordpress.org/Version_3.2.1.
44
APS Package Creation Switch to the Other sub-tab, click the Add button, in the Category box choose a category for the APS package. Let us pick Web/Blog to be the category for the WordPress APS package although a greater number of categories may be assigned to the same APS package. APS package supports multi-language localization. That means the content of some XML elements can be presented in different languages. To expand the APS package localization, click the Add button from the Languages section, and in the Language box choose a language that will be available. Let us assume that the WordPress APS package will support English (en) by default and, additionally, French (fr).
45
XML code:
<presentation> <changelog> <version version="3.2.1" release="1"> <entry>WordPress release notes: http://codex.wordpress.org/Version_3.2.1 </entry> </version> </changelog> <categories> <category>Web/Blog</category> </categories> <languages> <language>en</language> <language>fr</language> </languages> </presentation>
Global Settings tab There are no global settings in WordPress that can be applied to all instances.
Services tab GUI interaction steps The only service provided by WordPress is web blog management. To specify this service, click the Add button. The service added should be properly configured for successful provisioning: In the General sub-tab, specify the service unique identifier, ID: WordPressBlog. Click to the License sub-tab. As stated previously, WordPress is a free, open source application. Click the License type box and choose Free. A user should read and accept GPLv2 before using WordPress. Therefore, select the Must be accepted by a user check box, click the Add button, type the license name, and then browse for a file that contains the GPLv2 description. Because the APS package will be bilingual, two license agreements, one for each language and each containing the GPLv2 file, should be specified. For the APS controller to distinguish between these license agreements, the Language field should be set to an appropriate value.
46
47
XML code:
<license must-accept="true"> <free /> <text xml:lang="en-US"> <name>GPLv2_en</name> <file>htdocs/license_en.txt</file> </text> <text xml:lang="fr-FR"> <name>GPLv2_fr</name> <file>htdocs/license_fr.txt</file> </text> </license>
GUI interaction steps Proceed with the service configuration on the Settings sub-tab. WordPress requires that the following settings are to be specified on installation: Administrator credentials. Generally, the related settings should be visually rendered as a single group. Click the Add button, then the Setting group item, and type the group name: Administrator's preferences. It is recommended to inform the APS controller about the type of settings the group button, then the Class item, and in the Class contains by specifying its class. Click the box that appears choose authn. The Administrator's preferences group holds the login and password. Select the Administrator's preferences group, click the Add button then the String setting item, and in the ID box select admin_name. In the same way, add the Password setting item and select admin_password as a value. Both of those fields should be labeled for a user to distinguish, so add the Name detail field to each of the settings, and then type in an appropriate word as a value; for example, Admin's login and Password. This detail field has the mark meaning that an XML element corresponding to it can be localized into the
additional language (French) that was specified previously. Click next to the Name field of the login setting,and in the window that appears add a row for the fr-FR localization and type in, for instance, Le login administrateur as a value. For the password setting, specify Le mot de passe as a translation.
NOTE: Each locales that can be used here is specified as a <presentation><languages><language> element at the global application level.
An APS controller may automatically fill in some settings to reduce the number of input operations that require user involvement by specifying the class. Add the Class item for each of the settings inside the Administrator's preferences group, and assign login and password as corresponding values. Web blog title and administrator e-mail. These settings could be included in the same group; for example, named Main configuration. Vcard works well as a value of the group class; both settings relate to the general representation.
Note: Vcard class is organized according to the Vcard standard that is the basis of the HCard specification. Please, visit http://microformats.org/wiki/hcard for details.
48
APS Package Creation The Vcard standard prescribes that sub-classes fn and n are mandatory to use; therefore, let us add a sub-group named Title, for example, and specify fn n as its class value. Then a setting with ID: title, Type: string should be created inside the group. Let us assume that the title setting should be automatically filled in with a company name value. In accordance with PA-specific APS Classes, the company name can be obtained from the organization-name class; therefore, specify that class as a value of the title setting class.
Note: All other PA-specific APS classes can be found at http://www.parallels.com/r/docs/poa/Integrating_Application_with_Parall els_Automation_by_APS/58169.htm
As for the e-mail setting (ID: admin_email, Type: email), a separate sub-group of the email class named Email, for instance, should be created for it inside the Main configuration setting group. To comply with the Vcard standard, the value should be specified as the email setting class. Interface language. This setting relates to the WordPress appearance and also could be included in a separate group named Language, for example. The most applicable group class in such a case is web. The setting itself should have ID: locale, Type: enum and Class: locale. The enum type means that a choice between a number of pre-defined values (languages) must be made at the installation stage. To pre-define those values, select the setting, click the Add button and then Choice, and specify the language ID and Name. For instance, ID: en-US, Name: English.
49
XML code:
<settings> <group class="authn"> <name>Administrator's preferences</name> <setting id="admin_name" type="string" class="login"> <name>Administrator's login</name> <error-message>Please make sure the text you entered starts with a letter and continues with either numbers, letters, underscores or hyphens. </error-message> </setting> <setting id="admin_password" type="password" class="password" min-length="1" > <name>Password</name> </setting> </group> <group class="vcard"> <name>Main configuration</name> <group class="fn n"> <setting id="title" type="string" class="organization-name"> <name>Site name</name> </setting> </group> <group class="email"> <setting id="admin_email" type="email" class="value"> <name>Administrator's email</name> </setting> </group> <group class="web"> <setting id="locale" class="locale" type="enum" default-value="en-US"> <name>Interface language</name> <choice id="nl-NL" > <name>Dutch</name> </choice> <choice id="de-DE" > <name>German</name> </choice> <choice id="en-US" > <name>English</name> </choice> <choice id="fr-FR" > <name>French</name> </choice> <choice id="it-IT" > <name>Italian</name> </choice> </setting> </group> </settings>
GUI interaction steps Click the Requirements sub-tab. As defined previously, WordPress requires PHP version 5.2.4 or greater and MySQL version 5.0 or greater to be setup prior to its installation; that is why those requirements must be declared inside the APS package for successful provisioning. Click the Add button then PHP, and type 5.2.4 as a value of the min-version field. Because WordPress utilizes MySQL database to store all the settings, you must add the extension item as a PHP requirement detail, and set its value: mysql. Now let us add the Database requirement and specify details on it as follows ID: main, server-type: mysql, server-min-version: 5.0
50
51
XML code:
<requirements xmlns:php="http://apstandard.com/ns/1/php" xmlns:db="http://apstandard.com/ns/1/db" xmlns:mysql="http://apstandard.com/ns/1/db/mysql"> <php:version min="5.2.4"/> <php:extension>mysql</php:extension> <db:db> <db:id>main</db:id> <db:default-name>wordpress</db:default-name> <db:can-use-tables-prefix>true</db:can-use-tables-prefix> <db:server-type>mysql</db:server-type> <db:server-min-version>5.0</db:server-min-version> </db:db> </requirements>
GUI interaction steps Click the Entry Points sub-tab. All the specific access links to the WordPress application should be listed here. It is enough to add just a couple of links: administrator interface and web blog. Click the Add button, type Administrator interface in the Label field and /wplogin.php in the Destination field. A few additional details on this entry point must be stated. Two variables, for instance, log and pwd, are required to pass the login (the admin_name value) and password (the admin_password value) for auto-filling by the APS controller. The request method should be specified. Both login and password are sensitive data, and that is why the Post request method must be chosen. Add the Blog entry point specifying / as a destination value.
XML code:
<entry-points> <entry dst="/wp-login.php" method="POST"> <label>Administrative interface</label> <variable name="log" value-of-setting="admin_name"/> <variable name="pwd" value-of-setting="admin_password"/> </entry> <entry dst="/"> <label>Blog</label> </entry> </entry-points>
GUI interaction steps Switch to the Provision sub-tab. Make sure the configure script file that contains provisioning logic is implemented in full and exists in the Scripts folder. The general view of such a file looks similar to the following:
<?php # Collecting settings $admin_name = getenv('SETTINGS_admin_name'); $admin_password = getenv('SETTINGS_admin_password'); # etc. # Collecting DB info $db_id = 'main'; $db_type = getenv("DB_${db_id}_TYPE"); /*
52
53
function remove() { # removing DB tables - it is important for application that supports DB PREFIX } function configure() { # updating settings, url paths and other parameters # E.g.: updating DB record after admin login / password have been changed } ?>
A reference to that script file should be specified in the package. Click the Add button, and then Configuration script, browse for the script and choose a the script language, e.g. PHP. It is important to map URLs to directory or file paths. Add the URL mappings setting that serves as a site root, select that setting and click Add, to include the Mapping sub setting. Specify ID: /, browse for Path: htdocs (it is a sub-directory of Folder, where the application files are located). If you want the PHP interpreter to handle file extensions other than php, add the PHP handler sub setting and enumerate them using the extension detail field. Add other mappings that should be nested inside the root: wp-config.php, blogs/media, wp-content, tmp. All directories and files inside a mapping should be available for writing by the PHP interpreter, thus add the PHP permissions sub setting to each of the mappings.
54
XML code:
<provision> <configuration-script name="configure"> <script-language>php</script-language> </configuration-script> <url-mapping> <default-prefix>wordpress</default-prefix> <installed-size>6696960</installed-size> <mapping url="/" path="htdocs" xmlns:php="http://apstandard.com/ns/1/php"> <php:permissions writable="true"/> <php:handler> <php:extension>php</php:extension> </php:handler> <mapping url="wp-config.php"> <php:permissions writable="true"/> </mapping> <mapping url="blogs/media"> <php:permissions writable="true"/> </mapping> <mapping url="wp-content"> <php:permissions writable="true"/> </mapping> <mapping url="tmp"> <php:permissions writable="true"/> </mapping> </mapping> </url-mapping> </provision>
Updates tab GUI interaction steps The settings specified here define which earlier package versions can be upgraded to this one by means of upgrades or patches. Let us specify an upgrade condition that means significant changes will be brought into the contents of an earlier package. Click the Add button and fill in the Match field as follows: /application/version > '2.0' or /application/version = '2.0' and /application/release >= '1' In this case, the APS package starting from version 2.0-1 can be upgraded to the current version.
55
XML code:
<upgrade match="/application/version > '2.0' or /application/version = '2.0' and /application/release >= '1'"/>
Content tab Since WordPress is a simple shared application, it has nothing to do with PVC and no DLL registration is required. Since the Eclipse IDE has been used, there is no need to archive files; the package is automatically created inside the APS Package sub-folder of the APS project directory.
Validation, due to the Eclipse IDE with APS plug-in installed, is done automatically as well.
Finally, the test deployment of the WordPress package can be performed right from Eclipse. Make sure that you have access credentials to the Provider Control Panel of your internal POA and that Public API service is enabled. Navigate to Eclipse > Preferences; in the window that appears go to APS -> Compliant Panels. Click the Add button and select Parallels Automation Operation as a type. Specify a URL address of the host with POA installed and that of the Public API host, and enter valid credentials to log in to the corresponding Provider Control Panel and Public API access point. Click OK.
56
Next, navigate to Run -> Deploy APS Package, and in the window that appears select the POA site specified earlier as a host. Click Deploy.
As a result of successful deployment, a link to an instance of the application appears in the last line of the Console.
Note: If this is the first time the test deployment is performed, a request to specify POA Application ID and Resource Type ID appears.
57
<content xmlns:pvc="http://apstandard.com/ns/1/pvc"> <pvc:templates class="lin"> <pvc:archive-root path="/var/www/html/SugarCE-Full"/> <pvc:template path="templates/vzpem-sugarcrm-as4-template-20100410-1.0-1.i386.rpm"/> <pvc:template filename="vzpem-php5-cgi-as4"/> <pvc:template filename="vzpem-php-as4"/> <pvc:template filename="vzpem-mysql-client-as4"/> <pvc:template filename="vzpem-pgsql-client-as4"/> </pvc:templates> </content>
58
APS Package Creation The path attribute can be used to state that the template should be built-in inside the APS package.
Note: For details, refer to the PVC Aspect Specification, http://www.apsstandard.org/r/doc/aspect-pvc-1.2/index.html
59
60
61
Presentation tab GUI interaction steps Changelog sub-tab: Version: 1.5, Release: 1, Entry: SpamExperts release notes: built at <current date and time> Other sub-tab: Category: Collaboration/Email XML code:
<presentation> <summary></summary> <changelog> <version version="1.5" release="1"> <entry>SpamExperts release notes: built at 12-12-2011 09:39 </entry> </version> </changelog> <categories> <category>Collaboration/Email</category> </categories> </presentation>
Global Settings tab GUI interaction steps Because SpamExperts is an application of external provisioning, the following applicationspecific global settings must be declared: 62 SpamPanel URL (a URL leading to the web host where SpamPanel, used to manage antispam settings, is installed):
APS Package Creation ID: spampanel_url, Type: string, Class: access_point API access host (DNS or IP address of the master host where the SpamExpert API product is installed): ID: apihost, Type: string, Class: title API access login: ID: apilogin, Type: string, Class: title API access password: ID: apipass, Type: password, Class: title SSL (Enable/Disable SSL to communicate with APIs): ID: ssl_enabled, Type: boolean, Default value: True MX record (MX record that substitutes ones in user domains, and is required to redirect incoming e-mails for spam detection): ID: mx_primary, Type: string, Class: title
63
XML code:
<global-settings> <group class="authn"> <name>SpamPanel Settings</name> <setting id="spampanel_url" class="access_point" type="string"> <name>SpamPanel URL</name> </setting> </group> <group> <name>API Settings</name> <setting id="apihost" class="title" type="string"> <name>API hostname</name> </setting> <setting id="apilogin" class="title" type="string"> <name>API login</name> </setting> <setting id="apipass" class="title" type="password"> <name>API password</name> </setting> <setting id="ssl_enabled" class="title" type="boolean" default-value="true"> <name>SSL</name> </setting> </group> <group> <name>MX record</name> <setting id="mx_primary" class="title" type="string"> <name>Primary MX</name> </setting> </group> </global-settings>
Services tab SpamExperts is a multi-tenant application, therefore, a hierarchy of services should be declared: Domain integration root service and E-mail integration sub-service.
64
GUI interaction steps Root Service: General sub-tab: ID: SpamExpertsDomain, Class: service XML code:
<service id="SpamExpertsDomain" class="service">
Settings sub-tab: Domains to replace MX records in (that is, domain integration): ID: domains, Type: list, Element type: string, Class: domain-name, Visibility: hidden, Protected: true Domains to login for: ID: login_domains, Type: string, Class:value, Visibility: hidden, Protected: true Password to Login into SpamPanel: ID: domain_password, Type: password, Class: password, Visibility: hidden, Protected: true Email to send protection reports to: ID: email, Type: email, Class value, Visibility: hidden, Optional: true Number of domains: ID: num_domains, Type: string, Visibility: hidden Number of service users: ID: num_serviceusers, Type: string, Visibility: hidden
65
XML code:
<settings> <setting id="domains" class="domain-name" visibility="hidden" protected="true" type="list" element-type="string"> <name>List of domains</name> </setting> <group class="authn"> <setting id="login_domains" class="value" type="string" visibility="hidden" protected="true"> <name>List of domains</name> </setting> <setting id="domain_password" class="password" type="password" visibility="hidden" protected="true"> <name>Password</name> </setting> </group> <group class="vcard"> <group class="email"> <setting id="email" class="value" visibility="hidden" type="email" optional="true"> <name>Your e-mail address</name> </setting> </group> </group> <setting id="num_domains" type="string" visibility="hidden"> <name>Amount of domains allowed</name> </setting> <setting id="num_serviceusers" type="string" visibility="hidden"> <name>Amount of service users allowed</name> </setting> </settings>
Resources sub-tab. The following settings can be limited as resource objects and the application will report the value of their consumption: Number of domains:ID: num_domains_res, Class: item, Limiting setting: num_domains Number of service users: ID: num_serviceusers_res, Class: item, Limiting setting: num_serviceusers
XML code:
<resources> <resource id="num_domains" class="item" limiting-setting="num_domains"> <name>Number of domains</name> </resource> <resource id="num_serviceusers" class="item" limiting-setting="num_serviceusers"> <name>Number of service users</name> </resource> </resources>
Requirements sub-tab: PHP interpreter with two extensions must be installed on a provisioning gateway for the service configuration script to be executed: min version: 5.2, extension: openssl, extension: curl MX record is obligatory to present in domains: ID: MX_req, Record type: mx. Some MX specific attributes should be defined: Source: external, Value of setting: domains (List of domains to replace MX records in), Destination: external, Value of setting: mx_primary (MX record that substitutes ones in user domains).
XML code: 66
Entry Points sub-tab: Access point to login into SpamPanel of user domains: Label: SpamExperts ControlPanel, Destination: {spampanel_url}/bridgelogin.php, Request method: POST, Variable: spampanel_url_var, Value of setting: spampanel_url, Variable: domains_var, Value of setting: login_domains, Variable: password_var, Value of setting: domain_password
XML code:
<entry-points> <entry dst="{spampanel_url}/bridgelogin.php" method="POST"> <label>Antispam Controlpanel</label> <variable name="spampanel_url_var" value-of-setting="spampanel_url" /> <variable name="domains_var" value-of-setting="login_domains" /> <variable name="password_var" value-of-setting="domain_password" /> </entry> </entry-points>
Provision sub-tab: Verify that, configuration and resources scripts are placed into Scripts folder and add a reference to them.
XML code:
<provision> <configuration-script name="configure.php"> <script-language>php</script-language> </configuration-script> <resource-script name="report-resources.php"> <script-language>php</script-language> </resource-script> </provision>
67
APS Package Creation Settings sub-tab: ID: user_login, Type: email, Class: login, Protected: true, Unique: global ID: user_password, Type: password, Class: password, Protected: true
68
XML code:
<settings> <group class="authn"> <setting id="user_login" class="email" protected="true" type="login" uniq="global"> <name>Primary email address</name> </setting> <setting id="user_password" class="password" protected="true" type="password"> <name>Password</name> </setting> </group> </settings>
Requirements sub-tab: PHP interpreter with the same two extensions Mailbox: ID: mail, imap: true, smtp: true
XML code:
<requirements xmlns:mail="http://apstandard.com/ns/1/mail" xmlns:php="http://apstandard.com/ns/1/php"> <php:version min="5.2" /> <php:extension>openssl</php:extension> <php:extension>curl</php:extension> <mail:mailbox> <mail:id>account</mail:id> <mail:access> <mail:imap/> </mail:access> <mail:outgoing> <mail:smtp/> </mail:outgoing> </mail:mailbox> </requirements>
Entry Points sub-tab: Access point to log in to the dashboard of SpamPanel dedicated to a service user: Label: SpamExperts UserDashboard, Destination: {spampanel_url}/index.php, Request method: POST, Variable: spampanel_url_var, Value of setting: spampanel_url, Variable: username_var, Value of setting: user_login, Variable: userpassword_var, Value of setting: user_password
XML code:
<entry-points> <entry dst="{spampanel_url}/index.php" method="POST"> <label>SpamExperts UserDashboard</label> <variable name="spampanel_url_var" value-of-setting="spampanel_url" /> <variable name="username_var" value-of-setting="userlogin" /> <variable name="userpassword_var" value-of-setting="userpassword" /> </entry> </entry-points>
Provision sub-tab: Make sure, that the configuration script is placed into the Scripts folder and add a reference to it.
XML code: 69
After development is complete, perform the test deployment the same way as described for WordPress.
70
Package Certification
Once the APS package is ready, contact the APS support team (http://www.apsstandard.org/support/) for credentials to get an access to the APS Certification System, and then: Login to the APS Certification System (https://apscatalog.com/packager/admin/) using the given credentials. Upload the APS package to the APS Catalog by clicking the Upload new package button.
71
APS Package Creation When the process is complete, details on each test are displayed. Depending upon the results, the application receives a certification level according to the APS Application Certification Criteria.
Resolve APS package issues, if any, and request the application publication (http://www.apsstandard.org/certification/app/).
Note: For more information, refer to the APS Package Certification Guide available at http://www.apsstandard.org/r/doc/APS_Package_Certification_Guide/index.h tm
72
73
MODULE 4
In This Module
Importing APS Package .......................................................................................... 76 Configuration of Provisioning Environment ............................................................... 77 Resource Configuration........................................................................................... 78 Service Template .................................................................................................... 83 Service Plan............................................................................................................ 85 Check Your Progress .............................................................................................. 86
75
76
Note: For more information, refer to the POA Application Hosting, POA Linux Shared Hosting and POA Windows Shared Hosting Deployment Guides.
Note: For more information, refer to the POA Linux Mail Hosting Deployment Guide.
77
Resource Configuration
In POA, services are provisioned to customers through Resource Types. The main Resource Type must be configured to provide the root service of the application. Additionally, it is possible to create Resource Types for sub-services and application resources.
78
Resource Types
There are two ways to create an APS-related Resource Type: On the basis of Site Applications Resource Class. Only APS packages of the web shared provisioning type can use this Resource Class. A number of such applications can be installed in the same web site. On the basis of the Application resource class, often called a SaaS Application. Any type of APS package can be used to provision the service.
Besides the main application resource, there might be two other Resource Types related to SaaS: Application Service Resource Type allows specifying of additional parameters or setting limits for services other than the root service, as defined inside the application APS package; for example
... <service id="context" class="service"> ... <service id="account" class="account"> <setting id="user_module_access" type="string" visibility="hidden" default-value="groupware"> <name>Open-Xchange module access level for End-user</name> <description> This is access level of Open-Xchange account. </description> </setting> <setting id="upload_message_limit" type="string" visibility="hidden" default-value="100"> <name>Maximum size of all attachments in one message (in bytes) </name> </setting> <setting id="upload_attachment_limit" type="string" visibility="hidden" default-value="10"> <name>Maximum size of one attachment, maximum size of one InfoStore item (in bytes) </name> </setting> ... </service> ... </service> ...
79
Application Resource Resource Type that allows accounting for resources, as defined inside the APS package; for example,
... <service id="context" class="service"> ... <resources> <resource id="filestore_diskusage" class="mb" limiting-setting="filestore_quota"> <name>Disk space used by Open-Xchange context infostore files. </name> </resource> </resources> ... </service> ...
In the code extract above, the application reports disk quota usage to the APS controller.
Note: For details, refer to the POA Application Hosting Deployment Guide.
80
Activation Parameters
While creating the Application Resource Type, the activation parameters should be specified. There are two types of activation parameters natively related to the application APS package: Global settings. Changes impact all existing instances of the application, which are provisioned on the basis of this Resource Type. Global settings are defined inside the metadata file of the application APS package, for example,
... <global-settings> <setting id="ox_host" class="title" type="string" default-value="" min-length="1"> <name>Open-Xchange installation host</name> <description>This is DNS name or IP address of Open-Xchange installation, used for provisioning access. </description> </setting> </global-settings> ...
81
Deployment in Parallels Automation Default settings. These are initial settings for a newly created instance of the application root service. Such settings are defined inside the metadata file of the application APS package, for example,
... <service id="context" class="service"> ... <setting id="filestore_quota" type="string" visibility="hidden" default-value="1024"> <name>Open-Xchange context wide filestore quota (in MB)</name> </setting> <setting id="admin_tz" class="tz" type="enum" visibility="hidden" default-value=""> <name>Default time zone</name> </setting> <group class="branding"> <setting id="branding_theme" class="branding_theme" type="string" visibility="hidden" default-value=""> <name>Branding scheme name</name> </setting> </group> ... </service> ...
The definition above looks as follows in the POA Provider Control Panel:
82
Service Template
An APS application can be installed in a certain environment, and thus depends on other resources, such as web space, disk space, database, and other. Depending on which APS-related Resource Type is chosen, the minimal contents of the Service Template differ: If the Site Applications Resource Type is used, a physical hosting Resource Type and other required resources must be added into the same Service Template explicitly. In this case, an application is just an add-on object for a web site. For the Application Resource Type, the application uses an environment created for this application exclusively: web space, or a PVC container, or a special tenant. It is sufficient to include the Application Resource Type only, and then bind resource types existing in the system to it using the provisioning attributes as described earlier.
In case of using an APS resource based on the Application Class the other required resources must be selected by the provisioning system due to the links between the resources. It means, you need to add only the APS resource to a service template, since all other required resources will be added at the provisioning stage. Both Application Resource Type and additional resource types should have the same provisioning attribute as the hardware nodes do. Moreover, Backup Resource Type and the associated hardware node should have an additional provisioning attribute to prevent the chaotic backup done to different machines:
83
84
Service Plan
Service plan defines application components (and possibly their quantity) that can be purchased by a customer. Service plans are based on service templates combined with terms and prices. Service Plan is created by following a typical procedure in PBA (Parallels Business Automation). A customer can purchase additional application-related objects as options using resource rates. Services due to Application Service Resource Types. Resource limits due to Application Resource Resource Types. Licenses due to the APS License Class with a class identifier matching the API constant of the application-specific license as defined in Key Administrator Remote API Guide. Preliminarily, the application vendor's license service must be integrated with the Parallels Key Administrator service to make the license obtaining available. At the moment that an application instance needs a license, Parallels Automation requests it from the Parallels Key Administrator. The Parallels Key Administrator forwards this request to the vendor's licensing service. The vendor's licensing service issues the license and sends it back.
Note: For details about creating service plans, refer to the PBA Provider's Guide.
85
2 3
86
MODULE 5
87
88
Provisioning in Parallels Automation 3 Verify that all application entry points work properly.
Applications instances in shared web spaces are placed into the following directories on a hosting machine: Linux: /usr/local/pem/vhosts/<Webspace ID>/siteapps/<Application Instance ID>/ Windows: C:\Customer data\webspace_<Webspace ID>\webapps\SiteApp<Application Instance ID>\
Dedicated application instances are placed into directories inside a PVC container as specified in the PVC application templates. Provisioning scripts for external application processing are placed into the following directories on a gateway machine: Linux: /usr/local/pem/APS/instances/<Application Instance ID>/ Windows: C:\Program Files\SWsoft\pem\APS\instances\<Application Instance ID>\
To reconfigure application setting: 1 2 3 4 In CCP, select the target application. Open the Settings tab of the application and click Edit. Change settings and then click Submit. After the application receives the Ready status, verify that the setting has been changed in the application instance.
To uninstall the application: 1 2 In CCP, select the target application. Open the Settings tab of the application then click Uninstall.
To update the application: 1 2 3 In CCP, select the target application. Open the Settings tab of the application and click Upgrade. All the instances can be upgraded from the Provider Control Panel as well.
Configuration Runner
In order to perform one of operations over an application instance (install, configure, upgrade, or remove), the APS controller must create the runner.sh file in the provisioning environment that will start a script and provide needed parameters as environment variables. The content of the runner.sh file in a Linux OS may look as in the following examples.
89
In the example, the PHP based script configure is called after all environment variable are set. It requires upgrade from version 5.5.1 to version 5.6.0.
/usr/bin/php-cgi -d open_basedir= -q configure 'upgrade' '5.5.1' '5.6.0'
The configure-contact.php script with the configure command is called after setting all needed environment variables:
php -q configure-contact.php configure
90
To create a new service user and integrate him with applications at once: 1 2 3 4 5 6 7 Open the Service Users item of the customer control panel navigation menu. Click the Add New Service User button. Specify Display name, Login and Password. Select services you would like to integrate the new user with and click Next. To confirm the new service user creation, click Finish. Wait until the new service user is provisioned. Verify that the service user's entry point works correctly.
91
Note: If an application modifies an existing DNS record (typically MX record), make sure that it has been replaced with the one required by the application.
92
93
94
MODULE 6
95
Troubleshooting Tools
For APS, there are troubleshooting tools that can be used at different APS package life cycle stages. 1 2 3 In Eclipse, the APS player helps to debug the APS package at the package development and creation stage. It works with APS packages targeted on the external provisioning type. In POA, the task log is used for analyzing issues when a package is being imported and at the provisioning stage. The runner.sh script in the provisioning environment allows to re-execute the last provisioning task.
APS Player
APS plug-in in Eclipse IDE allows provisioning APS package of the external provisioning type in the test mode, i.e. without any APS-compliant product, by means of the following operations. Create, recreate, change and remove hierarchy of services Call configuration scripts and display their output Execute provisioning scripts on PHP Execute provisioning scripts on jscript and vbscript. Collect and show resource usage and display output of root service's resource script Satisfy requirements (define environment variables)
96
Solution 1 2 Cancel the task by clicking the Cancel Task button, if the APS package is shown as invalid in the task description. Then fix the APS package and import it again. If the error is caused by a failed network connection, click the Run Task button to rerun the task, once the connection is established or recovered.
97
7 8 9
10 Execute runner.sh again to verify that the script execution returns no errors. 11 Modify runner.sh to verify the execution result of other scripts and functions, if needed. 12 When all the errors are resolved, import the revised APS package with an increased release number.
98
10 When all the errors are resolved, import the revised APS package with an increased release number.
99
Unforeseen Error
Symptom: During installation of an application instance, an error message appears notifying about unforeseen error. Probable cause: This might happen if an existing version of an APS package was imported to POA, but the user session still keep old IDs of the application configuration cached. Recommended solution: Recommend the user to restart the POA session.
100
101
APPENDIX A
103
Module 1. Introduction
1 2 What benefits does APS provide for application vendors? Access to the channel of APS-enabled service providers. What is the difference between the SaaS business model and the standard application purchasing model? Customers subscribe to the target application and get on-demand access versus purchasing the application. 3 What are the main stages of the APS life cycle? Packaging Deployment Provisioning
104
105
106
107
108
109