-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.html
371 lines (343 loc) · 13.1 KB
/
config.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<!DOCTYPE html>
<html lang="en">
<head>
<title>CloudI: A Cloud at the lowest level - Current Configuration</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="Cloud Framework for fault-tolerant distributed processing with dynamic load balancing" name="description" />
<meta content="cloud, private cloud, framework, erlang, distributed, fault tolerant, distributed systems, embarrassingly parallel, divide and conquer, cloudi" name="keywords" />
<meta content="global" name="distribution" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="shortcut icon" href="images/cloud.ico" type="image/x-icon" />
<!-- Open Graph Protocol (OGP) with LinkedIn requirements -->
<meta property="og:title" content="CloudI: A Cloud at the lowest level - Current Configuration" />
<meta property="og:description" content="CloudI is an open-source private cloud computing framework for efficient, secure, and internal data processing. CloudI provides scaling for previously unscalable source code with efficient fault-tolerant execution of ATS, C/C++, Erlang/Elixir, Go, Haskell, Java, JavaScript/node.js, OCaml, Perl, PHP, Python, Ruby, or Rust services.
The bare essentials for efficient fault-tolerant processing on a cloud!" />
<meta property="og:image" content="https://cloudi.org/images/cloud_ogp.png" />
<meta property="og:url" content="https://cloudi.org/config.html" />
<meta property="og:type" content="website" />
</head>
<body onload="loadCurrent()">
<div id="header">
<a href="index.html">
Cloud<span style="font-family:serif">I</span><img alt="Active Cloud" width="156" height="106" src="images/cloud.png" />
</a>
</div>
<br />
<div id="navigation">
<ul>
<li><a href="api.html">API</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="tutorials.html">Tutorials</a>
(<a href="tutorial_java.html">Java</a>)</li>
<li><a href="download" rel="noopener" target="_blank">Download</a></li>
<li><a href="https://github.com/CloudI/CloudI/tree/develop#readme">Source</a></li>
<li><a href="support.html">Support</a></li>
</ul>
</div>
<div id="content">
<h1>Current Configuration</h1>
<h4><a href="api.html#2_code_status">code_status</a></h4>
<pre id="code_status" class="dynamic">
</pre>
<h4><a href="api.html#2_services_status">services_status</a></h4>
<pre id="services_status" class="dynamic">
</pre>
<h4><a href="api.html#2_nodes_status">nodes_status</a></h4>
<pre id="nodes_status" class="dynamic">
</pre>
<h4><a href="api.html#2_logging_status">logging_status</a></h4>
<pre id="logging_status" class="dynamic">
</pre>
<h4><a href="https://github.com/CloudI/CloudI/blob/master/src/lib/cloudi_service_health_check/src/cloudi_service_health_check.erl">cloudi_service_health_check</a></h4>
<pre id="service_health_check" class="dynamic">
</pre>
<h4>cloudi.conf file</h4>
<p>https://cloudi.org (and <a href="https://ndforge.com" target="_blank">https://ndforge.com</a>) Configuration
</p>
<pre>
%-*-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, [
{api,
["/cloudi/api/*"]},
{api_read_only,
["/cloudi/api/rpc/services_status.json/post",
"/cloudi/api/rpc/nodes_status.json/post",
"/cloudi/api/rpc/logging_status.json/get",
"/cloudi/api/rpc/code_status.json/get",
"/health_check/cloudi/hosts.json/get",
"/health_check/cloudi/hosts.erl"]},
{files,
["/ndforge.com/*",
"/cloudi.org/*",
"/loadbalancer_health_check/*"]}
]}.
{services, [
% CloudI Service API interface
{internal,
"/cloudi/api/",
cloudi_service_api_requests,
[],
none,
{5, seconds}, {5, seconds}, {5, seconds},
undefined, undefined, 1, 5, {5, minutes},
[{response_timeout_immediate_max, limit_min}]},
% ndforge.com files
{internal,
"/ndforge.com/",
cloudi_service_filesystem,
[{directory, "${HOME}/www/ndforge.com/"},
{replace, lfuda_gdsf}, % LFUDA GreedyDual-Size with Frequency (GDSF)
{files_size, 16384}, % KiB per process
{refresh, 900}, % 15 minutes
{cache, refresh}], % 7.5 minutes
none,
{1, minute}, {5, seconds}, {5, seconds},
undefined, undefined, 4, 5, {5, minutes},
[{info_pid_uses, 1}]},
% cloudi.org files
{internal,
"/cloudi.org/",
cloudi_service_filesystem,
[{directory, "${HOME}/www/cloudi.org/"},
{replace, lfuda_gdsf}, % LFUDA GreedyDual-Size with Frequency (GDSF)
{files_size, 16384}, % KiB per process
{refresh, 900}, % 15 minutes
{cache, refresh}], % 7.5 minutes
none,
{20, minutes}, {5, seconds}, {5, seconds},
undefined, undefined, 4, 5, {5, minutes},
[{info_pid_uses, 1}]},
% ec2 load-balancer health check
{internal,
"/loadbalancer_health_check/",
cloudi_service_filesystem,
[{directory, "${HOME}/www/private/"}],
none,
{5, seconds}, {5, seconds}, {5, seconds},
undefined, undefined, 1, 5, {5, minutes},
[{info_pid_uses, 1}]},
% CloudI health check requests
{internal,
"/health_check/cloudi/",
cloudi_service_health_check,
[{hosts,
[{"$CLOUDI_HOST1",
[{port, 8000}]},
{"$CLOUDI_HOST2",
[{port, 8000}]},
{"$CLOUDI_HOST3",
[{port, 8000}]},
{"$CLOUDI_HOST4",
[{port, 8000}]},
{"$LOAD_BALANCER1",
[{port, 80}]},
{"$LOAD_BALANCER2",
[{port, 80}]},
{"sourceforge.net",
[{ipv6, false},
{port, 443},
{interval, 30},
{tcp_test,
{{cloudi_service_health_check, tcp_test_https,
[get, "/projects/cloudi/files/2.0.7/cloudi-2.0.7.tar.gz/download",
302]}}}
]},
{"archive.org",
[{ipv6, false},
{port, 443},
{interval, 30},
{tcp_test,
{{cloudi_service_health_check, tcp_test_https,
[get, "/download/cloudi-2.0.7/cloudi-2.0.7.tar.gz",
302]}}}
]},
{"github.com",
[{ipv6, false},
{port, 443}]}
]}],
lazy_local,
{5, seconds}, {5, seconds}, {5, seconds},
undefined, undefined, 9, 5, {5, minutes},
[{info_pid_uses, 1},
{hibernate, true},
{restart_all, true}]},
% HTTP traffic
{internal,
"*",
cloudi_service_null,
[],
none,
{5, seconds}, {5, seconds}, {5, seconds},
undefined, undefined, 1, 5, {5, minutes},
[{response_timeout_immediate_max, limit_min}]},
{internal,
"?/",
cloudi_service_router,
[{add_prefix, false},
{parameters_strict_matching_default, false},
{http_redirect_health, "/health_check/cloudi/"},
{http_redirect_health_refresh, 60}, % 30 seconds * 2
{destinations,
[{"www.ndforge.com/*",
[{parameters_selected, [2]},
{service_names,
["/ndforge.com/*"]}]},
{"ndforge.com/*",
[{parameters_selected, [2]},
{service_names,
["/ndforge.com/*"]}]},
{"www.cloudi.org/*",
[{parameters_selected, [2]},
{service_names,
["/cloudi.org/*"]}]},
{"cloudi.org/download/get",
[{http_redirect, "https://sourceforge.net/projects/cloudi/files/2.0.7/cloudi-2.0.7.tar.gz/download"},
{http_redirect_secondaries,
["https://archive.org/download/cloudi-2.0.7/cloudi-2.0.7.tar.gz"]}]},
{"cloudi.org/download/cloudi-2.0.7.tar.?/get",
[{parameters_selected, [2]},
{http_redirect, "https://sourceforge.net/projects/cloudi/files/2.0.7/cloudi-2.0.7.tar.*/download"},
{http_redirect_secondaries,
["https://archive.org/download/cloudi-2.0.7/cloudi-2.0.7.tar.*"]}]},
{"cloudi.org/download/cloudi-*.tar.?/get",
[{parameters_selected, [2, 2, 3]},
{http_redirect, "https://sourceforge.net/projects/cloudi/files/*/cloudi-*.tar.*/download"}]},
{"cloudi.org/download/live_cd/?/?/get",
[{parameters_selected, [2, 3]},
{http_redirect, "https://sourceforge.net/projects/cloudi/files/live_cd/*/*/download"}]},
{"cloudi.org/download/cloudi_tutorial_java/?/?/get",
[{parameters_selected, [2, 3]},
{http_redirect, "https://sourceforge.net/projects/cloudi/files/cloudi_tutorial_java/*/*/download"}]},
{"cloudi.org/services_status.json/post",
[{service_names,
["/cloudi/api/rpc/services_status.json/post"]}]},
{"cloudi.org/nodes_status.json/post",
[{service_names,
["/cloudi/api/rpc/nodes_status.json/post"]}]},
{"cloudi.org/logging_status.json/get",
[{service_names,
["/cloudi/api/rpc/logging_status.json/get"]}]},
{"cloudi.org/code_status.json/get",
[{service_names,
["/cloudi/api/rpc/code_status.json/get"]}]},
{"cloudi.org/health_check/hosts.json/get",
[{service_names,
["/health_check/cloudi/hosts.json/get"]}]},
{"cloudi.org/*",
[{parameters_selected, [2]},
{service_names,
["/cloudi.org/*"]}]},
{"?/loadbalancer_health_check/index.html/get",
[{parameters_strict_matching, false},
{service_names,
["/loadbalancer_health_check/index.html/get"]}]}
]}],
lazy_closest,
{5, seconds}, {5, seconds}, {5, seconds},
undefined, [files, api_read_only], 8, 5, {5, minutes},
[{duo_mode, true},
{dest_refresh_start, {3, seconds}}]},
{internal,
"/",
cloudi_service_http_cowboy,
[{use_client_ip_prefix, true},
{use_host_prefix, true},
{content_security_policy,
"default-src 'self'; "
"script-src 'unsafe-inline' 'self'; "
"style-src 'unsafe-inline' 'self'; "
"object-src 'none'; "
"worker-src 'none'"},
{set_x_content_type_options, true},
{set_x_xss_protection, true},
{ip, {0, 0, 0, 0}}, {port, 8000}, {output, binary}],
lazy_closest,
{5, seconds}, {5, seconds}, {5, seconds},
[api], undefined, 2, 5, {5, minutes},
[{info_pid_uses, 1}]}
]}.
{nodes, [
{discovery,
[{ec2,
[{access_key_id, "${AWS_ACCESS_KEY_ID}"},
{secret_access_key, "${AWS_SECRET_ACCESS_KEY}"},
{host, "ec2.${AWS_DEFAULT_REGION}.amazonaws.com"},
{groups, ["ipv6-www"]}]}]}
]}.
{logging, [
{level, debug}, % levels: off, fatal, error, warn, info, debug, trace
{log_time_offset, info},
% For slower logging disk writes
{file_sync, {5, seconds}}
]}.
</pre>
</div>
<br />
<br />
<br />
<br />
<br />
<div id="footer">
<img alt="Powered By CloudI Active Cloud" style="position: absolute; right: 10px; bottom: 0;" src="images/powered_by_cloudi.png" />
</div>
<script>
// common javascript example http request function
function httpRequest(method, url) {
// function createCORSRequest(method, url) source code
// commonly used in javascript examples
var xhr = new XMLHttpRequest();
if ('withCredentials' in xhr) {
// Check if the XMLHttpRequest object
// has a "withCredentials" property.
// "withCredentials" only exists on XMLHTTPRequest2 objects.
xhr.open(method, url, true);
} else if (typeof XDomainRequest !== 'undefined') {
// Otherwise, check if XDomainRequest.
// XDomainRequest only exists in IE, and is IE's way of
// making CORS requests.
xhr = new XDomainRequest();
xhr.open(method, url);
} else {
// Otherwise, CORS is not supported by the browser.
xhr = null;
// throw an error if the browser is not supported
throw new Error('createCORSRequest failed!');
}
return xhr;
}
function loadCurrent() {
var code_status_request = httpRequest('GET','code_status.json');
code_status_request.onload = function () {
document.getElementById('code_status').innerHTML =
code_status_request.responseText;
};
code_status_request.send('');
var services_status_request = httpRequest('POST','services_status.json');
services_status_request.onload = function () {
document.getElementById('services_status').innerHTML =
services_status_request.responseText;
};
services_status_request.send('[]');
var nodes_status_request = httpRequest('POST','nodes_status.json');
nodes_status_request.onload = function () {
document.getElementById('nodes_status').innerHTML =
nodes_status_request.responseText;
};
nodes_status_request.send('[]');
var logging_status_request = httpRequest('GET','logging_status.json');
logging_status_request.onload = function () {
document.getElementById('logging_status').innerHTML =
logging_status_request.responseText;
};
logging_status_request.send('');
var service_health_check_request = httpRequest('GET','health_check/hosts.json');
service_health_check_request.onload = function () {
document.getElementById('service_health_check').innerHTML =
service_health_check_request.responseText;
};
service_health_check_request.send('');
}
</script>
</body>
</html>