wf_node_api 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +22 -18
- data/Gemfile.lock +3 -3
- data/LICENSE +19 -340
- data/Vagrantfile +28 -23
- data/_docs/api/Api.html +22 -18
- data/_docs/api/Api/NodeApi.html +1 -1
- data/_docs/api/ConfigCheck.html +34 -30
- data/_docs/api/ContainerManager.html +176 -77
- data/_docs/api/ContainerManagerAdapter.html +22 -18
- data/_docs/api/ContainerManagerAdapter/Lxc.html +169 -58
- data/_docs/api/ContainerManagerAdapter/Vserver.html +169 -58
- data/_docs/api/NotFoundError.html +22 -18
- data/_docs/api/OS.html +26 -22
- data/_docs/api/ResourceManager.html +11 -11
- data/_docs/api/ResourceManagerAdapter.html +22 -18
- data/_docs/api/ResourceManagerAdapter/Linux.html +13 -13
- data/_docs/api/WfNodeApi.html +23 -19
- data/_docs/api/_index.html +1 -1
- data/_docs/api/file.README.html +96 -66
- data/_docs/api/index.html +96 -66
- data/_docs/api/method_list.html +60 -42
- data/_docs/api/top-level-namespace.html +7 -7
- data/_docs/rest/api_data.js +934 -1
- data/_docs/rest/api_data.json +934 -1
- data/_docs/rest/api_project.js +31 -1
- data/_docs/rest/api_project.json +31 -1
- data/bin/wf_node_api +25 -21
- data/lib/wf_node_api.rb +25 -21
- data/lib/wf_node_api/api/node_api.rb +36 -27
- data/lib/wf_node_api/config/config_template.erb +36 -4
- data/lib/wf_node_api/config_check.rb +25 -21
- data/lib/wf_node_api/container_manager.rb +34 -22
- data/lib/wf_node_api/container_manager_adapter/lxc.rb +43 -25
- data/lib/wf_node_api/container_manager_adapter/vserver.rb +45 -27
- data/lib/wf_node_api/error/not_found.rb +22 -18
- data/lib/wf_node_api/os.rb +22 -18
- data/lib/wf_node_api/resource_manager.rb +24 -20
- data/lib/wf_node_api/resource_manager_adapter/linux.rb +25 -21
- data/lib/wf_node_api/translations.rb +22 -18
- data/lib/wf_node_api/version.rb +22 -18
- data/wf-node-api.gemspec +26 -22
- metadata +4 -3
data/_docs/api/OS.html
CHANGED
@@ -88,29 +88,33 @@
|
|
88
88
|
<div class="discussion">
|
89
89
|
|
90
90
|
<p>__ <em>_</em> _ _ <em>_</em> <em>__</em> __
|
91
|
-
__
|
92
|
-
<em>_</em> / <em>_</em>| / |</p>
|
91
|
+
__</p>
|
93
92
|
|
94
|
-
<pre class="code ruby"><code class="ruby">\ \
|
95
|
-
\
|
96
|
-
\
|
93
|
+
<pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
|
94
|
+
\ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
|
95
|
+
\ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
|
96
|
+
\_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
|
97
97
|
Container Manager</code></pre>
|
98
98
|
|
99
|
-
<p>Copyright
|
99
|
+
<p>Copyright © 2015 David Prandzioch <kontakt@davidprandzioch.de></p>
|
100
100
|
|
101
|
-
<p>
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
102
|
+
copy of this software and associated documentation files (the “Software”),
|
103
|
+
to deal in the Software without restriction, including without limitation
|
104
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
105
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
106
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
105
107
|
|
106
|
-
<p>
|
107
|
-
|
108
|
-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
109
|
-
more details.</p>
|
108
|
+
<p>The above copyright notice and this permission notice shall be included in
|
109
|
+
all copies or substantial portions of the Software.</p>
|
110
110
|
|
111
|
-
<p>
|
112
|
-
|
113
|
-
|
111
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
112
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
113
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
114
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
115
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
116
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
117
|
+
DEALINGS IN THE SOFTWARE.</p>
|
114
118
|
|
115
119
|
|
116
120
|
</div>
|
@@ -205,12 +209,12 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
205
209
|
<pre class="lines">
|
206
210
|
|
207
211
|
|
208
|
-
|
209
|
-
|
210
|
-
|
212
|
+
33
|
213
|
+
34
|
214
|
+
35</pre>
|
211
215
|
</td>
|
212
216
|
<td>
|
213
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/os.rb', line
|
217
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/os.rb', line 33</span>
|
214
218
|
|
215
219
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_linux?'>linux?</span>
|
216
220
|
<span class='const'>RUBY_PLATFORM</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>linux</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
@@ -225,7 +229,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
225
229
|
</div>
|
226
230
|
|
227
231
|
<div id="footer">
|
228
|
-
Generated on
|
232
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
229
233
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
230
234
|
0.8.7.6 (ruby-2.0.0).
|
231
235
|
</div>
|
@@ -220,18 +220,18 @@
|
|
220
220
|
<pre class="lines">
|
221
221
|
|
222
222
|
|
223
|
-
32
|
224
|
-
33
|
225
|
-
34
|
226
|
-
35
|
227
223
|
36
|
228
224
|
37
|
229
225
|
38
|
230
226
|
39
|
231
|
-
40
|
227
|
+
40
|
228
|
+
41
|
229
|
+
42
|
230
|
+
43
|
231
|
+
44</pre>
|
232
232
|
</td>
|
233
233
|
<td>
|
234
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/resource_manager.rb', line
|
234
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/resource_manager.rb', line 36</span>
|
235
235
|
|
236
236
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
237
237
|
<span class='ivar'>@resman</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
@@ -293,12 +293,12 @@
|
|
293
293
|
<pre class="lines">
|
294
294
|
|
295
295
|
|
296
|
-
|
297
|
-
|
298
|
-
|
296
|
+
49
|
297
|
+
50
|
298
|
+
51</pre>
|
299
299
|
</td>
|
300
300
|
<td>
|
301
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/resource_manager.rb', line
|
301
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/resource_manager.rb', line 49</span>
|
302
302
|
|
303
303
|
<span class='kw'>def</span> <span class='id identifier rubyid_total_cpu_cores'>total_cpu_cores</span>
|
304
304
|
<span class='ivar'>@resman</span><span class='period'>.</span><span class='id identifier rubyid_total_cpu_cores'>total_cpu_cores</span>
|
@@ -313,7 +313,7 @@
|
|
313
313
|
</div>
|
314
314
|
|
315
315
|
<div id="footer">
|
316
|
-
Generated on
|
316
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
317
317
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
318
318
|
0.8.7.6 (ruby-2.0.0).
|
319
319
|
</div>
|
@@ -88,29 +88,33 @@
|
|
88
88
|
<div class="discussion">
|
89
89
|
|
90
90
|
<p>__ <em>_</em> _ _ <em>_</em> <em>__</em> __
|
91
|
-
__
|
92
|
-
<em>_</em> / <em>_</em>| / |</p>
|
91
|
+
__</p>
|
93
92
|
|
94
|
-
<pre class="code ruby"><code class="ruby">\ \
|
95
|
-
\
|
96
|
-
\
|
93
|
+
<pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
|
94
|
+
\ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
|
95
|
+
\ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
|
96
|
+
\_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
|
97
97
|
Container Manager</code></pre>
|
98
98
|
|
99
|
-
<p>Copyright
|
99
|
+
<p>Copyright © 2015 David Prandzioch <kontakt@davidprandzioch.de></p>
|
100
100
|
|
101
|
-
<p>
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
102
|
+
copy of this software and associated documentation files (the “Software”),
|
103
|
+
to deal in the Software without restriction, including without limitation
|
104
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
105
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
106
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
105
107
|
|
106
|
-
<p>
|
107
|
-
|
108
|
-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
109
|
-
more details.</p>
|
108
|
+
<p>The above copyright notice and this permission notice shall be included in
|
109
|
+
all copies or substantial portions of the Software.</p>
|
110
110
|
|
111
|
-
<p>
|
112
|
-
|
113
|
-
|
111
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
112
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
113
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
114
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
115
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
116
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
117
|
+
DEALINGS IN THE SOFTWARE.</p>
|
114
118
|
|
115
119
|
|
116
120
|
</div>
|
@@ -140,7 +144,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
140
144
|
</div>
|
141
145
|
|
142
146
|
<div id="footer">
|
143
|
-
Generated on
|
147
|
+
Generated on Sun Oct 25 20:54:54 2015 by
|
144
148
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
145
149
|
0.8.7.6 (ruby-2.0.0).
|
146
150
|
</div>
|
@@ -220,14 +220,14 @@
|
|
220
220
|
<pre class="lines">
|
221
221
|
|
222
222
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
223
|
+
37
|
224
|
+
38
|
225
|
+
39
|
226
|
+
40
|
227
|
+
41</pre>
|
228
228
|
</td>
|
229
229
|
<td>
|
230
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/resource_manager_adapter/linux.rb', line
|
230
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/resource_manager_adapter/linux.rb', line 37</span>
|
231
231
|
|
232
232
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
233
233
|
<span class='kw'>if</span> <span class='gvar'>$container_type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>LXC</span><span class='tstring_end'>'</span></span> <span class='op'>&&</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='gvar'>$lxc_cgroup_mount_path</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='kw'>false</span>
|
@@ -285,18 +285,18 @@
|
|
285
285
|
<pre class="lines">
|
286
286
|
|
287
287
|
|
288
|
-
42
|
289
|
-
43
|
290
|
-
44
|
291
|
-
45
|
292
288
|
46
|
293
289
|
47
|
294
290
|
48
|
295
291
|
49
|
296
|
-
50
|
292
|
+
50
|
293
|
+
51
|
294
|
+
52
|
295
|
+
53
|
296
|
+
54</pre>
|
297
297
|
</td>
|
298
298
|
<td>
|
299
|
-
<pre class="code"><span class="info file"># File 'lib/wf_node_api/resource_manager_adapter/linux.rb', line
|
299
|
+
<pre class="code"><span class="info file"># File 'lib/wf_node_api/resource_manager_adapter/linux.rb', line 46</span>
|
300
300
|
|
301
301
|
<span class='kw'>def</span> <span class='id identifier rubyid_total_cpu_cores'>total_cpu_cores</span>
|
302
302
|
<span class='id identifier rubyid_cpu_cores'>cpu_cores</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>nproc</span><span class='tstring_end'>`</span></span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
@@ -317,7 +317,7 @@
|
|
317
317
|
</div>
|
318
318
|
|
319
319
|
<div id="footer">
|
320
|
-
Generated on
|
320
|
+
Generated on Sun Oct 25 20:54:55 2015 by
|
321
321
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
322
322
|
0.8.7.6 (ruby-2.0.0).
|
323
323
|
</div>
|
data/_docs/api/WfNodeApi.html
CHANGED
@@ -90,29 +90,33 @@
|
|
90
90
|
<div class="discussion">
|
91
91
|
|
92
92
|
<p>__ <em>_</em> _ _ <em>_</em> <em>__</em> __
|
93
|
-
__
|
94
|
-
<em>_</em> / <em>_</em>| / |</p>
|
93
|
+
__</p>
|
95
94
|
|
96
|
-
<pre class="code ruby"><code class="ruby">\ \
|
97
|
-
\
|
98
|
-
\
|
95
|
+
<pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
|
96
|
+
\ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
|
97
|
+
\ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
|
98
|
+
\_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
|
99
99
|
Container Manager</code></pre>
|
100
100
|
|
101
|
-
<p>Copyright
|
101
|
+
<p>Copyright © 2015 David Prandzioch <kontakt@davidprandzioch.de></p>
|
102
102
|
|
103
|
-
<p>
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
104
|
+
copy of this software and associated documentation files (the “Software”),
|
105
|
+
to deal in the Software without restriction, including without limitation
|
106
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
107
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
108
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
107
109
|
|
108
|
-
<p>
|
109
|
-
|
110
|
-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
111
|
-
more details.</p>
|
110
|
+
<p>The above copyright notice and this permission notice shall be included in
|
111
|
+
all copies or substantial portions of the Software.</p>
|
112
112
|
|
113
|
-
<p>
|
114
|
-
|
115
|
-
|
113
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
114
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
115
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
116
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
117
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
118
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
119
|
+
DEALINGS IN THE SOFTWARE.</p>
|
116
120
|
|
117
121
|
|
118
122
|
</div>
|
@@ -138,7 +142,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
138
142
|
<dt id="VERSION-constant" class="">VERSION =
|
139
143
|
|
140
144
|
</dt>
|
141
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.
|
145
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.7.0</span><span class='tstring_end'>'</span></span></pre></dd>
|
142
146
|
|
143
147
|
</dl>
|
144
148
|
|
@@ -154,7 +158,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
|
|
154
158
|
</div>
|
155
159
|
|
156
160
|
<div id="footer">
|
157
|
-
Generated on
|
161
|
+
Generated on Sun Oct 25 20:54:53 2015 by
|
158
162
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
159
163
|
0.8.7.6 (ruby-2.0.0).
|
160
164
|
</div>
|
data/_docs/api/_index.html
CHANGED
@@ -230,7 +230,7 @@
|
|
230
230
|
</div>
|
231
231
|
|
232
232
|
<div id="footer">
|
233
|
-
Generated on
|
233
|
+
Generated on Sun Oct 25 20:54:53 2015 by
|
234
234
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
235
235
|
0.8.7.6 (ruby-2.0.0).
|
236
236
|
</div>
|
data/_docs/api/file.README.html
CHANGED
@@ -61,83 +61,113 @@
|
|
61
61
|
|
62
62
|
<iframe id="search_frame"></iframe>
|
63
63
|
|
64
|
-
<div id="content"><div id='filecontents'
|
65
|
-
|
66
|
-
|
67
|
-
\ \ /\ / /| '
|
68
|
-
\ V V / | | | | | || _
|
69
|
-
_
|
70
|
-
Container Manager</
|
71
|
-
|
72
|
-
<
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
64
|
+
<div id="content"><div id='filecontents'>
|
65
|
+
<pre class="code ruby"><code class="ruby">__ ___ _ _ _____ ____ __ __
|
66
|
+
\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
|
67
|
+
\ \ /\ / /| '_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
|
68
|
+
\ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
|
69
|
+
\_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
|
70
|
+
Container Manager</code></pre>
|
71
|
+
|
72
|
+
<p>!The application is not yet ready for production usage, use at your own
|
73
|
+
risk!</p>
|
74
|
+
|
75
|
+
<h1 id="label-WhiteFuse+CM+Node+API">WhiteFuse CM Node API</h1>
|
76
|
+
|
77
|
+
<p>WhiteFuse CM is a web-based management system for Linux/FreeBSD based
|
78
|
+
container virtualization. Currently support for LXC
|
79
|
+
and linux-vserver is
|
80
|
+
implemented. The node api is a service that runs on the virtualization
|
81
|
+
nodes. It exposes a RESTful
|
82
|
+
interface that the master can connect in order
|
83
|
+
to administrate the node and it's containers. The node api is packaged
|
84
|
+
in
|
77
85
|
a ruby gem called <code>wf_node_api</code> .</p>
|
78
86
|
|
79
|
-
<h2>Supported container systems</h2>
|
87
|
+
<h2 id="label-Supported+container+systems">Supported container systems</h2>
|
80
88
|
|
81
89
|
<p>Currently the api supports:</p>
|
82
|
-
|
83
|
-
<
|
84
|
-
|
85
|
-
<
|
86
|
-
</ul>
|
90
|
+
<ul><li>
|
91
|
+
<p>LXC</p>
|
92
|
+
</li><li>
|
93
|
+
<p>linux-vserver</p>
|
94
|
+
</li></ul>
|
87
95
|
|
88
96
|
<p>Future support is planned for:</p>
|
89
|
-
|
90
|
-
<
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
solutions, the development is
|
98
|
-
|
99
|
-
<ul>
|
100
|
-
<
|
101
|
-
|
102
|
-
</
|
103
|
-
|
104
|
-
|
97
|
+
<ul><li>
|
98
|
+
<p>FreeBSD jails through ezjail</p>
|
99
|
+
</li></ul>
|
100
|
+
|
101
|
+
<h2 id="label-Supported+operating+systems">Supported operating systems</h2>
|
102
|
+
|
103
|
+
<p>While the node api basically works on any Linux distribution that supports
|
104
|
+
one of the two implemented containerization
|
105
|
+
solutions, the development is
|
106
|
+
only being done on:</p>
|
107
|
+
<ul><li>
|
108
|
+
<p>CentOS 7 for LXC</p>
|
109
|
+
</li><li>
|
110
|
+
<p>CentOS 6 for linux-vserver</p>
|
111
|
+
</li></ul>
|
112
|
+
|
113
|
+
<p>The test/development environment already comes with a
|
114
|
+
<code>Vagrantfile</code> that creates and provisions virtual machines
|
115
|
+
for
|
105
116
|
both lxc and vserver.</p>
|
106
117
|
|
107
|
-
<h2>Setting up a development / testing environment</h2>
|
108
|
-
|
109
|
-
<p>Requirements: Mac OS X or Linux, VirtualBox, Vagrant, Subnet
|
110
|
-
|
111
|
-
|
112
|
-
<
|
113
|
-
<li>
|
114
|
-
<
|
115
|
-
|
116
|
-
<
|
117
|
-
|
118
|
-
</
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
<
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
<
|
127
|
-
<
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<p>
|
136
|
-
|
118
|
+
<h2 id="label-Setting+up+a+development+%2F+testing+environment">Setting up a development / testing environment</h2>
|
119
|
+
|
120
|
+
<p>Requirements: Mac OS X or Linux, VirtualBox, Vagrant, Subnet
|
121
|
+
192.168.41.0/24 not in use (otherwise you will have to
|
122
|
+
customize the
|
123
|
+
<code>Vagrantfile</code>)</p>
|
124
|
+
<ol><li>
|
125
|
+
<p>Check out the source code</p>
|
126
|
+
</li><li>
|
127
|
+
<p>Run <code>vagrant up lxc</code> or <code>vagrant up vserver</code>
|
128
|
+
depending on which system you want to test drive</p>
|
129
|
+
</li><li>
|
130
|
+
<p>Wait for the creation and provisioning to finish</p>
|
131
|
+
</li><li>
|
132
|
+
<p>The node api is exposed on <a
|
133
|
+
href="https://192.168.41.210:1357">192.168.41.210:1357</a>/ for LXC or <a
|
134
|
+
href="https://192.168.41.211:1357">192.168.41.211:1357</a>/ for
|
135
|
+
linux-vserver.
|
136
|
+
The API token can be found in
|
137
|
+
<code>/etc/wf-node-api.conf</code> in the virtual machine. Logs go to
|
138
|
+
<code>/var/log/wf-node-api.log</code></p>
|
139
|
+
</li></ol>
|
140
|
+
|
141
|
+
<h2 id="label-Setting+up+a+production+node">Setting up a production node</h2>
|
142
|
+
<ol><li>
|
143
|
+
<p>Set up a host with either lxc or linux-vserver and ensure that you can
|
144
|
+
create, run (and so on) containers from cli</p>
|
145
|
+
</li><li>
|
146
|
+
<p>Install Ruby 2.0 or higher and RubyGems</p>
|
147
|
+
</li><li>
|
148
|
+
<p>Run <code>gem install wf_node_api</code> to install the node api</p>
|
149
|
+
</li><li>
|
150
|
+
<p>Run <code>wf_node_api</code> to initially create the configuration file</p>
|
151
|
+
</li><li>
|
152
|
+
<p>Adjust <code>/etc/wf-node-api.conf</code> to your needs</p>
|
153
|
+
</li><li>
|
154
|
+
<p>Run <code>wf_node_api start</code> to run the api as a service in
|
155
|
+
background</p>
|
156
|
+
</li></ol>
|
157
|
+
|
158
|
+
<p>After a reboot you have to run <code>wf_node_api</code> in order to bring
|
159
|
+
the api up again… or write an init script ;)</p>
|
160
|
+
|
161
|
+
<h2 id="label-Using+the+API">Using the API</h2>
|
162
|
+
|
163
|
+
<p>The Node API is a synchronous REST API, that allows you to manage your
|
164
|
+
container host over HTTPS. A fully featured API
|
165
|
+
documentation is located in
|
166
|
+
the <code>_docs/rest/</code> folder.</p>
|
137
167
|
</div></div>
|
138
168
|
|
139
169
|
<div id="footer">
|
140
|
-
Generated on
|
170
|
+
Generated on Sun Oct 25 20:54:53 2015 by
|
141
171
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
142
172
|
0.8.7.6 (ruby-2.0.0).
|
143
173
|
</div>
|