CreateEnv Params

CreateEnv Params

Note: This document is based on Jelastic version 4.7

Creation of a new environment at Jelastic can be automated in a variety of different ways, e.g. with the help of Jelastic CLI, through the direct API request or by declaring the appropriate parameters via JPS manifest. Herewith, though representing a rather simple operation, it can include a bunch of different parameters for the precise topology definition.

Thus, below we provide the description for all of such settings with the examples on their usage via CLI. They are divided into 3 major sections as arrays of the ~/jelastic/environment/control/createenvironment method, being named according to the appropriate arrays’ denominations – two common ones and listing of the specialized parameters for the Docker containers’ creation:

The parameters below are to be specified within the env array (of either CLI command or JSON file) and define the most common environment configurations, like programming languagenameregion and others:

Name Description Type Example Value Mandatory
region Environment region string Name of the required region – depends on hosting service provider settings. no
ishaenabled High Availability boolean truefalse
Note: Applicable only for Tomcat 6/7Jetty6TomEEGlassFish3
engine Programming language version string java6java7java8php5.3php5.4php5.5, etc. yes (except of Docker-based environments)
displayName Environment alias string my-env-alias no
sslstate Jelastic SSL boolean truefalse no
shortdomain Name for the environment to be created string my-cli-env yes

Example: –env ‘{“region”: “default_hn_group”, “ishaenabled”: “false”, “engine”: “java7”, “displayName”: “my-env-alias”, “sslstate”: “true”, “shortdomain”: “my-cli-env”}’

Within the nodes section, more subtle adjustment can be set to define the comprised servers’ parameters, like their typeamount, number of allocated reserved/dynamic cloudlets and more:

Name Description Type Example Value Mandatory
extip Public IP boolean truefalse no
count Number of nodes integer 123, … no
fixedCloudlets Number of fixed cloudlets integer 123, … yes
flexibleCloudlets Number of flexible cloudlets integer 123, … but can not be less than fixedCloudlets yes
displayName Node’s alias name string my-node-alias no
nodeType Type of the stack string dockertomcat6tomcat7tomeemysql5apache2nginxphp, etc. (see the full list of available values here) yes
docker List of Docker container settings array check the corresponding section below only for docker nodeType

Example: nodes ‘[{“extip”: “true”, “count”: “2”, “fixedCloudlets”: “16”, “flexibleCloudlets”: “32”, “displayName”: “my-node-alias”, “nodeType”: “docker”, “docker”: {…}}]’

The docker subsection is intended to state the specialized Docker container parameters, required for its deployment.

Name Description Type Example Value Mandatory
cmd Run command configuration string no
image Docker image name with a tag version (optionally) string ubuntututum/apache-phpjelastic/tomcat8:latest, etc. yes
nodeGroup Environment layer the image should be placed to string cp – application server
bl – load balancer
nosqldb – noSQL database
sqldb – SQl database
cache – cache node
storage – storage node
no (if not specified, an image will be added to the Extra layer)
links Linking parameters array described within the expandable list below no
env The list of environment variables object described within the expandable list below no
registry Credentials for the private registry array described within the expandable list below no
volumes List of local volumes array described within the expandable list below no
volumeMounts List of mounted data directories array described within the expandable list below no
volumesFrom List of nodes to copy the volume settings from array described within the expandable list below no

Example: “docker”: {“cmd”: “”, “image”: “jelastic/tomcat8:latest”, “nodeGroup”: “cp”, “links”: […], “env”: {…}, “registry”: {…}, “volumes”: […], “volumeMounts”: {…}, “volumesFrom”: [{…}]}

  • linking configuration – for establishing connection between Docker containers in confines of a single environment
  • environment variables configuration – for stating environment variables in Docker containers
  • registry configuration – for connection to private registry
  • local volumes – list of volumes to be created within local file system of Docker container
  • mount points – set of parameters that define folder(s) with required data to be attached from other servers
  • account volumes – list of nodes at the current account for the volumes to be imported from