diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-07-31 12:07:40 +0100 |
---|---|---|
committer | Baserock Gerrit <gerrit@baserock.org> | 2015-09-18 15:49:28 +0000 |
commit | 666c1f019c275a65fe96246a20e5bd3fbd73a8dd (patch) | |
tree | 16d164162a2b0abd5ed1493fec50e3ed3011ebd8 /schemas/cluster.json-schema | |
parent | aeeab946dac9100be26756bfd4948f4b52df386e (diff) | |
download | definitions-666c1f019c275a65fe96246a20e5bd3fbd73a8dd.tar.gz |
Add schemas for Baserock definitions format
See schemas/README.schemas for information.
Change-Id: I6c384692dbf70017a3ece2ed56c1f8cbe60b493d
Diffstat (limited to 'schemas/cluster.json-schema')
-rw-r--r-- | schemas/cluster.json-schema | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/schemas/cluster.json-schema b/schemas/cluster.json-schema new file mode 100644 index 00000000..1a628c7f --- /dev/null +++ b/schemas/cluster.json-schema @@ -0,0 +1,64 @@ +$schema: http://json-schema.org/draft-04/schema# +id: http://git.baserock.org/cgi-bin/cgit.cgi/baserock/baserock/definitions.git/tree/schemas/cluster.json-schema + +description: + This is a JSON-Schema description of a 'cluster' .morph file, which is part + of the Baserock definitions YAML representation format. + + This JSON-Schema file is valid for VERSION 7 of the Baserock definitions + YAML serialisation format. + + The Baserock definitions format is the recommended way of representing + Baserock definitions on disk. The actual data model is described separately. + See https://wiki.baserock.org/definitions for more information. + + This schema is represented as YAML, so that it can be edited more easily. + You may need to convert to JSON if using a JSON-Schema tool that expects + its input to be an actual string containing data serialised as JSON. + +definitions: + # A reference to a System, plus one or more SystemDeployment for that system. + system-deployment-set: + type: object + + required: [ 'morph', 'deploy' ] + additionalProperties: false + + properties: + morph: { type: string } + deploy-defaults: + type: object + additionalProperties: true + deploy: + patternProperties: + ^.*$: { $ref: "#/definitions/system-deployment" } + subsystems: + type: array + items: { $ref: "#/definitions/system-deployment-set" } + + # Corresponds to SystemDeployment in Baserock data model. + system-deployment: + type: object + + required: [ 'type', 'location' ] + additionalProperties: true + + properties: + type: { type: string } + location: { type: string } + + +# Corresponds to Cluster in Baserock data model. +type: object + +#required: [ 'name', 'kind', 'systems' ] +additionalProperties: false + +properties: + name: { type: string } + kind: { enum: [ "cluster" ] } + description: { type: string } + + systems: + type: array + items: { $ref: "#/definitions/system-deployment-set" } |