Show Table of Contents
Chapter 7. Environment Variables
OpenShift Enterprise uses environment variables to communicate information between cartridges, applications, and the system.
OpenShift Enterprise provides several system environment variables that are available for use at all cartridge entry points.
Place cartridge environment variables in the
$cartridge_name/env/ directory. OpenShift Enterprise loads cartridge variables after system environment variables, but before calling your code.
7.1. System Environment Variables
OpenShift Enterprise provides several system environment variables. These variables are read-only.
Table 7.1. System Environment Variables
| Name | Value |
|---|---|
| HOME | Alias for OPENSHIFT_HOMEDIR. |
| HISTFILE | Bash history file. |
| OPENSHIFT_APP_DNS | The fully qualified domain name of the application using your cartridge. |
| OPENSHIFT_APP_NAME | The name of the application using your cartridge. Assigned by the application developer. |
| OPENSHIFT_APP_UUID | The UUID of the application using your cartridge. Assigned by OpenShift Enterprise. |
| OPENSHIFT_DATA_DIR | The directory where the application and your cartridge store data. |
| OPENSHIFT_GEAR_DNS | The fully qualified domain name of the gear where your cartridge is installed. This may not be the same as OPENSHIFT_APP_DNS). |
| OPENSHIFT_GEAR_NAME | The name of the gear where your cartridge is installed. Assigned by OpenShift Enterprise. This may not be the same as OPENSHIFT_APP_NAME). |
| OPENSHIFT_GEAR_UUID | The UUID of the gear where your cartridge is installed. Assigned by OpenShift Enterprise. |
| OPENSHIFT_HOMEDIR | The home directory of the gear where your cartridge is installed. Assigned by OpenShift Enterprise. |
| OPENSHIFT_REPO_DIR | The directory where the application repository is stored. OpenShift Enterprise runs the application from this location. |
| OPENSHIFT_TMP_DIR | The directory where the application and your cartridge store temporary data. |
| TMP | Alias for OPENSHIFT_TMP_DIR. |
| TMPDIR | Alias for OPENSHIFT_TMP_DIR. |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.