New lorax documentation - 31.4
This commit is contained in:
parent
3e08389a0f
commit
72ff8e72a9
@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 6e55fdb35e04e7527afc63d14f55eaf0
|
||||
config: 976fdd7ad1c7255de97a1c91fa7bf7af
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.blueprints — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli.blueprints — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.cmdline — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli.cmdline — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.compose — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli.compose — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.modules — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli.modules — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.projects — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli.projects — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.sources — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli.sources — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.status — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli.status — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli.utilities — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli.utilities — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.http_client — Lorax 31.1 documentation</title>
|
||||
<title>composer.http_client — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.unix_socket — Lorax 31.1 documentation</title>
|
||||
<title>composer.unix_socket — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Overview: module code — Lorax 31.1 documentation</title>
|
||||
<title>Overview: module code — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax — Lorax 31.1 documentation</title>
|
||||
<title>pylorax — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.bisect — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.bisect — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.checkparams — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.checkparams — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.cmdline — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.cmdline — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.compose — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.compose — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -238,7 +238,7 @@
|
||||
<span class="n">pkgs</span> <span class="o">=</span> <span class="p">[(</span><span class="n">name</span><span class="p">,</span> <span class="s2">"*"</span><span class="p">)</span> <span class="k">for</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">packages</span><span class="o">.</span><span class="n">packageList</span><span class="p">]</span>
|
||||
<span class="n">grps</span> <span class="o">=</span> <span class="p">[</span><span class="n">grp</span><span class="o">.</span><span class="n">name</span> <span class="k">for</span> <span class="n">grp</span> <span class="ow">in</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">packages</span><span class="o">.</span><span class="n">groupList</span><span class="p">]</span>
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="n">_</span> <span class="o">=</span> <span class="n">projects_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">pkgs</span><span class="p">,</span> <span class="n">grps</span><span class="p">)</span>
|
||||
<span class="n">projects_depsolve</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">pkgs</span><span class="p">,</span> <span class="n">grps</span><span class="p">)</span>
|
||||
<span class="k">except</span> <span class="n">ProjectsError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">template_errors</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">"Error depsolving </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">compose_type</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)))</span>
|
||||
|
||||
@ -322,6 +322,240 @@
|
||||
<span class="k">return</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"kernel"</span><span class="p">][</span><span class="s2">"append"</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="timezone_cmd"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.timezone_cmd">[docs]</a><span class="k">def</span> <span class="nf">timezone_cmd</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
|
||||
<span class="sd">""" Update the timezone line with the settings</span>
|
||||
|
||||
<span class="sd"> :param line: The timezone ... line</span>
|
||||
<span class="sd"> :type line: str</span>
|
||||
<span class="sd"> :param settings: A dict with timezone and/or ntpservers list</span>
|
||||
<span class="sd"> :type settings: dict</span>
|
||||
|
||||
<span class="sd"> Using pykickstart to process the line is the best way to make sure it</span>
|
||||
<span class="sd"> is parsed correctly, and re-assembled for inclusion into the final kickstart</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">ks_version</span> <span class="o">=</span> <span class="n">makeVersion</span><span class="p">()</span>
|
||||
<span class="n">ks</span> <span class="o">=</span> <span class="n">KickstartParser</span><span class="p">(</span><span class="n">ks_version</span><span class="p">,</span> <span class="n">errorsAreFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">missingIncludeIsFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">readKickstartFromString</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="s2">"timezone"</span> <span class="ow">in</span> <span class="n">settings</span><span class="p">:</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">timezone</span><span class="o">.</span><span class="n">timezone</span> <span class="o">=</span> <span class="n">settings</span><span class="p">[</span><span class="s2">"timezone"</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="s2">"ntpservers"</span> <span class="ow">in</span> <span class="n">settings</span><span class="p">:</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">timezone</span><span class="o">.</span><span class="n">ntpservers</span> <span class="o">=</span> <span class="n">settings</span><span class="p">[</span><span class="s2">"ntpservers"</span><span class="p">]</span>
|
||||
|
||||
<span class="c1"># Converting back to a string includes a comment, return just the timezone line</span>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">timezone</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="get_timezone_settings"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.get_timezone_settings">[docs]</a><span class="k">def</span> <span class="nf">get_timezone_settings</span><span class="p">(</span><span class="n">recipe</span><span class="p">):</span>
|
||||
<span class="sd">"""Return the customizations.timezone dict</span>
|
||||
|
||||
<span class="sd"> :param recipe:</span>
|
||||
<span class="sd"> :type recipe: Recipe object</span>
|
||||
<span class="sd"> :returns: append value or empty string</span>
|
||||
<span class="sd"> :rtype: dict</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="s2">"customizations"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span> <span class="ow">or</span> \
|
||||
<span class="s2">"timezone"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">]:</span>
|
||||
<span class="k">return</span> <span class="p">{}</span>
|
||||
<span class="k">return</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"timezone"</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="lang_cmd"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.lang_cmd">[docs]</a><span class="k">def</span> <span class="nf">lang_cmd</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">languages</span><span class="p">):</span>
|
||||
<span class="sd">""" Update the lang line with the languages</span>
|
||||
|
||||
<span class="sd"> :param line: The lang ... line</span>
|
||||
<span class="sd"> :type line: str</span>
|
||||
<span class="sd"> :param settings: The list of languages</span>
|
||||
<span class="sd"> :type settings: list</span>
|
||||
|
||||
<span class="sd"> Using pykickstart to process the line is the best way to make sure it</span>
|
||||
<span class="sd"> is parsed correctly, and re-assembled for inclusion into the final kickstart</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">ks_version</span> <span class="o">=</span> <span class="n">makeVersion</span><span class="p">()</span>
|
||||
<span class="n">ks</span> <span class="o">=</span> <span class="n">KickstartParser</span><span class="p">(</span><span class="n">ks_version</span><span class="p">,</span> <span class="n">errorsAreFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">missingIncludeIsFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">readKickstartFromString</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">languages</span><span class="p">:</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">lang</span> <span class="o">=</span> <span class="n">languages</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
|
||||
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">languages</span><span class="p">)</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">addsupport</span> <span class="o">=</span> <span class="n">languages</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
|
||||
|
||||
<span class="c1"># Converting back to a string includes a comment, return just the lang line</span>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">lang</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="get_languages"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.get_languages">[docs]</a><span class="k">def</span> <span class="nf">get_languages</span><span class="p">(</span><span class="n">recipe</span><span class="p">):</span>
|
||||
<span class="sd">"""Return the customizations.locale.languages list</span>
|
||||
|
||||
<span class="sd"> :param recipe: The recipe</span>
|
||||
<span class="sd"> :type recipe: Recipe object</span>
|
||||
<span class="sd"> :returns: list of language strings</span>
|
||||
<span class="sd"> :rtype: list</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="s2">"customizations"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span> <span class="ow">or</span> \
|
||||
<span class="s2">"locale"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">]</span> <span class="ow">or</span> \
|
||||
<span class="s2">"languages"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"locale"</span><span class="p">]:</span>
|
||||
<span class="k">return</span> <span class="p">[]</span>
|
||||
<span class="k">return</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"locale"</span><span class="p">][</span><span class="s2">"languages"</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="keyboard_cmd"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.keyboard_cmd">[docs]</a><span class="k">def</span> <span class="nf">keyboard_cmd</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">layout</span><span class="p">):</span>
|
||||
<span class="sd">""" Update the keyboard line with the layout</span>
|
||||
|
||||
<span class="sd"> :param line: The keyboard ... line</span>
|
||||
<span class="sd"> :type line: str</span>
|
||||
<span class="sd"> :param settings: The keyboard layout</span>
|
||||
<span class="sd"> :type settings: str</span>
|
||||
|
||||
<span class="sd"> Using pykickstart to process the line is the best way to make sure it</span>
|
||||
<span class="sd"> is parsed correctly, and re-assembled for inclusion into the final kickstart</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">ks_version</span> <span class="o">=</span> <span class="n">makeVersion</span><span class="p">()</span>
|
||||
<span class="n">ks</span> <span class="o">=</span> <span class="n">KickstartParser</span><span class="p">(</span><span class="n">ks_version</span><span class="p">,</span> <span class="n">errorsAreFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">missingIncludeIsFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">readKickstartFromString</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">layout</span><span class="p">:</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">keyboard</span><span class="o">.</span><span class="n">keyboard</span> <span class="o">=</span> <span class="n">layout</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">keyboard</span><span class="o">.</span><span class="n">vc_keymap</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">keyboard</span><span class="o">.</span><span class="n">x_layouts</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
|
||||
<span class="c1"># Converting back to a string includes a comment, return just the keyboard line</span>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">keyboard</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="get_keyboard_layout"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.get_keyboard_layout">[docs]</a><span class="k">def</span> <span class="nf">get_keyboard_layout</span><span class="p">(</span><span class="n">recipe</span><span class="p">):</span>
|
||||
<span class="sd">"""Return the customizations.locale.keyboard list</span>
|
||||
|
||||
<span class="sd"> :param recipe: The recipe</span>
|
||||
<span class="sd"> :type recipe: Recipe object</span>
|
||||
<span class="sd"> :returns: The keyboard layout string</span>
|
||||
<span class="sd"> :rtype: str</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="s2">"customizations"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span> <span class="ow">or</span> \
|
||||
<span class="s2">"locale"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">]</span> <span class="ow">or</span> \
|
||||
<span class="s2">"keyboard"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"locale"</span><span class="p">]:</span>
|
||||
<span class="k">return</span> <span class="p">[]</span>
|
||||
<span class="k">return</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"locale"</span><span class="p">][</span><span class="s2">"keyboard"</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="firewall_cmd"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.firewall_cmd">[docs]</a><span class="k">def</span> <span class="nf">firewall_cmd</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
|
||||
<span class="sd">""" Update the firewall line with the new ports and services</span>
|
||||
|
||||
<span class="sd"> :param line: The firewall ... line</span>
|
||||
<span class="sd"> :type line: str</span>
|
||||
<span class="sd"> :param settings: A dict with the list of services and ports to enable and disable</span>
|
||||
<span class="sd"> :type settings: dict</span>
|
||||
|
||||
<span class="sd"> Using pykickstart to process the line is the best way to make sure it</span>
|
||||
<span class="sd"> is parsed correctly, and re-assembled for inclusion into the final kickstart</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">ks_version</span> <span class="o">=</span> <span class="n">makeVersion</span><span class="p">()</span>
|
||||
<span class="n">ks</span> <span class="o">=</span> <span class="n">KickstartParser</span><span class="p">(</span><span class="n">ks_version</span><span class="p">,</span> <span class="n">errorsAreFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">missingIncludeIsFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">readKickstartFromString</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># Do not override firewall --disabled</span>
|
||||
<span class="k">if</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">enabled</span> <span class="o">!=</span> <span class="kc">False</span> <span class="ow">and</span> <span class="n">settings</span><span class="p">:</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">ports</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">settings</span><span class="p">[</span><span class="s2">"ports"</span><span class="p">]</span> <span class="o">+</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">ports</span><span class="p">))</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">services</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">settings</span><span class="p">[</span><span class="s2">"enabled"</span><span class="p">]</span> <span class="o">+</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">services</span><span class="p">))</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">remove_services</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">settings</span><span class="p">[</span><span class="s2">"disabled"</span><span class="p">]</span> <span class="o">+</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">remove_services</span><span class="p">))</span>
|
||||
|
||||
<span class="c1"># Converting back to a string includes a comment, return just the keyboard line</span>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">firewall</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="get_firewall_settings"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.get_firewall_settings">[docs]</a><span class="k">def</span> <span class="nf">get_firewall_settings</span><span class="p">(</span><span class="n">recipe</span><span class="p">):</span>
|
||||
<span class="sd">"""Return the customizations.firewall settings</span>
|
||||
|
||||
<span class="sd"> :param recipe: The recipe</span>
|
||||
<span class="sd"> :type recipe: Recipe object</span>
|
||||
<span class="sd"> :returns: A dict of settings</span>
|
||||
<span class="sd"> :rtype: dict</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">settings</span> <span class="o">=</span> <span class="p">{</span><span class="s2">"ports"</span><span class="p">:</span> <span class="p">[],</span> <span class="s2">"enabled"</span><span class="p">:</span> <span class="p">[],</span> <span class="s2">"disabled"</span><span class="p">:</span> <span class="p">[]}</span>
|
||||
|
||||
<span class="k">if</span> <span class="s2">"customizations"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span> <span class="ow">or</span> \
|
||||
<span class="s2">"firewall"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">]:</span>
|
||||
<span class="k">return</span> <span class="n">settings</span>
|
||||
|
||||
<span class="n">settings</span><span class="p">[</span><span class="s2">"ports"</span><span class="p">]</span> <span class="o">=</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"firewall"</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"ports"</span><span class="p">,</span> <span class="p">[])</span>
|
||||
|
||||
<span class="k">if</span> <span class="s2">"services"</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"firewall"</span><span class="p">]:</span>
|
||||
<span class="n">settings</span><span class="p">[</span><span class="s2">"enabled"</span><span class="p">]</span> <span class="o">=</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"firewall"</span><span class="p">][</span><span class="s2">"services"</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"enabled"</span><span class="p">,</span> <span class="p">[])</span>
|
||||
<span class="n">settings</span><span class="p">[</span><span class="s2">"disabled"</span><span class="p">]</span> <span class="o">=</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"firewall"</span><span class="p">][</span><span class="s2">"services"</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"disabled"</span><span class="p">,</span> <span class="p">[])</span>
|
||||
<span class="k">return</span> <span class="n">settings</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="services_cmd"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.services_cmd">[docs]</a><span class="k">def</span> <span class="nf">services_cmd</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
|
||||
<span class="sd">""" Update the services line with additional services to enable/disable</span>
|
||||
|
||||
<span class="sd"> :param line: The services ... line</span>
|
||||
<span class="sd"> :type line: str</span>
|
||||
<span class="sd"> :param settings: A dict with the list of services to enable and disable</span>
|
||||
<span class="sd"> :type settings: dict</span>
|
||||
|
||||
<span class="sd"> Using pykickstart to process the line is the best way to make sure it</span>
|
||||
<span class="sd"> is parsed correctly, and re-assembled for inclusion into the final kickstart</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="c1"># Empty services and no additional settings, return an empty string</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">line</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">settings</span><span class="p">[</span><span class="s2">"enabled"</span><span class="p">]</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">settings</span><span class="p">[</span><span class="s2">"disabled"</span><span class="p">]:</span>
|
||||
<span class="k">return</span> <span class="s2">""</span>
|
||||
|
||||
<span class="n">ks_version</span> <span class="o">=</span> <span class="n">makeVersion</span><span class="p">()</span>
|
||||
<span class="n">ks</span> <span class="o">=</span> <span class="n">KickstartParser</span><span class="p">(</span><span class="n">ks_version</span><span class="p">,</span> <span class="n">errorsAreFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">missingIncludeIsFatal</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># Allow passing in a 'default' so that the enable/disable may be applied to it, without</span>
|
||||
<span class="c1"># parsing it and emitting a kickstart error message</span>
|
||||
<span class="k">if</span> <span class="n">line</span> <span class="o">!=</span> <span class="s2">"services"</span><span class="p">:</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">readKickstartFromString</span><span class="p">(</span><span class="n">line</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># Add to any existing services, removing any duplicates</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">services</span><span class="o">.</span><span class="n">enabled</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">settings</span><span class="p">[</span><span class="s2">"enabled"</span><span class="p">]</span> <span class="o">+</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">services</span><span class="o">.</span><span class="n">enabled</span><span class="p">))</span>
|
||||
<span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">services</span><span class="o">.</span><span class="n">disabled</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">settings</span><span class="p">[</span><span class="s2">"disabled"</span><span class="p">]</span> <span class="o">+</span> <span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">services</span><span class="o">.</span><span class="n">disabled</span><span class="p">))</span>
|
||||
|
||||
<span class="c1"># Converting back to a string includes a comment, return just the keyboard line</span>
|
||||
<span class="k">return</span> <span class="nb">str</span><span class="p">(</span><span class="n">ks</span><span class="o">.</span><span class="n">handler</span><span class="o">.</span><span class="n">services</span><span class="p">)</span><span class="o">.</span><span class="n">splitlines</span><span class="p">()[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="get_services"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.get_services">[docs]</a><span class="k">def</span> <span class="nf">get_services</span><span class="p">(</span><span class="n">recipe</span><span class="p">):</span>
|
||||
<span class="sd">"""Return the customizations.services settings</span>
|
||||
|
||||
<span class="sd"> :param recipe: The recipe</span>
|
||||
<span class="sd"> :type recipe: Recipe object</span>
|
||||
<span class="sd"> :returns: A dict of settings</span>
|
||||
<span class="sd"> :rtype: dict</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">settings</span> <span class="o">=</span> <span class="p">{</span><span class="s2">"enabled"</span><span class="p">:</span> <span class="p">[],</span> <span class="s2">"disabled"</span><span class="p">:</span> <span class="p">[]}</span>
|
||||
|
||||
<span class="k">if</span> <span class="s2">"customizations"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span> <span class="ow">or</span> \
|
||||
<span class="s2">"services"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">]:</span>
|
||||
<span class="k">return</span> <span class="n">settings</span>
|
||||
|
||||
<span class="n">settings</span><span class="p">[</span><span class="s2">"enabled"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"services"</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"enabled"</span><span class="p">,</span> <span class="p">[]))</span>
|
||||
<span class="n">settings</span><span class="p">[</span><span class="s2">"disabled"</span><span class="p">]</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">recipe</span><span class="p">[</span><span class="s2">"customizations"</span><span class="p">][</span><span class="s2">"services"</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"disabled"</span><span class="p">,</span> <span class="p">[]))</span>
|
||||
<span class="k">return</span> <span class="n">settings</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="get_default_services"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.get_default_services">[docs]</a><span class="k">def</span> <span class="nf">get_default_services</span><span class="p">(</span><span class="n">recipe</span><span class="p">):</span>
|
||||
<span class="sd">"""Get the default string for services, based on recipe</span>
|
||||
<span class="sd"> :param recipe: The recipe</span>
|
||||
|
||||
<span class="sd"> :type recipe: Recipe object</span>
|
||||
<span class="sd"> :returns: string with "services" or ""</span>
|
||||
<span class="sd"> :rtype: str</span>
|
||||
|
||||
<span class="sd"> When no services have been selected we don't need to add anything to the kickstart</span>
|
||||
<span class="sd"> so return an empty string. Otherwise return "services" which will be updated with</span>
|
||||
<span class="sd"> the settings.</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">services</span> <span class="o">=</span> <span class="n">get_services</span><span class="p">(</span><span class="n">recipe</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">services</span><span class="p">[</span><span class="s2">"enabled"</span><span class="p">]</span> <span class="ow">or</span> <span class="n">services</span><span class="p">[</span><span class="s2">"disabled"</span><span class="p">]:</span>
|
||||
<span class="k">return</span> <span class="s2">"services"</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="s2">""</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="customize_ks_template"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.customize_ks_template">[docs]</a><span class="k">def</span> <span class="nf">customize_ks_template</span><span class="p">(</span><span class="n">ks_template</span><span class="p">,</span> <span class="n">recipe</span><span class="p">):</span>
|
||||
<span class="sd">""" Customize the kickstart template and return it</span>
|
||||
|
||||
@ -330,26 +564,72 @@
|
||||
<span class="sd"> :param recipe:</span>
|
||||
<span class="sd"> :type recipe: Recipe object</span>
|
||||
|
||||
<span class="sd"> Apply customizations to existing template commands, or add defaults for ones that are</span>
|
||||
<span class="sd"> missing and required.</span>
|
||||
|
||||
<span class="sd"> Apply customizations.kernel.append to the bootloader argument in the template.</span>
|
||||
<span class="sd"> Add bootloader line if it is missing.</span>
|
||||
|
||||
<span class="sd"> Add default timezone if needed. It does NOT replace an existing timezone entry</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="n">kernel_append</span> <span class="o">=</span> <span class="n">get_kernel_append</span><span class="p">(</span><span class="n">recipe</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">kernel_append</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="n">ks_template</span>
|
||||
<span class="n">found_bootloader</span> <span class="o">=</span> <span class="kc">False</span>
|
||||
<span class="c1"># Commands to be modified [NEW-COMMAND-FUNC, NEW-VALUE, DEFAULT, REPLACE]</span>
|
||||
<span class="c1"># The function is called with a kickstart command string and the value to replace</span>
|
||||
<span class="c1"># The value is specific to the command, and is understood by the function</span>
|
||||
<span class="c1"># The default is a complete kickstart command string, suitable for writing to the template</span>
|
||||
<span class="c1"># If REPLACE is False it will not change an existing entry only add a missing one</span>
|
||||
<span class="n">commands</span> <span class="o">=</span> <span class="p">{</span><span class="s2">"bootloader"</span><span class="p">:</span> <span class="p">[</span><span class="n">bootloader_append</span><span class="p">,</span>
|
||||
<span class="n">get_kernel_append</span><span class="p">(</span><span class="n">recipe</span><span class="p">),</span>
|
||||
<span class="s1">'bootloader --location=none'</span><span class="p">,</span> <span class="kc">True</span><span class="p">],</span>
|
||||
<span class="s2">"timezone"</span><span class="p">:</span> <span class="p">[</span><span class="n">timezone_cmd</span><span class="p">,</span>
|
||||
<span class="n">get_timezone_settings</span><span class="p">(</span><span class="n">recipe</span><span class="p">),</span>
|
||||
<span class="s1">'timezone UTC'</span><span class="p">,</span> <span class="kc">False</span><span class="p">],</span>
|
||||
<span class="s2">"lang"</span><span class="p">:</span> <span class="p">[</span><span class="n">lang_cmd</span><span class="p">,</span>
|
||||
<span class="n">get_languages</span><span class="p">(</span><span class="n">recipe</span><span class="p">),</span>
|
||||
<span class="s1">'lang en_US.UTF-8'</span><span class="p">,</span> <span class="kc">True</span><span class="p">],</span>
|
||||
<span class="s2">"keyboard"</span><span class="p">:</span> <span class="p">[</span><span class="n">keyboard_cmd</span><span class="p">,</span>
|
||||
<span class="n">get_keyboard_layout</span><span class="p">(</span><span class="n">recipe</span><span class="p">),</span>
|
||||
<span class="s1">'keyboard --xlayouts us --vckeymap us'</span><span class="p">,</span> <span class="kc">True</span><span class="p">],</span>
|
||||
<span class="s2">"firewall"</span><span class="p">:</span> <span class="p">[</span><span class="n">firewall_cmd</span><span class="p">,</span>
|
||||
<span class="n">get_firewall_settings</span><span class="p">(</span><span class="n">recipe</span><span class="p">),</span>
|
||||
<span class="s1">'firewall --enabled'</span><span class="p">,</span> <span class="kc">True</span><span class="p">],</span>
|
||||
<span class="s2">"services"</span><span class="p">:</span> <span class="p">[</span><span class="n">services_cmd</span><span class="p">,</span>
|
||||
<span class="n">get_services</span><span class="p">(</span><span class="n">recipe</span><span class="p">),</span>
|
||||
<span class="n">get_default_services</span><span class="p">(</span><span class="n">recipe</span><span class="p">),</span> <span class="kc">True</span><span class="p">]</span>
|
||||
<span class="p">}</span>
|
||||
<span class="n">found</span> <span class="o">=</span> <span class="p">{}</span>
|
||||
|
||||
<span class="n">output</span> <span class="o">=</span> <span class="n">StringIO</span><span class="p">()</span>
|
||||
<span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="n">ks_template</span><span class="o">.</span><span class="n">splitlines</span><span class="p">():</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"bootloader"</span><span class="p">):</span>
|
||||
<span class="k">for</span> <span class="n">cmd</span> <span class="ow">in</span> <span class="n">commands</span><span class="p">:</span>
|
||||
<span class="p">(</span><span class="n">new_command</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="n">default</span><span class="p">,</span> <span class="n">replace</span><span class="p">)</span> <span class="o">=</span> <span class="n">commands</span><span class="p">[</span><span class="n">cmd</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="n">line</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="n">cmd</span><span class="p">):</span>
|
||||
<span class="n">found</span><span class="p">[</span><span class="n">cmd</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="k">if</span> <span class="n">value</span> <span class="ow">and</span> <span class="n">replace</span><span class="p">:</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"Replacing </span><span class="si">%s</span><span class="s2"> with </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">cmd</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">new_command</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">value</span><span class="p">),</span> <span class="n">file</span><span class="o">=</span><span class="n">output</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"Skipping </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">cmd</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">file</span><span class="o">=</span><span class="n">output</span><span class="p">)</span>
|
||||
<span class="k">break</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="c1"># No matches, write the line as-is</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">file</span><span class="o">=</span><span class="n">output</span><span class="p">)</span>
|
||||
<span class="k">continue</span>
|
||||
<span class="n">found_bootloader</span> <span class="o">=</span> <span class="kc">True</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"Found bootloader line: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">line</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">bootloader_append</span><span class="p">(</span><span class="n">line</span><span class="p">,</span> <span class="n">kernel_append</span><span class="p">),</span> <span class="n">file</span><span class="o">=</span><span class="n">output</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">found_bootloader</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="n">output</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="s1">'bootloader --append="</span><span class="si">%s</span><span class="s1">" --location=none'</span> <span class="o">%</span> <span class="n">kernel_append</span> <span class="o">+</span> <span class="n">output</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span></div>
|
||||
<span class="c1"># Write out defaults for the ones not found</span>
|
||||
<span class="c1"># These must go FIRST because the template still needs to have the packages added</span>
|
||||
<span class="n">defaults</span> <span class="o">=</span> <span class="n">StringIO</span><span class="p">()</span>
|
||||
<span class="k">for</span> <span class="n">cmd</span> <span class="ow">in</span> <span class="n">commands</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">cmd</span> <span class="ow">in</span> <span class="n">found</span><span class="p">:</span>
|
||||
<span class="k">continue</span>
|
||||
<span class="p">(</span><span class="n">new_command</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="n">default</span><span class="p">,</span> <span class="n">_</span><span class="p">)</span> <span class="o">=</span> <span class="n">commands</span><span class="p">[</span><span class="n">cmd</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="n">value</span> <span class="ow">and</span> <span class="n">default</span><span class="p">:</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"Setting </span><span class="si">%s</span><span class="s2"> to use </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">cmd</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">new_command</span><span class="p">(</span><span class="n">default</span><span class="p">,</span> <span class="n">value</span><span class="p">),</span> <span class="n">file</span><span class="o">=</span><span class="n">defaults</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">default</span><span class="p">:</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"Setting </span><span class="si">%s</span><span class="s2"> to </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">cmd</span><span class="p">,</span> <span class="n">default</span><span class="p">)</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">default</span><span class="p">,</span> <span class="n">file</span><span class="o">=</span><span class="n">defaults</span><span class="p">)</span>
|
||||
|
||||
<span class="k">return</span> <span class="n">defaults</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span> <span class="o">+</span> <span class="n">output</span><span class="o">.</span><span class="n">getvalue</span><span class="p">()</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="write_ks_root"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.write_ks_root">[docs]</a><span class="k">def</span> <span class="nf">write_ks_root</span><span class="p">(</span><span class="n">f</span><span class="p">,</span> <span class="n">user</span><span class="p">):</span>
|
||||
@ -708,9 +988,13 @@
|
||||
<span class="n">cfg_args</span><span class="p">[</span><span class="s2">"volid"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="n">cfg_args</span><span class="p">[</span><span class="s2">"extra_boot_args"</span><span class="p">]</span> <span class="o">=</span> <span class="n">get_kernel_append</span><span class="p">(</span><span class="n">recipe</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="s2">"compression"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">cfg_args</span><span class="p">:</span>
|
||||
<span class="n">cfg_args</span><span class="p">[</span><span class="s2">"compression"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"xz"</span>
|
||||
|
||||
<span class="k">if</span> <span class="s2">"compress_args"</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">cfg_args</span><span class="p">:</span>
|
||||
<span class="n">cfg_args</span><span class="p">[</span><span class="s2">"compress_args"</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
|
||||
<span class="n">cfg_args</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
|
||||
<span class="s2">"compression"</span><span class="p">:</span> <span class="s2">"xz"</span><span class="p">,</span>
|
||||
<span class="s2">"compress_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"ks"</span><span class="p">:</span> <span class="p">[</span><span class="n">ks_path</span><span class="p">],</span>
|
||||
<span class="s2">"logfile"</span><span class="p">:</span> <span class="n">log_dir</span><span class="p">,</span>
|
||||
<span class="s2">"timeout"</span><span class="p">:</span> <span class="mi">60</span><span class="p">,</span> <span class="c1"># 60 minute timeout</span>
|
||||
@ -755,6 +1039,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -762,9 +1047,11 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span> <span class="c1"># False instead of None because of TOML</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="n">default_image_name</span><span class="p">(</span><span class="s2">"xz"</span><span class="p">,</span> <span class="s2">"root.tar"</span><span class="p">),</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"app_template"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
@ -776,6 +1063,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -783,9 +1071,11 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span> <span class="c1"># False instead of None because of TOML</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"live.iso"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">"Anaconda"</span><span class="p">,</span> <span class="c1"># Live booting may expect this to be 'Anaconda'</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
@ -800,6 +1090,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -807,9 +1098,11 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span> <span class="c1"># False instead of None because of TOML</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.img"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
@ -822,6 +1115,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -829,9 +1123,11 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="s2">"qcow2"</span><span class="p">,</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.qcow2"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
@ -844,6 +1140,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -851,9 +1148,11 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span> <span class="c1"># False instead of None because of TOML</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"filesystem.img"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
@ -866,6 +1165,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -873,9 +1173,11 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.ami"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
@ -888,6 +1190,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -895,9 +1198,11 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="s2">"vpc"</span><span class="p">,</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"-o"</span><span class="p">,</span> <span class="s2">"subformat=fixed,force_size"</span><span class="p">],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.vhd"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
@ -910,6 +1215,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -917,9 +1223,11 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="s2">"vmdk"</span><span class="p">,</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.vmdk"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
@ -932,6 +1240,7 @@
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
@ -939,9 +1248,88 @@
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="s2">"qcow2"</span><span class="p">,</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.qcow2"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"app_template"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"app_file"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"google"</span><span class="p">:</span> <span class="p">{</span><span class="s2">"make_iso"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_disk"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"make_fsimage"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_vagrant"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">1024</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span> <span class="c1"># False instead of None because of TOML</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.tar.gz"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="s2">"disk.raw"</span><span class="p">,</span>
|
||||
<span class="s2">"compression"</span><span class="p">:</span> <span class="s2">"gzip"</span><span class="p">,</span>
|
||||
<span class="s2">"compress_args"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"-9"</span><span class="p">],</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"app_template"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"app_file"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"hyper-v"</span><span class="p">:</span> <span class="p">{</span><span class="s2">"make_iso"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_disk"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"make_fsimage"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_vagrant"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="s2">"vhdx"</span><span class="p">,</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.vhdx"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"app_template"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"app_file"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="p">},</span>
|
||||
<span class="s2">"alibaba"</span><span class="p">:</span> <span class="p">{</span><span class="s2">"make_iso"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_disk"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"make_fsimage"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_appliance"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ami"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_tar_disk"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_pxe_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_ostree_live"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_oci"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"make_vagrant"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"ostree"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_keep_size"</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
|
||||
<span class="s2">"live_rootfs_size"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_size_align"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="s2">"image_type"</span><span class="p">:</span> <span class="s2">"qcow2"</span><span class="p">,</span>
|
||||
<span class="s2">"qemu_args"</span><span class="p">:</span> <span class="p">[],</span>
|
||||
<span class="s2">"image_name"</span><span class="p">:</span> <span class="s2">"disk.qcow2"</span><span class="p">,</span>
|
||||
<span class="s2">"tar_disk_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
<span class="s2">"fs_label"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||||
<span class="s2">"image_only"</span><span class="p">:</span> <span class="kc">True</span><span class="p">,</span>
|
||||
<span class="s2">"app_name"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.config — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.config — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.crossdomain — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.crossdomain — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.dnfbase — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.dnfbase — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.gitrpm — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.gitrpm — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -292,10 +292,17 @@
|
||||
<span class="n">sourceIndex</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">add_source</span><span class="p">(</span><span class="n">GitArchiveTarball</span><span class="p">(</span><span class="n">gitRepo</span><span class="p">))</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">section_build</span> <span class="o">+=</span> <span class="s2">"tar -xvf </span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">sources</span><span class="p">[</span><span class="n">sourceIndex</span><span class="p">]</span><span class="o">.</span><span class="n">sourceName</span>
|
||||
<span class="n">dest</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">normpath</span><span class="p">(</span><span class="n">gitRepo</span><span class="p">[</span><span class="s2">"destination"</span><span class="p">])</span>
|
||||
<span class="c1"># Prevent double slash root</span>
|
||||
<span class="k">if</span> <span class="n">dest</span> <span class="o">==</span> <span class="s2">"/"</span><span class="p">:</span>
|
||||
<span class="n">dest</span> <span class="o">=</span> <span class="s2">""</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">create_parent_dirs</span><span class="p">(</span><span class="n">dest</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">section_install</span> <span class="o">+=</span> <span class="s2">"cp -r </span><span class="si">%s</span><span class="s2"> $RPM_BUILD_ROOT/</span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">gitRepo</span><span class="p">[</span><span class="s2">"rpmname"</span><span class="p">],</span> <span class="n">dest</span><span class="p">)</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">section_install</span> <span class="o">+=</span> <span class="s2">"cp -r </span><span class="si">%s</span><span class="s2">/. $RPM_BUILD_ROOT/</span><span class="si">%s</span><span class="se">\n</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">gitRepo</span><span class="p">[</span><span class="s2">"rpmname"</span><span class="p">],</span> <span class="n">dest</span><span class="p">)</span>
|
||||
<span class="n">sub</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_subpackage</span><span class="p">(</span><span class="kc">None</span><span class="p">)</span>
|
||||
<span class="n">sub</span><span class="o">.</span><span class="n">section_files</span> <span class="o">+=</span> <span class="s2">"</span><span class="si">%s</span><span class="s2">/"</span> <span class="o">%</span> <span class="n">dest</span></div></div>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">dest</span><span class="p">:</span>
|
||||
<span class="c1"># / is special, we don't want to include / itself, just what's under it</span>
|
||||
<span class="n">sub</span><span class="o">.</span><span class="n">section_files</span> <span class="o">+=</span> <span class="s2">"/*</span><span class="se">\n</span><span class="s2">"</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">sub</span><span class="o">.</span><span class="n">section_files</span> <span class="o">+=</span> <span class="s2">"</span><span class="si">%s</span><span class="s2">/</span><span class="se">\n</span><span class="s2">"</span> <span class="o">%</span> <span class="n">dest</span></div></div>
|
||||
|
||||
<div class="viewcode-block" id="make_git_rpm"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.gitrpm.make_git_rpm">[docs]</a><span class="k">def</span> <span class="nf">make_git_rpm</span><span class="p">(</span><span class="n">gitRepo</span><span class="p">,</span> <span class="n">dest</span><span class="p">):</span>
|
||||
<span class="sd">""" Create an rpm from the specified git repo</span>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.projects — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.projects — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.queue — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.queue — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.recipes — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.recipes — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -459,6 +459,12 @@
|
||||
<span class="n">description</span> <span class="o">=</span> <span class="n">recipe_dict</span><span class="p">[</span><span class="s2">"description"</span><span class="p">]</span>
|
||||
<span class="n">version</span> <span class="o">=</span> <span class="n">recipe_dict</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"version"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
|
||||
<span class="n">customizations</span> <span class="o">=</span> <span class="n">recipe_dict</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">"customizations"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># [customizations] was incorrectly documented at first, so we have to support using it</span>
|
||||
<span class="c1"># as [[customizations]] by grabbing the first element.</span>
|
||||
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">customizations</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
|
||||
<span class="n">customizations</span> <span class="o">=</span> <span class="n">customizations</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
|
||||
<span class="k">except</span> <span class="ne">KeyError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="k">raise</span> <span class="n">RecipeError</span><span class="p">(</span><span class="s2">"There was a problem parsing the recipe: </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.server — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.server — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.timestamp — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.timestamp — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.v0 — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.v0 — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api.workspace — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api.workspace — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.base — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.base — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.buildstamp — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.buildstamp — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.cmdline — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.cmdline — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -306,6 +306,8 @@
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Build an ami image"</span><span class="p">)</span>
|
||||
<span class="n">action</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--make-tar"</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s2">"store_true"</span><span class="p">,</span>
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Build a tar of the root filesystem"</span><span class="p">)</span>
|
||||
<span class="n">action</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--make-tar-disk"</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s2">"store_true"</span><span class="p">,</span>
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Build a tar of a partitioned disk image"</span><span class="p">)</span>
|
||||
<span class="n">action</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--make-pxe-live"</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s2">"store_true"</span><span class="p">,</span>
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Build a live pxe boot squashfs image"</span><span class="p">)</span>
|
||||
<span class="n">action</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--make-ostree-live"</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s2">"store_true"</span><span class="p">,</span>
|
||||
@ -373,8 +375,12 @@
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Path to existing filesystem image to use for creating final image."</span><span class="p">)</span>
|
||||
<span class="n">image_group</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--image-name"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Name of output file to create. Used for tar, fs and disk image. Default is a random name."</span><span class="p">)</span>
|
||||
<span class="n">image_group</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--tar-disk-name"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Name of the archive member for make-tar-disk."</span><span class="p">)</span>
|
||||
<span class="n">image_group</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--fs-label"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s2">"Anaconda"</span><span class="p">,</span>
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Label to set on fsimage, default is 'Anaconda'"</span><span class="p">)</span>
|
||||
<span class="n">image_group</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--image-size-align"</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="nb">int</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Create a disk image with a size that is a multiple of this value in MiB."</span><span class="p">)</span>
|
||||
<span class="n">image_group</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--image-type"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
|
||||
<span class="n">help</span><span class="o">=</span><span class="s2">"Create an image with qemu-img. See qemu-img --help for supported formats."</span><span class="p">)</span>
|
||||
<span class="n">image_group</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">"--qemu-arg"</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="s2">"append"</span><span class="p">,</span> <span class="n">dest</span><span class="o">=</span><span class="s2">"qemu_args"</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="p">[],</span>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.creator — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.creator — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -625,6 +625,9 @@
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Adding 1024M for reqpart --addboot"</span><span class="p">)</span>
|
||||
<span class="n">disk_size</span> <span class="o">+=</span> <span class="mi">1024</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">image_size_align</span><span class="p">:</span>
|
||||
<span class="n">disk_size</span> <span class="o">+=</span> <span class="n">opts</span><span class="o">.</span><span class="n">image_size_align</span> <span class="o">-</span> <span class="p">(</span><span class="n">disk_size</span> <span class="o">%</span> <span class="n">opts</span><span class="o">.</span><span class="n">image_size_align</span><span class="p">)</span>
|
||||
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Using disk size of </span><span class="si">%s</span><span class="s2">MiB"</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">disk_size</span></div>
|
||||
|
||||
@ -642,28 +645,49 @@
|
||||
|
||||
<span class="sd"> Use qemu+boot.iso or anaconda to install to a disk image.</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">image_name</span><span class="p">:</span>
|
||||
|
||||
<span class="c1"># For make_tar_disk, opts.image_name is the name of the final tarball.</span>
|
||||
<span class="c1"># Use opts.tar_disk_name as the name of the disk image</span>
|
||||
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">make_tar_disk</span><span class="p">:</span>
|
||||
<span class="n">disk_img</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">opts</span><span class="o">.</span><span class="n">result_dir</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">tar_disk_name</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">opts</span><span class="o">.</span><span class="n">image_name</span><span class="p">:</span>
|
||||
<span class="n">disk_img</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">opts</span><span class="o">.</span><span class="n">result_dir</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">image_name</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">disk_img</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">mktemp</span><span class="p">(</span><span class="n">prefix</span><span class="o">=</span><span class="s2">"lmc-disk-"</span><span class="p">,</span> <span class="n">suffix</span><span class="o">=</span><span class="s2">".img"</span><span class="p">,</span> <span class="nb">dir</span><span class="o">=</span><span class="n">opts</span><span class="o">.</span><span class="n">result_dir</span><span class="p">)</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"disk_img = </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">)</span>
|
||||
<span class="n">disk_size</span> <span class="o">=</span> <span class="n">calculate_disk_size</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">ks</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># For make_tar_disk, pass a second path parameter for the final tarball</span>
|
||||
<span class="c1"># not the final output file.</span>
|
||||
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">make_tar_disk</span><span class="p">:</span>
|
||||
<span class="n">tar_img</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">opts</span><span class="o">.</span><span class="n">result_dir</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">image_name</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">tar_img</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">no_virt</span><span class="p">:</span>
|
||||
<span class="n">novirt_install</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">,</span> <span class="n">cancel_func</span><span class="o">=</span><span class="n">cancel_func</span><span class="p">)</span>
|
||||
<span class="n">novirt_install</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">,</span> <span class="n">cancel_func</span><span class="o">=</span><span class="n">cancel_func</span><span class="p">,</span> <span class="n">tar_img</span><span class="o">=</span><span class="n">tar_img</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">install_log</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">opts</span><span class="o">.</span><span class="n">logfile</span><span class="p">))</span><span class="o">+</span><span class="s2">"/virt-install.log"</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"install_log = </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">install_log</span><span class="p">)</span>
|
||||
|
||||
<span class="n">virt_install</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">install_log</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">,</span> <span class="n">cancel_func</span><span class="o">=</span><span class="n">cancel_func</span><span class="p">)</span>
|
||||
<span class="n">virt_install</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">install_log</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">,</span> <span class="n">cancel_func</span><span class="o">=</span><span class="n">cancel_func</span><span class="p">,</span> <span class="n">tar_img</span><span class="o">=</span><span class="n">tar_img</span><span class="p">)</span>
|
||||
<span class="k">except</span> <span class="n">InstallError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"Install failed: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">opts</span><span class="o">.</span><span class="n">keep_image</span> <span class="ow">and</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">disk_img</span><span class="p">):</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Removing bad disk image"</span><span class="p">)</span>
|
||||
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">disk_img</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">opts</span><span class="o">.</span><span class="n">keep_image</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">disk_img</span><span class="p">):</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Removing bad disk image"</span><span class="p">)</span>
|
||||
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">disk_img</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">tar_img</span> <span class="ow">and</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">tar_img</span><span class="p">):</span>
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Removing bad tar file"</span><span class="p">)</span>
|
||||
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">tar_img</span><span class="p">)</span>
|
||||
<span class="k">raise</span>
|
||||
|
||||
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Disk Image install successful"</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">make_tar_disk</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="n">tar_img</span>
|
||||
|
||||
<span class="k">return</span> <span class="n">disk_img</span></div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.decorators — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.decorators — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.discinfo — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.discinfo — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.dnfbase — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.dnfbase — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.dnfhelper — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.dnfhelper — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.executils — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.executils — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.imgutils — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.imgutils — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -194,8 +194,8 @@
|
||||
|
||||
<span class="c1">######## Functions for making container images (cpio, tar, squashfs) ##########</span>
|
||||
|
||||
<div class="viewcode-block" id="compress"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.compress">[docs]</a><span class="k">def</span> <span class="nf">compress</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">rootdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="s2">"xz"</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">'''Make a compressed archive of the given rootdir.</span>
|
||||
<div class="viewcode-block" id="compress"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.compress">[docs]</a><span class="k">def</span> <span class="nf">compress</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">root</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="s2">"xz"</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">'''Make a compressed archive of the given rootdir or file.</span>
|
||||
<span class="sd"> command is a list of the archiver commands to run</span>
|
||||
<span class="sd"> compression should be "xz", "gzip", "lzma", "bzip2", or None.</span>
|
||||
<span class="sd"> compressargs will be used on the compression commandline.'''</span>
|
||||
@ -218,12 +218,23 @@
|
||||
<span class="n">compression</span> <span class="o">=</span> <span class="s2">"pbzip2"</span>
|
||||
<span class="n">compressargs</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s2">"-p</span><span class="si">%d</span><span class="s2">"</span> <span class="o">%</span> <span class="n">multiprocessing</span><span class="o">.</span><span class="n">cpu_count</span><span class="p">())</span>
|
||||
|
||||
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"find </span><span class="si">%s</span><span class="s2"> -print0 |</span><span class="si">%s</span><span class="s2"> | </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2"> > </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">rootdir</span><span class="p">,</span> <span class="s2">" "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">command</span><span class="p">),</span>
|
||||
<span class="n">compression</span><span class="p">,</span> <span class="s2">" "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">compressargs</span><span class="p">),</span> <span class="n">outfile</span><span class="p">)</span>
|
||||
<span class="n">find</span><span class="p">,</span> <span class="n">archive</span><span class="p">,</span> <span class="n">comp</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">,</span> <span class="kc">None</span>
|
||||
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="n">find</span> <span class="o">=</span> <span class="n">Popen</span><span class="p">([</span><span class="s2">"find"</span><span class="p">,</span> <span class="s2">"."</span><span class="p">,</span> <span class="s2">"-print0"</span><span class="p">],</span> <span class="n">stdout</span><span class="o">=</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">cwd</span><span class="o">=</span><span class="n">rootdir</span><span class="p">)</span>
|
||||
<span class="n">archive</span> <span class="o">=</span> <span class="n">Popen</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">stdin</span><span class="o">=</span><span class="n">find</span><span class="o">.</span><span class="n">stdout</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">cwd</span><span class="o">=</span><span class="n">rootdir</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isdir</span><span class="p">(</span><span class="n">root</span><span class="p">):</span>
|
||||
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"find </span><span class="si">%s</span><span class="s2"> -print0 |</span><span class="si">%s</span><span class="s2"> | </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2"> > </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">root</span><span class="p">,</span> <span class="s2">" "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">command</span><span class="p">),</span>
|
||||
<span class="n">compression</span><span class="p">,</span> <span class="s2">" "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">compressargs</span><span class="p">),</span> <span class="n">outfile</span><span class="p">)</span>
|
||||
|
||||
<span class="n">find</span> <span class="o">=</span> <span class="n">Popen</span><span class="p">([</span><span class="s2">"find"</span><span class="p">,</span> <span class="s2">"."</span><span class="p">,</span> <span class="s2">"-print0"</span><span class="p">],</span> <span class="n">stdout</span><span class="o">=</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">cwd</span><span class="o">=</span><span class="n">root</span><span class="p">)</span>
|
||||
<span class="n">archive</span> <span class="o">=</span> <span class="n">Popen</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">stdin</span><span class="o">=</span><span class="n">find</span><span class="o">.</span><span class="n">stdout</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">cwd</span><span class="o">=</span><span class="n">root</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="n">logger</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"echo </span><span class="si">%s</span><span class="s2"> |</span><span class="si">%s</span><span class="s2"> | </span><span class="si">%s</span><span class="s2"> </span><span class="si">%s</span><span class="s2"> > </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">root</span><span class="p">,</span> <span class="s2">" "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">command</span><span class="p">),</span>
|
||||
<span class="n">compression</span><span class="p">,</span> <span class="s2">" "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">compressargs</span><span class="p">),</span> <span class="n">outfile</span><span class="p">)</span>
|
||||
|
||||
<span class="n">archive</span> <span class="o">=</span> <span class="n">Popen</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">stdin</span><span class="o">=</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="n">PIPE</span><span class="p">,</span> <span class="n">cwd</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">root</span><span class="p">))</span>
|
||||
<span class="n">archive</span><span class="o">.</span><span class="n">stdin</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">root</span><span class="p">)</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s2">"utf-8"</span><span class="p">)</span> <span class="o">+</span> <span class="sa">b</span><span class="s2">"</span><span class="se">\0</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="n">archive</span><span class="o">.</span><span class="n">stdin</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
|
||||
|
||||
<span class="n">comp</span> <span class="o">=</span> <span class="n">Popen</span><span class="p">([</span><span class="n">compression</span><span class="p">]</span> <span class="o">+</span> <span class="n">compressargs</span><span class="p">,</span>
|
||||
<span class="n">stdin</span><span class="o">=</span><span class="n">archive</span><span class="o">.</span><span class="n">stdout</span><span class="p">,</span> <span class="n">stdout</span><span class="o">=</span><span class="nb">open</span><span class="p">(</span><span class="n">outfile</span><span class="p">,</span> <span class="s2">"wb"</span><span class="p">))</span>
|
||||
<span class="n">comp</span><span class="o">.</span><span class="n">wait</span><span class="p">()</span>
|
||||
@ -234,18 +245,18 @@
|
||||
<span class="nb">list</span><span class="p">(</span><span class="n">p</span><span class="o">.</span><span class="n">kill</span><span class="p">()</span> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="p">(</span><span class="n">find</span><span class="p">,</span> <span class="n">archive</span><span class="p">,</span> <span class="n">comp</span><span class="p">)</span> <span class="k">if</span> <span class="n">p</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="mi">1</span></div>
|
||||
|
||||
<div class="viewcode-block" id="mkcpio"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.mkcpio">[docs]</a><span class="k">def</span> <span class="nf">mkcpio</span><span class="p">(</span><span class="n">rootdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="s2">"xz"</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<div class="viewcode-block" id="mkcpio"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.mkcpio">[docs]</a><span class="k">def</span> <span class="nf">mkcpio</span><span class="p">(</span><span class="n">root</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="s2">"xz"</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="n">compressargs</span> <span class="o">=</span> <span class="n">compressargs</span> <span class="ow">or</span> <span class="p">[</span><span class="s2">"-9"</span><span class="p">]</span>
|
||||
<span class="k">return</span> <span class="n">compress</span><span class="p">([</span><span class="s2">"cpio"</span><span class="p">,</span> <span class="s2">"--null"</span><span class="p">,</span> <span class="s2">"--quiet"</span><span class="p">,</span> <span class="s2">"-H"</span><span class="p">,</span> <span class="s2">"newc"</span><span class="p">,</span> <span class="s2">"-o"</span><span class="p">],</span>
|
||||
<span class="n">rootdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span></div>
|
||||
<span class="n">root</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="mktar"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.mktar">[docs]</a><span class="k">def</span> <span class="nf">mktar</span><span class="p">(</span><span class="n">rootdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="s2">"xz"</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">selinux</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
|
||||
<div class="viewcode-block" id="mktar"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.mktar">[docs]</a><span class="k">def</span> <span class="nf">mktar</span><span class="p">(</span><span class="n">root</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="s2">"xz"</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">selinux</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
|
||||
<span class="n">compressargs</span> <span class="o">=</span> <span class="n">compressargs</span> <span class="ow">or</span> <span class="p">[</span><span class="s2">"-9"</span><span class="p">]</span>
|
||||
<span class="n">tar_cmd</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"tar"</span><span class="p">,</span> <span class="s2">"--no-recursion"</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="n">selinux</span><span class="p">:</span>
|
||||
<span class="n">tar_cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="s2">"--selinux"</span><span class="p">,</span> <span class="s2">"--acls"</span><span class="p">,</span> <span class="s2">"--xattrs"</span><span class="p">]</span>
|
||||
<span class="n">tar_cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="s2">"-cf-"</span><span class="p">,</span> <span class="s2">"--null"</span><span class="p">,</span> <span class="s2">"-T-"</span><span class="p">]</span>
|
||||
<span class="k">return</span> <span class="n">compress</span><span class="p">(</span><span class="n">tar_cmd</span><span class="p">,</span> <span class="n">rootdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span></div>
|
||||
<span class="k">return</span> <span class="n">compress</span><span class="p">(</span><span class="n">tar_cmd</span><span class="p">,</span> <span class="n">root</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="mksquashfs"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.mksquashfs">[docs]</a><span class="k">def</span> <span class="nf">mksquashfs</span><span class="p">(</span><span class="n">rootdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="s2">"default"</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">'''Make a squashfs image containing the given rootdir.'''</span>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.installer — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.installer — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -481,7 +481,7 @@
|
||||
<span class="k">return</span> <span class="n">rc</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="novirt_install"><a class="viewcode-back" href="../../pylorax.html#pylorax.installer.novirt_install">[docs]</a><span class="k">def</span> <span class="nf">novirt_install</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">,</span> <span class="n">cancel_func</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<div class="viewcode-block" id="novirt_install"><a class="viewcode-back" href="../../pylorax.html#pylorax.installer.novirt_install">[docs]</a><span class="k">def</span> <span class="nf">novirt_install</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">,</span> <span class="n">cancel_func</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">tar_img</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Use Anaconda to install to a disk image</span>
|
||||
|
||||
@ -491,6 +491,7 @@
|
||||
<span class="sd"> :param int disk_size: The size of the disk_img in MiB</span>
|
||||
<span class="sd"> :param cancel_func: Function that returns True to cancel build</span>
|
||||
<span class="sd"> :type cancel_func: function</span>
|
||||
<span class="sd"> :param str tar_img: For make_tar_disk, the path to final tarball to be created</span>
|
||||
|
||||
<span class="sd"> This method runs anaconda to create the image and then based on the opts</span>
|
||||
<span class="sd"> passed creates a qemu disk image or tarfile.</span>
|
||||
@ -667,10 +668,22 @@
|
||||
<span class="k">raise</span> <span class="n">InstallError</span><span class="p">(</span><span class="s2">"novirt_install mktar failed: rc=</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">rc</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="c1"># For raw disk images, use fallocate to deallocate unused space</span>
|
||||
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">"fallocate"</span><span class="p">,</span> <span class="p">[</span><span class="s2">"--dig-holes"</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">],</span> <span class="n">raise_err</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span></div>
|
||||
<span class="n">execWithRedirect</span><span class="p">(</span><span class="s2">"fallocate"</span><span class="p">,</span> <span class="p">[</span><span class="s2">"--dig-holes"</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">],</span> <span class="n">raise_err</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># For make_tar_disk, wrap the result in a tar file, and remove the original disk image.</span>
|
||||
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">make_tar_disk</span><span class="p">:</span>
|
||||
<span class="n">compress_args</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="k">for</span> <span class="n">arg</span> <span class="ow">in</span> <span class="n">opts</span><span class="o">.</span><span class="n">compress_args</span><span class="p">:</span>
|
||||
<span class="n">compress_args</span> <span class="o">+=</span> <span class="n">arg</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">" "</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
|
||||
|
||||
<div class="viewcode-block" id="virt_install"><a class="viewcode-back" href="../../pylorax.html#pylorax.installer.virt_install">[docs]</a><span class="k">def</span> <span class="nf">virt_install</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">install_log</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">,</span> <span class="n">cancel_func</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="n">rc</span> <span class="o">=</span> <span class="n">mktar</span><span class="p">(</span><span class="n">disk_img</span><span class="p">,</span> <span class="n">tar_img</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">compression</span><span class="p">,</span> <span class="n">compress_args</span><span class="p">,</span> <span class="n">selinux</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">rc</span><span class="p">:</span>
|
||||
<span class="k">raise</span> <span class="n">InstallError</span><span class="p">(</span><span class="s2">"novirt_install mktar failed: rc=</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">rc</span><span class="p">)</span>
|
||||
|
||||
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">disk_img</span><span class="p">)</span></div>
|
||||
|
||||
<div class="viewcode-block" id="virt_install"><a class="viewcode-back" href="../../pylorax.html#pylorax.installer.virt_install">[docs]</a><span class="k">def</span> <span class="nf">virt_install</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">install_log</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">disk_size</span><span class="p">,</span> <span class="n">cancel_func</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">tar_img</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
|
||||
<span class="sd">"""</span>
|
||||
<span class="sd"> Use qemu to install to a disk image</span>
|
||||
|
||||
@ -681,6 +694,7 @@
|
||||
<span class="sd"> :param int disk_size: The size of the disk_img in MiB</span>
|
||||
<span class="sd"> :param cancel_func: Function that returns True to cancel build</span>
|
||||
<span class="sd"> :type cancel_func: function</span>
|
||||
<span class="sd"> :param str tar_img: For make_tar_disk, the path to final tarball to be created</span>
|
||||
|
||||
<span class="sd"> This uses qemu with a boot.iso and a kickstart to create a disk</span>
|
||||
<span class="sd"> image and then optionally, based on the opts passed, creates tarfile.</span>
|
||||
@ -794,7 +808,20 @@
|
||||
<span class="n">rc</span> <span class="o">=</span> <span class="n">mktar</span><span class="p">(</span><span class="n">vagrant_dir</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">compression</span><span class="p">,</span> <span class="n">compress_args</span><span class="p">,</span> <span class="n">selinux</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">rc</span><span class="p">:</span>
|
||||
<span class="k">raise</span> <span class="n">InstallError</span><span class="p">(</span><span class="s2">"virt_install failed"</span><span class="p">)</span>
|
||||
<span class="n">shutil</span><span class="o">.</span><span class="n">rmtree</span><span class="p">(</span><span class="n">vagrant_dir</span><span class="p">)</span></div>
|
||||
<span class="n">shutil</span><span class="o">.</span><span class="n">rmtree</span><span class="p">(</span><span class="n">vagrant_dir</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># For make_tar_disk, wrap the result in a tar file, and remove the original disk image.</span>
|
||||
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">make_tar_disk</span><span class="p">:</span>
|
||||
<span class="n">compress_args</span> <span class="o">=</span> <span class="p">[]</span>
|
||||
<span class="k">for</span> <span class="n">arg</span> <span class="ow">in</span> <span class="n">opts</span><span class="o">.</span><span class="n">compress_args</span><span class="p">:</span>
|
||||
<span class="n">compress_args</span> <span class="o">+=</span> <span class="n">arg</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">" "</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
|
||||
|
||||
<span class="n">rc</span> <span class="o">=</span> <span class="n">mktar</span><span class="p">(</span><span class="n">disk_img</span><span class="p">,</span> <span class="n">tar_img</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">compression</span><span class="p">,</span> <span class="n">compress_args</span><span class="p">,</span> <span class="n">selinux</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">rc</span><span class="p">:</span>
|
||||
<span class="k">raise</span> <span class="n">InstallError</span><span class="p">(</span><span class="s2">"virt_install mktar failed: rc=</span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="n">rc</span><span class="p">)</span>
|
||||
|
||||
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">disk_img</span><span class="p">)</span></div>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.ltmpl — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.ltmpl — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.monitor — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.monitor — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.mount — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.mount — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.sysutils — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.sysutils — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.treebuilder — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.treebuilder — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.treeinfo — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.treeinfo — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -40,8 +40,8 @@ compose start http-server qcow2``. It will print a UUID that you can use to
|
||||
keep track of the build. You can also cancel the build if needed.
|
||||
|
||||
The available types of images is displayed by ``composer-cli compose types``.
|
||||
Currently this consists of: ami, ext4-filesystem, live-iso, openstack,
|
||||
partitioned-disk, qcow2, tar, vhd, vmdk
|
||||
Currently this consists of: alibaba, ami, ext4-filesystem, google, hyper-v,
|
||||
live-iso, openstack, partitioned-disk, qcow2, tar, vhd, vmdk
|
||||
|
||||
Monitor the build status
|
||||
------------------------
|
||||
|
@ -175,11 +175,13 @@ for selecting optional packages.
|
||||
Customizations
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
The ``[[customizations]]`` section can be used to configure the hostname of the final image. eg.::
|
||||
The ``[customizations]`` section can be used to configure the hostname of the final image. eg.::
|
||||
|
||||
[[customizations]]
|
||||
[customizations]
|
||||
hostname = "baseimage"
|
||||
|
||||
This is optional and may be left out to use the defaults.
|
||||
|
||||
|
||||
[customizations.kernel]
|
||||
***********************
|
||||
@ -244,6 +246,93 @@ Add a group to the image. ``name`` is required and ``gid`` is optional::
|
||||
gid = 1130
|
||||
|
||||
|
||||
[customizations.timezone]
|
||||
*************************
|
||||
|
||||
Customizing the timezone and the NTP servers to use for the system::
|
||||
|
||||
[customizations.timezone]
|
||||
timezone = "US/Eastern"
|
||||
ntpservers = ["0.north-america.pool.ntp.org", "1.north-america.pool.ntp.org"]
|
||||
|
||||
The values supported by ``timezone`` can be listed by running ``timedatectl list-timezones``.
|
||||
|
||||
If no timezone is setup the system will default to using `UTC`. The ntp servers are also
|
||||
optional and will default to using the distribution defaults which are fine for most uses.
|
||||
|
||||
In some image types there are already NTP servers setup, eg. Google cloud image, and they
|
||||
cannot be overridden because they are required to boot in the selected environment. But the
|
||||
timezone will be updated to the one selected in the blueprint.
|
||||
|
||||
|
||||
[customizations.locale]
|
||||
***********************
|
||||
|
||||
Customize the locale settings for the system::
|
||||
|
||||
[customizations.locale]
|
||||
languages = ["en_US.UTF-8"]
|
||||
keyboard = "us"
|
||||
|
||||
The values supported by ``languages`` can be listed by running ``localectl list-locales`` from
|
||||
the command line.
|
||||
|
||||
The values supported by ``keyboard`` can be listed by running ``localectl list-keymaps`` from
|
||||
the command line.
|
||||
|
||||
Multiple languages can be added. The first one becomes the
|
||||
primary, and the others are added as secondary. One or the other of ``languages``
|
||||
or ``keyboard`` must be included (or both) in the section.
|
||||
|
||||
|
||||
[customizations.firewall]
|
||||
*************************
|
||||
|
||||
By default the firewall blocks all access except for services that enable their ports explicitly,
|
||||
like ``sshd``. This command can be used to open other ports or services. Ports are configured using
|
||||
the port:protocol format::
|
||||
|
||||
[customizations.firewall]
|
||||
ports = ["22:tcp", "80:tcp", "imap:tcp", "53:tcp", "53:udp"]
|
||||
|
||||
Numeric ports, or their names from ``/etc/services`` can be used in the ``ports`` enabled/disabled lists.
|
||||
|
||||
The blueprint settings extend any existing settings in the image templates, so if ``sshd`` is
|
||||
already enabled it will extend the list of ports with the ones listed by the blueprint.
|
||||
|
||||
If the distribution uses ``firewalld`` you can specify services listed by ``firewall-cmd --get-services``
|
||||
in a ``customizations.firewall.services`` section::
|
||||
|
||||
[customizations.firewall.services]
|
||||
enabled = ["ftp", "ntp", "dhcp"]
|
||||
disabled = ["telnet"]
|
||||
|
||||
Remember that the ``firewall.services`` are different from the names in ``/etc/services``.
|
||||
|
||||
Both are optional, if they are not used leave them out or set them to an empty list ``[]``. If you
|
||||
only want the default firewall setup this section can be omitted from the blueprint.
|
||||
|
||||
NOTE: The ``Google`` and ``OpenStack`` templates explicitly disable the firewall for their environment.
|
||||
This cannot be overridden by the blueprint.
|
||||
|
||||
[customizations.services]
|
||||
*************************
|
||||
|
||||
This section can be used to control which services are enabled at boot time.
|
||||
Some image types already have services enabled or disabled in order for the
|
||||
image to work correctly, and cannot be overridden. eg. ``ami`` requires
|
||||
``sshd``, ``chronyd``, and ``cloud-init``. Without them the image will not
|
||||
boot. Blueprint services are added to, not replacing, the list already in the
|
||||
templates, if any.
|
||||
|
||||
The service names are systemd service units. You may specify any systemd unit
|
||||
file accepted by ``systemctl enable`` eg. ``cockpit.socket``::
|
||||
|
||||
[customizations.services]
|
||||
enabled = ["sshd", "cockpit.socket", "httpd"]
|
||||
disabled = ["postfix", "telnetd"]
|
||||
|
||||
|
||||
[[repos.git]]
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
@ -401,11 +401,13 @@ table.citation td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
th > p:first-child,
|
||||
td > p:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
td > p:only-child {
|
||||
th > p:last-child,
|
||||
td > p:last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
@ -482,7 +484,7 @@ li > p:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
li > p:only-child {
|
||||
li > p:last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '31.1',
|
||||
VERSION: '31.4',
|
||||
LANGUAGE: 'None',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer-cli — Lorax 31.1 documentation</title>
|
||||
<title>composer-cli — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -315,8 +315,8 @@ saved by viewing the changelog - <code class="docutils literal notranslate"><spa
|
||||
<span class="pre">compose</span> <span class="pre">start</span> <span class="pre">http-server</span> <span class="pre">qcow2</span></code>. It will print a UUID that you can use to
|
||||
keep track of the build. You can also cancel the build if needed.</p>
|
||||
<p>The available types of images is displayed by <code class="docutils literal notranslate"><span class="pre">composer-cli</span> <span class="pre">compose</span> <span class="pre">types</span></code>.
|
||||
Currently this consists of: ami, ext4-filesystem, live-iso, openstack,
|
||||
partitioned-disk, qcow2, tar, vhd, vmdk</p>
|
||||
Currently this consists of: alibaba, ami, ext4-filesystem, google, hyper-v,
|
||||
live-iso, openstack, partitioned-disk, qcow2, tar, vhd, vmdk</p>
|
||||
</div>
|
||||
<div class="section" id="monitor-the-build-status">
|
||||
<h2>Monitor the build status<a class="headerlink" href="#monitor-the-build-status" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer.cli package — Lorax 31.1 documentation</title>
|
||||
<title>composer.cli package — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>composer package — Lorax 31.1 documentation</title>
|
||||
<title>composer package — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Index — Lorax 31.1 documentation</title>
|
||||
<title>Index — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -513,6 +513,8 @@
|
||||
<li><a href="pylorax.html#pylorax.monitor.LogRequestHandler.finish">finish() (pylorax.monitor.LogRequestHandler method)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.treebuilder.RuntimeBuilder.finished">finished() (pylorax.treebuilder.RuntimeBuilder method)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.firewall_cmd">firewall_cmd() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.freeze">freeze() (pylorax.api.recipes.Recipe method)</a>
|
||||
</li>
|
||||
@ -541,20 +543,28 @@
|
||||
<li><a href="pylorax.api.html#pylorax.api.queue.get_compose_type">get_compose_type() (in module pylorax.api.queue)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.config.ComposerConfig.get_default">get_default() (pylorax.api.config.ComposerConfig method)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_default_services">get_default_services() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.dnfbase.get_dnf_base_object">get_dnf_base_object() (in module pylorax.dnfbase)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_extra_pkgs">get_extra_pkgs() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="composer.html#composer.http_client.get_filename">get_filename() (in module composer.http_client)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_firewall_settings">get_firewall_settings() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.queue.get_image_name">get_image_name() (in module pylorax.api.queue)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.mount.IsoMountpoint.get_iso_label">get_iso_label() (pylorax.mount.IsoMountpoint method)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_kernel_append">get_kernel_append() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_kernel_append">get_kernel_append() (in module pylorax.api.compose)</a>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_keyboard_layout">get_keyboard_layout() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_languages">get_languages() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.imgutils.get_loop_name">get_loop_name() (in module pylorax.imgutils)</a>
|
||||
</li>
|
||||
@ -563,8 +573,12 @@
|
||||
<li><a href="pylorax.api.html#pylorax.api.projects.get_repo_sources">get_repo_sources() (in module pylorax.api.projects)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.recipes.get_revision_from_tag">get_revision_from_tag() (in module pylorax.api.recipes)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_services">get_services() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.projects.get_source_ids">get_source_ids() (in module pylorax.api.projects)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.get_timezone_settings">get_timezone_settings() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="composer.html#composer.http_client.get_url_json">get_url_json() (in module composer.http_client)</a>
|
||||
</li>
|
||||
@ -664,6 +678,8 @@
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.keyboard_cmd">keyboard_cmd() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.imgutils.kpartx_disk_img">kpartx_disk_img() (in module pylorax.imgutils)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
@ -672,6 +688,8 @@
|
||||
<h2 id="L">L</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.lang_cmd">lang_cmd() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.ArchData.lib64_arches">lib64_arches (pylorax.ArchData attribute)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.sysutils.linktree">linktree() (in module pylorax.sysutils)</a>
|
||||
@ -1110,6 +1128,8 @@
|
||||
<h2 id="S">S</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.services_cmd">services_cmd() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.executils.setenv">setenv() (in module pylorax.executils)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.monitor.LogRequestHandler.setup">setup() (pylorax.monitor.LogRequestHandler method)</a>
|
||||
@ -1129,11 +1149,11 @@
|
||||
<li><a href="composer.cli.html#composer.cli.sources.sources_cmd">sources_cmd() (in module composer.cli.sources)</a>
|
||||
</li>
|
||||
<li><a href="composer.cli.html#composer.cli.sources.sources_delete">sources_delete() (in module composer.cli.sources)</a>
|
||||
</li>
|
||||
<li><a href="composer.cli.html#composer.cli.sources.sources_info">sources_info() (in module composer.cli.sources)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="composer.cli.html#composer.cli.sources.sources_info">sources_info() (in module composer.cli.sources)</a>
|
||||
</li>
|
||||
<li><a href="composer.cli.html#composer.cli.sources.sources_list">sources_list() (in module composer.cli.sources)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.html#pylorax.ltmpl.split_and_expand">split_and_expand() (in module pylorax.ltmpl)</a>
|
||||
@ -1179,6 +1199,8 @@
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="pylorax.api.html#pylorax.api.timestamp.timestamp_dict">timestamp_dict() (in module pylorax.api.timestamp)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.compose.timezone_cmd">timezone_cmd() (in module pylorax.api.compose)</a>
|
||||
</li>
|
||||
<li><a href="pylorax.api.html#pylorax.api.recipes.Recipe.toml">toml() (pylorax.api.recipes.Recipe method)</a>
|
||||
</li>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Welcome to Lorax's documentation! — Lorax 31.1 documentation</title>
|
||||
<title>Welcome to Lorax's documentation! — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Introduction to Lorax — Lorax 31.1 documentation</title>
|
||||
<title>Introduction to Lorax — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>livemedia-creator — Lorax 31.1 documentation</title>
|
||||
<title>livemedia-creator — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -226,7 +226,7 @@ you have the anaconda-tui package installed.</p>
|
||||
<p><p>Create Live Install Media</p>
|
||||
</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">livemedia</span><span class="o">-</span><span class="n">creator</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span>
|
||||
<span class="p">(</span><span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">iso</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">disk</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">fsimage</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">appliance</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">ami</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">tar</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">pxe</span><span class="o">-</span><span class="n">live</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">ostree</span><span class="o">-</span><span class="n">live</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">oci</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">vagrant</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">iso</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">disk</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">fsimage</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">appliance</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">ami</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">tar</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">tar</span><span class="o">-</span><span class="n">disk</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">pxe</span><span class="o">-</span><span class="n">live</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">ostree</span><span class="o">-</span><span class="n">live</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">oci</span> <span class="o">|</span> <span class="o">--</span><span class="n">make</span><span class="o">-</span><span class="n">vagrant</span><span class="p">)</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">iso</span> <span class="n">ISO</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">iso</span><span class="o">-</span><span class="n">only</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">iso</span><span class="o">-</span><span class="n">name</span> <span class="n">ISO_NAME</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">ks</span> <span class="n">KS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">only</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">no</span><span class="o">-</span><span class="n">virt</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">proxy</span> <span class="n">PROXY</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">anaconda</span><span class="o">-</span><span class="n">arg</span> <span class="n">ANACONDA_ARGS</span><span class="p">]</span>
|
||||
@ -237,9 +237,11 @@ you have the anaconda-tui package installed.</p>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">extra</span><span class="o">-</span><span class="n">boot</span><span class="o">-</span><span class="n">args</span> <span class="n">EXTRA_BOOT_ARGS</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">disk</span><span class="o">-</span><span class="n">image</span> <span class="n">DISK_IMAGE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">keep</span><span class="o">-</span><span class="n">image</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">fs</span><span class="o">-</span><span class="n">image</span> <span class="n">FS_IMAGE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">name</span> <span class="n">IMAGE_NAME</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">fs</span><span class="o">-</span><span class="n">label</span> <span class="n">FS_LABEL</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="nb">type</span> <span class="n">IMAGE_TYPE</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">qemu</span><span class="o">-</span><span class="n">arg</span> <span class="n">QEMU_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">qcow2</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">qcow2</span><span class="o">-</span><span class="n">arg</span> <span class="n">QEMU_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">compression</span> <span class="n">COMPRESSION</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">tar</span><span class="o">-</span><span class="n">disk</span><span class="o">-</span><span class="n">name</span> <span class="n">TAR_DISK_NAME</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">fs</span><span class="o">-</span><span class="n">label</span> <span class="n">FS_LABEL</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="n">size</span><span class="o">-</span><span class="n">align</span> <span class="n">IMAGE_SIZE_ALIGN</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">image</span><span class="o">-</span><span class="nb">type</span> <span class="n">IMAGE_TYPE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">qemu</span><span class="o">-</span><span class="n">arg</span> <span class="n">QEMU_ARGS</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">qcow2</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">qcow2</span><span class="o">-</span><span class="n">arg</span> <span class="n">QEMU_ARGS</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">compression</span> <span class="n">COMPRESSION</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">compress</span><span class="o">-</span><span class="n">arg</span> <span class="n">COMPRESS_ARGS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">name</span> <span class="n">APP_NAME</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">template</span> <span class="n">APP_TEMPLATE</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">app</span><span class="o">-</span><span class="n">file</span> <span class="n">APP_FILE</span><span class="p">]</span>
|
||||
<span class="p">[</span><span class="o">--</span><span class="n">ram</span> <span class="n">MEMORY</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">vcpus</span> <span class="n">VCPUS</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">vnc</span> <span class="n">VNC</span><span class="p">]</span>
|
||||
@ -283,6 +285,10 @@ you have the anaconda-tui package installed.</p>
|
||||
<dd><p>Build a tar of the root filesystem</p>
|
||||
<p>Default: False</p>
|
||||
</dd>
|
||||
<dt><kbd>--make-tar-disk</kbd></dt>
|
||||
<dd><p>Build a tar of a partitioned disk image</p>
|
||||
<p>Default: False</p>
|
||||
</dd>
|
||||
<dt><kbd>--make-pxe-live</kbd></dt>
|
||||
<dd><p>Build a live pxe boot squashfs image</p>
|
||||
<p>Default: False</p>
|
||||
@ -398,10 +404,17 @@ you have the anaconda-tui package installed.</p>
|
||||
<dt><kbd>--image-name</kbd></dt>
|
||||
<dd><p>Name of output file to create. Used for tar, fs and disk image. Default is a random name.</p>
|
||||
</dd>
|
||||
<dt><kbd>--tar-disk-name</kbd></dt>
|
||||
<dd><p>Name of the archive member for make-tar-disk.</p>
|
||||
</dd>
|
||||
<dt><kbd>--fs-label</kbd></dt>
|
||||
<dd><p>Label to set on fsimage, default is 'Anaconda'</p>
|
||||
<p>Default: "Anaconda"</p>
|
||||
</dd>
|
||||
<dt><kbd>--image-size-align</kbd></dt>
|
||||
<dd><p>Create a disk image with a size that is a multiple of this value in MiB.</p>
|
||||
<p>Default: 0</p>
|
||||
</dd>
|
||||
<dt><kbd>--image-type</kbd></dt>
|
||||
<dd><p>Create an image with qemu-img. See qemu-img --help for supported formats.</p>
|
||||
</dd>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>lorax-composer — Lorax 31.1 documentation</title>
|
||||
<title>lorax-composer — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -110,6 +110,10 @@
|
||||
<li class="toctree-l4"><a class="reference internal" href="#customizations-sshkey">[[customizations.sshkey]]</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#customizations-user">[[customizations.user]]</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#customizations-group">[[customizations.group]]</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#customizations-timezone">[customizations.timezone]</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#customizations-locale">[customizations.locale]</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#customizations-firewall">[customizations.firewall]</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#customizations-services">[customizations.services]</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#repos-git">[[repos.git]]</a></li>
|
||||
@ -409,11 +413,12 @@ for selecting optional packages.</p>
|
||||
</div>
|
||||
<div class="section" id="customizations">
|
||||
<h3>Customizations<a class="headerlink" href="#customizations" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">[[customizations]]</span></code> section can be used to configure the hostname of the final image. eg.:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">customizations</span><span class="p">]]</span>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">[customizations]</span></code> section can be used to configure the hostname of the final image. eg.:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="p">]</span>
|
||||
<span class="n">hostname</span> <span class="o">=</span> <span class="s2">"baseimage"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This is optional and may be left out to use the defaults.</p>
|
||||
<div class="section" id="customizations-kernel">
|
||||
<h4>[customizations.kernel]<a class="headerlink" href="#customizations-kernel" title="Permalink to this headline">¶</a></h4>
|
||||
<p>This allows you to append arguments to the bootloader's kernel commandline. This will not have any
|
||||
@ -470,6 +475,78 @@ an encrypted password. Otherwise it will be treated as a plain text password.</p
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="customizations-timezone">
|
||||
<h4>[customizations.timezone]<a class="headerlink" href="#customizations-timezone" title="Permalink to this headline">¶</a></h4>
|
||||
<p>Customizing the timezone and the NTP servers to use for the system:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">timezone</span><span class="p">]</span>
|
||||
<span class="n">timezone</span> <span class="o">=</span> <span class="s2">"US/Eastern"</span>
|
||||
<span class="n">ntpservers</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"0.north-america.pool.ntp.org"</span><span class="p">,</span> <span class="s2">"1.north-america.pool.ntp.org"</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The values supported by <code class="docutils literal notranslate"><span class="pre">timezone</span></code> can be listed by running <code class="docutils literal notranslate"><span class="pre">timedatectl</span> <span class="pre">list-timezones</span></code>.</p>
|
||||
<p>If no timezone is setup the system will default to using <cite>UTC</cite>. The ntp servers are also
|
||||
optional and will default to using the distribution defaults which are fine for most uses.</p>
|
||||
<p>In some image types there are already NTP servers setup, eg. Google cloud image, and they
|
||||
cannot be overridden because they are required to boot in the selected environment. But the
|
||||
timezone will be updated to the one selected in the blueprint.</p>
|
||||
</div>
|
||||
<div class="section" id="customizations-locale">
|
||||
<h4>[customizations.locale]<a class="headerlink" href="#customizations-locale" title="Permalink to this headline">¶</a></h4>
|
||||
<p>Customize the locale settings for the system:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">locale</span><span class="p">]</span>
|
||||
<span class="n">languages</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"en_US.UTF-8"</span><span class="p">]</span>
|
||||
<span class="n">keyboard</span> <span class="o">=</span> <span class="s2">"us"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The values supported by <code class="docutils literal notranslate"><span class="pre">languages</span></code> can be listed by running <code class="docutils literal notranslate"><span class="pre">localectl</span> <span class="pre">list-locales</span></code> from
|
||||
the command line.</p>
|
||||
<p>The values supported by <code class="docutils literal notranslate"><span class="pre">keyboard</span></code> can be listed by running <code class="docutils literal notranslate"><span class="pre">localectl</span> <span class="pre">list-keymaps</span></code> from
|
||||
the command line.</p>
|
||||
<p>Multiple languages can be added. The first one becomes the
|
||||
primary, and the others are added as secondary. One or the other of <code class="docutils literal notranslate"><span class="pre">languages</span></code>
|
||||
or <code class="docutils literal notranslate"><span class="pre">keyboard</span></code> must be included (or both) in the section.</p>
|
||||
</div>
|
||||
<div class="section" id="customizations-firewall">
|
||||
<h4>[customizations.firewall]<a class="headerlink" href="#customizations-firewall" title="Permalink to this headline">¶</a></h4>
|
||||
<p>By default the firewall blocks all access except for services that enable their ports explicitly,
|
||||
like <code class="docutils literal notranslate"><span class="pre">sshd</span></code>. This command can be used to open other ports or services. Ports are configured using
|
||||
the port:protocol format:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">firewall</span><span class="p">]</span>
|
||||
<span class="n">ports</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"22:tcp"</span><span class="p">,</span> <span class="s2">"80:tcp"</span><span class="p">,</span> <span class="s2">"imap:tcp"</span><span class="p">,</span> <span class="s2">"53:tcp"</span><span class="p">,</span> <span class="s2">"53:udp"</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Numeric ports, or their names from <code class="docutils literal notranslate"><span class="pre">/etc/services</span></code> can be used in the <code class="docutils literal notranslate"><span class="pre">ports</span></code> enabled/disabled lists.</p>
|
||||
<p>The blueprint settings extend any existing settings in the image templates, so if <code class="docutils literal notranslate"><span class="pre">sshd</span></code> is
|
||||
already enabled it will extend the list of ports with the ones listed by the blueprint.</p>
|
||||
<p>If the distribution uses <code class="docutils literal notranslate"><span class="pre">firewalld</span></code> you can specify services listed by <code class="docutils literal notranslate"><span class="pre">firewall-cmd</span> <span class="pre">--get-services</span></code>
|
||||
in a <code class="docutils literal notranslate"><span class="pre">customizations.firewall.services</span></code> section:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">services</span><span class="p">]</span>
|
||||
<span class="n">enabled</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"ftp"</span><span class="p">,</span> <span class="s2">"ntp"</span><span class="p">,</span> <span class="s2">"dhcp"</span><span class="p">]</span>
|
||||
<span class="n">disabled</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"telnet"</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Remember that the <code class="docutils literal notranslate"><span class="pre">firewall.services</span></code> are different from the names in <code class="docutils literal notranslate"><span class="pre">/etc/services</span></code>.</p>
|
||||
<p>Both are optional, if they are not used leave them out or set them to an empty list <code class="docutils literal notranslate"><span class="pre">[]</span></code>. If you
|
||||
only want the default firewall setup this section can be omitted from the blueprint.</p>
|
||||
<p>NOTE: The <code class="docutils literal notranslate"><span class="pre">Google</span></code> and <code class="docutils literal notranslate"><span class="pre">OpenStack</span></code> templates explicitly disable the firewall for their environment.
|
||||
This cannot be overridden by the blueprint.</p>
|
||||
</div>
|
||||
<div class="section" id="customizations-services">
|
||||
<h4>[customizations.services]<a class="headerlink" href="#customizations-services" title="Permalink to this headline">¶</a></h4>
|
||||
<p>This section can be used to control which services are enabled at boot time.
|
||||
Some image types already have services enabled or disabled in order for the
|
||||
image to work correctly, and cannot be overridden. eg. <code class="docutils literal notranslate"><span class="pre">ami</span></code> requires
|
||||
<code class="docutils literal notranslate"><span class="pre">sshd</span></code>, <code class="docutils literal notranslate"><span class="pre">chronyd</span></code>, and <code class="docutils literal notranslate"><span class="pre">cloud-init</span></code>. Without them the image will not
|
||||
boot. Blueprint services are added to, not replacing, the list already in the
|
||||
templates, if any.</p>
|
||||
<p>The service names are systemd service units. You may specify any systemd unit
|
||||
file accepted by <code class="docutils literal notranslate"><span class="pre">systemctl</span> <span class="pre">enable</span></code> eg. <code class="docutils literal notranslate"><span class="pre">cockpit.socket</span></code>:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">services</span><span class="p">]</span>
|
||||
<span class="n">enabled</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"sshd"</span><span class="p">,</span> <span class="s2">"cockpit.socket"</span><span class="p">,</span> <span class="s2">"httpd"</span><span class="p">]</span>
|
||||
<span class="n">disabled</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"postfix"</span><span class="p">,</span> <span class="s2">"telnetd"</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="repos-git">
|
||||
<h3>[[repos.git]]<a class="headerlink" href="#repos-git" title="Permalink to this headline">¶</a></h3>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Lorax — Lorax 31.1 documentation</title>
|
||||
<title>Lorax — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>src — Lorax 31.1 documentation</title>
|
||||
<title>src — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
Binary file not shown.
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Product and Updates Images — Lorax 31.1 documentation</title>
|
||||
<title>Product and Updates Images — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Python Module Index — Lorax 31.1 documentation</title>
|
||||
<title>Python Module Index — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax.api package — Lorax 31.1 documentation</title>
|
||||
<title>pylorax.api package — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -324,8 +324,45 @@ Other options will be filled in by <cite>make_compose()</cite></p>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Apply customizations to existing template commands, or add defaults for ones that are
|
||||
missing and required.</p>
|
||||
<p>Apply customizations.kernel.append to the bootloader argument in the template.
|
||||
Add bootloader line if it is missing.</p>
|
||||
<p>Add default timezone if needed. It does NOT replace an existing timezone entry</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.firewall_cmd">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">firewall_cmd</code><span class="sig-paren">(</span><em>line</em>, <em>settings</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#firewall_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.firewall_cmd" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Update the firewall line with the new ports and services</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>line</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- The firewall ... line</p></li>
|
||||
<li><p><strong>settings</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) -- A dict with the list of services and ports to enable and disable</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Using pykickstart to process the line is the best way to make sure it
|
||||
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.get_default_services">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">get_default_services</code><span class="sig-paren">(</span><em>recipe</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#get_default_services"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.get_default_services" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Get the default string for services, based on recipe
|
||||
:param recipe: The recipe</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns</dt>
|
||||
<dd class="field-odd"><p>string with "services" or ""</p>
|
||||
</dd>
|
||||
<dt class="field-even">Return type</dt>
|
||||
<dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)">str</a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>When no services have been selected we don't need to add anything to the kickstart
|
||||
so return an empty string. Otherwise return "services" which will be updated with
|
||||
the settings.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
@ -354,6 +391,23 @@ iso using the templates such as x86.tmpl</p>
|
||||
even though the results are applied differently.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.get_firewall_settings">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">get_firewall_settings</code><span class="sig-paren">(</span><em>recipe</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#get_firewall_settings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.get_firewall_settings" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the customizations.firewall settings</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>recipe</strong> (<em>Recipe object</em>) -- The recipe</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>A dict of settings</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Return type</dt>
|
||||
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)">dict</a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.get_kernel_append">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">get_kernel_append</code><span class="sig-paren">(</span><em>recipe</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#get_kernel_append"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.get_kernel_append" title="Permalink to this definition">¶</a></dt>
|
||||
@ -371,6 +425,106 @@ even though the results are applied differently.</p>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.get_keyboard_layout">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">get_keyboard_layout</code><span class="sig-paren">(</span><em>recipe</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#get_keyboard_layout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.get_keyboard_layout" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the customizations.locale.keyboard list</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>recipe</strong> (<em>Recipe object</em>) -- The recipe</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>The keyboard layout string</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Return type</dt>
|
||||
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)">str</a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.get_languages">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">get_languages</code><span class="sig-paren">(</span><em>recipe</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#get_languages"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.get_languages" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the customizations.locale.languages list</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>recipe</strong> (<em>Recipe object</em>) -- The recipe</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>list of language strings</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Return type</dt>
|
||||
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.7)">list</a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.get_services">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">get_services</code><span class="sig-paren">(</span><em>recipe</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#get_services"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.get_services" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the customizations.services settings</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>recipe</strong> (<em>Recipe object</em>) -- The recipe</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>A dict of settings</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Return type</dt>
|
||||
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)">dict</a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.get_timezone_settings">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">get_timezone_settings</code><span class="sig-paren">(</span><em>recipe</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#get_timezone_settings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.get_timezone_settings" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the customizations.timezone dict</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><p><strong>recipe</strong> (<em>Recipe object</em>) -- </p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns</dt>
|
||||
<dd class="field-even"><p>append value or empty string</p>
|
||||
</dd>
|
||||
<dt class="field-odd">Return type</dt>
|
||||
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)">dict</a></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.keyboard_cmd">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">keyboard_cmd</code><span class="sig-paren">(</span><em>line</em>, <em>layout</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#keyboard_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.keyboard_cmd" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Update the keyboard line with the layout</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>line</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- The keyboard ... line</p></li>
|
||||
<li><p><strong>settings</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- The keyboard layout</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Using pykickstart to process the line is the best way to make sure it
|
||||
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.lang_cmd">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">lang_cmd</code><span class="sig-paren">(</span><em>line</em>, <em>languages</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#lang_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.lang_cmd" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Update the lang line with the languages</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>line</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- The lang ... line</p></li>
|
||||
<li><p><strong>settings</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.7)"><em>list</em></a>) -- The list of languages</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Using pykickstart to process the line is the best way to make sure it
|
||||
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.move_compose_results">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">move_compose_results</code><span class="sig-paren">(</span><em>cfg</em>, <em>results_dir</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#move_compose_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.move_compose_results" title="Permalink to this definition">¶</a></dt>
|
||||
@ -398,6 +552,22 @@ even though the results are applied differently.</p>
|
||||
<p>Set url to "baseurl" if it is a repo, leave it as "url" for the installation url.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.services_cmd">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">services_cmd</code><span class="sig-paren">(</span><em>line</em>, <em>settings</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#services_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.services_cmd" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Update the services line with additional services to enable/disable</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>line</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- The services ... line</p></li>
|
||||
<li><p><strong>settings</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) -- A dict with the list of services to enable and disable</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Using pykickstart to process the line is the best way to make sure it
|
||||
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.start_build">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">start_build</code><span class="sig-paren">(</span><em>cfg</em>, <em>dnflock</em>, <em>gitlock</em>, <em>branch</em>, <em>recipe_name</em>, <em>compose_type</em>, <em>test_mode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#start_build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.start_build" title="Permalink to this definition">¶</a></dt>
|
||||
@ -438,6 +608,22 @@ even though the results are applied differently.</p>
|
||||
<p>Return a list of templates and errors encountered or an empty list</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.timezone_cmd">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">timezone_cmd</code><span class="sig-paren">(</span><em>line</em>, <em>settings</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#timezone_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.timezone_cmd" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Update the timezone line with the settings</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
<dd class="field-odd"><ul class="simple">
|
||||
<li><p><strong>line</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- The timezone ... line</p></li>
|
||||
<li><p><strong>settings</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) -- A dict with timezone and/or ntpservers list</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>Using pykickstart to process the line is the best way to make sure it
|
||||
is parsed correctly, and re-assembled for inclusion into the final kickstart</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.api.compose.write_ks_group">
|
||||
<code class="descclassname">pylorax.api.compose.</code><code class="descname">write_ks_group</code><span class="sig-paren">(</span><em>f</em>, <em>group</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/api/compose.html#write_ks_group"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.api.compose.write_ks_group" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>pylorax package — Lorax 31.1 documentation</title>
|
||||
<title>pylorax package — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
@ -943,8 +943,8 @@ last.</p>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.imgutils.compress">
|
||||
<code class="descclassname">pylorax.imgutils.</code><code class="descname">compress</code><span class="sig-paren">(</span><em>command</em>, <em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/imgutils.html#compress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.imgutils.compress" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Make a compressed archive of the given rootdir.
|
||||
<code class="descclassname">pylorax.imgutils.</code><code class="descname">compress</code><span class="sig-paren">(</span><em>command</em>, <em>root</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/imgutils.html#compress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.imgutils.compress" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Make a compressed archive of the given rootdir or file.
|
||||
command is a list of the archiver commands to run
|
||||
compression should be "xz", "gzip", "lzma", "bzip2", or None.
|
||||
compressargs will be used on the compression commandline.</p>
|
||||
@ -1061,7 +1061,7 @@ loop device really is associated with the backing file before continuing.</p>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.imgutils.mkcpio">
|
||||
<code class="descclassname">pylorax.imgutils.</code><code class="descname">mkcpio</code><span class="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/imgutils.html#mkcpio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.imgutils.mkcpio" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="descclassname">pylorax.imgutils.</code><code class="descname">mkcpio</code><span class="sig-paren">(</span><em>root</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/imgutils.html#mkcpio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.imgutils.mkcpio" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
@ -1156,7 +1156,7 @@ in options.</p>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.imgutils.mktar">
|
||||
<code class="descclassname">pylorax.imgutils.</code><code class="descname">mktar</code><span class="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em>, <em>selinux=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/imgutils.html#mktar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.imgutils.mktar" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="descclassname">pylorax.imgutils.</code><code class="descname">mktar</code><span class="sig-paren">(</span><em>root</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em>, <em>selinux=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/imgutils.html#mktar"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.imgutils.mktar" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
@ -1303,7 +1303,7 @@ When an error is detected the process is terminated and this returns True</p>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.installer.novirt_install">
|
||||
<code class="descclassname">pylorax.installer.</code><code class="descname">novirt_install</code><span class="sig-paren">(</span><em>opts</em>, <em>disk_img</em>, <em>disk_size</em>, <em>cancel_func=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/installer.html#novirt_install"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.installer.novirt_install" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="descclassname">pylorax.installer.</code><code class="descname">novirt_install</code><span class="sig-paren">(</span><em>opts</em>, <em>disk_img</em>, <em>disk_size</em>, <em>cancel_func=None</em>, <em>tar_img=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/installer.html#novirt_install"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.installer.novirt_install" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Use Anaconda to install to a disk image</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
@ -1312,6 +1312,7 @@ When an error is detected the process is terminated and this returns True</p>
|
||||
<li><p><strong>disk_img</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- The full path to the disk image to be created</p></li>
|
||||
<li><p><strong>disk_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a>) -- The size of the disk_img in MiB</p></li>
|
||||
<li><p><strong>cancel_func</strong> (<em>function</em>) -- Function that returns True to cancel build</p></li>
|
||||
<li><p><strong>tar_img</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- For make_tar_disk, the path to final tarball to be created</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1337,7 +1338,7 @@ metadata file are set correctly. All other values are left untouched.</p>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="pylorax.installer.virt_install">
|
||||
<code class="descclassname">pylorax.installer.</code><code class="descname">virt_install</code><span class="sig-paren">(</span><em>opts</em>, <em>install_log</em>, <em>disk_img</em>, <em>disk_size</em>, <em>cancel_func=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/installer.html#virt_install"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.installer.virt_install" title="Permalink to this definition">¶</a></dt>
|
||||
<code class="descclassname">pylorax.installer.</code><code class="descname">virt_install</code><span class="sig-paren">(</span><em>opts</em>, <em>install_log</em>, <em>disk_img</em>, <em>disk_size</em>, <em>cancel_func=None</em>, <em>tar_img=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylorax/installer.html#virt_install"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylorax.installer.virt_install" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Use qemu to install to a disk image</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters</dt>
|
||||
@ -1347,6 +1348,7 @@ metadata file are set correctly. All other values are left untouched.</p>
|
||||
<li><p><strong>disk_img</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- The full path to the disk image to be created</p></li>
|
||||
<li><p><strong>disk_size</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a>) -- The size of the disk_img in MiB</p></li>
|
||||
<li><p><strong>cancel_func</strong> (<em>function</em>) -- Function that returns True to cancel build</p></li>
|
||||
<li><p><strong>tar_img</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) -- For make_tar_disk, the path to final tarball to be created</p></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Search — Lorax 31.1 documentation</title>
|
||||
<title>Search — Lorax 31.4 documentation</title>
|
||||
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
<div class="version">
|
||||
31.1
|
||||
31.4
|
||||
</div>
|
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "COMPOSER-CLI" "1" "Mar 27, 2019" "31.1" "Lorax"
|
||||
.TH "COMPOSER-CLI" "1" "Apr 30, 2019" "31.4" "Lorax"
|
||||
.SH NAME
|
||||
composer-cli \- Composer Cmdline Utility Documentation
|
||||
.
|
||||
@ -221,8 +221,8 @@ compose start http\-server qcow2\fP\&. It will print a UUID that you can use to
|
||||
keep track of the build. You can also cancel the build if needed.
|
||||
.sp
|
||||
The available types of images is displayed by \fBcomposer\-cli compose types\fP\&.
|
||||
Currently this consists of: ami, ext4\-filesystem, live\-iso, openstack,
|
||||
partitioned\-disk, qcow2, tar, vhd, vmdk
|
||||
Currently this consists of: alibaba, ami, ext4\-filesystem, google, hyper\-v,
|
||||
live\-iso, openstack, partitioned\-disk, qcow2, tar, vhd, vmdk
|
||||
.SH MONITOR THE BUILD STATUS
|
||||
.sp
|
||||
Monitor it using \fBcomposer\-cli compose status\fP, which will show the status of
|
||||
|
@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "LIVEMEDIA-CREATOR" "1" "Mar 27, 2019" "31.1" "Lorax"
|
||||
.TH "LIVEMEDIA-CREATOR" "1" "Apr 30, 2019" "31.4" "Lorax"
|
||||
.SH NAME
|
||||
livemedia-creator \- Live Media Creator Documentation
|
||||
.
|
||||
@ -78,7 +78,7 @@ Create Live Install Media
|
||||
.nf
|
||||
.ft C
|
||||
usage: livemedia\-creator [\-h]
|
||||
(\-\-make\-iso | \-\-make\-disk | \-\-make\-fsimage | \-\-make\-appliance | \-\-make\-ami | \-\-make\-tar | \-\-make\-pxe\-live | \-\-make\-ostree\-live | \-\-make\-oci | \-\-make\-vagrant)
|
||||
(\-\-make\-iso | \-\-make\-disk | \-\-make\-fsimage | \-\-make\-appliance | \-\-make\-ami | \-\-make\-tar | \-\-make\-tar\-disk | \-\-make\-pxe\-live | \-\-make\-ostree\-live | \-\-make\-oci | \-\-make\-vagrant)
|
||||
[\-\-iso ISO] [\-\-iso\-only] [\-\-iso\-name ISO_NAME]
|
||||
[\-\-ks KS] [\-\-image\-only] [\-\-no\-virt] [\-\-proxy PROXY]
|
||||
[\-\-anaconda\-arg ANACONDA_ARGS]
|
||||
@ -89,9 +89,11 @@ usage: livemedia\-creator [\-h]
|
||||
[\-\-extra\-boot\-args EXTRA_BOOT_ARGS]
|
||||
[\-\-disk\-image DISK_IMAGE] [\-\-keep\-image]
|
||||
[\-\-fs\-image FS_IMAGE] [\-\-image\-name IMAGE_NAME]
|
||||
[\-\-fs\-label FS_LABEL] [\-\-image\-type IMAGE_TYPE]
|
||||
[\-\-qemu\-arg QEMU_ARGS] [\-\-qcow2]
|
||||
[\-\-qcow2\-arg QEMU_ARGS] [\-\-compression COMPRESSION]
|
||||
[\-\-tar\-disk\-name TAR_DISK_NAME] [\-\-fs\-label FS_LABEL]
|
||||
[\-\-image\-size\-align IMAGE_SIZE_ALIGN]
|
||||
[\-\-image\-type IMAGE_TYPE] [\-\-qemu\-arg QEMU_ARGS]
|
||||
[\-\-qcow2] [\-\-qcow2\-arg QEMU_ARGS]
|
||||
[\-\-compression COMPRESSION]
|
||||
[\-\-compress\-arg COMPRESS_ARGS] [\-\-app\-name APP_NAME]
|
||||
[\-\-app\-template APP_TEMPLATE] [\-\-app\-file APP_FILE]
|
||||
[\-\-ram MEMORY] [\-\-vcpus VCPUS] [\-\-vnc VNC]
|
||||
@ -143,6 +145,11 @@ Build a tar of the root filesystem
|
||||
.sp
|
||||
Default: False
|
||||
.TP
|
||||
.B\-\-make\-tar\-disk
|
||||
Build a tar of a partitioned disk image
|
||||
.sp
|
||||
Default: False
|
||||
.TP
|
||||
.B\-\-make\-pxe\-live
|
||||
Build a live pxe boot squashfs image
|
||||
.sp
|
||||
@ -270,11 +277,19 @@ Path to existing filesystem image to use for creating final image.
|
||||
.B\-\-image\-name
|
||||
Name of output file to create. Used for tar, fs and disk image. Default is a random name.
|
||||
.TP
|
||||
.B\-\-tar\-disk\-name
|
||||
Name of the archive member for make\-tar\-disk.
|
||||
.TP
|
||||
.B\-\-fs\-label
|
||||
Label to set on fsimage, default is \(aqAnaconda\(aq
|
||||
.sp
|
||||
Default: "Anaconda"
|
||||
.TP
|
||||
.B\-\-image\-size\-align
|
||||
Create a disk image with a size that is a multiple of this value in MiB.
|
||||
.sp
|
||||
Default: 0
|
||||
.TP
|
||||
.B\-\-image\-type
|
||||
Create an image with qemu\-img. See qemu\-img \-\-help for supported formats.
|
||||
.TP
|
||||
|
@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "LORAX-COMPOSER" "1" "Mar 27, 2019" "31.1" "Lorax"
|
||||
.TH "LORAX-COMPOSER" "1" "Apr 30, 2019" "31.4" "Lorax"
|
||||
.SH NAME
|
||||
lorax-composer \- Lorax Composer Documentation
|
||||
.
|
||||
@ -277,18 +277,20 @@ For purposes of blueprints, mandatory and default packages will be installed. T
|
||||
for selecting optional packages.
|
||||
.SS Customizations
|
||||
.sp
|
||||
The \fB[[customizations]]\fP section can be used to configure the hostname of the final image. eg.:
|
||||
The \fB[customizations]\fP section can be used to configure the hostname of the final image. eg.:
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
.nf
|
||||
.ft C
|
||||
[[customizations]]
|
||||
[customizations]
|
||||
hostname = "baseimage"
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
This is optional and may be left out to use the defaults.
|
||||
.SS [customizations.kernel]
|
||||
.sp
|
||||
This allows you to append arguments to the bootloader\(aqs kernel commandline. This will not have any
|
||||
@ -378,6 +380,122 @@ gid = 1130
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.SS [customizations.timezone]
|
||||
.sp
|
||||
Customizing the timezone and the NTP servers to use for the system:
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
.nf
|
||||
.ft C
|
||||
[customizations.timezone]
|
||||
timezone = "US/Eastern"
|
||||
ntpservers = ["0.north\-america.pool.ntp.org", "1.north\-america.pool.ntp.org"]
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
The values supported by \fBtimezone\fP can be listed by running \fBtimedatectl list\-timezones\fP\&.
|
||||
.sp
|
||||
If no timezone is setup the system will default to using \fIUTC\fP\&. The ntp servers are also
|
||||
optional and will default to using the distribution defaults which are fine for most uses.
|
||||
.sp
|
||||
In some image types there are already NTP servers setup, eg. Google cloud image, and they
|
||||
cannot be overridden because they are required to boot in the selected environment. But the
|
||||
timezone will be updated to the one selected in the blueprint.
|
||||
.SS [customizations.locale]
|
||||
.sp
|
||||
Customize the locale settings for the system:
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
.nf
|
||||
.ft C
|
||||
[customizations.locale]
|
||||
languages = ["en_US.UTF\-8"]
|
||||
keyboard = "us"
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
The values supported by \fBlanguages\fP can be listed by running \fBlocalectl list\-locales\fP from
|
||||
the command line.
|
||||
.sp
|
||||
The values supported by \fBkeyboard\fP can be listed by running \fBlocalectl list\-keymaps\fP from
|
||||
the command line.
|
||||
.sp
|
||||
Multiple languages can be added. The first one becomes the
|
||||
primary, and the others are added as secondary. One or the other of \fBlanguages\fP
|
||||
or \fBkeyboard\fP must be included (or both) in the section.
|
||||
.SS [customizations.firewall]
|
||||
.sp
|
||||
By default the firewall blocks all access except for services that enable their ports explicitly,
|
||||
like \fBsshd\fP\&. This command can be used to open other ports or services. Ports are configured using
|
||||
the port:protocol format:
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
.nf
|
||||
.ft C
|
||||
[customizations.firewall]
|
||||
ports = ["22:tcp", "80:tcp", "imap:tcp", "53:tcp", "53:udp"]
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
Numeric ports, or their names from \fB/etc/services\fP can be used in the \fBports\fP enabled/disabled lists.
|
||||
.sp
|
||||
The blueprint settings extend any existing settings in the image templates, so if \fBsshd\fP is
|
||||
already enabled it will extend the list of ports with the ones listed by the blueprint.
|
||||
.sp
|
||||
If the distribution uses \fBfirewalld\fP you can specify services listed by \fBfirewall\-cmd \-\-get\-services\fP
|
||||
in a \fBcustomizations.firewall.services\fP section:
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
.nf
|
||||
.ft C
|
||||
[customizations.firewall.services]
|
||||
enabled = ["ftp", "ntp", "dhcp"]
|
||||
disabled = ["telnet"]
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.sp
|
||||
Remember that the \fBfirewall.services\fP are different from the names in \fB/etc/services\fP\&.
|
||||
.sp
|
||||
Both are optional, if they are not used leave them out or set them to an empty list \fB[]\fP\&. If you
|
||||
only want the default firewall setup this section can be omitted from the blueprint.
|
||||
.sp
|
||||
NOTE: The \fBGoogle\fP and \fBOpenStack\fP templates explicitly disable the firewall for their environment.
|
||||
This cannot be overridden by the blueprint.
|
||||
.SS [customizations.services]
|
||||
.sp
|
||||
This section can be used to control which services are enabled at boot time.
|
||||
Some image types already have services enabled or disabled in order for the
|
||||
image to work correctly, and cannot be overridden. eg. \fBami\fP requires
|
||||
\fBsshd\fP, \fBchronyd\fP, and \fBcloud\-init\fP\&. Without them the image will not
|
||||
boot. Blueprint services are added to, not replacing, the list already in the
|
||||
templates, if any.
|
||||
.sp
|
||||
The service names are systemd service units. You may specify any systemd unit
|
||||
file accepted by \fBsystemctl enable\fP eg. \fBcockpit.socket\fP:
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
.nf
|
||||
.ft C
|
||||
[customizations.services]
|
||||
enabled = ["sshd", "cockpit.socket", "httpd"]
|
||||
disabled = ["postfix", "telnetd"]
|
||||
.ft P
|
||||
.fi
|
||||
.UNINDENT
|
||||
.UNINDENT
|
||||
.SS [[repos.git]]
|
||||
.sp
|
||||
The \fB[[repos.git]]\fP entries are used to add files from a \fIgit repository<https://git\-scm.com/>\fP
|
||||
|
@ -1,6 +1,6 @@
|
||||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "LORAX" "1" "Mar 27, 2019" "31.1" "Lorax"
|
||||
.TH "LORAX" "1" "Apr 30, 2019" "31.4" "Lorax"
|
||||
.SH NAME
|
||||
lorax \- Lorax Documentation
|
||||
.
|
||||
|
Loading…
Reference in New Issue
Block a user