Schemas

XML schema’s have a number of uses in the XML world, these include validation, documentation, querying support, data binding and guided editing of XML files. Within Genesis schema’s fulfill two primary functions, these are:

  • Validation of data stored in the configuration hierarchy.
  • Enforcement of infrastructure nomenclature.

Apart from keeping the Genesis engine free of validation code, leveraging XML schema for these purposes provides a robust, extensible and open standards compliant mechanism for ensuring the integrity of configuration hierarchy.

All Genesis XML Schema files (.xsd files) are stored under genesis/engine/schemas within the genesis distribution.

Configuration Hierarchy Validation

In order to maintain the integrity of the data stored in the configuration hierarchy Genesis schemas exist for all elements of the logical and physical configuration and are named after the elements they validate. Every application being provisioned by Genesis will also have it’s own schema. The schemas use a combination of predefined simple data types and derived simple and complex data types. These schemas maintain and enforce a standard and consistent structure and semantic for all the XML files stored in the configuration hierarchy.

Enforcement of Nomenclature

The role of nomenclature in the automation and standardisation of infrastructure provisioning cannot be overstated. A simple, consistent and justifiable infrastructure nomenclature is the foundation which all automated processes are built upon, yet the benefits of such a nomenclature reach far beyond provisioning. Encoding and validating naming rules has traditionally been a time consuming and expensive activity which has limited the extent to which the rules are can be applied and enforced.

Genesis enforces infrastructure nomenclature by encoding the naming rules using regular expressions to define simple data types within XML schemas. This mechanism is incredibly powerful, new naming rules can be quickly implemented, existing rules can be changed and “what if” scenarios can be tested with ease against existing configurations.

The following schema files are compose validate and enforce nomenclature in the configuration hierarchy:

Global Configurations

common.xsd
enterprise.xsd

Logical Configurations

service.xsd
environment.xsd

Physical Configurations

datacentre.xsd
rack.xsd
node.xsd