Application Manifest

Let’s have a closer look at the code of the package with all required configurations.

Note: Before starting to pack your application we recommend to deploy it first to the platform manually and check all the required settings in order to be aware what configurations to specify in the manifest code.

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:

1
2
3
4
5
{
 "jpsVersion":"0.2"
 "jpsType": "install",
 "application": { }
}

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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
{
   application: {
      "id":"opencms",
      "name":"OpenCMS",
      "version":"8.5",
      "logo":"",
      "type":"java",
      "categories":["apps/cms","apps/popular"],
      "homepage": "",
      "description": {
          "en": "OpenCMS from Alkacon Software is a professional, easy to use website content management system. OpenCms helps content managers worldwide to create and maintain beautiful websites fast and efficiently.",
          "ru": "Russian description"
      },
     "startPage" : "/install.jsp",
     "success": {
    "text": "Dashboard success text",
    "email": "Email success text"
     }

}}
ValueDescriptionMandatory
idUnique application identifier, it is suggested using small letters while stating idyes
nameApplication nameyes
versionApplication versionyes
logoSecure http link to the logoyes
typeType due to the programming languages. Available values are:
  • java
  • php
yes
categoriesCategory(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
homepageApplication homepage in format of URL RFC 1738yes
descriptionDescription 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:
  • “abc”
  • { en : “abc”, ua : “абв” }
yes
startPageContext/relative path which is opened after pressing “Open in browser” button (if sso is not used). Default value is “/”no
successThe 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 NameCategories Value
Dev & Admin Toolsapps/dev-and-admin-tools
Clustersapps/clusters
Microservicesapps/microservices
Content Managementapps/content-management
E-Commerceapps/e-commerce
Storage & File Managerapps/file-manager
Project Managementapps/project-management
Note: You can specify multiple categories in a single package, and your application will be shown in each of them. Also, if you need some additional categories, please contact your technical account manager to start the discussion.

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:

1
2
3
4
5
6
"topology":{
             "ha":value,
             "engine":"value",
             "ssl":value,
             "nodes":[ ]
          },
NameDescriptionTypeValuesMandatory
haHigh Availabilitybooleantrue, falseyes
engineProgramming language versionstringjava6, java7, php5.3, php5.4, php5.5yes
sslSSLbooleantrue, falseyes
nodesThe list of node settings (mentioned below)arrayno

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:

1
2
3
4
5
6
7
8
"nodes":[
           {
              "extip":value,
              "count":value,
              "cloudlets":value,
              "nodeType":"value"
           }
        ]
NameDescriptionTypeValuesMandatory
extipExternal IPbooleantrue, falseyes
countNumber of the nodes in the environmentinteger1, 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.integer1, 2, 3, …yes
nodeTypeNode typestringtomcat6, 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 NameNode Type Value
Tomcat 6tomcat6
Tomcat 7tomcat7
TomEEtomee
Jetty 6jetty6
GlassFish 3glassfish3
Apache 2apache2
NGINX PHPnginxphp
MySQLmysql5
MariaDB 5mariadb
MariaDB 10mariadb10
PostgreSQL 8postgres8
PostgreSQL 9postgres9
MongoDBmongodb
CouchDBcouchdb
NGINX balancernginx
Mavenmaven3
Memcachedmemcached

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):

cartridge value

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:

1
2
3
4
5
6
7
"upload":[
             {
                "nodeType":"value",
                "sourcePath":"value",
                "destPath":"value"
             }
                       ],
NameDescriptionTypeValuesMandatory
nodeTypeNode typestringtomcat6, tomcat7, mysql5, apache2, nginxphp, etc. (see the table above for the full list of node types)yes
sourcePathLink to the file for uploading (e.g., *.jar library or *.so module)stringhttps://…/jdbc-connector.jar, https://…/libcurl.soyes
destPathThe file system path where to save the uploaded filestring${WEBAPPS}/jdbc-connector.jar, ${HOME}/libcurl.soyes

DEPLOYMENTS Section

The “deployments”:[ ] section is responsible for setting the deploy process of the application archive to the configured environment.

Sample of code:

1
2
3
4
5
6
7
"deployments":[
     {
        "archive":"value",
        "name":"value",
        "context":"value"
     }
  ]
NameDescriptionTypeValuesMandatory
archiveLink to archive in war, zip, tar.gz formatsstringhttps://…/test.waryes
nameName of archive to be deployedstringtest.waryes
contextThe context in which to deploy the applicationstringROOTPossible values: “ROOT”, “/” or arbitrary pathyes

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:

1
2
3
4
5
6
7
8
9
"configs":[
 {
    "nodeType":"value",
    "restart":value,
    "replacements":[]
    "path":"value",
    "database":{},
    }
]
NameDescriptionTypeValuesMandatory
nodeTypeNode typestringtomcat6, tomcat7, mysql5, apache2, nginxphp, etc. (follow the link to the full list of node types)no
restartRestart (reboot) nodebooleantrue, falseyes
replacementsThe list of replacements in the configuration files on the node (mentioned below)arrayno
pathThe path to the configuration file is required for replacementsstringno
databaseThe list of database settings (mentioned below)arrayno

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:

1
2
3
4
5
6
"replacements":[
    {
       "pattern":"value",
       "replacement":"value"
    },
]
NameDescriptionTypeValuesMandatory
patternRegular expressions to find the stringstringcyclos\\.host\\.url\\s*=\\s*.*yes
replacementString to replacestringcyclos.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:

1
2
3
4
5
6
"database":{
   "name":"value",
   "user":"value",
   "dump":"value",
   "patch" : "value"
}
NameDescriptionTypeValuesMandatory
nameName of the database to createstringcyclos3yes
userUser 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)stringrootno
dumpLink to the application database dump (this value is optional)stringhttps://…/cyclos3.sqlno
patchSQL query or link to such query. it is used only for SQL databases, supports replacements.stringUPDATE magento.admin_user SET password=CONCAT(MD5(‘qX${user.appPassword}'), ‘:qX’), email='${user.email}’ WHERE username=‘admin’;no

What’s next?