An application represents a group of software packages, and linked resources, that can be installed on a host. It abstracts the concepts of individual packages, configuration files and services from the user. Instead, the user can focus on deploying a ‘business application’ (e.g. A secure web server) and the underlying system will take care of the rest.
Parameters may be associated to an application, in particular for template rendering.
The following elements are defined as part of an application representation:
A package resource has the following representation:
Example:
{
"name": "mod_ssl"
}
A file resource has the following representation:
Example:
{
"name": "httpd.conf",
"path": "/etc/httpd/conf/httpd.conf",
"mode": "644",
"owner": "root",
"group": "root",
"template": {
"delimiter": {
"start": "${"
"end": "}"
}
}
}
A service resource has the following representation:
Example:
{
"name": "httpd",
"enabled": true
}
A sequence of actions to perform upon an event.
Each action defines an operation to apply on a resource, for example: update a file, restart a service, etc. Available operations depend on target resource:
on files:
on services:
Example:
{
"do": [
{
"action": "update",
"resource": "file://httpd.conf"
},
{
"action": "restart",
"resource": "service://httpd"
}
],
"on": [
"httpd_port"
]
}
{
"name": "WebServer",
"organization": "Guardis Test",
"description": "Apache web server",
"parameters": [
{
"description": "The httpd port",
"key": "httpd_port",
"name": "Httpd Port",
"schema": {
"type": "string"
},
"value": "80"
}
],
"files": [
{
"group": "root",
"mode": "644",
"name": "httpd.conf",
"owner": "root",
"path": "/etc/httpd/conf/httpd.conf",
"template": {
"name": "httpd.conf",
"delimiter": {
"start": "${"
"end": "}"
}
}
}
],
"packages": [
{
"name": "mod_ssl"
},
{
"name": "httpd"
}
],
"services": [
{
"enabled": true,
"name": "httpd"
}
],
"handlers": [
{
"do": [
{
"action": "update",
"resource": "file://httpd.conf"
},
{
"action": "restart",
"resource": "service://httpd"
}
],
"on": [
"httpd_port"
]
}
]
}
/organizations/{org_name}/applications
/organizations/{org_name}/applications/{app_name}
/organizations/{org_name}/applications/{app_name}/_clone?name=new_name
2016 © ComodIT. All Rights Reserved. Privacy Policy | Terms of Service