Commit 20bf35fc authored by Alain Takoudjou's avatar Alain Takoudjou

Update Release Candidate

parents b04d30a2 425ae92c
Changes
=======
1.0.75 (2018-09-04)
-------------------
* erp5_test: stop using erp5_test recipe
* random: fix password generation with newlines
* erp5testnode: enable password authentication for scalability test system
* pbs: Ignore numerical IDs (UID/GID) when push
* request: add requestoptional.serialised
1.0.65 (2018-06-22)
-------------------
......
[buildout]
extends =
../gcc/buildout.cfg
../numpy/openblas.cfg
../cython/buildout.cfg
../scipy/buildout.cfg
......@@ -41,6 +42,6 @@ setup-eggs =
${numpy:egg}
${scipy:egg}
rpath =
${gcc-fortran:location}/lib
${gcc-fortran:location}/lib64
${gcc:location}/lib
${gcc:location}/lib64
${openblas:location}/lib
......@@ -9,5 +9,5 @@ depends_gitfetch =
[go_github.com_mholt_caddy]
<= go-git-package
go.importpath = github.com/mholt/caddy
repository = https://github.com/mholt/caddy
revision = v0.11.0-11-ge263566673
repository = https://lab.nexedi.com/nexedi/caddy.git
revision = nxd-v0.11.0-3-g12438f6cff8c15f307631151eb064cec579b7605
This diff is collapsed.
......@@ -25,7 +25,7 @@ find-links = http://pkgs.fedoraproject.org/repo/pkgs/rdiff-backup/rdiff-backup-1
[rdiff-backup-build-1.3.4]
<= rdiff-backup-build
# use our own version
find-links = http://www.nexedi.org/static/packages/source/rdiff-backup-1.3.4nxd2.tar.gz
find-links = http://www.nexedi.org/static/packages/source/rdiff-backup-1.3.4nxd5.tar.gz
patches =
${:_profile_base_location_}/rdiff-backup-1.3.4-librsync-1.0.0.patch#31fafc8bc4a00f002f52008a9f3b671f
......
[buildout]
extends =
../gcc/buildout.cfg
../numpy/openblas.cfg
../cython/buildout.cfg
../scipy/buildout.cfg
......@@ -49,6 +50,6 @@ setup-eggs =
${pillow-python:egg}
networkx
rpath =
${gcc-fortran:location}/lib
${gcc-fortran:location}/lib64
${gcc:location}/lib
${gcc:location}/lib64
${openblas:location}/lib
[buildout]
extends =
../gcc/buildout.cfg
../cython/buildout.cfg
../numpy/openblas.cfg
../scipy/buildout.cfg
......@@ -40,6 +41,6 @@ setup-eggs =
${numpy:egg}
${scipy:egg}
rpath =
${gcc-fortran:location}/lib
${gcc-fortran:location}/lib64
${gcc:location}/lib
${gcc:location}/lib64
${openblas:location}/lib
#!/usr/bin/env python
r"""Command-line tool to format software release JSON for slapos.
Inspired by json.tool from python
Usage::
format-json infile outfile
"""
import os
import sys
import json
import collections
def main():
if len(sys.argv) != 3:
raise SystemExit(sys.argv[0] + " infile outfile")
with open(sys.argv[1], 'rb') as infile:
try:
obj = json.load(infile, object_pairs_hook=collections.OrderedDict)
except ValueError, e:
raise SystemExit(e)
with open(sys.argv[2], 'wb') as outfile:
json.dump(obj, outfile, sort_keys=False, indent=2, separators=(',', ': '))
outfile.write('\n')
if __name__ == '__main__':
main()
......@@ -18,7 +18,10 @@
},
"serialisation": {
"description": "How the parameters and results are serialised",
"enum": ["xml", "json-in-xml"],
"enum": [
"xml",
"json-in-xml"
],
"type": "string"
},
"software-type": {
......@@ -44,7 +47,10 @@
},
"serialisation": {
"description": "How the parameters and results are serialised, if different from global setting, required if global setting is not provided",
"enum": ["xml", "json-in-xml"],
"enum": [
"xml",
"json-in-xml"
],
"type": "string"
},
"request": {
......@@ -55,11 +61,11 @@
"description": "URL, relative to Software Release base path, of a json schema for values published by instance of current software type",
"type": "string"
},
"software-type" : {
"software-type": {
"description": "Value to be used as software type instead of the software type id (in order to use multiple diferent forms for the same software type).",
"type": "string"
},
"shared" : {
"shared": {
"description": "Define if the request will request a Slave or Software Instance.",
"default": "false",
"type": "boolean"
......@@ -78,4 +84,3 @@
},
"type": "object"
}
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '1.0.66'
version = '1.0.75'
name = 'slapos.cookbook'
long_description = open("README.rst").read() + "\n" + \
open("CHANGES.rst").read() + "\n"
......@@ -160,9 +160,11 @@ setup(name=name,
'readline = slapos.recipe.readline:Recipe',
'redis.server = slapos.recipe.redis:Recipe',
'request = slapos.recipe.request:Recipe',
'request.serialised = slapos.recipe.request:Serialised',
'request.serialised = slapos.recipe.request:RequestJSONEncoded',
'request.edge = slapos.recipe.request:RequestEdge',
'requestoptional = slapos.recipe.request:RequestOptional',
'requestoptional.serialised = '
'slapos.recipe.request:RequestOptionalJSONEncoded',
're6stnet.registry = slapos.recipe.re6stnet:Recipe',
'reverseproxy.nginx = slapos.recipe.reverse_proxy_nginx:Recipe',
'seleniumrunner = slapos.recipe.seleniumrunner:Recipe',
......@@ -208,5 +210,6 @@ setup(name=name,
tests_require=[
'jsonschema',
'mock',
'testfixtures',
],
)
......@@ -74,6 +74,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
$RDIFF_BACKUP \\
--remote-schema %(remote_schema)s \\
--restore-as-of now \\
--ignore-numerical-ids \\
--force \\
%(local_dir)s \\
%(remote_dir)s
......
......@@ -264,7 +264,7 @@ class RequestOptional(Recipe):
update = install
class Serialised(Recipe):
class JSONCodec(object):
def _filterForStorage(self, partition_parameter_kw):
return wrap(partition_parameter_kw)
......@@ -274,7 +274,17 @@ class Serialised(Recipe):
except slapmodule.NotFoundError:
return {}
class RequestJSONEncoded(JSONCodec, Recipe):
"""
Like Recipe, but serialised with JSONCodec.
"""
pass
class RequestOptionalJSONEncoded(JSONCodec, RequestOptional):
"""
Like RequestOptional, but serialised with JSONCodec.
"""
pass
CONNECTION_PARAMETER_STRING = 'connection-'
......
......@@ -6,21 +6,40 @@
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
"items": {
"$ref": "#"
}
},
"positiveInteger": {
"type": "integer",
"minimum": 0
},
"positiveIntegerDefault0": {
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
"allOf": [
{
"$ref": "#/definitions/positiveInteger"
},
{
"default": 0
}
]
},
"simpleTypes": {
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
"enum": [
"array",
"boolean",
"integer",
"null",
"number",
"object",
"string"
]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
}
......@@ -61,63 +80,99 @@
"type": "boolean",
"default": false
},
"maxLength": { "$ref": "#/definitions/positiveInteger" },
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
"maxLength": {
"$ref": "#/definitions/positiveInteger"
},
"minLength": {
"$ref": "#/definitions/positiveIntegerDefault0"
},
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
{
"type": "boolean"
},
{
"$ref": "#"
}
],
"default": {}
},
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
{
"$ref": "#"
},
{
"$ref": "#/definitions/schemaArray"
}
],
"default": {}
},
"maxItems": { "$ref": "#/definitions/positiveInteger" },
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
"maxItems": {
"$ref": "#/definitions/positiveInteger"
},
"minItems": {
"$ref": "#/definitions/positiveIntegerDefault0"
},
"uniqueItems": {
"type": "boolean",
"default": false
},
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"maxProperties": {
"$ref": "#/definitions/positiveInteger"
},
"minProperties": {
"$ref": "#/definitions/positiveIntegerDefault0"
},
"required": {
"$ref": "#/definitions/stringArray"
},
"additionalProperties": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
{
"type": "boolean"
},
{
"$ref": "#"
}
],
"default": {}
},
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"additionalProperties": {
"$ref": "#"
},
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"additionalProperties": {
"$ref": "#"
},
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"additionalProperties": {
"$ref": "#"
},
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/stringArray" }
{
"$ref": "#"
},
{
"$ref": "#/definitions/stringArray"
}
]
}
},
......@@ -128,23 +183,39 @@
},
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"$ref": "#/definitions/simpleTypes"
},
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"items": {
"$ref": "#/definitions/simpleTypes"
},
"minItems": 1,
"uniqueItems": true
}
]
},
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
"allOf": {
"$ref": "#/definitions/schemaArray"
},
"anyOf": {
"$ref": "#/definitions/schemaArray"
},
"oneOf": {
"$ref": "#/definitions/schemaArray"
},
"not": {
"$ref": "#"
}
},
"dependencies": {
"exclusiveMaximum": [ "maximum" ],
"exclusiveMinimum": [ "minimum" ]
"exclusiveMaximum": [
"maximum"
],
"exclusiveMinimum": [
"minimum"
]
},
"default": {}
}
import mock
import unittest
from collections import defaultdict
from slapos.recipe import request
from testfixtures import LogCapture
class RecipeTestMixin(object):
def setUp(self):
self.buildout = {
"buildout": {
},
"slap-connection": {
}
}
slap_patch = mock.patch(
"slapos.recipe.request.slapmodule.slap", autospec=True)
slap = slap_patch.start()
self.addCleanup(slap_patch.stop)
slap_instance = mock.MagicMock()
self.request_instance = mock.MagicMock()
register_instance = mock.MagicMock()
requested_instance = mock.MagicMock()
self.request_instance.return_value = requested_instance
register_instance.request = self.request_instance
slap_instance.registerComputerPartition.return_value = register_instance
slap.return_value = slap_instance
self.instance_getConnectionParameter = \
requested_instance.getConnectionParameter
def test_no_return_in_options_logs(self):
options = defaultdict(str)
self.instance_getConnectionParameter.return_value = self.return_value_empty
with LogCapture() as log:
self.recipe(self.buildout, "request", options)
log.check(
('request', 'DEBUG',
'No parameter to return to main instance.Be careful about that...'),
)
self.request_instance.assert_called_with(
'', 'RootSoftwareInstance', '', filter_kw={},
partition_parameter_kw=self.called_partition_parameter_kw,
shared=False, state='started')
def test_return_in_options_logs(self):
options = defaultdict(str)
options['return'] = 'anything'
self.instance_getConnectionParameter.return_value = self.return_value_empty
with LogCapture() as log:
self.recipe(self.buildout, "request", options)
log.check()
self.request_instance.assert_called_with(
'', 'RootSoftwareInstance', '', filter_kw={},
partition_parameter_kw=self.called_partition_parameter_kw,
shared=False, state='started')
def test_return_not_ready(self):
options = defaultdict(str)
options['return'] = 'anything'
self.instance_getConnectionParameter.side_effect = \
request.slapmodule.NotFoundError()
recipe = self.recipe(self.buildout, "request", options)
if self.raises:
self.assertRaises(KeyError, recipe.install)
self.assertEqual(options['connection-anything'], '')
self.request_instance.assert_called_with(
'', 'RootSoftwareInstance', '', filter_kw={},
partition_parameter_kw=self.called_partition_parameter_kw,
shared=False, state='started')
def test_return_ready(self):
options = defaultdict(str)
options['return'] = 'anything'
self.instance_getConnectionParameter.return_value = self.return_value
recipe = self.recipe(self.buildout, "request", options)
result = recipe.install()
self.assertEqual([], result)
self.assertEqual(options['connection-anything'], 'done')
self.request_instance.assert_called_with(
'', 'RootSoftwareInstance', '', filter_kw={},
partition_parameter_kw=self.called_partition_parameter_kw,
shared=False, state='started')
class RecipeTest(RecipeTestMixin, unittest.TestCase):
recipe = request.Recipe
raises = True
return_value_empty = {}
return_value = 'done'
called_partition_parameter_kw = {}
class RequestOptionalTest(RecipeTestMixin, unittest.TestCase):
recipe = request.RequestOptional
raises = False
return_value = 'done'
return_value_empty = {}
called_partition_parameter_kw = {}
class RequestJSONEncodedTest(RecipeTestMixin, unittest.TestCase):
recipe = request.RequestJSONEncoded
return_value_empty = "{}"
return_value = '{"anything": "done"}'
raises = True
called_partition_parameter_kw = {'_': '{}'}
class RequestOptionalJSONEncodedTest(RecipeTestMixin, unittest.TestCase):
recipe = request.RequestOptionalJSONEncoded
return_value_empty = "{}"
return_value = '{"anything": "done"}'
raises = False
called_partition_parameter_kw = {'_': '{}'}
......@@ -14,7 +14,10 @@
"serialisation": {
"description": "How the parameters and results are serialised",
"require": true,
"enum": ["xml", "json-in-xml"],
"enum": [
"xml",
"json-in-xml"
],
"type": "string"
},
"software-type": {
......@@ -35,7 +38,10 @@
},
"serialisation": {
"description": "How the parameters and results are serialised, if different from global setting",
"enum": ["xml", "json-in-xml"],
"enum": [
"xml",
"json-in-xml"
],
"type": "string"
},
"request": {
......@@ -48,11 +54,11 @@
"description": "URL, relative to Software Release base path, of a json schema for values published by instance of current software type",
"type": "string"
},
"software-type" : {
"software-type": {
"description": "Value to be used as software type instead of the software type id (in order to use multiple diferent forms for the same software type).",
"type": "string"
},
"shared" : {
"shared": {
"description": "Define if the request will request a Slave or Software Instance.",
"type": "boolean"
},
......@@ -69,4 +75,3 @@
},
"type": "object"
}
......@@ -29,6 +29,7 @@ import unittest
import os
import glob
import json
import collections
import slapos.test
import jsonschema
......@@ -41,20 +42,39 @@ def getSchemaValidator(filename):
json_file.close()
return json_dict
def createTest(path, json_dict):
def createValidatorTest(path, json_dict):
# Test that json is valid
def run(self, *args, **kwargs):
with open(path, "r") as json_file:
self.assertEquals(jsonschema.validate(json.loads(json_file.read()), json_dict), None)
json_file.close()
self.assertEqual(jsonschema.validate(json.load(json_file), json_dict), None)
return run
def createFormatTest(path, json_dict):
# Test that json match our formatting rules
def run(self, *args, **kwargs):
with open(path, "r") as json_file:
content = json_file.read()
# this is the format produced by `format-json` tool at the
# root of this repository.
# XXX it would be better to reuse the code.
self.assertEqual(
(json.dumps(
json.loads(content, object_pairs_hook=collections.OrderedDict),
sort_keys=False,
indent=2,
separators=(',', ': ')) + "\n").splitlines(),
content.splitlines())
return run
def generateSoftwareCfgTest():
json_dict = getSchemaValidator("schema.json")
base_path = "/".join(slapos.test.__file__.split("/")[:-3])
for path in glob.glob("%s/software/*/software.cfg.json" % base_path):
test_name = "test_%s_software_cfg_json" % path.split("/")[-2]
setattr(TestJSONSchemaValidation, test_name , createTest(path, json_dict))
setattr(TestJSONSchemaValidation, test_name, createValidatorTest(path, json_dict))
setattr(TestJSONSchemaValidation, test_name + '_format', createFormatTest(path, json_dict))
def generateJSONSchemaTest():
......@@ -64,7 +84,8 @@ def generateJSONSchemaTest():
software_type = path.split("/")[-2]
filename = path.split("/")[-1].replace("-", "_").replace(".", "_")
test_name = "test_schema_%s_%s" % (software_type, filename)
setattr(TestJSONSchemaValidation, test_name , createTest(path, json_dict))
setattr(TestJSONSchemaValidation, test_name, createValidatorTest(path, json_dict))
setattr(TestJSONSchemaValidation, test_name + '_format', createFormatTest(path, json_dict))
class TestJSONSchemaValidation(unittest.TestCase):
pass
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"public-ipv4": {
......@@ -50,7 +49,10 @@
"description": "Use HTTP2 as default Protocol",
"type": "string",
"default": "true",
"enum": ["true", "false"]
"enum": [
"true",
"false"
]
},
"re6st-verification-url": {
"title": "Test Verification URL",
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"url": {
......@@ -22,7 +21,6 @@
"type": "string",
"pattern": "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$"
},
"server-alias": {
"title": "Server Alias",
"description": "Server Alias List separated by space",
......@@ -34,23 +32,26 @@
"description": "Type of slave. If redirect, the slave will redirect to the given url. If zope, the rewrite rules will be compatible with Virtual Host Monster",
"type": "string",
"default": "",
"enum": ["", "zope", "redirect", "notebook", "eventsource"]
"enum": [
"",
"zope",
"redirect",
"notebook",
"eventsource"
]
},
"path": {
"title": "Backend Path",
"description": "Path to proxy to in the backend",
"type": "string",
"default": ""
},
"default-path": {
"title": "Default Path",
"description": "Provide default path to redirect user to when user access / (the site root)",
"type": "string",
"default": ""
},
"ssl_crt": {
"title": "SSL Certificate",
"description": "Content of the SSL Certificate file",
......@@ -65,7 +66,6 @@
"textarea": true,
"default": ""
},
"ssl_ca_crt": {
"title": "SSL Certificate Authority's Certificate",
"description": "Content of the CA certificate file",
......@@ -78,90 +78,101 @@
"description": "If set to true, http requests will be redirected to https",
"type": "string",
"default": "false",
"enum": ["false", "true"]
"enum": [
"false",
"true"
]
},
"ssl-proxy-verify": {
"title": "Verify Backend Certificates",
"description": "If set to true, Backend SSL Certificates will be checked and frontend will refuse to proxy if certificate is invalid",
"type": "string",
"default": "false",
"enum": ["false", "true"]
"enum": [
"false",
"true"
]
},
"ssl_proxy_ca_crt": {
"title": "SSL Backend Authority's Certificate",
"description": "Content of the SSL Certificate Authority file of the backend (to be used with ssl-proxy-verify)",
"type": "string",
"default": ""
},
"monitor-ipv6-test": {
"title": "IPv6 Address to Monitor Packet Lost",
"description": "IPv6 Address for the frontend keep monitoring with ping6 (without brackets)",
"type": "string",
"default": ""
},
"monitor-ipv4-test": {
"title": "IPv4 Address to Monitor Packet Lost",
"description": "IPv4 Address for the frontend keep monitoring with ping",
"type": "string",
"default": ""
},
"re6st-optimal-test": {
"title": "IPv6 and IPv4 Address to test Re6st",
"description": "IPv6 and IPv6 Address for the frontend test if re6st is on the optimal status (use ipv6,ipv4)",
"type": "string",
"default": ""
},
"enable_cache": {
"title": "Enable Cache",
"description": "If set to true, http caching server (Apache Traffic Server) will be used between frontend apache and backend",
"type": "string",
"default": "false",
"enum": ["false", "true"]
"enum": [
"false",
"true"
]
},
"disable-no-cache-request": {
"title": "Disable 'no-cache' requests",
"description": "If set to true, Cache-Control and Pragma requests headers will not be sent to cache and backend servers. This prevents clients from bypassing cache when enable_cache is true",
"type": "string",
"default": "false",
"enum": ["false", "true"]
"enum": [
"false",
"true"
]
},
"disable-via-header": {
"title": "Disable 'Via' headers from cache",
"description": "If set to true, Via response headers will not be sent to client",
"type": "string",
"default": "false",
"enum": ["false", "true"]
"enum": [
"false",
"true"
]
},
"enable-http2": {
"title": "Enable HTTP2 Protocol",
"description": "Use HTTP2 Protocol for the site",
"type": "string",
"default": "true",
"enum": ["true", "false"]
"enum": [
"true",
"false"
]
},
"prefer-gzip-encoding-to-backend": {
"title": "Prefer gzip Encoding for Backend",
"description": "If set to true, frontend will rewrite Accept-Encoding request header to simply 'gzip' for all variants of Accept-Encoding containing 'gzip', in order to maximize cache hits for resources cached with Vary: Accept-Encoding when enable_cache is used",
"type": "string",
"default": "false",
"enum": ["false", "true"]
"enum": [
"false",
"true"
]
},
"disabled-cookie-list": {
"title": "Disabled Cookies",
"description": "List of Cookies separated by space that will not be sent to cache and backend servers. This is especially useful to discard analytics tracking cookies when using Vary: Cookie cache headers",
"type": "string",
"default": ""
},
"apache_custom_http": {
"title": "HTTP configuration",
"description": "Raw http configuration in python template format. Your site will be rejected if you use it without notification and approval of frontend administrators",
......
......@@ -121,9 +121,9 @@ eggs =
${rdiff-backup-build-1.3.4:egg}
[versions]
# 1.3.4nxd2 is invalid version string, thus pached version string is not '1.3.4nxd2+SlapOSPatched001'
# but '1.3.4nxd2-SlapOSPatched001'.
rdiff-backup = 1.3.4nxd2-SlapOSPatched001
# 1.3.4nxd5 is invalid version string, thus pached version string is not '1.3.4nxd5+SlapOSPatched001'
# but '1.3.4nxd5-SlapOSPatched001'.
rdiff-backup = 1.3.4nxd5-SlapOSPatched001
gunicorn = 19.1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.4.2
......
......@@ -7,7 +7,11 @@
"publish": {
"description": "Upload built packages automatically to a Debian repository when successful.",
"type": "object",
"required": ["suite", "host", "key"],
"required": [
"suite",
"host",
"key"
],
"properties": {
"suite": {
"type": "string"
......
......@@ -13,11 +13,6 @@ Generally things to be done with ``caddy-frontend``:
* **Jérome Perrin**: *For event source, if I understand https://github.com/mholt/caddy/issues/1355 correctly, we could use caddy as a proxy in front of nginx-push-stream . If we have a "central shared" caddy instance, can it handle keeping connections opens for many clients ?*
* ``ssl_ca_crt``
* ``disabled-cookie-list`` (requires writing middleware plugin for Caddy)::
RequestHeader edit Cookie "(^%(disabled_cookie)s=[^;]*; |; %(disabled_cookie)s=[^;]*|^%(disabled_cookie)s=[^;]*$)" ""' % dict(disabled_cookie=disabled_cookie) }}
* there is already `MR <https://github.com/mholt/caddy/pull/2144>`_ which will allow regexp modification of headers, thus cookies
* ``ssl_proxy_ca_crt`` for ``ssl_proxy_verify``, this is related to bug `#1550 <https://github.com/mholt/caddy/issues/1550>`_, proposed solution `just adding your CA to the system's trust store`
* ``check-error-on-caddy-log`` like ``check-error-on-apache-log``
* cover test suite like resilient tests for KVM and prove it works the same way as Caddy
......
......@@ -58,7 +58,7 @@ md5sum = f20d6c3d2d94fb685f8d26dfca1e822b
[template-default-slave-virtualhost]
filename = templates/default-virtualhost.conf.in
md5sum = 8ed87061b9e20e2ad74aae9f80d1b53d
md5sum = d9269cc085752e09f4acce37a18e160c
[template-cached-slave-virtualhost]
filename = templates/cached-virtualhost.conf.in
......
......@@ -49,8 +49,8 @@
},
"disabled-cookie-list": {
"default": "",
"description": "[NOT Implemented] List of Cookies separated by space that will not be sent to cache and backend servers. This is especially useful to discard analytics tracking cookies when using Vary: Cookie cache headers",
"title": "[NOT Implemented] Disabled Cookies",
"description": "List of Cookies separated by space that will not be sent to cache and backend servers. This is especially useful to discard analytics tracking cookies when using Vary: Cookie cache headers",
"title": "Disabled Cookies",
"type": "string"
},
"enable-http2": {
......@@ -109,12 +109,12 @@
},
"prefer-gzip-encoding-to-backend": {
"default": "false",
"description": "[NOT Implemented] If set to true, frontend will rewrite Accept-Encoding request header to simply 'gzip' for all variants of Accept-Encoding containing 'gzip', in order to maximize cache hits for resources cached with Vary: Accept-Encoding when enable_cache is used",
"description": "If set to true, frontend will rewrite Accept-Encoding request header to simply 'gzip' for all variants of Accept-Encoding containing 'gzip', in order to maximize cache hits for resources cached with Vary: Accept-Encoding when enable_cache is used",
"enum": [
"false",
"true"
],
"title": "[NOT Implemented] Prefer gzip Encoding for Backend",
"title": "Prefer gzip Encoding for Backend",
"type": "string"
},
"re6st-optimal-test": {
......
......@@ -45,9 +45,6 @@
log / {{ slave_parameter.get('access_log') }} "{remote} {>REMOTE_USER} [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\" {latency_ms}"
errors {{ slave_parameter.get('error_log') }}
{%- for disabled_cookie in disabled_cookie_list %}
{%- endfor %} {#- for disabled_cookie in disabled_cookie_list #}
{%- if prefer_gzip %}
rewrite {
if {>Accept-Encoding} match "(^gzip,.*|.*, gzip,.*|.*, gzip$|^gzip$)"
......@@ -66,6 +63,10 @@
{%- endif %} {#- if proxy_name == 'prefer-gzip' #}
# As backend is trusting REMOTE_USER header unset it always
header_upstream -REMOTE_USER
{%- for disabled_cookie in disabled_cookie_list %}
# Remove cookie {{ disabled_cookie }} from client Cookies
header_upstream Cookie "(.*)(^{{ disabled_cookie }}=[^;]*; |; {{ disabled_cookie }}=[^;]*|^{{ disabled_cookie }}=[^;]*$)(.*)" "$1 $3"
{%- endfor %} {#- for disabled_cookie in disabled_cookie_list #}
{%- if disable_via_header %}
header_downstream -Via
......@@ -119,6 +120,10 @@
{%- endif %} {#- if proxy_name == 'prefer-gzip' #}
# As backend is trusting REMOTE_USER header unset it always
header_upstream -REMOTE_USER
{%- for disabled_cookie in disabled_cookie_list %}
# Remove cookie {{ disabled_cookie }} from client Cookies
header_upstream Cookie "(.*)(^{{ disabled_cookie }}=[^;]*; |; {{ disabled_cookie }}=[^;]*|^{{ disabled_cookie }}=[^;]*$)(.*)" "$1 $3"
{%- endfor %} {#- for disabled_cookie in disabled_cookie_list #}
{%- if disable_via_header %}
header_downstream -Via
......@@ -154,9 +159,6 @@
log / {{ slave_parameter.get('access_log') }} "{remote} {>REMOTE_USER} [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\" {latency_ms}"
errors {{ slave_parameter.get('error_log') }}
{%- for disabled_cookie in disabled_cookie_list %}
{%- endfor %} {#- for disabled_cookie in disabled_cookie_list #}
{%- if prefer_gzip %}
rewrite {
if {>Accept-Encoding} match "(^gzip,.*|.*, gzip,.*|.*, gzip$|^gzip$)"
......@@ -183,6 +185,10 @@
{%- endif %} {#- if proxy_name == 'prefer-gzip' #}
# As backend is trusting REMOTE_USER header unset it always
header_upstream -REMOTE_USER
{%- for disabled_cookie in disabled_cookie_list %}
# Remove cookie {{ disabled_cookie }} from client Cookies
header_upstream Cookie "(.*)(^{{ disabled_cookie }}=[^;]*; |; {{ disabled_cookie }}=[^;]*|^{{ disabled_cookie }}=[^;]*$)(.*)" "$1 $3"
{%- endfor %} {#- for disabled_cookie in disabled_cookie_list #}
{%- if disable_via_header %}
header_downstream -Via
......@@ -230,6 +236,10 @@
{%- endif %} {#- if proxy_name == 'prefer-gzip' #}
# As backend is trusting REMOTE_USER header unset it always
header_upstream -REMOTE_USER
{%- for disabled_cookie in disabled_cookie_list %}
# Remove cookie {{ disabled_cookie }} from client Cookies
header_upstream Cookie "(.*)(^{{ disabled_cookie }}=[^;]*; |; {{ disabled_cookie }}=[^;]*|^{{ disabled_cookie }}=[^;]*$)(.*)" "$1 $3"
{%- endfor %} {#- for disabled_cookie in disabled_cookie_list #}
{%- if disable_via_header %}
header_downstream -Via
......
This diff is collapsed.
TestDefaultMonitorHttpdPort-0/etc/plugin/__init__.py
TestDefaultMonitorHttpdPort-0/etc/plugin/buildout-TestDefaultMonitorHttpdPort-0-status.py
TestDefaultMonitorHttpdPort-0/etc/plugin/check-free-disk-space.py
TestDefaultMonitorHttpdPort-0/etc/plugin/monitor-bootstrap-status.py
TestDefaultMonitorHttpdPort-1/etc/plugin/buildout-TestDefaultMonitorHttpdPort-1-status.py
TestDefaultMonitorHttpdPort-1/etc/plugin/check-free-disk-space.py
TestDefaultMonitorHttpdPort-1/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestDefaultMonitorHttpdPort-0/etc/promise/check-free-disk-space
TestDefaultMonitorHttpdPort-0/etc/promise/monitor-http-frontend
TestDefaultMonitorHttpdPort-0/etc/promise/monitor-httpd-listening-on-tcp
TestDefaultMonitorHttpdPort-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestDefaultMonitorHttpdPort-1/etc/promise/caddy_frontend_ipv4_https
TestDefaultMonitorHttpdPort-1/etc/promise/caddy_frontend_ipv6_http
TestDefaultMonitorHttpdPort-1/etc/promise/caddy_frontend_ipv6_https
TestDefaultMonitorHttpdPort-1/etc/promise/caddy_ssl_cached
TestDefaultMonitorHttpdPort-1/etc/promise/check-free-disk-space
TestDefaultMonitorHttpdPort-1/etc/promise/frontend-caddy-configuration-promise
TestDefaultMonitorHttpdPort-1/etc/promise/monitor-http-frontend
TestDefaultMonitorHttpdPort-1/etc/promise/monitor-httpd-listening-on-tcp
......
TestEnableHttp2ByDefaultDefaultSlave-0/etc/plugin/__init__.py
TestEnableHttp2ByDefaultDefaultSlave-0/etc/plugin/buildout-TestEnableHttp2ByDefaultDefaultSlave-0-status.py
TestEnableHttp2ByDefaultDefaultSlave-0/etc/plugin/check-free-disk-space.py
TestEnableHttp2ByDefaultDefaultSlave-0/etc/plugin/monitor-bootstrap-status.py
TestEnableHttp2ByDefaultDefaultSlave-1/etc/plugin/__init__.py
TestEnableHttp2ByDefaultDefaultSlave-1/etc/plugin/buildout-TestEnableHttp2ByDefaultDefaultSlave-1-status.py
TestEnableHttp2ByDefaultDefaultSlave-1/etc/plugin/check-free-disk-space.py
TestEnableHttp2ByDefaultDefaultSlave-1/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestEnableHttp2ByDefaultDefaultSlave-0/etc/promise/check-free-disk-space
TestEnableHttp2ByDefaultDefaultSlave-0/etc/promise/monitor-http-frontend
TestEnableHttp2ByDefaultDefaultSlave-0/etc/promise/monitor-httpd-listening-on-tcp
TestEnableHttp2ByDefaultDefaultSlave-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestEnableHttp2ByDefaultDefaultSlave-1/etc/promise/caddy_frontend_ipv4_https
TestEnableHttp2ByDefaultDefaultSlave-1/etc/promise/caddy_frontend_ipv6_http
TestEnableHttp2ByDefaultDefaultSlave-1/etc/promise/caddy_frontend_ipv6_https
TestEnableHttp2ByDefaultDefaultSlave-1/etc/promise/caddy_ssl_cached
TestEnableHttp2ByDefaultDefaultSlave-1/etc/promise/check-free-disk-space
TestEnableHttp2ByDefaultDefaultSlave-1/etc/promise/frontend-caddy-configuration-promise
TestEnableHttp2ByDefaultDefaultSlave-1/etc/promise/monitor-http-frontend
TestEnableHttp2ByDefaultDefaultSlave-1/etc/promise/monitor-httpd-listening-on-tcp
......
TestEnableHttp2ByDefaultFalseSlave-0/etc/plugin/__init__.py
TestEnableHttp2ByDefaultFalseSlave-0/etc/plugin/buildout-TestEnableHttp2ByDefaultFalseSlave-0-status.py
TestEnableHttp2ByDefaultFalseSlave-0/etc/plugin/check-free-disk-space.py
TestEnableHttp2ByDefaultFalseSlave-0/etc/plugin/monitor-bootstrap-status.py
TestEnableHttp2ByDefaultFalseSlave-1/etc/plugin/__init__.py
TestEnableHttp2ByDefaultFalseSlave-1/etc/plugin/buildout-TestEnableHttp2ByDefaultFalseSlave-1-status.py
TestEnableHttp2ByDefaultFalseSlave-1/etc/plugin/check-free-disk-space.py
TestEnableHttp2ByDefaultFalseSlave-1/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestEnableHttp2ByDefaultFalseSlave-0/etc/promise/check-free-disk-space
TestEnableHttp2ByDefaultFalseSlave-0/etc/promise/monitor-http-frontend
TestEnableHttp2ByDefaultFalseSlave-0/etc/promise/monitor-httpd-listening-on-tcp
TestEnableHttp2ByDefaultFalseSlave-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestEnableHttp2ByDefaultFalseSlave-1/etc/promise/caddy_frontend_ipv4_https
TestEnableHttp2ByDefaultFalseSlave-1/etc/promise/caddy_frontend_ipv6_http
TestEnableHttp2ByDefaultFalseSlave-1/etc/promise/caddy_frontend_ipv6_https
TestEnableHttp2ByDefaultFalseSlave-1/etc/promise/caddy_ssl_cached
TestEnableHttp2ByDefaultFalseSlave-1/etc/promise/check-free-disk-space
TestEnableHttp2ByDefaultFalseSlave-1/etc/promise/frontend-caddy-configuration-promise
TestEnableHttp2ByDefaultFalseSlave-1/etc/promise/monitor-http-frontend
TestEnableHttp2ByDefaultFalseSlave-1/etc/promise/monitor-httpd-listening-on-tcp
......
TestMalformedBackenUrlSlave-0/etc/plugin/__init__.py
TestMalformedBackenUrlSlave-0/etc/plugin/buildout-TestMalformedBackenUrlSlave-0-status.py
TestMalformedBackenUrlSlave-0/etc/plugin/check-free-disk-space.py
TestMalformedBackenUrlSlave-0/etc/plugin/monitor-bootstrap-status.py
TestMalformedBackenUrlSlave-1/etc/plugin/__init__.py
TestMalformedBackenUrlSlave-1/etc/plugin/buildout-TestMalformedBackenUrlSlave-1-status.py
TestMalformedBackenUrlSlave-1/etc/plugin/check-free-disk-space.py
TestMalformedBackenUrlSlave-1/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestMalformedBackenUrlSlave-0/etc/promise/check-free-disk-space
TestMalformedBackenUrlSlave-0/etc/promise/monitor-http-frontend
TestMalformedBackenUrlSlave-0/etc/promise/monitor-httpd-listening-on-tcp
TestMalformedBackenUrlSlave-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestMalformedBackenUrlSlave-1/etc/promise/caddy_frontend_ipv4_https
TestMalformedBackenUrlSlave-1/etc/promise/caddy_frontend_ipv6_http
TestMalformedBackenUrlSlave-1/etc/promise/caddy_frontend_ipv6_https
TestMalformedBackenUrlSlave-1/etc/promise/caddy_ssl_cached
TestMalformedBackenUrlSlave-1/etc/promise/check-free-disk-space
TestMalformedBackenUrlSlave-1/etc/promise/frontend-caddy-configuration-promise
TestMalformedBackenUrlSlave-1/etc/promise/monitor-http-frontend
TestMalformedBackenUrlSlave-1/etc/promise/monitor-httpd-listening-on-tcp
......
TestMasterRequest-0/etc/plugin/__init__.py
TestMasterRequest-0/etc/plugin/buildout-TestMasterRequest-0-status.py
TestMasterRequest-0/etc/plugin/check-free-disk-space.py
TestMasterRequest-0/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestMasterRequest-0/etc/promise/check-free-disk-space
TestMasterRequest-0/etc/promise/monitor-http-frontend
TestMasterRequest-0/etc/promise/monitor-httpd-listening-on-tcp
TestMasterRequest-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......
TestMasterRequestDomain-0/etc/plugin/__init__.py
TestMasterRequestDomain-0/etc/plugin/buildout-TestMasterRequestDomain-0-status.py
TestMasterRequestDomain-0/etc/plugin/check-free-disk-space.py
TestMasterRequestDomain-0/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestMasterRequestDomain-0/etc/promise/check-free-disk-space
TestMasterRequestDomain-0/etc/promise/monitor-http-frontend
TestMasterRequestDomain-0/etc/promise/monitor-httpd-listening-on-tcp
TestMasterRequestDomain-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......
TestQuicEnabled-0/etc/plugin/__init__.py
TestQuicEnabled-0/etc/plugin/buildout-TestQuicEnabled-0-status.py
TestQuicEnabled-0/etc/plugin/check-free-disk-space.py
TestQuicEnabled-0/etc/plugin/monitor-bootstrap-status.py
TestQuicEnabled-1/etc/plugin/__init__.py
TestQuicEnabled-1/etc/plugin/buildout-TestQuicEnabled-1-status.py
TestQuicEnabled-1/etc/plugin/check-free-disk-space.py
TestQuicEnabled-1/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestQuicEnabled-0/etc/promise/check-free-disk-space
TestQuicEnabled-0/etc/promise/monitor-http-frontend
TestQuicEnabled-0/etc/promise/monitor-httpd-listening-on-tcp
TestQuicEnabled-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestQuicEnabled-1/etc/promise/caddy_frontend_ipv4_https
TestQuicEnabled-1/etc/promise/caddy_frontend_ipv6_http
TestQuicEnabled-1/etc/promise/caddy_frontend_ipv6_https
TestQuicEnabled-1/etc/promise/caddy_ssl_cached
TestQuicEnabled-1/etc/promise/check-free-disk-space
TestQuicEnabled-1/etc/promise/frontend-caddy-configuration-promise
TestQuicEnabled-1/etc/promise/monitor-http-frontend
TestQuicEnabled-1/etc/promise/monitor-httpd-listening-on-tcp
......
TestRe6stVerificationUrlDefaultSlave-0/etc/plugin/__init__.py
TestRe6stVerificationUrlDefaultSlave-0/etc/plugin/buildout-TestRe6stVerificationUrlDefaultSlave-0-status.py
TestRe6stVerificationUrlDefaultSlave-0/etc/plugin/check-free-disk-space.py
TestRe6stVerificationUrlDefaultSlave-0/etc/plugin/monitor-bootstrap-status.py
TestRe6stVerificationUrlDefaultSlave-1/etc/plugin/__init__.py
TestRe6stVerificationUrlDefaultSlave-1/etc/plugin/buildout-TestRe6stVerificationUrlDefaultSlave-1-status.py
TestRe6stVerificationUrlDefaultSlave-1/etc/plugin/check-free-disk-space.py
TestRe6stVerificationUrlDefaultSlave-1/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestRe6stVerificationUrlDefaultSlave-0/etc/promise/check-free-disk-space
TestRe6stVerificationUrlDefaultSlave-0/etc/promise/monitor-http-frontend
TestRe6stVerificationUrlDefaultSlave-0/etc/promise/monitor-httpd-listening-on-tcp
TestRe6stVerificationUrlDefaultSlave-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestRe6stVerificationUrlDefaultSlave-1/etc/promise/caddy_frontend_ipv4_https
TestRe6stVerificationUrlDefaultSlave-1/etc/promise/caddy_frontend_ipv6_http
TestRe6stVerificationUrlDefaultSlave-1/etc/promise/caddy_frontend_ipv6_https
TestRe6stVerificationUrlDefaultSlave-1/etc/promise/caddy_ssl_cached
TestRe6stVerificationUrlDefaultSlave-1/etc/promise/check-free-disk-space
TestRe6stVerificationUrlDefaultSlave-1/etc/promise/frontend-caddy-configuration-promise
TestRe6stVerificationUrlDefaultSlave-1/etc/promise/monitor-http-frontend
TestRe6stVerificationUrlDefaultSlave-1/etc/promise/monitor-httpd-listening-on-tcp
......
TestRe6stVerificationUrlSlave-0/etc/plugin/__init__.py
TestRe6stVerificationUrlSlave-0/etc/plugin/buildout-TestRe6stVerificationUrlSlave-0-status.py
TestRe6stVerificationUrlSlave-0/etc/plugin/check-free-disk-space.py
TestRe6stVerificationUrlSlave-0/etc/plugin/monitor-bootstrap-status.py
TestRe6stVerificationUrlSlave-1/etc/plugin/__init__.py
TestRe6stVerificationUrlSlave-1/etc/plugin/buildout-TestRe6stVerificationUrlSlave-1-status.py
TestRe6stVerificationUrlSlave-1/etc/plugin/check-free-disk-space.py
TestRe6stVerificationUrlSlave-1/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestRe6stVerificationUrlSlave-0/etc/promise/check-free-disk-space
TestRe6stVerificationUrlSlave-0/etc/promise/monitor-http-frontend
TestRe6stVerificationUrlSlave-0/etc/promise/monitor-httpd-listening-on-tcp
TestRe6stVerificationUrlSlave-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestRe6stVerificationUrlSlave-1/etc/promise/caddy_frontend_ipv4_https
TestRe6stVerificationUrlSlave-1/etc/promise/caddy_frontend_ipv6_http
TestRe6stVerificationUrlSlave-1/etc/promise/caddy_frontend_ipv6_https
TestRe6stVerificationUrlSlave-1/etc/promise/caddy_ssl_cached
TestRe6stVerificationUrlSlave-1/etc/promise/check-free-disk-space
TestRe6stVerificationUrlSlave-1/etc/promise/frontend-caddy-configuration-promise
TestRe6stVerificationUrlSlave-1/etc/promise/monitor-http-frontend
TestRe6stVerificationUrlSlave-1/etc/promise/monitor-httpd-listening-on-tcp
......
TestReplicateSlave-0/etc/plugin/__init__.py
TestReplicateSlave-0/etc/plugin/buildout-TestReplicateSlave-0-status.py
TestReplicateSlave-0/etc/plugin/check-free-disk-space.py
TestReplicateSlave-0/etc/plugin/monitor-bootstrap-status.py
TestReplicateSlave-1/etc/plugin/__init__.py
TestReplicateSlave-1/etc/plugin/buildout-TestReplicateSlave-1-status.py
TestReplicateSlave-1/etc/plugin/check-free-disk-space.py
TestReplicateSlave-1/etc/plugin/monitor-bootstrap-status.py
TestReplicateSlave-2/etc/plugin/buildout-TestReplicateSlave-2-status.py
TestReplicateSlave-2/etc/plugin/check-free-disk-space.py
TestReplicateSlave-2/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestReplicateSlave-0/etc/promise/check-free-disk-space
TestReplicateSlave-0/etc/promise/monitor-http-frontend
TestReplicateSlave-0/etc/promise/monitor-httpd-listening-on-tcp
TestReplicateSlave-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestReplicateSlave-1/etc/promise/caddy_frontend_ipv4_https
TestReplicateSlave-1/etc/promise/caddy_frontend_ipv6_http
TestReplicateSlave-1/etc/promise/caddy_frontend_ipv6_https
TestReplicateSlave-1/etc/promise/caddy_ssl_cached
TestReplicateSlave-1/etc/promise/check-free-disk-space
TestReplicateSlave-1/etc/promise/frontend-caddy-configuration-promise
TestReplicateSlave-1/etc/promise/monitor-http-frontend
TestReplicateSlave-1/etc/promise/monitor-httpd-listening-on-tcp
......@@ -30,7 +28,6 @@ TestReplicateSlave-2/etc/promise/caddy_frontend_ipv4_https
TestReplicateSlave-2/etc/promise/caddy_frontend_ipv6_http
TestReplicateSlave-2/etc/promise/caddy_frontend_ipv6_https
TestReplicateSlave-2/etc/promise/caddy_ssl_cached
TestReplicateSlave-2/etc/promise/check-free-disk-space
TestReplicateSlave-2/etc/promise/frontend-caddy-configuration-promise
TestReplicateSlave-2/etc/promise/monitor-http-frontend
TestReplicateSlave-2/etc/promise/monitor-httpd-listening-on-tcp
......
TestSlave-0/etc/plugin/__init__.py
TestSlave-0/etc/plugin/buildout-TestSlave-0-status.py
TestSlave-0/etc/plugin/check-free-disk-space.py
TestSlave-0/etc/plugin/monitor-bootstrap-status.py
TestSlave-1/etc/plugin/__init__.py
TestSlave-1/etc/plugin/buildout-TestSlave-1-status.py
TestSlave-1/etc/plugin/check-free-disk-space.py
TestSlave-1/etc/plugin/monitor-bootstrap-status.py
\ No newline at end of file
TestSlave-0/etc/promise/check-free-disk-space
TestSlave-0/etc/promise/monitor-http-frontend
TestSlave-0/etc/promise/monitor-httpd-listening-on-tcp
TestSlave-0/etc/promise/promise-monitor-httpd-is-process-older-than-dependency-set
......@@ -9,7 +8,6 @@ TestSlave-1/etc/promise/caddy_frontend_ipv4_https
TestSlave-1/etc/promise/caddy_frontend_ipv6_http
TestSlave-1/etc/promise/caddy_frontend_ipv6_https
TestSlave-1/etc/promise/caddy_ssl_cached
TestSlave-1/etc/promise/check-free-disk-space
TestSlave-1/etc/promise/frontend-caddy-configuration-promise
TestSlave-1/etc/promise/monitor-http-frontend
TestSlave-1/etc/promise/monitor-httpd-listening-on-tcp
......
This diff is collapsed.
......@@ -5,22 +5,28 @@
"title": "Input Parameters",
"properties": {
"server-port": {
"allOf": [{
"allOf": [
{
"$ref": "#/definitions/tcpv4port"
}, {
},
{
"title": "http port to use",
"description": "Caucase http port to use.",
"default": 8009
}]
}
]
},
"server-https-port": {
"allOf": [{
"allOf": [
{
"$ref": "#/definitions/tcpv4port"
}, {
},
{
"title": "https port to use",
"description": "Caucase port to use for https connexion.",
"default": 8010
}]
}
]
},
"external-url": {
"title": "External http url",
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"port": {
......@@ -16,36 +15,35 @@
"type": "string",
"pattern": "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$"
},
"frontend-server-alias": {
"title": "Server Alias",
"description": "Server Alias List separated by space",
"type": "string",
"default": ""
},
"frontend-type": {
"title": "Backend Type",
"description": "Type of slave. If redirect, the slave will redirect to the given url. If zope, the rewrite rules will be compatible with Virtual Host Monster",
"type": "string",
"default": "",
"enum": ["", "zope", "redirect"]
"enum": [
"",
"zope",
"redirect"
]
},
"frontend-path": {
"title": "Backend Path",
"description": "Path to proxy to in the backend",
"type": "string",
"default": ""
},
"frontend-default-path": {
"title": "Default Path",
"description": "Provide default path to redirect user to",
"type": "string",
"default": ""
},
"frontend-ssl_crt": {
"title": "SSL Certificate",
"description": "SSL Certificate",
......@@ -60,7 +58,6 @@
"textarea": true,
"default": ""
},
"frontend-ssl_ca_crt": {
"title": "SSL Certificate Authority's Certificate",
"description": "SSL Key",
......@@ -74,14 +71,12 @@
"type": "boolean",
"default": false
},
"frontend-ssl-proxy-verify": {
"title": "Verify Backend Certificates",
"description": "If set to true, Backend Certificates are checked",
"type": "boolean",
"default": false
},
"frontend-ssl_proxy_ca_crt": {
"title": "SSL Backend Authority's Certificate",
"description": "SSL Certificate Authority of the backen (to be used with ssl-proxy-verify)",
......@@ -89,35 +84,30 @@
"textarea": true,
"default": ""
},
"frontend-enable_cache": {
"title": "Enable Cache",
"description": "If set to true, the cache is used",
"type": "boolean",
"default": false
},
"frontend-disable-no-cache-request": {
"title": "Disable 'no-cache' requests",
"description": "If set to true, no-cache control headers will be disabled",
"type": "boolean",
"default": false
},
"frontend-disable-via-header": {
"title": "Disable 'Via' headers from cache",
"description": "If set to true, via headers will be disabled",
"type": "boolean",
"default": false
},
"frontend-prefer-gzip-encoding-to-backend": {
"title": "Prefer gzip Encoding for Backend",
"description": "If set to true, if a request is made with accept encoding 'gzip', only that one will be transferred to the backend",
"type": "boolean",
"default": false
},
"frontend-disabled-cookie-list": {
"title": "Disabled Cookies",
"description": "List of Cookies separated by space that will not be sent to the backend",
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"port": {
......@@ -16,43 +15,41 @@
"type": "string",
"pattern": "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$"
},
"frontend-server-alias": {
"title": "Server Alias",
"description": "Server Alias List separated by space",
"type": "string",
"default": ""
},
"frontend-type": {
"title": "Backend Type",
"description": "Type of slave. If redirect, the slave will redirect to the given url. If zope, the rewrite rules will be compatible with Virtual Host Monster",
"type": "string",
"default": "",
"enum": ["", "zope", "redirect"]
"enum": [
"",
"zope",
"redirect"
]
},
"frontend-path": {
"title": "Backend Path",
"description": "Path to proxy to in the backend",
"type": "string",
"default": ""
},
"frontend-default-path": {
"title": "Default Path",
"description": "Provide default path to redirect user to",
"type": "string",
"default": ""
},
"frontend-https-only": {
"title": "HTTPS Only",
"description": "If set to true, http request are redirect to https",
"type": "boolean",
"default": false
},
"frontend-enable_cache": {
"title": "Enable Cache",
"description": "If set to true, the cache is used",
......
......@@ -3,12 +3,15 @@
"extends": "./schema-definitions.json#",
"properties": {
"tcpv4-port": {
"allOf": [{
"allOf": [
{
"$ref": "#/definitions/tcpv4port"
}, {
},
{
"description": "Start allocating ports at this value, going upward",
"default": 23000
}]
}
]
},
"backend-count": {
"description": "Number of backend cloudooo instances",
......
......@@ -7,7 +7,9 @@
"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-\").",
"additionalProperties": {
"type": "array",
"items": { "type": "string" },
"items": {
"type": "string"
},
"uniqueItems": true
},
"type": "object"
......@@ -104,7 +106,9 @@
},
"zope-partition-dict": {
"description": "Zope layout definition",
"default": {"1": {}},
"default": {
"1": {}
},
"patternProperties": {
".*": {
"additionalProperties": false,
......@@ -160,12 +164,15 @@
"type": "string"
},
"port-base": {
"allOf": [{
"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
}]
}
]
}
},
"type": "object"
......@@ -215,11 +222,14 @@
"description": "Common settings ZEO servers",
"properties": {
"tcpv4-port": {
"allOf": [{
"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.",
......@@ -237,7 +247,9 @@
"zodb": {
"description": "Zope Object DataBase mountpoints. See https://github.com/zopefoundation/ZODB/blob/3.10/src/ZODB/component.xml for extra options.",
"items": {
"required": ["type"],
"required": [
"type"
],
"properties": {
"name": {
"description": "Database name",
......@@ -251,14 +263,21 @@
},
"type": {
"description": "Storage type",
"enum": ["zeo", "neo"],
"enum": [
"zeo",
"neo"
],
"type": "string"
},
"server": {
"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', ...",
"anyOf": [
{"$ref": "./instance-zeo-schema.json"},
{"$ref": "../neoppod/instance-neo-input-schema.json"}
{
"$ref": "./instance-zeo-schema.json"
},
{
"$ref": "../neoppod/instance-neo-input-schema.json"
}
]
},
"storage-dict": {
......@@ -270,11 +289,15 @@
"type": "boolean"
}
},
"additionalProperties": {"type": "string"},
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"additionalProperties": {"type": "string"},
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"type": "array"
......
{
"$schema": "http://json-schema.org/draft-04/schema#",
"required": ["tcpv4-port"],
"required": [
"tcpv4-port"
],
"properties": {
"tcpv4-port": {
"allOf": [{
"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",
......
{
"$schema": "http://json-schema.org/draft-04/schema#",
"required": ["tcpv4-port"],
"required": [
"tcpv4-port"
],
"properties": {
"tcpv4-port": {
"allOf": [{
"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": [{
"default": [
{
"name": "erp5",
"user": "user",
"password": "insecure"
}],
}
],
"minItems": 1,
"items": {
"required": ["name", "user", "password"],
"required": [
"name",
"user",
"password"
],
"properties": {
"name": {
"description": "Database name",
......@@ -135,6 +146,5 @@
},
"type": "array"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"required": ["tcpv4-port"],
"required": [
"tcpv4-port"
],
"properties": {
"tcpv4-port": {
"allOf": [{
"allOf": [
{
"$ref": "#/definitions/tcpv4port"
}, {
},
{
"description": "Start allocating ports at this value, going upward"
}]
}
]
},
"postmaster": {
"description": "Mail address to send technical mails to. Non-empty value required for smptd relay service to be deployed. Values will be put in alias-dict as 'postmaster' key (alias-dict takes precedence)",
......@@ -29,7 +34,9 @@
"relay": {
"description": "Forward outgoing mails to a specific relay. If enabled, relay must support TLS-encrypted SASL authentication.",
"dependencies": {
"host": ["sasl-credential"]
"host": [
"sasl-credential"
]
},
"properties": {
"host": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"test-node-title": {
......
......@@ -15,4 +15,4 @@
[template]
filename = instance.cfg
md5sum = 2eba374ea5b7ec6c95a1f79066cfb46b
md5sum = a345d46655c3e841c2ecf4e3a0446c8f
......@@ -36,10 +36,9 @@ command-line =
--source_code_path_list=$${slapos:location}/software/caddy-frontend/test
# XXX slapos.cookbook:wrapper does not allow extending env, so we add some default $PATH entries ( not sure they are needed )
# PATH=${buildout:bin-directory}:/usr/bin/:/bin/
environment =
PATH=${curl:location}/bin/:${openssl:location}/bin/:/usr/bin/:/bin
LOCAL_IPV4=$${slap-configuration:ipv4-random}
GLOBAL_IPV6=$${slap-configuration:ipv6-random}
CURL=${curl:location}/bin/curl
SLAPOS_TEST_WORKING_DIR=$${create-directory:working-dir}
TEST_SR=${template:test_software_release}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"image-to-test-url": {
......@@ -23,7 +22,10 @@
"title": "Type of the test.",
"type": "string",
"default": "script-from-url",
"enum" : ["script-from-url", "cloned-playbook"]
"enum": [
"script-from-url",
"cloned-playbook"
]
},
"script-to-test-url": {
"title": "Optional URL of script to test, used for test-type=script-from-url.",
......@@ -36,5 +38,9 @@
"type": "string"
}
},
"required": ["image-to-test-url", "image-to-test-md5sum", "test-type"]
"required": [
"image-to-test-url",
"image-to-test-md5sum",
"test-type"
]
}
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance]
filename = instance.cfg.in
md5sum = 7c907db5f803b03a218b49888a3a3799
[template-nginx-service]
filename = template-nginx-service.sh.in
md5sum = 529532e1240a66bdf39e3cbbef90ba87
[template-nginx-configuration]
filename = template-nginx.cfg.in
md5sum = 9f22db89a2679534aa8fd37dbca86782
[template-runTestSuite]
filename = runTestSuite.in
md5sum = af6985e2192b43b5b1dfd37bb538df72
......@@ -94,8 +94,8 @@ def main():
firefox_capabilities = webdriver.common.desired_capabilities.DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
browser = webdriver.Firefox(capabilities=firefox_capabilities,
firefox_binary='${firefox:location}/firefox-slapos',
executable_path='${firefox:location}/geckodriver')
firefox_binary='${firefox-wrapper:location}',
executable_path='${geckodriver:location}')
elif args.target in ['iOS', 'Android']:
# parameters for mobile emulators have different names then parameters for
# desktop OSes
......
......@@ -10,6 +10,7 @@ extends =
../../component/nginx/buildout.cfg
../../component/openssl/buildout.cfg
../../component/curl/buildout.cfg
./buildout.hash.cfg
parts =
slapos-cookbook
......@@ -31,13 +32,6 @@ parts =
[nodejs-output]
<= nodejs-8.6.0-output
[instance]
recipe = slapos.recipe.template
md5sum = 7c907db5f803b03a218b49888a3a3799
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
mode = 0644
[eggs]
recipe = zc.recipe.egg
eggs =
......@@ -98,26 +92,26 @@ stop-on-error = true
command = cd ${uritemplate-repository.git:location} && PATH=${git:location}/bin/:${nodejs:location}/bin/:$PATH ${nodejs:location}/bin/npm install .
update-command = ${:command}
[template-nginx-service]
[macro-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-nginx-service.sh.in
md5sum = 529532e1240a66bdf39e3cbbef90ba87
output = ${buildout:directory}/template-nginx-service.sh.in
url = ${:_profile_base_location_}/${:filename}
mode = 0644
[instance]
<= macro-template
output = ${buildout:directory}/instance.cfg
[template-nginx-service]
<= macro-template
output = ${buildout:directory}/template-nginx-service.sh.in
[template-nginx-configuration]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-nginx.cfg.in
md5sum = 9f22db89a2679534aa8fd37dbca86782
<= macro-template
output = ${buildout:directory}/template-nginx.cfg.in
mode = 0644
[template-runTestSuite]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/runTestSuite.in
md5sum = 2898d62902351e6df9ce887bd98e2ca1
<= macro-template
output = ${buildout:directory}/runTestSuite.in
mode = 0644
[versions]
erp5.util = 0.4.51
......
......@@ -110,7 +110,10 @@
"title": "Scheme of HTTP service into the VM (require: kvm-name).",
"description": "Say If HTTP service to run/or running into the Virtual Machine will use http or https. Possible values: http, https.",
"type": "string",
"enum": ["http", "https"],
"enum": [
"http",
"https"
],
"default": "http"
}
},
......@@ -126,7 +129,10 @@
"title": "Restrict all access to VM with firewall.",
"description": "When Firewall is enabled, this parameter define if only vm of this cluster and authorized sources ip should have access to cluster.",
"type": "string",
"enum": ["on", "off"],
"enum": [
"on",
"off"
],
"default": "off"
},
"fw-authorized-sources": {
......@@ -187,7 +193,10 @@
"description": "Define if SlapOS should start or stop this VM.",
"type": "string",
"default": "started",
"enum": ["started", "stopped"]
"enum": [
"started",
"stopped"
]
},
"enable-device-hotplug": {
"title": "Enable device hotplug mode",
......@@ -237,7 +246,14 @@
"description": "Type of QEMU disk drive, to create.",
"type": "string",
"default": "qcow2",
"enum": ["qcow2", "raw", "vdi", "vmdk", "cloop", "qed"]
"enum": [
"qcow2",
"raw",
"vdi",
"vmdk",
"cloop",
"qed"
]
},
"disk-type": {
"title": "Disk type",
......@@ -259,14 +275,23 @@
"description": "Disk cache controls how the host cache is used to access block data.",
"type": "string",
"default": "writeback",
"enum": ["none", "writeback", "unsafe", "directsync", "writethrough"]
"enum": [
"none",
"writeback",
"unsafe",
"directsync",
"writethrough"
]
},
"disk-aio": {
"title": "Disk aio to use.",
"description": "Selects between pthread based disk I/O and native Linux AIO.",
"type": "string",
"default": "threads",
"enum": ["threads", "native"]
"enum": [
"threads",
"native"
]
},
"cpu-count": {
"title": "CPU count",
......@@ -302,7 +327,41 @@
"title": "Use keyboard layout language",
"description": "Use keyboard layout language (for example fr for French). Can be usefull with VNC display",
"type": "string",
"enum": ["ar", "da", "de", "de-ch", "en-gb", "en-us", "es", "et", "fi", "fo", "fr", "fr-be", "fr-ca", "fr-ch", "hr", "hu", "is", "it", "ja", "lt", "lv", "mk", "nl", "nl-be", "no", "pl", "pt", "pt-br", "ru", "sl", "sv", "th", "tr"],
"enum": [
"ar",
"da",
"de",
"de-ch",
"en-gb",
"en-us",
"es",
"et",
"fi",
"fo",
"fr",
"fr-be",
"fr-ca",
"fr-ch",
"hr",
"hu",
"is",
"it",
"ja",
"lt",
"lv",
"mk",
"nl",
"nl-be",
"no",
"pl",
"pt",
"pt-br",
"ru",
"sl",
"sv",
"th",
"tr"
],
"default": "fr"
},
"nbd-host": {
......@@ -366,7 +425,14 @@
"description": "Type of QEMU disk drive, to create.",
"type": "string",
"default": "qcow2",
"enum": ["qcow2", "raw", "vdi", "vmdk", "cloop", "qed"]
"enum": [
"qcow2",
"raw",
"vdi",
"vmdk",
"cloop",
"qed"
]
},
"wipe-disk-ondestroy": {
"title": "Wipe disks when destroy the VM",
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"enable-device-hotplug": {
......@@ -53,31 +52,53 @@
"description": "Type of QEMU disk drive.",
"type": "string",
"default": "virtio",
"enum": ["ide", "scsi", "sd", "mtd", "floppy", "pflash", "virtio"]
"enum": [
"ide",
"scsi",
"sd",
"mtd",
"floppy",
"pflash",
"virtio"
]
},
"disk-format": {
"title": "Type of disk drive to create by QEMU.",
"description": "Type of QEMU disk drive, to create.",
"type": "string",
"default": "qcow2",
"enum": ["qcow2", "raw", "vdi", "vmdk", "cloop", "qed"]
"enum": [
"qcow2",
"raw",
"vdi",
"vmdk",
"cloop",
"qed"
]
},
"disk-cache": {
"title": "Cache option to use with Disk.",
"description": "Disk cache controls how the host cache is used to access block data.",
"type": "string",
"default": "writeback",
"enum": ["none", "writeback", "unsafe", "directsync", "writethrough"]
"enum": [
"none",
"writeback",
"unsafe",
"directsync",
"writethrough"
]
},
"disk-aio": {
"title": "Disk aio to use.",
"description": "Selects between pthread based disk I/O and native Linux AIO.",
"type": "string",
"default": "threads",
"enum": ["threads", "native"]
"enum": [
"threads",
"native"
]
},
"cpu-count": {
"title": "CPU count",
"description": "Number of CPU cores.",
......@@ -107,19 +128,55 @@
"description": "Select the emulated CPU model. Ex: SandyBridge,+erms,+smep,+smx,+vmx",
"type": "string"
},
"keyboard-layout-language": {
"title": "Use keyboard layout language",
"description": "Use keyboard layout language (for example fr for French). Can be usefull with VNC display",
"type": "string",
"enum": ["ar", "da", "de", "de-ch", "en-gb", "en-us", "es", "et", "fi", "fo", "fr", "fr-be", "fr-ca", "fr-ch", "hr", "hu", "is", "it", "ja", "lt", "lv", "mk", "nl", "nl-be", "no", "pl", "pt", "pt-br", "ru", "sl", "sv", "th", "tr"]
"enum": [
"ar",
"da",
"de",
"de-ch",
"en-gb",
"en-us",
"es",
"et",
"fi",
"fo",
"fr",
"fr-be",
"fr-ca",
"fr-ch",
"hr",
"hu",
"is",
"it",
"ja",
"lt",
"lv",
"mk",
"nl",
"nl-be",
"no",
"pl",
"pt",
"pt-br",
"ru",
"sl",
"sv",
"th",
"tr"
]
},
"nbd-host": {
"title": "NBD hostname",
"description": "hostname (or IP) of the NBD server containing the boot image.",
"type": "string",
"format": ["host-name", "ip-address", "ipv6"],
"format": [
"host-name",
"ip-address",
"ipv6"
],
"default": "debian.nbd.vifib.net"
},
"nbd-port": {
......@@ -130,12 +187,15 @@
"minimum": 1,
"maximum": 65535
},
"nbd2-host": {
"title": "Second NBD hostname",
"description": "hostname (or IP) of the second NBD server (containing drivers for example).",
"type": "string",
"format": ["host-name", "ip-address", "ipv6"]
"format": [
"host-name",
"ip-address",
"ipv6"
]
},
"nbd2-port": {
"title": "Second NBD port",
......@@ -144,7 +204,6 @@
"minimum": 1,
"maximum": 65535
},
"virtual-hard-drive-url": {
"title": "Existing disk image URL",
"description": "If specified, will download an existing disk image (qcow2, raw, ...), and will use it as main virtual hard drive. Can be used to download and use an already installed and customized virtual hard drive.",
......@@ -168,7 +227,6 @@
"type": "boolean",
"default": true
},
"external-disk-number": {
"title": "Number of additional disk to create for virtual machine",
"description": "Specify the number of additional disk to create for virtual machine in data folder of SlapOS Node. Requires instance_storage_home to be configured on SlapOS Node.",
......@@ -189,9 +247,15 @@
"description": "Type of QEMU disk drive, to create.",
"type": "string",
"default": "qcow2",
"enum": ["qcow2", "raw", "vdi", "vmdk", "cloop", "qed"]
"enum": [
"qcow2",
"raw",
"vdi",
"vmdk",
"cloop",
"qed"
]
},
"wipe-disk-ondestroy": {
"title": "Wipe disks when destroy the VM",
"description": "Say if disks should be wiped by writing new data over every single bit before delete them. This option is used to securely delete VM disks",
......@@ -206,7 +270,6 @@
"minimum": 1,
"maximum": 5
},
"use-tap": {
"title": "Use QEMU TAP network interface",
"description": "Use QEMU TAP network interface, might require a bridge on SlapOS Node.",
......@@ -221,7 +284,7 @@
},
"nat-rules": {
"title": "List of rules for NAT of QEMU user mode network stack.",
"description": "List of rules for NAT of QEMU user mode network stack, as comma-separated list of ports. For each port specified, it will redirect port x of the VM (example: 80) to the port x + 10000 of the public IPv6 (example: 10080). Defaults to \"22 80 443\". Ignored if \"use-tap\" parameter is enabled.",
"description": "List of rules for NAT of QEMU user mode network stack, as comma-separated list of ports (with optional protocol). For each port specified, it will redirect port x of the VM (example: 80, udp:53) to the port x + 10000 of the public IPv6 (example: 10080, udp:10053). Defaults to \"22 80 443\". Ignored if \"use-tap\" parameter is enabled.",
"type": "string"
},
"nat-restrict-mode": {
......
......@@ -8,7 +8,6 @@
"format": "uri",
"require": true
},
"url": {
"title": "URL",
"description": "URL used to connect to the service.",
......
......@@ -9,6 +9,7 @@
{% set instance_type = slapparameter_dict.get('type', 'standalone') -%}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '22 80 443') -%}
{% set frontend_software_type = 'default' -%}
{% set disk_device_path = slapparameter_dict.get('disk-device-path', None) -%}
{% set extends_list = [] -%}
{% set part_list = [] -%}
......@@ -633,6 +634,19 @@ keyboard-layout-language = fr
{% endif -%}
{% if disk_device_path %}
{% do part_list.append('disk-device-permission') -%}
[disk-device-permission]
recipe = slapos.recipe.template:jinja2
template = inline:
{%- raw %}
[{"disk": "{{disk_device_path}}"}]
{% endraw -%}
rendered = ${buildout:directory}/.slapos-disk-permission
context =
raw disk_device_path {{disk_device_path}}
{% endif -%}
[buildout]
parts =
certificate-authority
......
......@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum = dbf43756c605144f0a3cd829b588d931
md5sum = 0fd548b8cac9278496d9d83dde26d09c
download-only = true
on-update = true
......@@ -186,7 +186,7 @@ ignore-existing = true
url = ${:_profile_base_location_}/template/template-kvm-run.in
mode = 644
filename = template-kvm-run.in
md5sum = 887585f23359d136093de42b1ad1d777
md5sum = 0a076a9338ea0c25fa4e7c9369473d8a
download-only = true
on-update = true
......
......@@ -248,9 +248,21 @@ number = -1
if use_nat == 'true':
number += 1
rules = 'user,id=lan%s' % number
if nat_rules:
rules += ',' + ','.join('hostfwd=tcp:%s:%s-:%s' % (listen_ip,
int(port) + 10000, port) for port in nat_rules.split())
for rule in nat_rules.split():
proto = 'tcp'
rule = rule.split(':')
if len(rule) == 1:
port = int(rule[0])
elif len(rule) == 2:
proto = rule[0]
port = int(rule[1])
rules += ',hostfwd={proto}:{hostaddr}:{hostport}-:{guestport}'.format(
proto=proto,
hostaddr=listen_ip,
hostport=port + 10000,
guestport=port
)
if httpd_port > 0:
rules += ',guestfwd=tcp:10.0.2.100:80-cmd:%s %s %s' % (netcat_bin,
......
......@@ -2,7 +2,9 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Parameters to instantiate a NEO cluster. See https://lab.nexedi.com/nexedi/neoppod/blob/master/neo.conf for more information.",
"additionalProperties": false,
"require": ["cluster"],
"require": [
"cluster"
],
"properties": {
"cluster": {
"description": "Cluster unique identifier. Your last line of defense against mixing up NEO clusters and corrupting your data. Choose a unique value for each of your cluster.",
......@@ -30,7 +32,9 @@
"description": "[NEO SR only] 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 ('node-0', 'node-1', ...). The prefix 'node-' is mandatory and the number must start from 0. The total number of nodes here must be equal to the length of node-list.",
"additionalProperties": {
"type": "array",
"items": { "type": "string" },
"items": {
"type": "string"
},
"uniqueItems": true
},
"type": "object"
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"-dns-type": {
"title": "DNS Software type",
"description": "Software type of DNS nodes",
"default": "single-default",
"type": "string"
},
"-dns-software-release-url": {
"title": "DNS Software Release",
"description": "Url of the software release to be used for the nodes",
"default": "",
"type": "string"
},
"-dns-quantity": {
"title": "DNS Quantity",
"description": "DNS Nodes Quantity",
"default": 1,
"type": "integer"
},
"-dns-i-state": {
"title": "Requested state of node i",
"description": "Requested State of node i of the replication. i must inferior or equal to '-dns-quantity'",
"default": "started",
"type": "string"
},
"-sla-i-sla_parameter": {
"title": "sla_parameter used to request node i",
"description": "Parameter used to provide sla parameter to request dns nodes",
"default": "",
"type": "string"
},
"zone": {
"title": "Zone",
"description": "Zone to be handled by the DNS cluster",
......@@ -47,21 +40,18 @@
"default": "domain.com",
"pattern": "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$"
},
"server-admin": {
"title": "Zone Administrator Email",
"description": "Email of the zone administrator, it is used to generate SOA value",
"type": "string",
"default": "admin@domain.com"
},
"dns-name-template-string": {
"title": "DNS domains template string",
"description": "Template used to generate DNS domain name",
"type": "string",
"default": "ns%s. + zone"
},
"monitor-interface-url": {
"title": "Monitor Web Interface URL",
"description": "Give Url of HTML web interface that will be used to render this monitor instance.",
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"record": {
"title": "Record",
"description": "Record for the configuration",
"type": "string"
},
"origin": {
"title": "Origin",
"description": "Used to qualify RR in the configuration. i.e.: if your origin is a.example.com and the RR for Europe is 'eu' the european clients will use eu.a.exmple.com",
"type": "string"
},
"default": {
"title": "Default RR",
"description": "Defautl record to use when the ip is not regognized",
"type": "string"
},
"europe": {
"title": "Europe RR",
"description": "Records to use for Europe",
"default": "eu",
"type": "string"
},
"africa": {
"title": "Africa RR",
"description": "Records to use for Africa",
"default": "af",
"type": "string"
},
"south-america": {
"title": "South America RR",
"description": "Records to use for South America",
"default": "sa",
"type": "string"
},
"north-america": {
"title": "North America RR",
"description": "Records to use for North America",
"default": "na",
"type": "string"
},
"china": {
"title": "China RR",
"description": "Records to use for China",
"default": "cn",
"type": "string"
},
"japan": {
"title": "Japan RR",
"description": "Records to use for Japan",
"default": "jp",
"type": "string"
},
"hong-kong": {
"title": "Honk Kong RR",
"description": "Records to use for Hong Kong",
"default": "hk",
"type": "string"
},
"east-asia": {
"title": "East Asia RR",
"description": "Records to use for East Asia",
"default": "as",
"type": "string"
},
"west-asia": {
"title": "West Asia RR",
"description": "Records to use for West Asia",
"default": "eu",
"type": "string"
},
"oceania": {
"title": "Oceania RR",
"description": "Records to use for Oceania",
......
This diff is collapsed.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
}
"properties": {}
}
This diff is collapsed.
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template]
filename = instance.cfg.in
md5sum = c4ac5de141ae6a64848309af03e51d88
[template-selenium]
filename = instance-selenium.cfg.in
md5sum = 9b6648b8f37baa3f7a6bfb68d4426049
......@@ -17,7 +17,7 @@ report-project = $${slap-parameter:report-project}
[firefox-instance]
recipe = slapos.cookbook:firefox
runner-path = $${rootdirectory:bin}/firefox-sandboxed
firefox-path = ${firefox:location}/firefox-slapos
firefox-path = ${firefox-wrapper:location}
prefsjs-path = $${rootdirectory:etc}/prefs.js
shell-path = ${dash:location}/bin/dash
tmp-path = $${xvfb-instance:tmp-path}
......
......@@ -5,6 +5,7 @@ extends =
../../component/firefox/buildout.cfg
../../component/dash/buildout.cfg
../../stack/slapos.cfg
./buildout.hash.cfg
# develop += /opt/slapdev
......@@ -15,6 +16,7 @@ parts =
instance-recipe-egg
xserver
firefox
geckodriver
xwd
[instance-recipe]
......@@ -30,20 +32,19 @@ recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
[template]
# Default template for the instance.
[macro-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = c4ac5de141ae6a64848309af03e51d88
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
mode = 0644
[template]
<= macro-template
output = ${buildout:directory}/template.cfg
[template-selenium]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-selenium.cfg
md5sum = 8be91f4515decef0f8af5910e43e0e52
<= macro-template
output = ${buildout:directory}/template-selenium.cfg
mode = 0644
[versions]
plone.recipe.command = 1.1
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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