Specifying Target Container¶
Running a specific action requires to specify a target container, in confines of which this action is executed. Thus, it is possible to specify a particular container, all containers within a layer by the nodeGroup value, or all containers of the same type by the nodeType value.
Particular Container¶
The nodeId parameter is used to specify a particular container for the action execution. If you know the Node ID of your container (displayed at the Jelastic dashboard next to the required node), you can set it statically as follows.
writeFile:
- nodeId: 123
path: /var/www/webroot/hw.txt
body: Hello World!
{
"writeFile": [
{
"nodeId": "123",
"path": "/var/www/webroot/hw.txt",
"body": "Hello World!"
}
]
}
If you don't know the Node ID or a container is not created yet, you can set a dynamic value, using special placeholders as follows.
writeFile:
- nodeId: ${nodes.apache2[0].id}
path: /var/www/webroot/hw.txt
body: Hello World!
{
"writeFile": [
{
"nodeId": "${nodes.apache2[0].id}",
"path": "/var/www/webroot/hw.txt",
"body": "Hello World!"
}
]
}
For more information, visit the Placeholders documentation page.
All Containers By Group¶
The nodeGroup parameter is used to specify all containers within a specific layer.
The Jelastic Platform supports the following predefined nodeGroup values:
-
bl
-
cp
-
cache
-
sqldb
-
nosqldb
-
storage
-
vds (for VPS)
-
build
Actions for the specified nodeGroup are executed successively one by one. For Docker containers the nodeGroup value is not predefined, therefore, you can state it to any value above or your custom one.
Note
If you state a custom nodeGroup value for Docker containers, the corresponding container is placed to the Extra layer. Subsequently, this nodeGroup value can be used within the same-named actions field to point to the particular Extra layer.
All Containers By Type¶
The nodeType parameter is used to specify all containers that are built upon the same software stacks.
Examples
Using the nodeType parameter while performing the writeFile action.
writeFile:
nodeType: apache2
path: /tmp/example.txt
body: Hello World
{
"writeFile": {
"nodeType": "apache2",
"path": "/tmp/example.txt",
"body": "Hello World"
}
}
where:
writeFile
- action to write data to the filenodeType
- parameter that specifies the node typepath
- parameter that specifies the path to the filebody
- data that is written to the file
Using the engine and nodeType parameters while creating a new environment.
type: install
name: install Tomcat7 node
engine: java7
nodes:
nodeType: tomcat7
{
"type": "install",
"name": "install Tomcat7 node",
"engine": "java7",
"nodes": {
"nodeType": "tomcat7"
}
}
where:
engine
- parameter that specifies the engine versionnodeType
- parameter that specifies the node type
Selector Types¶
There are three alternative approaches, provided to specify a target container in a manifest:
- specifying a target container within a name of an action (node selectors)
Through the following example, a new file is created in the compute layer ([cp]) and a new directory is created in the compute ([cp]) and balancer ([bl]) layers, and container with the Node ID 123. Actions for the specified containers are executed in the declared order.
- createfile [cp]:
path: /tmp/test.txt
- createDirectory [cp,bl,123]:
path: /tmp/test
[
{
"createFile [cp]": {
"path": "/tmp/test.txt"
}
},
{
"createDirectory [cp,bl,123]": {
"path": "/tmp/test"
}
}
]
A defined action in manifest could be executed in all nodes of all layers within an environment where JPS is executed. For example:
type: update
name: cmd in all nodes
onInstall:
cmd [*]: echo hello world!
{
"type": "update",
"name": "cmd in all nodes",
"onInstall": {
"cmd [*]": "echo hello world!"
}
}
There is a console log screen which displays that cmd
action has been executed in all nodes by unique identifier one by one:
- specifying a target container next to the performed action
Through the following example, the createFile and createDirectory actions are applied to the specified nodeGroup, namely the compute layer ([cp]).
- createFile:
path: /tmp/test.txt
createDirectory:
path: /tmp/test
nodeGroup: cp
[
{
"createFile": {
"path": "/tmp/test.txt"
},
"createDirectory": {
"path": "/tmp/test"
},
"nodeGroup": "cp"
}
]
- specifying a target container as a parameter in the actions object
Learn more on this parameter within the Custom Actions documentation page.
Note
Node selectors have higher priority than containers specified next to the action, but lower than parameters set in the actions object.
If you specify all three parameters (nodeId, nodeGroup, and nodeType), actions for indicated containers are executed in the following order: nodeId -> nodeGroup -> nodeType.
NodeGroup Aliases¶
An existed nodes in environments can be targeted not only by their defined *nodeGroup*s and by aliases. That aliases could be defined in manifests like in example:
type: update
name: Alias for nodeGroup
nodeGroupAlias:
cp: sqldb2
onInstall:
log: ${nodes.sqldb2.id}
{
"type": "update",
"name": "Alias for nodeGroup",
"nodeGroupAlias": {
"cp": "sqldb2"
},
"onInstall": {
"log": "${nodes.sqldb2.id}"
}
}
In the example above JPS add-on with type
update could be applied on any existing environment. In this case all compute nodes with nodeGroup cp can be called by aliases (Nodes with nodeGroup sqldb2 are absent in environment). So the example result is displayed in the screen:
Note
nodeGroupAlias
option works only within current JPS manifest.
Supported Stacks¶
Below you can find data about supported software stacks in confines of the nodeGroup, nodeType, and engine values.
Predefined nodeGroup Values¶
The Jelastic Platform supports the following predefined nodeGroup values:
-
bl (for load balancers) - nginx, varnish, haproxy, apache-lb
-
cp (for compute nodes) - tomcat6, tomcat7, tomcat8, tomee, glassfish3, glassfish4, jetty6, jetty8, jetty9, jboss7, smartfox-server, powerdns, railo4, wildfly, wildfly9, wildfly10, wildfly11, wildfly12, springboot, apache2, nginxphp, apache2-python, apache2-ruby, nginx-ruby, nodejs, iis8
-
sqldb (for SQL databases) - mysql5, mysql5-6, mariadb, mariadb10, postgres9, postgresql, mssql, mssqlweb, mssqlstd
-
nosqldb (for NoSQL databases) - mongodb, mongodb2, couchdb, redis, redis3, redis4, cassandra, cassandra2, cassandra3, neo4j, neo4j2-1, neo4j3, orientDB, orientDB2, Percona
-
vds (for virtual private servers, VPS) - centos6, centos7, ubuntu16-04, windows2008, windows2012
-
cache (for a cache server) - memcached
-
build (for a build node) - maven3
-
storage (for a storage container) - storage
Predefined nodeType Values¶
The Jelastic Platform supports the following software stacks:
- Compute Nodes (cp):
- Java
tomcat
- Dockerized Tomcattomcat6
- Tomcat 6tomcat7
- Tomcat 7tomcat8
- Tomcat 8tomcat85
- Tomcat 8.5tomcat9
- Tomcat 9tomee
- TomEEglassfish3
- GlassFish 3glassfish4
- GlassFish 4glassfish
- GlassFish 5jetty6
- Jetty 6jetty8
- Jetty 8jetty9
- Jetty 9jboss7
- Jbossas 7smartfox-server
- SmartFoxServer 2Xpowerdns
- Powerdns 3railo4
- Railo4 9wildfly
- Wildfly 8wildfly9
- Wildfly 9wildfly10
- Wildfly 10wildfly11
- Wildfly 11wildfly12
- Wildfly 12springboot
- SpringBoot 1.x-2.x
- PHP
apache2
- Apache 2nginxphp
- Nginx PHP
- Python
apache2-python
- Apache 2 + Python
- Ruby
apache2-ruby
- Apache 2 + Rubynginx-ruby
- Nginx Ruby
- Node.js
nodejs
- Node.js
- Web Server (IIS)
iis8
- Web Server (IIS)
- Java
- SQL Databases (sqldb):
mysql5
- MySQLmariadb
- MariaDB 5mariadb10
- MariaDB 10postgres9
- PostgreSQL 9postgresql
- PostgreSQL 10mssql
- MSSQL 2012mssqlweb
- MSSQL Webmssqlstd
- MSSQL std
- NoSQL Databases (nosqldb):
mongodb
- MongoDBmongodb2
- MongoDB 2couchdb
- CouchDBredis
- Redis 2.8redis3
- Redis 3.2redis4
- Redis 4.0cassandra2
- Cassandra 2cassandra3
- Cassandra 3neo4j
- Neo4jneo4j2-1
- Neo4j2-1neo4j3
- Neo4j3orientDB
- OrientDBorientDB2
- OrientDB 2Percona
- Percona 5
- Balancers (bl):
nginx
- Nginx balancerhaproxy
- HAProxy balancerapache-lb
- Apache balancervarnish
- Varnish 4
- Build Node (build):
maven3
- Мaven
- Cache Node (cache):
memcached
- Мemcached
- Virtual Private Servers (vps):
centos6
- CentOS 6centos7
- CentOS 7ubuntu16-04
- Ubuntu16-04windows2008
- Windows2008windows2012
- Windows2012
- Storage (storage):
storage
- Shared storage
- Docker Containers (docker):
docker
Dokerized Template Tags¶
There is a list of dokerized
supported Jelastic templates with their tags:
nodeType | tomcat |
tomee |
apache2 |
nginxphp |
nginx(lb) |
---|---|---|---|---|---|
tag | 6.0.45-jdk-1.6.0_45 6.0.45-jdk-1.7.0_79 6.0.45-jdk-1.8.0_102 7.0.73-jdk-1.8.0_102 7.0.73-jdk-1.6.0_45 7.0.73-jdk-1.7.0_79 7.0.85-OpenJDK-1.7.0_161 7.0.85-OpenJDK-1.8.0_161 8.5.29-jdk-10 9.0.6-jdk-10 |
7.0.1-jdk-1.7.0_79 7.0.1-jdk-1.8.0_102 7.0.3-jdk-1.7.0_79 7.0.3-jdk-1.8.0_131 7.0.3-jdk-1.8.0_141 7.0.3-OpenJDK-1.7.0_141* 7.0.3-OpenJDK-1.8.0_141 |
2.4.6-php-5.3.29 2.4.6-php-5.4.45 2.4.6-php-5.5.38 2.4.6-php-5.6.28 2.4.6-php-7.0.13 2.4.6-php-7.1.0 2.4.6-php-7.1.13 2.4.6-php-7.1.7 |
1.10.1-php-5.3.29 1.10.1-php-5.4.45 1.10.1-php-5.5.38 1.10.1-php-5.6.28 1.10.1-php-7.0.10 1.10.1-php-7.0.13 1.10.1-php-7.1.0 1.12.2-php-7.1.13 1.12.2-php-7.2.1 |
1.10.1 1.10.3 1.12.2 |
nodeType | mysql |
mariadb-dockerized |
postgresql |
memcached |
maven3 |
varnish |
---|---|---|---|---|---|---|
tag | 5.6.32 5.6.36 5.6.37 5.7.14 5.7.18 5.7.19 |
5.5.56 5.5.57 5.5.58 10.1.20 10.1.24 10.2.7 10.2.8 10.2.12 |
9.6.8 9.6.9 9.6.10 10.1 10.3 10.4 10.5 |
1.4.24 1.5.4 1.5.6 |
3.3.9-jdk-1.7.0_79 3.3.9-jdk-1.8.0_102 3.5.0-jdk-1.8.0_152 3.5.2-jdk-9.0.4 3.5.2-jdk-10 |
4.1.5 5.2.1 |
Engine Versions¶
The following section deals with the supported engine versions and their availability for a corresponding nodeType (in confines of the compute nodes).
Java Stacks
nodeType | tomcat6 |
tomcat7 |
tomcat8 |
tomee |
glassfish |
glassfish3 |
glassfish4 |
jetty6 |
jetty8 |
---|---|---|---|---|---|---|---|---|---|
engine | java6 java7 java8 |
java6 java7 java8 jdk 10 |
java7 java8 JDK 9 jdk 10 |
java7 java8 |
jdk-1.8.0_144 jdk-1.8.0_152 |
java6 java7 |
java7 java8 |
java6 java7 java8 |
java6 java7 java8 |
nodeType | jetty9 |
jboss7 |
smartfox-server |
powerdns |
railo4 |
wildfly |
wildfly9 |
wildfly10 |
wildfly11 |
wildfly12 |
---|---|---|---|---|---|---|---|---|---|---|
engine | java8 | java7 | java6 java7 java8 |
java6 | java7 java8 |
java7 java8 |
java7 java8 |
java8 jdk-9 |
java8 jdk-9 |
java8 jdk-9 jdk-10 |
PHP Stacks
nodeType | apache2 |
nginxphp |
---|---|---|
engine | php5.3 php5.4 php5.5 php5.6 php7 php7.1.7 php7.2.1 |
php5.3 php5.4 php5.5 php5.6 php7 php7.1.13 php7.2.1 |
Ruby Stacks
nodeType | apache2-ruby |
nginx-ruby |
---|---|---|
engine | ruby1.9 ruby2.0 ruby2.1 ruby2.2 ruby2.3 ruby2.4.1 |
ruby1.9 ruby2.0 ruby2.1 ruby2.2 ruby2.3 ruby2.4.1 |
Python Stacks
nodeType | apache2-python |
---|---|
engine | python2.7 python3.3 python3.4 python3.5 |
Nodejs Stacks
nodeType | nodejs |
---|---|
engine | nodejs6.11.5 nodejs6.12.3 nodejs8.9.0 nodejs8.9.4 nodejs9.0.0 nodejs9.4.0 |
.Net
nodeType | iis8 |
---|---|
engine | .NET 4 |
Note
The list of supported software stacks can vary depending on your Jelastic Platform version - it can be checked at your dashboard.
What’s next?
-
Explore the list of available Actions
-
See the Events list the actions can be bound to
-
Find out the list of Placeholders for automatic parameters fetching
-
Read how to integrate your Custom Scripts
-
Learn how to customize Visual Settings