Environment Variables

Environment Variables:

Environment variables stores the values of the frequently used parameters, that are provided to a software program at runtime. Setting and using such placeholders instead of specifying the required values in the application code each time they are needed, makes your application more portable and flexible. It brings even more convenience if these values may differ from one host to another.

Each Apiqcloud-managed software stack is provided with a number of default variables, which display all the significant container information to help developers with application hosting.

Apiqcloud PaaS also gives you the possibility to declare your own custom environment variables (user-defined parameters) by means of adding the needed values to a special configuration file and in such a way, keeping them out of the code. Inside this file, you can set placeholders for your folder names, usernames, passwords, hosts, IP addresses, etc instead of hardcoding their values to every file they are required in.

 

  • Default Environment Variables:

 

Within variables Apiqcloud 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:

 

Variable

Value Example

Description

CLONE_ON_SCALE

FALSE

Defines if new nodes upon horizontal scaling should be clones of a layer master (true) or created from scratch (false)

DOCKER_EXPOSED_PORT

7979,8009,8743,21,22,25,443,80,8080

Lists ports from the EXPOSE directive of the image's dockerfile, which will be opened via container firewall during environment creation (informational)

CLOUDJIFFY_PORTS

3306/tcp, 33061/udp, 33062

Specifies custom ports, which will be opened via container firewall during environment creation

PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

A default shell variable, with a list of paths to directories with executable programs (informational)

STACK_PATH

/opt/tomcat

Stack home directory (informational)

STACK_USER

tomcat

Name of the default user for the stack (informational)

STACK_VERSION

9.0.5

Version of the current template (informational)

MASTER_IP

192.168.4.210

Internal IP address of a master node within a layer (informational)

MASTER_ID

162713

Unique node identifier of a master node within a layer (informational)

MASTER_HOST

node162713

A short hostname for a master node within a layer (informational)

 

  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

Share Environment

Share Environment A client who originally created an environment becomes its Owner and share...

Clone Environment

Cloning Environment Apiqcloud provides multiple environments in just a few clicks, like...

Create Environment

How to Create your Apiqcloud Environment Firstly,  you need to create an appropriate...

Environment Aliases

Environment Aliases To ease the process of management, creating alternative (alias) for an...

Enviornment Variables

Environment Variables: To store the values of the frequently used parameters environment...