Application Manifest
Let’s have a closer look at the code of the package with all required configurations.
JPS manifest is a file with .json extension which contains an appropriate code written in JSON format (JSON Formatter & Validator). This manifest file includes the links to the web only dependencies. This file can be named as you require.
The code should contain a set of strings needed for successful installation of application. The basis of the code is represented by the following strings:
|
|
This is a mandatory body part of the application package which includes the information about JPS version and the type of the application installation (“install” mode initiates a new environment creation required for deploy).
These basic strings should be extended with the settings required by the application you are packing. The following configuration details are included to the “application”: { } parameter:
Application Description
First of all you need to provide some general information about the application such as its title, version, type of programming language and so on.
Sample of code:
|
|
Value | Description | Mandatory |
---|---|---|
id | Unique application identifier, it is suggested using small letters while stating id | yes |
name | Application name | yes |
version | Application version | yes |
logo | Secure http link to the logo | yes |
type | Type due to the programming languages. Available values are:
| yes |
categories | Category(ies) of the Marketplace, for which the app will belong to. The available values are listed below. If this option is not stated, application will be located in the Others category. | no |
homepage | Application homepage in format of URL RFC 1738 | yes |
description | Description of application that is displayed to a user in the installation wizard. A string or associative array, where the key is the language code in IETF language tag or ISO 639‑1 format. Possible ways of providing “description” values:
| yes |
startPage | Context/relative path which is opened after pressing “Open in browser” button (if sso is not used). Default value is “/” | no |
success | The text which will be displayed at the dashboard as a message or sent by email after successful app deployment (“email” value is optional, if it is not stated, the content from “text” value will be used for emailing) | yes |
In the categories parameter you can use the following values due to the Marketplace category you would like your application belong to:
Marketplace Section Name | Categories Value |
---|---|
Dev & Admin Tools | apps/dev-and-admin-tools |
Clusters | apps/clusters |
Microservices | apps/microservices |
Content Management | apps/content-management |
E-Commerce | apps/e-commerce |
Storage & File Manager | apps/file-manager |
Project Management | apps/project-management |
Environment configurations
You need to specify the details about the environment your application requires for a proper performance. The settings stated in this part of the code will be used for creating and configuring the appropriate environment while package installation.
TOPOLOGY Section
The “topology”:{ } section includes the data on the programming language of the environment, the required nodes with their settings and the necessity to enable such extra functions as High Availability and SSL.
Sample of code:
|
|
Name | Description | Type | Values | Mandatory |
---|---|---|---|---|
ha | High Availability | boolean | true, false | yes |
engine | Programming language version | string | java6, java7, php5.3, php5.4, php5.5 | yes |
ssl | SSL | boolean | true, false | yes |
nodes | The list of node settings (mentioned below) | array | no |
NODES Subsection
This is the “nodes”:[ ] subsection of the above mentioned “topology”:{ } where you can specify the amount of nodes and their main settings.
Sample of code:
|
|
Name | Description | Type | Values | Mandatory |
---|---|---|---|---|
extip | External IP | boolean | true, false | yes |
count | Number of the nodes in the environment | integer | 1, 2, 3, … | yes |
cloudlets (or “fixedCloudlets” and “flexibleCloudlets”) | “cloudlets” parameter specifies the amount of flexible cloudlets for the node (the reserved will be set to 1 cloudlet by default). Fixed and flexible cloudlets can be stated separately with “fixedCloudlets” and “flexibleCloudlets” parameters. | integer | 1, 2, 3, … | yes |
nodeType | Node type | string | tomcat6, tomcat7, mysql5, apache2, nginxphp etc. (see the full list of node types below) | yes |
In the nodeType parameter you can use the following node type values due to the stack you want to use:
Software Stack Name | Node Type Value |
---|---|
Tomcat 6 | tomcat6 |
Tomcat 7 | tomcat7 |
TomEE | tomee |
Jetty 6 | jetty6 |
GlassFish 3 | glassfish3 |
Apache 2 | apache2 |
NGINX PHP | nginxphp |
MySQL | mysql5 |
MariaDB 5 | mariadb |
MariaDB 10 | mariadb10 |
PostgreSQL 8 | postgres8 |
PostgreSQL 9 | postgres9 |
MongoDB | mongodb |
CouchDB | couchdb |
NGINX balancer | nginx |
Maven | maven3 |
Memcached | memcached |
Note: You can also include the desired nodes to your application JPS package (if you have any integrated to your platform). To get the required value for the nodeType parameter, open your Cluster > Templates admin panel and copy the string in brackets next to the necessary cartridge name (e.g., glassfish4):
UPLOAD Section
Add the “upload”:[ ] section to the code if your application requires any additional files (e.g. any library or module) to be uploaded and set:
Sample of code:
|
|
Name | Description | Type | Values | Mandatory |
---|---|---|---|---|
nodeType | Node type | string | tomcat6, tomcat7, mysql5, apache2, nginxphp, etc. (see the table above for the full list of node types) | yes |
sourcePath | Link to the file for uploading (e.g., *.jar library or *.so module) | string | https://…/jdbc-connector.jar, https://…/libcurl.so | yes |
destPath | The file system path where to save the uploaded file | string | ${WEBAPPS}/jdbc-connector.jar, ${HOME}/libcurl.so | yes |
DEPLOYMENTS Section
The “deployments”:[ ] section is responsible for setting the deploy process of the application archive to the configured environment.
Sample of code:
|
|
Name | Description | Type | Values | Mandatory |
---|---|---|---|---|
archive | Link to archive in war, zip, tar.gz formats | string | https://…/test.war | yes |
name | Name of archive to be deployed | string | test.war | yes |
context | The context in which to deploy the application | string | ROOTPossible values: “ROOT”, “/” or arbitrary path | yes |
CONFIGS Section
Using the “configs”:[ ] section you are able to modify any configuration file at any node (application server, database, etc.) to configure application settings (e.g. configure connection setting between application server and database) and also perform database related operations: apply initial database dump, apply database patch, etc.
Sample of code:
|
|
Name | Description | Type | Values | Mandatory |
---|---|---|---|---|
nodeType | Node type | string | tomcat6, tomcat7, mysql5, apache2, nginxphp, etc. (follow the link to the full list of node types) | no |
restart | Restart (reboot) node | boolean | true, false | yes |
replacements | The list of replacements in the configuration files on the node (mentioned below) | array | no | |
path | The path to the configuration file is required for replacements | string | no | |
database | The list of database settings (mentioned below) | array | no |
REPLACEMENTS Subsection
This is the “replacements”:[ ] subsection of the above mentioned “configs”:{ }. You can use as replacement any string value including any combination of placeholders.
Sample of code:
|
|
Name | Description | Type | Values | Mandatory |
---|---|---|---|---|
pattern | Regular expressions to find the string | string | cyclos\\.host\\.url\\s*=\\s*.* | yes |
replacement | String to replace | string | cyclos.host.url = ${env.url} | yes |
DATABASE Subsection
This is the “database”:[ ] subsection of the above mentioned “configs”:{ } where you can specify the main db settings.
Sample of code:
|
|
Name | Description | Type | Values | Mandatory |
---|---|---|---|---|
name | Name of the database to create | string | cyclos3 | yes |
user | User name in the database on behalf of which the application will be used (if a user is not stated the database will be created from root user) | string | root | no |
dump | Link to the application database dump (this value is optional) | string | https://…/cyclos3.sql | no |
patch | SQL query or link to such query. it is used only for SQL databases, supports replacements. | string | UPDATE magento.admin_user SET password=CONCAT(MD5(‘qX${user.appPassword}'), ‘:qX’), email='${user.email}’ WHERE username=‘admin’; | no |