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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +22 -18
  3. data/Gemfile.lock +3 -3
  4. data/LICENSE +19 -340
  5. data/Vagrantfile +28 -23
  6. data/_docs/api/Api.html +22 -18
  7. data/_docs/api/Api/NodeApi.html +1 -1
  8. data/_docs/api/ConfigCheck.html +34 -30
  9. data/_docs/api/ContainerManager.html +176 -77
  10. data/_docs/api/ContainerManagerAdapter.html +22 -18
  11. data/_docs/api/ContainerManagerAdapter/Lxc.html +169 -58
  12. data/_docs/api/ContainerManagerAdapter/Vserver.html +169 -58
  13. data/_docs/api/NotFoundError.html +22 -18
  14. data/_docs/api/OS.html +26 -22
  15. data/_docs/api/ResourceManager.html +11 -11
  16. data/_docs/api/ResourceManagerAdapter.html +22 -18
  17. data/_docs/api/ResourceManagerAdapter/Linux.html +13 -13
  18. data/_docs/api/WfNodeApi.html +23 -19
  19. data/_docs/api/_index.html +1 -1
  20. data/_docs/api/file.README.html +96 -66
  21. data/_docs/api/index.html +96 -66
  22. data/_docs/api/method_list.html +60 -42
  23. data/_docs/api/top-level-namespace.html +7 -7
  24. data/_docs/rest/api_data.js +934 -1
  25. data/_docs/rest/api_data.json +934 -1
  26. data/_docs/rest/api_project.js +31 -1
  27. data/_docs/rest/api_project.json +31 -1
  28. data/bin/wf_node_api +25 -21
  29. data/lib/wf_node_api.rb +25 -21
  30. data/lib/wf_node_api/api/node_api.rb +36 -27
  31. data/lib/wf_node_api/config/config_template.erb +36 -4
  32. data/lib/wf_node_api/config_check.rb +25 -21
  33. data/lib/wf_node_api/container_manager.rb +34 -22
  34. data/lib/wf_node_api/container_manager_adapter/lxc.rb +43 -25
  35. data/lib/wf_node_api/container_manager_adapter/vserver.rb +45 -27
  36. data/lib/wf_node_api/error/not_found.rb +22 -18
  37. data/lib/wf_node_api/os.rb +22 -18
  38. data/lib/wf_node_api/resource_manager.rb +24 -20
  39. data/lib/wf_node_api/resource_manager_adapter/linux.rb +25 -21
  40. data/lib/wf_node_api/translations.rb +22 -18
  41. data/lib/wf_node_api/version.rb +22 -18
  42. data/wf-node-api.gemspec +26 -22
  43. 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
- __ \ \ / / |__ (_) |_ <em>_</em>| <em>_</em>| _ <em>_</em>
92
- <em>_</em> / <em>_</em>| / |</p>
91
+ __</p>
93
92
 
94
- <pre class="code ruby"><code class="ruby">\ \ /\ / /| &#39;_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
95
- \ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
96
- \_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
93
+ <pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
94
+ \ \ /\ / /| &#39;_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
95
+ \ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
96
+ \_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
97
97
  Container Manager</code></pre>
98
98
 
99
- <p>Copyright (C) 2015 David Prandzioch &lt;kontakt@davidprandzioch.de&gt;</p>
99
+ <p>Copyright © 2015 David Prandzioch &lt;kontakt@davidprandzioch.de&gt;</p>
100
100
 
101
- <p>This program is free software; you can redistribute it and/or modify it
102
- under the terms of the GNU General Public License as published by the Free
103
- Software Foundation; either version 2 of the License, or (at your option)
104
- any later version.</p>
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>This program is distributed in the hope that it will be useful, but WITHOUT
107
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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>You should have received a copy of the GNU General Public License along
112
- with this program; if not, write to the Free Software Foundation, Inc., 51
113
- Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
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
- 29
209
- 30
210
- 31</pre>
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 29</span>
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'>&#39;</span><span class='tstring_content'>linux</span><span class='tstring_end'>&#39;</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 Mon Jul 20 18:09:05 2015 by
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</pre>
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 32</span>
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
- 45
297
- 46
298
- 47</pre>
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 45</span>
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 Mon Jul 20 18:09:05 2015 by
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
- __ \ \ / / |__ (_) |_ <em>_</em>| <em>_</em>| _ <em>_</em>
92
- <em>_</em> / <em>_</em>| / |</p>
91
+ __</p>
93
92
 
94
- <pre class="code ruby"><code class="ruby">\ \ /\ / /| &#39;_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
95
- \ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
96
- \_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
93
+ <pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
94
+ \ \ /\ / /| &#39;_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
95
+ \ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
96
+ \_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
97
97
  Container Manager</code></pre>
98
98
 
99
- <p>Copyright (C) 2015 David Prandzioch &lt;kontakt@davidprandzioch.de&gt;</p>
99
+ <p>Copyright © 2015 David Prandzioch &lt;kontakt@davidprandzioch.de&gt;</p>
100
100
 
101
- <p>This program is free software; you can redistribute it and/or modify it
102
- under the terms of the GNU General Public License as published by the Free
103
- Software Foundation; either version 2 of the License, or (at your option)
104
- any later version.</p>
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>This program is distributed in the hope that it will be useful, but WITHOUT
107
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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>You should have received a copy of the GNU General Public License along
112
- with this program; if not, write to the Free Software Foundation, Inc., 51
113
- Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
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 Mon Jul 20 18:09:05 2015 by
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
- 33
224
- 34
225
- 35
226
- 36
227
- 37</pre>
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 33</span>
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'>&#39;</span><span class='tstring_content'>LXC</span><span class='tstring_end'>&#39;</span></span> <span class='op'>&amp;&amp;</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</pre>
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 42</span>
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 Mon Jul 20 18:09:05 2015 by
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>
@@ -90,29 +90,33 @@
90
90
  <div class="discussion">
91
91
 
92
92
  <p>__ <em>_</em> _ _ <em>_</em> <em>__</em> __
93
- __ \ \ / / |__ (_) |_ <em>_</em>| <em>_</em>| _ <em>_</em>
94
- <em>_</em> / <em>_</em>| / |</p>
93
+ __</p>
95
94
 
96
- <pre class="code ruby"><code class="ruby">\ \ /\ / /| &#39;_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
97
- \ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
98
- \_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
95
+ <pre class="code ruby"><code class="ruby">\ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
96
+ \ \ /\ / /| &#39;_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
97
+ \ V V / | | | | | || __/ _|| |_| \__ \ __/ |___| | | |
98
+ \_/\_/ |_| |_|_|\__\___|_| \__,_|___/\___|\____|_| |_|
99
99
  Container Manager</code></pre>
100
100
 
101
- <p>Copyright (C) 2015 David Prandzioch &lt;kontakt@davidprandzioch.de&gt;</p>
101
+ <p>Copyright © 2015 David Prandzioch &lt;kontakt@davidprandzioch.de&gt;</p>
102
102
 
103
- <p>This program is free software; you can redistribute it and/or modify it
104
- under the terms of the GNU General Public License as published by the Free
105
- Software Foundation; either version 2 of the License, or (at your option)
106
- any later version.</p>
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>This program is distributed in the hope that it will be useful, but WITHOUT
109
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
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>You should have received a copy of the GNU General Public License along
114
- with this program; if not, write to the Free Software Foundation, Inc., 51
115
- Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
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'>&#39;</span><span class='tstring_content'>0.8.0</span><span class='tstring_end'>&#39;</span></span></pre></dd>
145
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.7.0</span><span class='tstring_end'>&#39;</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 Mon Jul 20 18:09:05 2015 by
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>
@@ -230,7 +230,7 @@
230
230
  </div>
231
231
 
232
232
  <div id="footer">
233
- Generated on Mon Jul 20 18:09:04 2015 by
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>
@@ -61,83 +61,113 @@
61
61
 
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
- <div id="content"><div id='filecontents'><hr>
65
-
66
- <p>\ \ / / |__ (<em>) |</em> <em>__| _</em><em>| _ _</em>_ ___ / <strong><em>| \/ |
67
- \ \ /\ / /| &#39;</em> | | _<em>/ _ \ |</em> | | | / _<em>|/ _ \ | | |\/| |
68
- \ V V / | | | | | || _</em>/ <em>|| |</em>| __ \ __/ |</strong><em>| | | |
69
- _/_/ |</em>| |<em>|</em>|_<em>_</em><em>|</em>| _<em>,</em>|<em>__/_</em><em>|_</em>_<em>|</em>| |_|
70
- Container Manager</p>
71
-
72
- <h1>WhiteFuse Node API</h1>
73
-
74
- <p>WhiteFuse is a web-based management system for Linux/FreeBSD based container virtualization. Currently support for LXC
75
- and linux-vserver is implemented. The node api is a service that runs on the virtualization nodes. It exposes a RESTful
76
- interface that the master can connect in order to administer the node and it&#39;s containers. The node api is packaged in
64
+ <div id="content"><div id='filecontents'>
65
+ <pre class="code ruby"><code class="ruby">__ ___ _ _ _____ ____ __ __
66
+ \ \ / / |__ (_) |_ ___| ___| _ ___ ___ / ___| \/ |
67
+ \ \ /\ / /| &#39;_ \| | __/ _ \ |_ | | | / __|/ _ \ | | |\/| |
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&#39;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
- <ul>
84
- <li>LXC</li>
85
- <li>linux-vserver</li>
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
- <ul>
91
- <li>FreeBSD jails through ezjail</li>
92
- </ul>
93
-
94
- <h2>Supported operating systems</h2>
95
-
96
- <p>While the node api basically works on any Linux distribution that supports one of the two implemented containerization
97
- solutions, the development is only being done on:</p>
98
-
99
- <ul>
100
- <li>CentOS 7 for LXC</li>
101
- <li>CentOS 6 for linux-vserver</li>
102
- </ul>
103
-
104
- <p>The test/development environment already comes with a Vagrantfile that creates and provisions virtual machines for
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 192.168.41.0/24 not in use (otherwise you will have to
110
- customize the Vagrantfile)</p>
111
-
112
- <ol>
113
- <li>Check out the source code</li>
114
- <li>Run <code>vagrant up lxc</code> or <code>vagrant up vserver</code> depending on which system you want to test drive</li>
115
- <li>Wait for the creation and provisioning to finish</li>
116
- <li>The node api is exposed on <a href="https://192.168.41.210:1357/">https://192.168.41.210:1357/</a> for LXC or <a href="https://192.168.41.211:1357/">https://192.168.41.211:1357/</a> for linux-vserver.
117
- The API token can be found in <code>/etc/wf-node-api.conf</code> in the virtual machine. Logs go to <code>/var/log/wf-node-api.log</code></li>
118
- </ol>
119
-
120
- <h2>Setting up a production node</h2>
121
-
122
- <ol>
123
- <li>Set up a host with either lxc or linux-vserver and ensure that you can create, run (and so on) containers from cli</li>
124
- <li>Install Ruby 2.0 or higher and RubyGems</li>
125
- <li>Run <code>gem install wf_node_api</code> to install the node api</li>
126
- <li>Run <code>wf_node_api</code> to initially create the configuration file</li>
127
- <li>Adjust <code>/etc/wf-node-api.conf</code> to your needs</li>
128
- <li>Run <code>wf_node_api start</code> to run the api as a service in background</li>
129
- </ol>
130
-
131
- <p>After a reboot you have to run <code>wf_node_api</code> in order to bring the api up again... or write an init script ;)</p>
132
-
133
- <h2>Using the API</h2>
134
-
135
- <p>The Node API is a synchronous REST API, that allows you to manage your container host over HTTPS. A fully featured API
136
- documentation is located in the <code>_docs/rest/</code> folder.</p>
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 Mon Jul 20 18:09:04 2015 by
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>