How Can We Help?
< All Topics
Print

Environment Variable

Environment Variables:

Environment variables store 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 BitssCloud-managed software stack is provided with a number of default variables, which display all the significant container information to help developers with application hosting.

BitssCloud 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, BitssCloud 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 layering master (true) or created from scratch (false)
DOCKER_EXPOSED_PORT7979,8009,8743,21,22,25,443,80,8080Lists ports from the EXPOSE directive of the image’s docker file, which will be opened via container firewall during environment creation (informational)
BitssCloud_PORTS3306/tcp, 33061/udp, 33062Specifies custom ports, which will be opened via container firewall during 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.5A version of the current template (informational)
MASTER_IP192.168.4.210The internal 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)
Table of Contents