Este contenido no está disponible en el idioma seleccionado.

Chapter 2. Managed Files


Managed files are files that have non-default settings, or that require special handling by OpenShift Enterprise.
The $cartridge_name/metadata/managed_files.yml file lists managed files and strings that OpenShift Enterprise uses during different stages of the cartridge life cycle.
File Patterns

Most entries in the managed_files.yml file use file patterns. OpenShift Enterprise treats these patterns like shell globs. Dir.glob processes entries that contain asterisk (*) symbols using the File::FNM_DOTMATCH flag. It treats entries that end in a forward slash (/) as directories, and other entries as files. For more information on globs, see http://ruby-doc.org/core-1.9.3/Dir.html#method-c-glob.

Entries that begin with ~/ start at the gear directory. All other entries start at the cartridge directory.
Strings

Some entries allow string values. These values return directly without any modification.

Allowed Entries

OpenShift Enterprise supports the following entries:

Expand
Table 2.1. Managed File Entries
Entry Type Usage Reference
locked_files File Pattern Files that the application developer can read but not update. Chapter 3, Locking Cartridges
snapshot_exclusions File Pattern Array of file names not to backup from the gear when rhc snapshot runs. Chapter 10, Backing Up and Restoring Cartridges
setup_rewritten File Pattern Files that OpenShift Enterprise removes before running setup. Section 6.2, “setup Script”
process_templates File Pattern ERB templates OpenShift Enterprise renders after running setup. Section 6.1, “Embedded Ruby (ERB) Processing”
restore_transforms Strings Set of regex transforms for rewriting file names when rhc restore runs. Chapter 10, Backing Up and Restoring Cartridges
The following example demonstrates the structure of a basic managed_files.yml file:

Example 2.1. managed_files.yml

locked_files:
- env/
- ~/.foorc
snapshot_exclusions:
- mydir/*
restore_transforms:
- s|${OPENSHIFT_GEAR_NAME}/data|app-root/data|
process_templates:
- **/*.erb
setup_rewritten:
- conf/*
Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat