7.2. Cartridge Environment Variables


OpenShift Enterprise provides three environment variables for all cartridges by default. These variables are read-only.
Expand
Table 7.2. Cartridge Environment Variables
Name Value
OPENSHIFT_{Cartridge-Short-Name}_DIR The directory where cartridge information is installed.
OPENSHIFT_{Cartridge-Short-Name}_IDENT The identity of the cartridge, sourced from its manifest.yml file. The format is Cartridge-Vendor:Version:Cartridge-Version.
OPENSHIFT_PRIMARY_CARTRIDGE_DIR The directory where the primary cartridge on a gear is installed. For example, a scaling PHP application has both a PHP cartridge and a HAProxy cartridge installed on the head gear. In this case, the PHP cartridge is the primary cartridge.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top