instance-erp5-input-schema.json 9.27 KB
Newer Older
1 2 3 4 5
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Parameters to instantiate ERP5",
  "additionalProperties": false,
  "properties": {
6
    "sla-dict": {
7
      "description": "Where to request instances. Each key is a query string for criterions (e.g. \"computer_guid=foo\"), and each value is a list of partition references (note: Zope partitions reference must be prefixed with \"zope-\").",
8 9 10 11
      "additionalProperties": {
        "type": "array",
        "items": { "type": "string" },
        "uniqueItems": true
12 13 14
      },
      "type": "object"
    },
15 16 17 18 19 20
    "site-id": {
      "description": "ERP5Site object's id",
      "default": "erp5",
      "type": "string"
    },
    "timezone": {
21
      "description": "Zope's timezone. Possible values are determined by host's libc, and typically come from a separate package (tzdata, ...)",
22 23 24
      "default": "UTC",
      "type": "string"
    },
25 26 27
    "deadlock-debugger-password": {
      "description": "Password for /manage_debug_threads",
      "type": "string"
28
    },
29 30 31 32 33 34 35 36 37
    "inituser-login": {
      "description": "Login of the initial/rescue user",
      "default": "zope",
      "type": "string"
    },
    "inituser-password": {
      "description": "Password of the initial/rescue user",
      "type": "string"
    },
38
    "developer-list": {
39
      "description": "List of logins which should get the Developper role (required to modify portal_components' content), defaulting to inituser-login's value",
40
      "items": {
41
        "pattern": "/^\\S+$/",
42 43 44 45 46
        "type": "string"
      },
      "uniqueItems": true,
      "type": "array"
    },
47 48 49
    "hostalias-dict": {
      "description": "Hostname-to-hostname mapping",
      "default": {},
50 51 52
      "additionalProperties": {
        "description": "A hostname to which current entry will resolve",
        "type": "string"
53 54 55
      },
      "type": "object"
    },
56
    "hosts-dict": {
57
      "description": "Host entries to be used in addition to and/or overriding auto-generated ones (erp5-catalog-0, erp5-cloudooo, erp5-memcached-persistent, erp5-memcached-volatile and erp5-smtp)",
58 59
      "patternProperties": {
        ".*": {
60
          "description": "An IP or domain name to which current entry will resolve",
61 62 63 64 65
          "type": "string"
        }
      },
      "type": "object"
    },
66 67 68 69
    "frontend": {
      "description": "Front-end slave instance request parameters",
      "properties": {
        "software-url": {
70
          "description": "Front-end's software type. If this parameter is empty, no front-end instance is requested. Else, sla-dict must specify 'frontend' which is a special value matching all frontends (e.g. {\"instance_guid=bar\": [\"frontend\"]}).",
71 72 73 74 75 76 77 78 79 80 81
          "default": "",
          "type": "string"
        },
        "domain": {
          "description": "The domain name to request front-end to respond as.",
          "default": "",
          "type": "string"
        },
        "software-type": {
          "description": "Request a front-end slave instance of this software type.",
          "default": "RootSoftwareInstance",
82
          "type": "object"
83
        }
84 85 86
      },
      "type": "object"
    },
87 88
    "zope-partition-dict": {
      "description": "Zope layout definition",
89
      "default": {"1": {}},
90 91 92 93 94
      "patternProperties": {
        ".*": {
          "additionalProperties": false,
          "properties": {
            "family": {
95
              "description": "The family this partition is part of. For example: 'public', 'admin', 'backoffice', 'web-service'... Each family gets its own balancer entry. It has no special meaning for the system.",
96 97 98 99 100 101 102 103 104 105
              "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",
106
              "default": 4,
107 108 109 110 111 112 113
              "type": "integer"
            },
            "timerserver-interval": {
              "description": "Timerserver tick perdiod, in seconds, or 0 to disable",
              "default": 5,
              "type": "integer"
            },
114 115 116 117 118
            "webdav": {
              "description": "Serve webdav queries, implies timerserver-interval=0 (disabled). Mixing webdav and non-webdav nodes in a single family will give unspecified results.",
              "default": false,
              "type": "boolean"
            },
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
            "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
              }]
136
            }
137 138 139 140 141 142 143 144 145
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "kumofs": {
      "description": "Persistent memcached service",
      "additionalProperties": {
146
        "$ref": "./instance-kumofs-schema.json#properties"
147 148 149 150 151 152
      },
      "type": "object"
    },
    "memcached": {
      "description": "Volatile memcached service",
      "additionalProperties": {
153
        "$ref": "./instance-kumofs-schema.json#properties"
154 155 156 157 158 159
      },
      "type": "object"
    },
    "cloudooo": {
      "description": "Format conversion service",
      "additionalProperties": {
160
        "$ref": "./instance-cloudooo-schema.json#properties"
161 162 163 164 165 166
      },
      "type": "object"
    },
    "mariadb": {
      "description": "Relational database service",
      "additionalProperties": {
167
        "$ref": "./instance-mariadb-schema.json#properties"
168 169 170
      },
      "type": "object"
    },
171 172 173 174 175 176 177 178 179 180 181 182 183
    "zodb-zeo": {
      "description": "Common settings ZEO servers",
      "properties": {
        "tcpv4-port": {
          "allOf": [{
            "$ref": "#/definitions/tcpv4port"
          }, {
            "description": "Start allocating ports at this value, going upward"
          }]
        },
        "backup-periodicity": {
          "description": "When to backup, specified in the same format as for systemd.time(7) calendar events (years & seconds not supported, DoW & DoM can not be combined). Enter 'never' to disable backups.",
          "default": "daily",
184
          "type": "string"
185
        },
186 187 188
        "tidstorage-repozo-path": {
          "description": "Directory for backup timestamp and tidstorage status files.",
          "default": "~/srv/backup/tidstorage",
189 190 191 192
          "type": "string"
        }
      },
      "type": "object"
193 194
    },
    "zodb": {
195
      "description": "Zope Object DataBase mountpoints. See https://github.com/zopefoundation/ZODB/blob/3.10/src/ZODB/component.xml for extra options.",
196
      "items": {
197
        "required": ["type"],
198 199 200 201 202 203
        "properties": {
          "name": {
            "description": "Database name",
            "default": "main",
            "type": "string"
          },
204
          "mount-point": {
205 206 207 208
            "description": "Mount point",
            "default": "/",
            "type": "string"
          },
209
          "type": {
210
            "description": "Storage type",
211
            "enum": ["zeo", "neo"],
212 213
            "type": "string"
          },
214
          "server": {
215
            "description": "Instantiate a server. If missing, 'storage-dict' must contain the necessary properties to mount the ZODB. For ZEO, the partition reference is 'zodb'. For NEO, they are 'neo-0', 'neo-1', ...",
216
            "anyOf": [
217 218
              {"$ref": "./instance-zeo-schema.json"},
              {"$ref": "../neoppod/instance-neo-input-schema.json"}
219 220
            ]
          },
221
          "storage-dict": {
222
            "description": "Storage configuration. For NEO, 'logfile' is automatically set (see https://lab.nexedi.com/nexedi/neoppod/blob/master/neo/client/component.xml for other settings).",
223 224 225 226 227 228 229
            "properties": {
              "ssl": {
                "description": "For external NEO. Pass false if you want to disable SSL or pass custom values for ca/cert/key.",
                "default": true,
                "type": "boolean"
              }
            },
230
            "additionalProperties": {"type": "string"},
231
            "type": "object"
Vincent Pelletier's avatar
Vincent Pelletier committed
232
          }
233
        },
234
        "additionalProperties": {"type": "string"},
235 236 237
        "type": "object"
      },
      "type": "array"
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
    },
    "jupyter": {
      "description": "Jupyter slave instance parameters",
      "properties": {
        "enable": {
          "description": "Whether to enable creation of associated slave Jupyter instance",
          "default": false,
          "type": "boolean"
        },
        "zope-family": {
          "description": "Zope family to connect Jupyter to by default",
          "default": "<first instantiated Zope family>",
          "type": "string"
        }
      },
      "type": "object"
254 255 256
    }
  }
}