/usr/share/doc/ganeti/html/virtual-cluster.html is in ganeti-doc 2.16.0~rc2-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Virtual cluster support — Ganeti 2.16.0~rc2 documentation</title>
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '2.16.0~rc2',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Ganeti walk-through" href="walkthrough.html" />
<link rel="prev" title="Upgrade notes" href="upgrade.html" />
</head>
<body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="walkthrough.html" title="Ganeti walk-through"
accesskey="N">next</a></li>
<li class="right" >
<a href="upgrade.html" title="Upgrade notes"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="virtual-cluster-support">
<h1><a class="toc-backref" href="#id2">Virtual cluster support</a><a class="headerlink" href="#virtual-cluster-support" title="Permalink to this headline">¶</a></h1>
<p>Documents Ganeti version 2.16</p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#virtual-cluster-support" id="id2">Virtual cluster support</a><ul>
<li><a class="reference internal" href="#introduction" id="id3">Introduction</a></li>
<li><a class="reference internal" href="#limitations" id="id4">Limitations</a></li>
<li><a class="reference internal" href="#basics" id="id5">Basics</a></li>
<li><a class="reference internal" href="#setup" id="id6">Setup</a></li>
<li><a class="reference internal" href="#use" id="id7">Use</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="introduction">
<h2><a class="toc-backref" href="#id3">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
<p>This is a description of Ganeti’s support for virtual clusters
introduced in version 2.7. The original design is described
in a separate <a class="reference internal" href="design-virtual-clusters.html"><span class="doc">design document</span></a>.</p>
<p>A virtual cluster consists of multiple virtual nodes (instances of
Ganeti daemons) running on the same physical machine within one
operating system. This way multiple (virtual) nodes can be simulated
using a single machine. Virtual clusters can be run as a user without
root privileges (see <a class="reference internal" href="#limitations"><span class="std std-ref">limitations</span></a>).</p>
<p>While not implemented in the helper setup script at the time of this
writing, virtual clusters can also be split over multiple physical
machines, allowing for even more virtual nodes.</p>
</div>
<div class="section" id="limitations">
<span id="id1"></span><h2><a class="toc-backref" href="#id4">Limitations</a><a class="headerlink" href="#limitations" title="Permalink to this headline">¶</a></h2>
<p>Due to historical and practical design decisions virtual clusters
have several limitations.</p>
<ul class="simple">
<li>“fake” hypervisor only</li>
<li>Instances must be diskless or file-backed</li>
<li>Node information is the same over multiple virtual nodes (e.g. free
memory)</li>
<li>If running as a user without root privileges, certain operations are
not available; some operations are not useful even when running as
root (e.g. powercycle)</li>
<li>OS definitions must be prepared for this setup</li>
<li>Setup is partially manual, especially when not running as root</li>
</ul>
</div>
<div class="section" id="basics">
<h2><a class="toc-backref" href="#id5">Basics</a><a class="headerlink" href="#basics" title="Permalink to this headline">¶</a></h2>
<p>Ganeti programs act as running on a virtual node if the environment
variables <code class="docutils literal"><span class="pre">GANETI_ROOTDIR</span></code> and <code class="docutils literal"><span class="pre">GANETI_HOSTNAME</span></code> are set. The former
must be an absolute path to a directory with the last component being
equal to the value of <code class="docutils literal"><span class="pre">GANETI_HOSTNAME</span></code>, which contains the name of
the virtual node. The reason for this requirement is that one virtual
node must be able to compute an absolute path on another node for
copying files via SSH.</p>
<p>The whole content of <code class="docutils literal"><span class="pre">GANETI_ROOTDIR</span></code> is the node directory, its
parent directory (without hostname) is the cluster directory.</p>
<p>Example for environment variables:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">GANETI_ROOTDIR</span><span class="o">=/</span><span class="n">tmp</span><span class="o">/</span><span class="n">vcluster</span><span class="o">/</span><span class="n">node1</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
<span class="n">GANETI_HOSTNAME</span><span class="o">=</span><span class="n">node1</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span>
</pre></div>
</div>
<p>With this example the node directory is
<code class="docutils literal"><span class="pre">/tmp/vcluster/node1.example.com</span></code> and the cluster directory
<code class="docutils literal"><span class="pre">/tmp/vcluster</span></code>.</p>
</div>
<div class="section" id="setup">
<span id="vcluster-setup"></span><h2><a class="toc-backref" href="#id6">Setup</a><a class="headerlink" href="#setup" title="Permalink to this headline">¶</a></h2>
<p>A script to configure virtual clusters is included with Ganeti as
<code class="docutils literal"><span class="pre">tools/vcluster-setup</span></code> (usually installed as
<code class="docutils literal"><span class="pre">/usr/lib/ganeti/tools/vcluster-setup</span></code>). Running it with the <code class="docutils literal"><span class="pre">-h</span></code>
option prints a usage description. The script creates all necessary
directories, configures network interfaces, adds or updates entries in
<code class="docutils literal"><span class="pre">/etc/hosts</span></code> and generates a small number of helper scripts.</p>
</div>
<div class="section" id="use">
<h2><a class="toc-backref" href="#id7">Use</a><a class="headerlink" href="#use" title="Permalink to this headline">¶</a></h2>
<p>Once the virtual cluster has been <a class="reference internal" href="#vcluster-setup"><span class="std std-ref">set up</span></a>, the
cluster can be initialized. The instructions for doing so have been
printed by the <code class="docutils literal"><span class="pre">vcluster-setup</span></code> script together with other useful
information, such as the list of virtual nodes. The commands printed
should be used to configure the list of enabled hypervisors and other
settings.</p>
<p>To run commands for a specific virtual node, the script named <code class="docutils literal"><span class="pre">cmd</span></code>
located in the node directory can be used. It takes a command as its
argument(s), sets the environment variables <code class="docutils literal"><span class="pre">GANETI_ROOTDIR</span></code> and
<code class="docutils literal"><span class="pre">GANETI_HOSTNAME</span></code> and then runs the command. Example:</p>
<div class="highlight-shell-example"><div class="highlight"><pre><span></span><span class="c1"># Let's create a cluster with node1 as its master node</span>
$ <span class="gs">cd</span> <span class="gs">/tmp/vcluster</span>
$ <span class="gs">node1.example.com/cmd</span> <span class="gs">gnt-cluster</span> <span class="gs">info</span>
Cluster name: cluster.example.com
…
Master node: node1.example.com
…
<span class="c1"># Configure cluster as per "vcluster-setup" script</span>
$ <span class="gs">node1.example.com/cmd</span> <span class="gs">gnt-cluster</span> <span class="gs">modify</span> <span class="gs">…</span>
</pre></div>
</div>
<p>Scripts are provided in the cluster root directory to start, stop or
restart all daemons for all virtual nodes. These are named
<code class="docutils literal"><span class="pre">start-all</span></code>, <code class="docutils literal"><span class="pre">stop-all</span></code> and <code class="docutils literal"><span class="pre">restart-all</span></code>. <code class="docutils literal"><span class="pre">ganeti-watcher</span></code> can
be run for all virtual nodes using <code class="docutils literal"><span class="pre">watcher-all</span></code>.</p>
<p>Adding an instance (assuming node1.example.com is the master node as per
the example above):</p>
<div class="highlight-shell-example"><div class="highlight"><pre><span></span>$ <span class="gs">node1.example.com/cmd</span> <span class="gs">gnt-instance</span> <span class="gs">add</span> <span class="gs">--os-size</span> <span class="gs">1G</span> <span class="gs">\</span>
<span class="gs">--disk-template=file</span> <span class="gs">--os-type</span> <span class="gs">dummy</span> <span class="gs">-B</span> <span class="gs">memory=192</span> <span class="gs">-I</span> <span class="gs">hail</span> <span class="gs">\</span>
<span class="gs">instance1.example.com</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Virtual cluster support</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#limitations">Limitations</a></li>
<li><a class="reference internal" href="#basics">Basics</a></li>
<li><a class="reference internal" href="#setup">Setup</a></li>
<li><a class="reference internal" href="#use">Use</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="upgrade.html"
title="previous chapter">Upgrade notes</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="walkthrough.html"
title="next chapter">Ganeti walk-through</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/virtual-cluster.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="walkthrough.html" title="Ganeti walk-through"
>next</a></li>
<li class="right" >
<a href="upgrade.html" title="Upgrade notes"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">Ganeti 2.16.0~rc2 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2018, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Google Inc..
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.7.
</div>
</body>
</html>
|