13.2. Cartridge Directory Structure


The required directories of a cartridge must conform to a set structure or the cartridge can fail to function properly. You can add additional directories and files as needed to support the function of your cartridge.
  • Required files must exist for minimal OpenShift Enterprise support of the cartridge.
  • Discretionary files are recommended, but not necessary. For example, conf.d is the standard file where a web framework installs its httpd configuration.
  • Optional files are not necessary. Use optional files to support additional cartridge functionality.
Cartridge Directory Structure

Figure 13.1. Cartridge Directory Structure

To support multiple software versions within one cartridge, create symbolic links between the $cartridge_name/bin/control file and the $cartridge_name/versions/$software_version/bin/control file. Alternatively, use the $cartridge_name/bin/control file as a shim to call the control file for the desired version.
When creating an instance of your cartridge for use by a gear, OpenShift Enterprise copies the files, links, and directories from the cartridge library, with the exception of the $cartridge_name/usr/ directory. The $cartridge_name/usr/ directory is symbolically linked to the gear's cartridge instance. This link enables all cartridge instances to share libraries and other data.
See Chapter 3, Locking Cartridges for details on customizing a cartridge instance.
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.

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.

© 2024 Red Hat, Inc.