Bootstrap the Content Repository
Bootstrap the content repository using CND and YAML files.
Bootstrapping Hippo CMS's content repository involves importing the necessary node type definitions, content, and application configuration from so-called repository data modules that are packaged with the CMS application.
The most common use case for bootstrapping the repository is the first time the application is started in an environment (such as a developer's local machine or a production server). In this case, the 'empty' repository must be filled with the minimum required node type definitions, content, and application configuration for the application the function properly.
Another common use case is when a new release of the application is deployed in an existing (previously bootstrapped) environment. The new release may contain new features that require new or updated node type definitions and/or application configuration to be bootstrapped into the existing repository.
Repository Data Modules
A repository data module is a JAR file containing:
- Compact Node Type Definitions (CND files)
CNDs describe the data structures.
- YAML Source definitions (YAML files)
This includes actual content (documents, images etc.) as well as application configuration stored as repository data.
Like the content repository itself, the repository data module JARs are packaged with the CMS WAR application. On first startup the repository detects the repository data modules and performs the bootstrapping.
A repository data module JAR is compiled from its corresponding module in the Maven project, typically repository-data/[name_of_module].
A project created from the Maven archetype is preconfigured with three repository data modules:
Repository data required by any deployment of the application, including document types, delivery tier configuration etc.
Repository data only required in development environments, i.e. when running locally or deploying to a CI system.
On first startup, i.e. when there is no existing repository, bootstrap is enabled automatically.
On subsequent startups, i.e. when there is an existing repository, bootstrap is disabled by default. To enable bootstrap for an existing repository the system property repo.bootstrap=true must be set.
For more information on passing system properties to the application see Run and Develop with Cargo (for development environments) and Repository Deployment Settings (for production environments) for more info.
Develop and Maintain Repository Data Modules
Being part of the Maven project, the repository data module source files should be checked into version control along with the rest of the project files. This enables developers to easily get the project up and running in their local development environment and collaborate with their fellow team members.
In most cases developers do not need to manually maintain the repository data modules. Automatic Export, when enabled, transparantely updates the repository data modules in the project whenever the developers modify the repository using their development tools (such as the Setup application, Document Type Editor, Console etc.).
Occassionally developers will have to make manual modifications, especially when merging changes from multiple developers in the version control system.
- JCR Compact Node Type Definition (external link to Jackrabbit)
- Configuration Management
- Automatic Export