Переменные окружения

Приведённые ниже переменные окружения установлены для серверов

Tomcat 6, Tomcat 7 и TomEE:
переменнаяпуть в приложении Jelastic
user.home/opt/tomcat/temp
user.dir/opt/tomcat/temp
java.io.tmpdir/opt/tomcat/temp
java.home/usr/java/latest
catalina.home/opt/tomcat/
catalina.base/opt/tomcat/

Glassfish 3:
переменнаяпуть в приложении Jelastic
user.home/opt/glassfish3/temp
user.dir/opt/glassfish3/glassfish/domains/domain1/config
java.io.tmpdir/tmp
java.home/usr/java/latest
logs/opt/glassfish3/glassfish/domains/domain1/logs/

Jetty 6:
переменнаяпуть в приложении Jelastic
user.home/opt/jetty/home
user.dir/opt/jetty/home
java.io.tmpdir/opt/jetty/tmp
java.home/usr/java/latest

Default Environment Variables

Within variables Jelastic provides the data on the created stack. Most of them are just informational (marked within tables below) and do not have any actual effect on the container. For example, using the TOMCAT_VERSION variable you can compare versions of the running Tomcat server and the one required by your application (to ensure compatibility), but changing its value won’t upgrade your container.

There is a number of options available for all software stack templates:

VariableValue ExampleDescription
CLONE_ON_SCALEFALSEDefines if new nodes upon horizontal scaling should be clones of a layer master (true) or created from scratch (false)
DOCKER_EXPOSED_PORT7979,8009,8743,21,22,25,443,80,8080Specifies which ports will be opened via container firewall after environment creation
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binA default shell variable, with a list of paths to directories with executable programs (informational)
STACK_PATH/opt/tomcatStack home directory (informational)
STACK_USERtomcatName of the default user for the stack (informational)
STACK_VERSION9.0.5Version of the current template (informational)
MASTER_IP192.168.4.210Internal IP address of a master node within a layer (informational)
MASTER_ID162713Unique node  identifier of a master node within a layer (informational)
MASTER_HOSTnode162713A short hostname for a master node within a layer (informational)

Below, we’ve provided a list of the stack-specific environment variables:
  • Java
    • Tomcat & TomEE
      VariableValue ExampleDescription
      JAVA_HOME/usr/java/latest/A path to the directory with the Java compiler (informational)
      JAVA_OPTS_CONFFILE/opt/tomcat/conf/variables.confPath to the variables.conf file
      JAVA_VERSION1.8.0.161A version of the running Java engine (informational)
      JELASTIC_EXPOSE0Disables or enables the auto-redirect functionality with an ability to define required port manually
      TOMCAT_SHORT_VERSION9A major version of the running Tomcat server (informational)
      TOMCAT_VERSION9.0.5A minor version of the running Tomcat server (informational)
      VERT_SCALINGtrueDefines if the default Java GC agent should be enabled (true) or disabled (false)
      WEBROOT/opt/tomcat/webapps/Sets a path to the directory for  application deployment
    • GlassFish & Payara
      VariableValue ExampleDescription
      ADMIN_USERadminLogin of the admin user for the administration console (informational)
      DASfalseShows if there is a DAS node (required to configure cluster) for the current layer
      GMS_LISTENER_PORT9090Port to be used by the group management service (GMS) on nodes (informational)
      HAZELCAST_CONFIG/opt/glassfish/hazelcast.xmlSets a path to the hazelcast configuration file
      HOME_DIR/home/jelasticContainer home directory (informational)
      JAVA_OPTS_CONFFILE/opt/glassfish/glassfish/domains/domain1/config/variables.confPath to the variables.conf file
      JAVA_VERSION1.8.0.144A version of the running Java engine (informational)
      JELASTIC_PRIORITY_PORTS28080Sets a GlassFish HTTP listener port
      ON_ENV_INSTALLhttps://raw.githubusercontent.com/jelastic-jps/glassfish/master/addons/auto-cluster.jpsA script to be executed after environment creation
      PORT_4848_TCP_PORT4848Port for admin console (informational)
      PSWD_FILE/home/jelastic/.ssh/pwdfilePath to the file with the admin user password (informational)
      WEBROOT/opt/glassfish/glassfish/domains/domain1/applicationsSets a path to the directory for  application deployment
    • WildFly
      VariableValue ExampleDescription
      ADMIN_USERadminLogin of the admin user for the administration console (informational)
      HOME_DIR/home/jelasticContainer home directory (informational)
      JAVA_HOME/usr/java/latest/A path to the directory with the Java compiler (informational)
      JAVA_OPTS_CONFFILE/opt/wildfly/conf/variables.confPath to the variables.conf file
      JAVA_VERSION10A version of the running Java engine (informational)
      JBOSS_HOME/opt/wildflyStack home directory (informational)
      JELASTIC_EXPOSEFALSEDisables or enables the auto-redirect functionality with an ability to define required port manually
      JELASTIC_MEMORY_AUTOCONFIGtrueEnables or disables memory auto-configuration for WildFly
      LAUNCH_JBOSS_IN_BACKGROUNDtrueRuns an application server in the background mode
      ON_ENV_INSTALLhttps://raw.githubusercontent.com/jelastic-jps/wildfly/master/addons/auto-clustering/auto-cluster.jpsA script to be executed after environment creation
      VERT_SCALINGtrueDefines if the default Java GC agent should be enabled (true) or disabled (false)
      WILDFLY_VERSION12.0.0.FinalA version of the running WildFly server (informational)
    • Spring Boot
      VariableValue ExampleDescription
      HOME_DIR/home/jelasticContainer home directory (informational)
      JAVA_ARGSarg1 arg2Allows to pass some custom arguments to your application main function
      JAVA_HOME/usr/java/latest/A path to the directory with the Java compiler (informational)
      JAVA_OPTS_CONFFILE/home/jelastic/conf/variables.confPath to the variables.conf file
      JAVA_VERSION10.0.1A version of the running Java engine (informational)
      VERT_SCALINGtrueDefines if the default Java GC agent should be enabled (true) or disabled (false)
  • PHP
    • Apache
      VariableValue ExampleDescription
      APACHE_VERSION2.4.6A version of the running Apache server (informational)
      PHP_VERSION7.2.1A version of the running PHP engine (informational)
      WEBROOT/var/www/webrootSets a path to the directory for  application deployment
    • NGINX
      VariableValue ExampleDescription
      NGINX_VERSION1.12.2A version of the running NGINX server (informational)
      PHP_VERSION7.2.1A version of the running PHP engine (informational)
      WEBROOT/var/www/webrootSets a path to the directory for  application deployment
  • Database
    • MySQL
      VariableValue ExampleDescription
      MYSQL_VERSION5.7.20A version of the running MySQL server (informational)
      ON_ENV_INSTALLhttps://raw.githubusercontent.com/jelastic-jps/mysql-cluster/master/addons/auto-clustering/auto-cluster.jpsA script to be executed after environment creation
    • MariaDB
      VariableValue ExampleDescription
      MARIADB_VERSION10.2.12A version of the running MariaDB server (informational)
    • PostgreSQL
      VariableValue ExampleDescription
      POSTGRES_VERSION10.4A version of the running PostgreSQL server (informational)
    • Redis
      VariableValue ExampleDescription
      REDIS_COMMANDERenabledDefines if the Redis Commander management tool should be enabled or disabled
      REDIS_SENTINELdisabledDefines if Redis Sentinel high-availability and monitoring tool should be enabled or disabled
      STACK_NAMEredisA name of the current stack (informational)