Permalink
Fetching contributors…
Cannot retrieve contributors at this time
1208 lines (1204 sloc) 48.3 KB
%-*-Mode:erlang;coding:utf-8;tab-width:4;c-basic-offset:4;indent-tabs-mode:()-*-
% ex: set ft=erlang fenc=utf-8 sts=4 ts=4 sw=4 et nomod:
{acl, [
% Access Control Lists (ACLs) define service name prefixes that can be
% referenced instead of the literal service name prefixes for the
% destination allow list and/or the destination deny list. The ACLs may
% reference other ACLs (cyclic references and missing references
% in this list generate errors). ACLs can be provided as service name
% patterns to match before a send operation and non-patterns are made
% into service name patterns by appending a '*' character.
{all, [database, tests]},
{database, ["/db/"]},
{tests, ["/tests/"]},
{api, ["/cloudi/api/"]}
]}.
{services, [
% an internal service is a native Erlang service,
% using the cloudi_service behavior
% this particular service handles the CloudI Service API which provides
% dynamic configuration of CloudI
{internal,
% prefix specified for all subscriptions
"/cloudi/api/",
% module name of a module in a reachable path
cloudi_service_api_requests,
% module arguments are supplied as a list for the
% cloudi_service_init/2 function
[],
% destination refresh controls how quickly service membership propogates
% Any process that sends to long-lived processes can use
% a 'lazy' prefix destination refresh (otherwise, if sending to
% short-lived provesses, use an 'immediate' prefix destination refresh).
% The 'lazy' prefix makes the service cache service name lookup data
% while the 'immediate' prefix uses a central local process to do
% service name lookups.
% A 'closest' suffix destination refresh always prefers local
% processes rather than using remote processes
% (processes on other nodes).
% A 'furthest' suffix destination refresh always prefers remote
% processes rather than using local processes.
% A 'random' suffix load balances across all connected nodes.
% A 'local' suffix will only send to local processes, which will
% cause less request latency.
% A 'remote' suffix will always send to remote processes, which can
% provide more fault-tolerance guarantees.
% If the process doesn't send to any other processes, then 'none' can
% be used and the process will die if it attempts to send to another
% process (it is as if the destination deny list contains all services).
% (so the choices are:
% 'lazy_closest', 'immediate_closest',
% 'lazy_furthest', 'immediate_furthest',
% 'lazy_random', 'immediate_random',
% 'lazy_local', 'immediate_local',
% 'lazy_remote', 'immediate_remote',
% 'lazy_newest', 'immediate_newest',
% 'lazy_oldest', 'immediate_oldest',
% 'none')
none,
% timeout for executing the cloudi_service_init/2 function
5000,
% default timeout for asynchronous calls
5000,
% default timeout for synchronous calls
5000,
% destination deny list is used as an ACL (Access Control List) that
% prevents the process from sending to destinations with the specified
% prefixes. if atoms are used within the list, they must exist as an
% associative entry in the acl configuration list.
% if the destination deny list is 'undefined' any destination is valid.
% a blocked request will just return a timeout
% (earlier than the timeout specified for the request).
undefined,
% destination allow list is used as an ACL (Access Control List) that
% allows the process to send to destinations with the specified
% prefixes. if atoms are used within the list, they must exist as an
% associative entry in the acl configuration list.
% if the destination allow list is 'undefined' any destination is valid.
% a blocked request will just return a timeout
% (earlier than the timeout specified for the request).
undefined,
% specify how many processes should be created with this configuration
1,
% If more than MaxR restarts occur within MaxT seconds,
% CloudI terminates the process
% MaxR (maximum restarts)
5,
% MaxT (maximum time)
300, % seconds
% options, e.g.:
% {queue_limit, 1024} % to limit the service's queue to a maximum
% % of 1024 requests (to prevent excessive memory
% % consumption while the service is busy,
% % handling a previous request)
% (see config_service_options in
% lib/cloudi_core/src/cloudi_configuration.hrl)
[]},
% an external service is an OS process connected
% with a socket to the loopback device for each thread
% the service below processes the Hexidecimal digits of PI (as a test)
{external,
% prefix specified for all subscriptions
"/tests/",
% executable file path
"@prefix@/lib/cloudi-@VERSION@/tests/hexpi/hexpi_cxx",
% command line arguments for the executable
"",
% {Key, Value} pairs to specify environment variables
[{"LD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"},
{"DYLD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"}],
% destination refresh controls how quickly service membership propogates
% Any process that sends to long-lived processes can use
% a 'lazy' prefix destination refresh (otherwise, if sending to
% short-lived provesses, use an 'immediate' prefix destination refresh).
% The 'lazy' prefix makes the service cache service name lookup data
% while the 'immediate' prefix uses a central local process to do
% service name lookups.
% A 'closest' suffix destination refresh always prefers local
% processes rather than using remote processes
% (processes on other nodes).
% A 'furthest' suffix destination refresh always prefers remote
% processes rather than using local processes.
% A 'random' suffix load balances across all connected nodes.
% A 'local' suffix will only send to local processes, which will
% cause less request latency.
% A 'remote' suffix will always send to remote processes, which can
% provide more fault-tolerance guarantees.
% If the process doesn't send to any other processes, then 'none' can
% be used and the process will die if it attempts to send to another
% process (it is as if the destination deny list contains all services).
% (so the choices are:
% 'lazy_closest', 'immediate_closest',
% 'lazy_furthest', 'immediate_furthest',
% 'lazy_random', 'immediate_random',
% 'lazy_local', 'immediate_local',
% 'lazy_remote', 'immediate_remote',
% 'lazy_newest', 'immediate_newest',
% 'lazy_oldest', 'immediate_oldest',
% 'none')
none,
% protocol used for each socket
tcp,
% buffer size used for each socket
default, % bytes
% timeout for receiving an initialization message from a socket
20000,
% default timeout for asynchronous calls
5000,
% default timeout for synchronous calls
5000,
% destination deny list is used as an ACL (Access Control List) that
% prevents the process from sending to destinations with the specified
% prefixes. if atoms are used within the list, they must exist as an
% associative entry in the acl configuration list.
% if the destination deny list is 'undefined' any destination is valid.
% a blocked request will just return a timeout
% (earlier than the timeout specified for the request).
undefined, % with 'none' destination refresh method, this is not checked
% destination allow list is used as an ACL (Access Control List) that
% allows the process to send to destinations with the specified
% prefixes. if atoms are used within the list, they must exist as an
% associative entry in the acl configuration list.
% if the destination allow list is 'undefined' any destination is valid.
% a blocked request will just return a timeout
% (earlier than the timeout specified for the request).
undefined,
% specify how many processes should be created with this configuration
% (a float is a multiplier for the erlang VM scheduler count, i.e.,
% the desired cpu count)
1,
% specify how many threads should be created with this configuration
% (i.e., how many sockets should be opened to each OS process)
% (a float is a multiplier for the erlang VM scheduler count, i.e.,
% the desired cpu count)
0.5,
% If more than MaxR restarts occur within MaxT seconds,
% CloudI terminates the process
% MaxR (maximum restarts)
5,
% MaxT (maximum time)
300, % seconds
% options, e.g.:
% {queue_limit, 1024} % to limit the service's queue to a maximum
% % of 1024 requests (to prevent excessive memory
% % consumption while the service is busy,
% % handling a previous request)
% (see config_service_options in
% lib/cloudi_core/src/cloudi_configuration.hrl)
[{request_timeout_adjustment, true},
{nice, 15}%,
%{cgroup,
% [{name, "cloudi/integration_tests/hexpi"},
% {parameters,
% [{"memory.limit_in_bytes", "64m"}]}]}
]},
% (using the proplist method of specifying the configuration data...
% it provides defaults automatically)
[%{type, internal}, % gets inferred
{prefix, "/cloudi/"},
{module, cloudi_service_filesystem},
{args,
[{directory, "@prefix@/lib/cloudi-@VERSION@/service_api/dashboard/"}]},
{dest_refresh, none},
{count_process, 4}],
[{prefix, "/cloudi/log/"},
{module, cloudi_service_filesystem},
{args,
[{directory, "@prefix@/lib/cloudi-@VERSION@/logs/"},
{read, [{"/cloudi/log/cloudi.log", -16384}]},
{refresh, 10}]},
{dest_refresh, none}],
[{prefix, "*"},
{module, cloudi_service_null},
{args, [{debug, true}]},
{dest_refresh, none},
{options, [{response_timeout_immediate_max, limit_min}]}],
[{prefix, "/tests/websockets/"},
{module, cloudi_service_http_cowboy},
{args,
[{port, 6464}, {output, external}, {use_websockets, true},
{query_get_format, text_pairs},
{use_x_method_override, true},
{websocket_connect_sync,
"/tests/websockets/bounce/websocket/connect"},
{websocket_disconnect_async,
"/tests/websockets/bounce/websocket/disconnect"},
{websocket_ping, 30000}, % milliseconds
{websocket_subscriptions,
[% also, subscribe to "on" a "bounce"
{"b*u*ce", % <-- valid pattern
[{parameters_selected, [1, 2]},
{service_name,
% wildcards for substitution don't need to be in a valid pattern
"**/websocket"}]},
% second subscription, "notification"
{"b*u*ce",
[{parameters_selected, [2, 1]},
{service_name,
"**tification/websocket"}]}
]}]}],
% tests/http/ services
{internal,
"/tests/http/",
cloudi_service_http_cowboy,
[{port, 6466}, {output, external},
{query_get_format, text_pairs},
{use_x_method_override, true}],
immediate_closest,
5000, 5000, 5000, [api], undefined, 1, 5, 300,
[]},
{internal,
"/tests/http/",
cloudi_service_http_cowboy,
[{port, 6467}, {output, internal},
{query_get_format, text_pairs},
{use_x_method_override, true}],
immediate_closest, % quickstart testing, to avoid false negatives
5000, 5000, 5000, undefined, undefined, 1, 5, 300,
[]},
{internal,
"/tests/http/",
cloudi_service_http_elli,
[{port, 6468}, {output, external},
{query_get_format, text_pairs},
{use_x_method_override, true}],
immediate_closest,
5000, 5000, 5000, [api], undefined, 1, 5, 300,
[]},
{internal,
"/queue",
cloudi_service_queue,
[% a maximum of 3 retries will occur if the service request
% fails to receive a response within the timeout period
% (e.g., the destination service crashes without providing a response)
{retry, 3},
% a write ahead logging (WAL) file path for all requests
% (n.b., for efficiency reasons all requests are also held in memory)
{file, "@prefix@/lib/cloudi-@VERSION@/logs/example_queue_${I}.log"},
{compression, 6},
{checksum, crc32}],
immediate_closest,
5000, 5000, 5000, undefined, undefined, 4, 5, 300,
% make sure the cloudi_service_queue gets a timeout as
% quickly as possible to allow it to retry
[{request_timeout_immediate_max, limit_min},
{response_timeout_immediate_max, limit_min}]},
{internal,
"/byzantine",
cloudi_service_quorum,
[{quorum, byzantine}],
immediate_closest,
5000, 5000, 5000, undefined, undefined, 1, 5, 300, []},
{external,
"/tests/http/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/http/http.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 4, 5, 300,
[{nice, 15}]},
{external,
"/tests/http/",
"@JAVA@",
% enable assertions
"-ea:org.cloudi... "
"-jar @prefix@/lib/cloudi-@VERSION@/tests/http/java/http.jar",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 4, 5, 300,
[{nice, 15}]},
{external,
"/tests/http/",
"@RUBY@",
"@prefix@/lib/cloudi-@VERSION@/tests/http/http.rb",
[{"RUBYLIB", "@prefix@/lib/cloudi-@VERSION@/api/ruby/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 4, 5, 300,
[{nice, 15}]},
@CONFIG_TESTS_GO_COUNT@
@CONFIG_TESTS_HASKELL_COUNT@
@CONFIG_TESTS_OCAML_COUNT@
{external,
"/tests/count/",
"@prefix@/lib/cloudi-@VERSION@/tests/count/count_c", "",
[{"LD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"},
{"DYLD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 4, 1, 5, 300,
[{nice, 10}]},
{external,
"/tests/count/",
"@JAVA@",
% enable assertions
"-ea:org.cloudi... "
"-jar @prefix@/lib/cloudi-@VERSION@/tests/count/java/count.jar",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 4, 5, 300,
[{nice, 10}]},
{external,
"/tests/count/",
"@NODE@",
"@prefix@/lib/cloudi-@VERSION@/tests/count/count.js",
[{"NODE_PATH", "@prefix@/lib/cloudi-@VERSION@/api/javascript/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 4, 1, 5, 300,
[{nice, 10}]},
{external,
"/tests/count/",
"@PERL@",
"@prefix@/lib/cloudi-@VERSION@/tests/count/CountTask.pm",
[{"PERL5LIB", "@prefix@/lib/cloudi-@VERSION@/api/perl/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 4, 5, 300,
[{nice, 10}]},
{external,
"/tests/count/",
"@PHP@",
"-d include_path='@prefix@/lib/cloudi-@VERSION@/api/php/' "
"-f @prefix@/lib/cloudi-@VERSION@/tests/count/count.php",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 4, 1, 5, 300,
[{nice, 10}]},
{external,
"/tests/count/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/count/count.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 4, 5, 300,
[{nice, 10}]},
{external,
"/tests/count/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/count/count_c.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 4, 5, 300,
[{nice, 10}]},
{external,
"/tests/count/",
"@RUBY@",
"@prefix@/lib/cloudi-@VERSION@/tests/count/count.rb",
[{"RUBYLIB", "@prefix@/lib/cloudi-@VERSION@/api/ruby/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 4, 5, 300,
[{nice, 10}]},
{internal,
"/tests/count/",
cloudi_service_test_count,
[],
none, 5000, 5000, 5000, undefined, undefined, 4, 5, 300,
[]},
@CONFIG_TESTS_GO_HTTP_REQ@
@CONFIG_TESTS_HASKELL_HTTP_REQ@
@CONFIG_TESTS_OCAML_HTTP_REQ@
{external,
"/tests/http_req/",
"@prefix@/lib/cloudi-@VERSION@/tests/http_req/http_req_c", "",
[{"LD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"},
{"DYLD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{nice, 10}]},
{external,
"/tests/http_req/",
"@JAVA@",
% enable assertions
"-ea:org.cloudi... "
"-jar @prefix@/lib/cloudi-@VERSION@/tests/http_req/java/http_req.jar",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{nice, 10}]},
{external,
"/tests/http_req/",
"@NODE@",
"@prefix@/lib/cloudi-@VERSION@/tests/http_req/http_req.js",
[{"NODE_PATH", "@prefix@/lib/cloudi-@VERSION@/api/javascript/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{nice, 10}]},
{external,
"/tests/http_req/",
"@PERL@",
"@prefix@/lib/cloudi-@VERSION@/tests/http_req/http_req.pl",
[{"PERL5LIB", "@prefix@/lib/cloudi-@VERSION@/api/perl/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{nice, 10}]},
{external,
"/tests/http_req/",
"@PHP@",
"-d include_path='@prefix@/lib/cloudi-@VERSION@/api/php/' "
"-f @prefix@/lib/cloudi-@VERSION@/tests/http_req/http_req.php",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{nice, 10}]},
{external,
"/tests/http_req/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/http_req/http_req.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{nice, 10}]},
{external,
"/tests/http_req/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/http_req/http_req_c.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined,
1.0, 1, 5, 300,
[{request_timeout_adjustment, true},
{count_process_dynamic,
[{rate_request_max, 1.1},
{rate_request_min, 0.9},
{count_max, 4.0},
{count_min, 0.25}]},
{nice, 10}]},
{external,
"/tests/http_req/",
"@RUBY@",
"@prefix@/lib/cloudi-@VERSION@/tests/http_req/http_req.rb",
[{"RUBYLIB", "@prefix@/lib/cloudi-@VERSION@/api/ruby/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{nice, 10}]},
{internal,
"/tests/http_req/",
cloudi_service_test_http_req,
[],
none,
limit_max, limit_max, limit_max, % test limits
undefined, undefined, 1.0, 5, 300,
[{timeout_terminate, limit_max},
{request_timeout_adjustment, true},
{hibernate,
[{rate_request_min, 0.9}]},
{count_process_dynamic,
[{rate_request_max, 1.1},
{rate_request_min, 0.9},
{count_max, 2.0},
{count_min, 0.25}]}]},
{internal,
"/tests/http_req/",
cloudi_service_test_http_req,
[],
none,
limit_min, limit_min, limit_min, % test limits
undefined, undefined, 1.0, 5, 300,
[{timeout_terminate, limit_min},
{request_timeout_adjustment, true},
{hibernate,
[{rate_request_min, 0.9}]},
{count_process_dynamic,
[{rate_request_max, 1.1},
{rate_request_min, 0.9},
{count_max, 2.0},
{count_min, 0.25}]}]},
@CONFIG_TESTS_GO_NULL@
@CONFIG_TESTS_HASKELL_NULL@
@CONFIG_TESTS_OCAML_NULL@
{external,
"/tests/null/response/",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null_c", "",
[{"LD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"},
{"DYLD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_min},
{nice, 10}]},
{external,
"/tests/null/response/",
"@JAVA@",
% enable assertions
"-ea:org.cloudi... "
"-jar @prefix@/lib/cloudi-@VERSION@/tests/null/java/null_.jar",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_min},
{nice, 10}]},
{external,
"/tests/null/response/",
"@NODE@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null.js",
[{"NODE_PATH", "@prefix@/lib/cloudi-@VERSION@/api/javascript/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_min},
{nice, 10}]},
{external,
"/tests/null/response/",
"@PERL@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null.pl",
[{"PERL5LIB", "@prefix@/lib/cloudi-@VERSION@/api/perl/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_min},
{nice, 10}]},
{external,
"/tests/null/response/",
"@PHP@",
"-d include_path='@prefix@/lib/cloudi-@VERSION@/api/php/' "
"-f @prefix@/lib/cloudi-@VERSION@/tests/null/null.php",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_min},
{nice, 10}]},
{external,
"/tests/null/response/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_min},
{nice, 10}]},
{external,
"/tests/null/response/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null_c.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_min},
{nice, 10}]},
{external,
"/tests/null/response/",
"@RUBY@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null.rb",
[{"RUBYLIB", "@prefix@/lib/cloudi-@VERSION@/api/ruby/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_min},
{nice, 10}]},
{internal,
"/tests/null/response/",
cloudi_service_test_null,
[],
none, 5000, 5000, 5000, undefined, undefined, 1, 5, 300,
[{response_timeout_immediate_max, limit_min}]},
{external,
"/tests/null/timeout/",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null_c", "",
[{"LD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"},
{"DYLD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_max},
{nice, 10}]},
{external,
"/tests/null/timeout/",
"@JAVA@",
% enable assertions
"-ea:org.cloudi... "
"-jar @prefix@/lib/cloudi-@VERSION@/tests/null/java/null_.jar",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_max},
{nice, 10}]},
{external,
"/tests/null/timeout/",
"@NODE@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null.js",
[{"NODE_PATH", "@prefix@/lib/cloudi-@VERSION@/api/javascript/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_max},
{nice, 10}]},
{external,
"/tests/null/timeout/",
"@PERL@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null.pl",
[{"PERL5LIB", "@prefix@/lib/cloudi-@VERSION@/api/perl/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_max},
{nice, 10}]},
{external,
"/tests/null/timeout/",
"@PHP@",
"-d include_path='@prefix@/lib/cloudi-@VERSION@/api/php/' "
"-f @prefix@/lib/cloudi-@VERSION@/tests/null/null.php",
[],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_max},
{nice, 10}]},
{external,
"/tests/null/timeout/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_max},
{nice, 10}]},
{external,
"/tests/null/timeout/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null_c.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_max},
{nice, 10}]},
{external,
"/tests/null/timeout/",
"@RUBY@",
"@prefix@/lib/cloudi-@VERSION@/tests/null/null.rb",
[{"RUBYLIB", "@prefix@/lib/cloudi-@VERSION@/api/ruby/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{response_timeout_immediate_max, limit_max},
{nice, 10}]},
{internal,
"/tests/null/timeout/",
cloudi_service_test_null,
[],
none, 5000, 5000, 5000, undefined, undefined, 1, 5, 300,
[{response_timeout_immediate_max, limit_max}]},
{internal,
"/tests/",
cloudi_service_router,
[{destinations,
[{"http_req/any.xml/get",
[{mode, round_robin},
{service_names,
["http_req/c.xml/get",
"http_req/java.xml/get",
"http_req/perl.xml/get",
"http_req/php.xml/get",
"http_req/python.xml/get",
"http_req/python_c.xml/get",
"http_req/ruby.xml/get"]}]},
{"null/response/any/get",
[{mode, round_robin},
{service_names,
["null/response/c/get",
"null/response/java/get",
"null/response/perl/get",
"null/response/php/get",
"null/response/python/get",
"null/response/python_c/get",
"null/response/ruby/get"]}]},
{"null/timeout/any/get",
[{mode, round_robin},
{service_names,
["null/timeout/c/get",
"null/timeout/java/get",
"null/timeout/perl/get",
"null/timeout/php/get",
"null/timeout/python/get",
"null/timeout/python_c/get",
"null/timeout/ruby/get"]}]}]}],
immediate_closest,
5000, 5000, 5000, [api], undefined, 1, 5, 300,
[{request_name_lookup, async}]},
% normal echo in python
{external,
"/tests/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/echo/echo.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
[{nice, 15}]},
% unstable 50% chance (coin toss) echo in python
{external,
"/tests/coin/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/echo/echo.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
none, default, default,
5000, 5000, 5000, undefined, undefined, 1, 1, 5, 300,
% give this service instance a 50% of failure on a service request
[{monkey_chaos, [{probability_request, 0.5}]},
{nice, 15}]},
{internal,
"/tests/http_req/",
cloudi_service_filesystem,
[{directory, "@prefix@/lib/cloudi-@VERSION@/tests/http_req/public_html/"},
{write_append, ["/tests/http_req/hexpi.txt"]},
{refresh, 5}, % seconds
{cache, 300}, % seconds
{notify_one, [{"/tests/http_req/index.html/get", "/tests/echo/put"}]}
],
immediate_closest,
5000, 5000, 5000, undefined, undefined, 1, 5, 300, []},
%{internal,
% "/db/pgsql/",
% cloudi_service_db_pgsql,
% [{hostname, "127.0.0.1"},
% {username, "cloudi_tests"},
% {password, "cloudi_tests"},
% {port, 5432},
% {database, "cloudi_tests"}],
% none,
% 5000, 5000, 5000, undefined, undefined, 1, 5, 300, []},
% the service below manages the Hexidecimal PI test
[{prefix, "/tests/"},
{module, cloudi_service_map_reduce},
{args, [{map_reduce, cloudi_service_test_hexpi}, % map-reduce module
{map_reduce_args, [1, 65536]}, % index start, index end
{concurrency, 1.5}]},
{timeout_init, 20000},
{dest_list_deny, [api]},
{options, [{request_timeout_adjustment, true}]}],
{external,
"/tests/websockets/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/websockets/websockets.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
immediate_local, default, default,
5000, 5000, 5000, [api], undefined, 1, 4, 5, 300,
[{nice, 15}]},
{external,
"/tests/environment/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/environment/environment.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"},
{"USER", "${USER}"},
{"$USER", "user"},
{"${USER}_$USER", "user_user"},
{"$USER${USER}", "useruser"},
{"${USER}123$USER", "user123user"},
{"USER_D", "user_\\$"}, % \\ is needed to escape $
{"USER_", "user_$"}], % "$" is ignored
immediate_local, default, default,
5000, 5000, 5000, [api], undefined, 1, 1, 5, 300,
[{nice, 15}]},
% msg_size tests can not use the udp protocol with the default buffer size
@CONFIG_TESTS_GO_MSG_SIZE@
@CONFIG_TESTS_HASKELL_MSG_SIZE@
@CONFIG_TESTS_OCAML_MSG_SIZE@
{internal,
"/tests/msg_size/",
cloudi_service_test_msg_size,
[],
immediate_closest,
5000, 5000, 5000, [api], undefined, 2, 5, 300,
[{request_timeout_adjustment, true},
{duo_mode, true},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{restart_delay, []},
{scope, cloudi_service_test_msg_size}]},
{external,
"/tests/msg_size/",
"@prefix@/lib/cloudi-@VERSION@/tests/msg_size/msg_size_cxx",
"",
[{"LD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"},
{"DYLD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"}],
immediate_closest, default, default,
5000, 5000, 5000, [api], undefined, 2, 1, 5, 300,
[{request_timeout_adjustment, true},
{aspects_init_after,
[{cloudi_service_test_msg_size, aspect_init}]},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{scope, cloudi_service_test_msg_size},
{nice, 15}]},
{external,
"/tests/msg_size/",
"@JAVA@",
% enable assertions
"-ea:org.cloudi... "
"-jar @prefix@/lib/cloudi-@VERSION@/tests/msg_size/java/msg_size.jar",
[],
immediate_closest, default, default,
5000, 5000, 5000, [api], undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{aspects_init_after,
[{cloudi_service_test_msg_size, aspect_init}]},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{scope, cloudi_service_test_msg_size},
{nice, 15}]},
{external,
"/tests/msg_size/",
"@NODE@",
"@prefix@/lib/cloudi-@VERSION@/tests/msg_size/msg_size.js",
[{"NODE_PATH", "@prefix@/lib/cloudi-@VERSION@/api/javascript/"}],
immediate_closest, default, default,
5000, 5000, 5000, [api], undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{aspects_init_after,
[{cloudi_service_test_msg_size, aspect_init}]},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{scope, cloudi_service_test_msg_size},
{nice, 15}]},
{external,
"/tests/msg_size/",
"@PERL@",
"@prefix@/lib/cloudi-@VERSION@/tests/msg_size/msg_size.pl",
[{"PERL5LIB", "@prefix@/lib/cloudi-@VERSION@/api/perl/"}],
immediate_closest, default, default,
5000, 5000, 5000, [api], undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{aspects_init_after,
[{cloudi_service_test_msg_size, aspect_init}]},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{scope, cloudi_service_test_msg_size},
{nice, 15}]},
{external,
"/tests/msg_size/",
"@PHP@",
"-d include_path='@prefix@/lib/cloudi-@VERSION@/api/php/' "
"-f @prefix@/lib/cloudi-@VERSION@/tests/msg_size/msg_size.php",
[],
immediate_closest, default, default,
5000, 5000, 5000, [api], undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{aspects_init_after,
[{cloudi_service_test_msg_size, aspect_init}]},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{scope, cloudi_service_test_msg_size},
{nice, 15}]},
{external,
"/tests/msg_size/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/msg_size/msg_size.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
immediate_closest, default, default,
5000, 5000, 5000, [api], undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{aspects_init_after,
[{cloudi_service_test_msg_size, aspect_init}]},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{scope, cloudi_service_test_msg_size},
{nice, 15}]},
{external,
"/tests/msg_size/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/msg_size/msg_size_c.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
immediate_closest, default, default,
5000, 5000, 5000, [api], undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{aspects_init_after,
[{cloudi_service_test_msg_size, aspect_init}]},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{scope, cloudi_service_test_msg_size},
{nice, 15}]},
{external,
"/tests/msg_size/",
"@RUBY@",
"@prefix@/lib/cloudi-@VERSION@/tests/msg_size/msg_size.rb",
[{"RUBYLIB", "@prefix@/lib/cloudi-@VERSION@/api/ruby/"}],
immediate_closest, default, default,
5000, 5000, 5000, [api], undefined, 1, 1, 5, 300,
[{request_timeout_adjustment, true},
{aspects_init_after,
[{cloudi_service_test_msg_size, aspect_init}]},
{aspects_request_before,
[{cloudi_service_test_msg_size, aspect_request}]},
{aspects_terminate_before,
[{cloudi_service_test_msg_size, aspect_terminate}]},
{scope, cloudi_service_test_msg_size},
{nice, 15}]},
@CONFIG_TESTS_GO_MESSAGING@
@CONFIG_TESTS_HASKELL_MESSAGING@
@CONFIG_TESTS_OCAML_MESSAGING@
{external,
"/tests/messaging/perl/",
"@PERL@",
"@prefix@/lib/cloudi-@VERSION@/tests/messaging/MessagingTask.pm",
[{"PERL5LIB", "@prefix@/lib/cloudi-@VERSION@/api/perl/"}],
immediate_local, default, default,
5000, 10000, 10000, [api], undefined, 1, 4, 5, 300,
[{scope, cloudi_service_test_messaging_perl},
{nice, 15}]},
{external,
"/tests/messaging/javascript/",
"@NODE@",
"@prefix@/lib/cloudi-@VERSION@/tests/messaging/messaging.js",
[{"NODE_PATH", "@prefix@/lib/cloudi-@VERSION@/api/javascript/"}],
immediate_local, default, default,
5000, 10000, 10000, [api], undefined, 4, 1, 5, 300,
[{scope, cloudi_service_test_messaging_javascript},
{nice, 15}]},
{external,
"/tests/messaging/php/",
"@PHP@",
"-d include_path='@prefix@/lib/cloudi-@VERSION@/api/php/' "
"-f @prefix@/lib/cloudi-@VERSION@/tests/messaging/messaging.php",
[],
immediate_local, default, default,
5000, 10000, 10000, [api], undefined, 4, 1, 5, 300,
[{scope, cloudi_service_test_messaging_php},
{nice, 15}]},
{external,
"/tests/messaging/python/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/messaging/messaging.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
immediate_local, default, default,
5000, 10000, 10000, [api], undefined, 1, 4, 5, 300,
[{scope, cloudi_service_test_messaging_python},
{nice, 15}]},
{external,
"/tests/messaging/python_c/",
"@PYTHON@",
"@prefix@/lib/cloudi-@VERSION@/tests/messaging/messaging_c.py",
[{"PYTHONPATH", "@prefix@/lib/cloudi-@VERSION@/api/python/"}],
immediate_local, default, default,
5000, 10000, 10000, [api], undefined, 1, 4, 5, 300,
[{scope, cloudi_service_test_messaging_python_c},
{nice, 15}]},
{external,
"/tests/messaging/ruby/",
"@RUBY@",
"@prefix@/lib/cloudi-@VERSION@/tests/messaging/messaging.rb",
[{"RUBYLIB", "@prefix@/lib/cloudi-@VERSION@/api/ruby/"}],
immediate_local, default, default,
5000, 10000, 10000, [api], undefined, 1, 4, 5, 300,
[{scope, cloudi_service_test_messaging_ruby},
{nice, 15}]},
{external,
"/tests/messaging/cxx/",
"@prefix@/lib/cloudi-@VERSION@/tests/messaging/messaging_cxx",
"",
[{"LD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"},
{"DYLD_LIBRARY_PATH", "@prefix@/lib/cloudi-@VERSION@/api/c/"}],
immediate_local, default, default,
5000, 10000, 10000, [api], undefined, 1, 4, 5, 300,
[{scope, cloudi_service_test_messaging_cxx},
{nice, 15}]},
{external,
"/tests/messaging/java/",
"@JAVA@",
% based on http://www.infoq.com/articles/benchmarking-jvm
"-Xbatch -server -Xmx1G -Xms1G "
% enable assertions
"-ea:org.cloudi... "
"-jar @prefix@/lib/cloudi-@VERSION@/tests/messaging/java/messaging.jar",
[],
immediate_local, default, default,
5000, 10000, 10000, [api], undefined, 1, 4, 5, 300,
[{scope, cloudi_service_test_messaging_java},
{nice, 15}]},
{internal,
"/tests/messaging/erlang/variation0/",
cloudi_service_test_messaging_sequence1,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, false},
{request_pid_uses, 1000},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation0}]},
{internal,
"/tests/messaging/erlang/variation0/",
cloudi_service_test_messaging_sequence2,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, false},
{request_pid_uses, 1000},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation0}]},
{internal,
"/tests/messaging/erlang/variation0/",
cloudi_service_test_messaging_sequence3,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, false},
{request_pid_uses, 1000},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation0}]},
{internal,
"/tests/messaging/erlang/variation0/",
cloudi_service_test_messaging_sequence4,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, false},
{request_pid_uses, 1000},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation0}]},
{internal,
"/tests/messaging/erlang/variation1/",
cloudi_service_test_messaging_sequence1,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, true},
{request_pid_uses, 1000},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation1}]},
{internal,
"/tests/messaging/erlang/variation1/",
cloudi_service_test_messaging_sequence2,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, true},
{request_pid_uses, 1000},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation1}]},
{internal,
"/tests/messaging/erlang/variation1/",
cloudi_service_test_messaging_sequence3,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, true},
{request_pid_uses, 1000},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation1}]},
{internal,
"/tests/messaging/erlang/variation1/",
cloudi_service_test_messaging_sequence4,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, true},
{request_pid_uses, 1000},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation1}]},
{internal,
"/tests/messaging/erlang/variation2/",
cloudi_service_test_messaging_sequence1,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, true},
{request_pid_uses, 4},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation2}]},
{internal,
"/tests/messaging/erlang/variation2/",
cloudi_service_test_messaging_sequence2,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, true},
{request_pid_uses, 4},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation2}]},
{internal,
"/tests/messaging/erlang/variation2/",
cloudi_service_test_messaging_sequence3,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, true},
{request_pid_uses, 4},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation2}]},
{internal,
"/tests/messaging/erlang/variation2/",
cloudi_service_test_messaging_sequence4,
[],
immediate_local,
5000, 10000, 10000, [api], undefined, 4, 5, 300,
[{application_name, cloudi_service_test_messaging_sequence},
{duo_mode, true},
{hibernate, true},
{request_pid_uses, 4},
{reload, true},
{timeout_terminate, 10},
{scope, cloudi_service_test_messaging_erlang_variation2}]}
]}.
% automatic node detection with a UDP multicast group
{nodes, automatic}.
% is equivalent to:
%{nodes, [{discovery, [{multicast, []}]}]}.
% manually specified node names
%{nodes, ['cloudi@host1', 'cloudi@host2']}.
% is equivalent to:
%{nodes, [{nodes, ['cloudi@host1', 'cloudi@host2']}]}.
% (see https://cloudi.org/api.html#2_nodes_set for all the options)
{logging, [
%{file, "path/to/logfile"},
%{level, trace}, % levels: off, fatal, error, warn, info, debug, trace
%{syslog,
% [{identity, "CloudI"},
% {facility, local0},
% {level, trace}]}, % CloudI log levels are mapped to syslog levels
%{formatters,
% [{any,
% [{formatter, cloudi_core_i_logger},
% {formatter_config,
% [{mode, legacy}]}]},
% {['STDOUT'],
% [{formatter, cloudi_core_i_logger},
% {formatter_config,
% [{mode, legacy_stdout}]}]},
% {['STDERR'],
% [{formatter, cloudi_core_i_logger},
% {formatter_config,
% [{mode, legacy_stderr}]}]}]},
%{redirect, undefined}
{log_time_offset, info}
]}.