Commit 45977c84 authored by Vincent Pelletier's avatar Vincent Pelletier

Define parameters using a json schema.

parent a5784a07
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["tcpv4-port"],
"properties": {
"tcpv4-port": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"description": "Start allocating ports at this value, going upward",
}]
},
"font-url-list": {
"description": "List of URLs from which fonts are to be downloaded",
"default": [],
"items": {
"type": "string"
},
"type": "array"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by Cloudooo instanciation",
"properties": {
"url": {
"description": "Conversion service access information",
"type": "string"
}
},
"type": "object"
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"description": "Parameters to instantiate ERP5",
"additionalProperties": false,
"properties": {
"site-id": {
"description": "ERP5Site object's id",
"default": "erp5",
"type": "string"
},
"timezone": {
"description": "Main site's timezone",
"default": "UTC",
"type": "string"
},
"zope-partition-dict": {
"description": "Zope layout definition",
"patternProperties": {
".*": {
"additionalProperties": false,
"properties": {
"family": {
"description": "The family this partition is part of. For example: 'public', 'admin', 'backoffice', 'web-service'... Each family gets its own frontend (=client-facing ip & port). It has no special meaning for the system.",
"default": "default",
"type": "string"
},
"instance-count": {
"description": "Number of Zopes to setup on this partition",
"default": 1,
"type": "integer"
},
"thread-amount": {
"description": "Number of worker threads for each created Zope process",
"default": 1,
"type": "integer"
},
"timerserver-interval": {
"description": "Timerserver tick perdiod, in seconds, or 0 to disable",
"default": 5,
"type": "integer"
},
"longrequest-logger-interval": {
"description": "Period, in seconds, with which LongRequestLogger polls worker thread stack traces, or -1 to disable",
"default": -1,
"type": "integer"
},
"longrequest-logger-timeout": {
"description": "Transaction duration after which LongRequestLogger will start logging its stack trace, in seconds",
"default": 1,
"type": "integer"
},
"port-base": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"description": "Start allocating ports at this value. Useful if one needs to make several partitions share the same port range (ie, several partitions bound to a single address)",
"default": 2200
}]
},
"computer-guid": {
"description": "GUID of computer instance must be requested on",
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
},
"frontend": {
"additionalProperties": false,
"properties": {
"software-url": {
"description": "Software URL of an existing frontend, no frontend will be requested if this value is empty",
"default": "",
"type": "string"
},
"instance-guid": {
"description": "Frontend's instance GUID, required if software-url is non-empty (not perfect: if frontend is moved and its instance GUID changes, you need to update this value)",
"type": "string"
},
"software-type": {
"description": "Frontend software type in given software relase",
"default": "RootSoftwareInsance",
"type": "string"
},
"domain": {
"description": "Domain name belonging to this instance",
"default": "",
"type": "string"
}
},
"default": {},
"type": "object"
},
"kumofs-computer-guid": {
"description": "GUID of computer instance must be requested on",
"type": "string"
},
"kumofs": {
"description": "Persistent memcached service",
"additionalProperties": {
"$ref": "./instance-kumofs-input-schema.json#properties"
},
"type": "object"
},
"memcached-computer-guid": {
"description": "GUID of computer instance must be requested on",
"type": "string"
},
"memcached": {
"description": "Volatile memcached service",
"additionalProperties": {
"$ref": "./instance-kumofs-input-schema.json#properties"
},
"type": "object"
},
"cloudooo-computer-guid": {
"description": "GUID of computer instance must be requested on",
"type": "string"
},
"cloudooo": {
"description": "Format conversion service",
"additionalProperties": {
"$ref": "./instance-cloudooo-input-schema.json#properties"
},
"type": "object"
},
"mariadb-computer-guid": {
"description": "GUID of computer instance must be requested on",
"type": "string"
},
"mariadb": {
"description": "Relational database service",
"additionalProperties": {
"$ref": "./instance-mariadb-input-schema.json#properties"
},
"type": "object"
},
"zodb-software-type": {
"description": "Zope Object DataBase implementation",
"default": "zeo",
"enum": ["zeo"],
"type": "string"
},
"zodb": {
"description": "Zope Object DataBase service",
"oneOf": [
{"$ref": "./instance-zeo-input-schema.json#properties"}
]
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by ERP5 instanciation",
"properties": {
"kumofs-url": {
"description": "Persistent memcached access information",
"type": "string"
},
"memcached-url": {
"description": "Volatile memcached access information",
"type": "string"
},
"cloudooo-url": {
"description": "Conversion service access information",
"type": "string"
},
"mariadb-url": {
"description": "Relational database access information",
"type": "string"
}
},
"patternProperties": {
"family-.*": {
"description": "Zope family access information",
"type": "string"
}
},
"type": "object"
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["tcpv4-port"],
"properties": {
"tcpv4-port": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"description": "Start allocating ports at this value, going upward"
}]
},
"ram-storage-size": {
"description": "If 0 use disk storage, otherwise use ram and limit data size to this many megabytes",
"default": 0,
"type": "integer"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by KumoFS instanciation",
"properties": {
"url": {
"description": "Persistent memcached access information",
"type": "string"
}
},
"type": "object"
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["tcpv4-port"],
"properties": {
"tcpv4-port": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"description": "Start allocating ports at this value, going downward"
}]
},
"database-list": {
"description": "Databases to create and respective user credentials getting all privileges on it",
"default": [{
"name": "erp5",
"user": "user",
"password": "insecure"
}],
"minItems": 1,
"items": {
"required": ["name", "user", "password"],
"properties": {
"name": {
"description": "Database name",
"type": "string"
},
"user": {
"description": "User name",
"type": "string"
},
"password": {
"description": "User password",
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"test-database-amount": {
"description": "The number of test databases to create, adding auto-generated entries to database-list",
"default": 0,
"minimum": 0,
"type": "integer"
},
"catalog-backup": {
"description": "Backup control knobs",
"properties": {
"full-retention-days": {
"description": "How many days full backups must be retained, -1 meaning full backups are disabled and 0 meaning no expiration",
"default": 7,
"minimum": -1,
"type": "integer"
},
"incremental-retention-days": {
"description": "How many days incremental backups (binlogs) must be retained, -1 meaning incremental backups are disabled and 0 meaning no expiration",
"minimum": -1,
"default": "full-retention-days' value",
"type": "integer"
}
},
"type": "object"
},
"innodb-buffer-size": {
"description": "See MariaDB documentation on innodb_buffer_pool_size",
"minimum": 0,
"default": "MariaDB's default",
"type": "integer"
},
"innodb-log-file-size": {
"description": "See MariaDB documentation on innodb_log_file_size",
"minimum": 0,
"default": "MariaDB's default",
"type": "integer"
},
"innodb-log-buffer-size": {
"description": "See MariaDB documentation on innodb_log_buffer_size",
"minimum": 0,
"default": "MariaDB's default",
"type": "integer"
},
"mariadb-relaxed-writes": {
"description": "When enabled, sets innodb_flush_log_at_trx_commit = 0, innodb_flush_method = nosync, innodb_doublewrite = 0 and sync_frm = 0 - RTFM, those options are dangerous",
"default": false,
"type": "boolean"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by MariaDB instanciation",
"properties": {
"url": {
"description": "Relational database access information",
"type": "string"
}
},
"type": "object"
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["tcpv4-port", "zodb-dict"],
"properties": {
"tcpv4-port": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"description": "Start allocating ports at this value, going upward"
}]
},
"tidstorage-dict": {
"description": "Controls ZODB backup generation and retention",
"properties": {
"zodb-dict": {
"description": "Maps an export identifier to the path it must be backed up into",
"default": {},
"patternProperties": {
".*": {
"description": "'%(backup)s' is expanded to partition's ZODB backup path (typically 'srv/backup/zodb')",
"default": "%(backup)s/<export identifier>",
"type": "string"
}
},
"type": "object"
},
"timestamp-path": {
"description": "Path to backup timestamp file, occurrences of '%(backup)s' being eplaced with the path to partition's srv/backup/tidstorage directory",
"default": "%(backup)s/repozo_tidstorage_timestamp.log",
"type": "string"
}
},
"type": "object"
},
"zodb-dict": {
"description": "Maps an export identifier to its settings",
"patternProperties": {
".*": {
"properties": {
"storage-family": {
"description": "Opaque name used to regroup/separate mountpoints under different ZEO processes (must be valid as a file name and as a ConfigParser section name)",
"default": "default",
"pattern": "^[^<>:\"/\\|?*\\]\\[ ]*$",
"type": "string"
},
"mount-point": {
"description": "Traversal path export should be mounted at (opaque to this software type)",
"default": "/",
"pattern": "^[^<>:\"/\\|?*]*$",
"type": "string"
},
"cache-size": {
"description": "Client-side cache size in object count (opaque to this software type)",
"default": -1,
"type": "integer"
},
"storage-dict": {
"default": {},
"properties": {
"path": {
"description": "FileStorage file path, '%(zodb)s' occurrences are replaced with the path to partition's srv/zodb directory",
"default": "%(zodb)s/<export identifier>.fs",
"type": "string"
},
"client": {
"description": "Client-side settings for this mountpoint",
"default": {},
"patternProperties": {
".*": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by ZEO instanciation",
"properties": {
"zodb-storage-type": {
"description": "zope.cfg-friendly storage type",
"enum": ["zeoclient"],
"type": "string"
},
"zodb-dict": {
"description": "Maps an export identifier to values received as parameters",
"patternProperties": {
".*": {
"description": "Contains the mount-point, cache-size and client-dict received as parameters for current export identifier (client-dict's 'storage' and 'server' entries are overwritten with actual values)",
"type": "array"
}
},
"type": "object"
},
"tidstorage-ip": {
"description": "IP address of tidstorage service",
"type": "string"
},
"tidstorage-port": {
"description": "Port of tidstorage service",
"type": "string" // XXX: better to be an integer ?
}
},
"type": "object"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment