LibreQoS/_readthedocs/html/docs/Quickstart/quickstart.html
2023-05-19 14:17:54 -06:00

234 lines
16 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Server Setup - Pre-requisites &mdash; LibreQoE documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="prev" title="Network Interface Requirements" href="../System%20Requirements/Networking.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home">
LibreQoE
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Readme:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../README.html">Sponsors</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../README.html#support-libreqos">Support LibreQoS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../README.html#matrix-chat">Matrix Chat</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../README.html#features">Features</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Read me first!:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="networkdesignassumptions.html">Network Design Assumptions</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Quickstart Considerations:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../System%20Requirements/Compute.html">System Requirements</a></li>
<li class="toctree-l1"><a class="reference internal" href="../System%20Requirements/Networking.html">Network Interface Requirements</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Server Setup - Pre-requisites</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#install-ubuntu-server">Install Ubuntu Server</a></li>
<li class="toctree-l2"><a class="reference internal" href="#choose-bridge-type">Choose Bridge Type</a></li>
<li class="toctree-l2"><a class="reference internal" href="#adding-a-regular-linux-bridge-if-not-using-bifrost-xdp-bridge">Adding a regular Linux bridge (if not using Bifrost XDP bridge)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-influxdb-optional-but-recommended">Install InfluxDB (Optional but Recommended)</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="#install-libreqos">Install LibreQoS</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">LibreQoE</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Server Setup - Pre-requisites</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/docs/Quickstart/quickstart.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="server-setup-pre-requisites">
<h1>Server Setup - Pre-requisites<a class="headerlink" href="#server-setup-pre-requisites" title="Permalink to this heading"></a></h1>
<p>Disable hyperthreading on the BIOS/UEFI of your host system. Hyperthreaading is also known as Simultaneous Multi Threading (SMT) on AMD systems. Disabling this is very important for optimal performance of the XDP cpumap filtering and, in turn, throughput and latency.</p>
<ul class="simple">
<li><p>Boot, pressing the appropriate key to enter the BIOS settings</p></li>
<li><p>For AMD systems, you will have to navigate the settings to find the “SMT Control” setting. Usually it is under something like <code class="docutils literal notranslate"><span class="pre">Advanced</span> <span class="pre">-&gt;</span> <span class="pre">AMD</span> <span class="pre">CBS</span> <span class="pre">-&gt;</span> <span class="pre">CPU</span> <span class="pre">Common</span> <span class="pre">Options</span> <span class="pre">-&gt;</span> <span class="pre">Thread</span> <span class="pre">Enablement</span> <span class="pre">-&gt;</span> <span class="pre">SMT</span> <span class="pre">Control</span></code> Once you find it, switch to “Disabled” or “Off”</p></li>
<li><p>For Intel systems, you will also have to navigate the settings to find the “hyperthrading” toggle option. On HP servers its under <code class="docutils literal notranslate"><span class="pre">System</span> <span class="pre">Configuration</span> <span class="pre">&gt;</span> <span class="pre">BIOS/Platform</span> <span class="pre">Configuration</span> <span class="pre">(RBSU)</span> <span class="pre">&gt;</span> <span class="pre">Processor</span> <span class="pre">Options</span> <span class="pre">&gt;</span> <span class="pre">Intel</span> <span class="pre">(R)</span> <span class="pre">Hyperthreading</span> <span class="pre">Options.</span></code></p></li>
<li><p>Save changes and reboot</p></li>
</ul>
<section id="install-ubuntu-server">
<h2>Install Ubuntu Server<a class="headerlink" href="#install-ubuntu-server" title="Permalink to this heading"></a></h2>
<p>We recommend Ubuntu Server because its kernel version tends to track closely with the mainline Linux releases. Our current documentation assumes Ubuntu Server. To run LibreQoS v1.4, Linux kernel 5.11 or greater is required, as 5.11 includes some important XDP patches. Ubuntu Server 22.04 uses kernel 5.13, which meets that requirement.</p>
<p>You can download Ubuntu Server 22.04 from <a href="https://ubuntu.com/download/server">https://ubuntu.com/download/server</a>.</p>
<ol class="arabic simple">
<li><p>Boot Ubuntu Server from USB.</p></li>
<li><p>Follow the steps to install Ubuntu Server.</p></li>
<li><p>If you use a Mellanox network card, the Ubuntu Server installer will ask you whether to install the mellanox/intel NIC drivers. Check the box to confirm. This extra driver is important.</p></li>
<li><p>On the Networking settings step, it is recommended to assign a static IP address to the management NIC.</p></li>
<li><p>Ensure SSH server is enabled so you can more easily log into the server later.</p></li>
<li><p>You can use scp or sftp to access files from your LibreQoS server for easier file editing. Heres how to access via scp or sftp using an <a class="reference external" href="https://www.addictivetips.com/ubuntu-linux-tips/sftp-server-ubuntu/">Ubuntu</a> or <a class="reference external" href="https://winscp.net/eng/index.php">Windows</a> machine.</p></li>
</ol>
</section>
<section id="choose-bridge-type">
<h2>Choose Bridge Type<a class="headerlink" href="#choose-bridge-type" title="Permalink to this heading"></a></h2>
<p>There are two options for the bridge to pass data through your two interfaces:</p>
<ul class="simple">
<li><p>Bifrost XDP-Accelerated Bridge</p></li>
<li><p>Regular Linux Bridge</p></li>
</ul>
<p>The Bifrost Bridge is faster and generally recommended, but may not work perfectly in a VM setup using virtualized NICs.
To use the Bifrost bridge, skip the regular Linux bridge section below, and be sure to enable Bifrost/XDP in lqos.conf a few sections below.</p>
</section>
<section id="adding-a-regular-linux-bridge-if-not-using-bifrost-xdp-bridge">
<h2>Adding a regular Linux bridge (if not using Bifrost XDP bridge)<a class="headerlink" href="#adding-a-regular-linux-bridge-if-not-using-bifrost-xdp-bridge" title="Permalink to this heading"></a></h2>
<p>From the Ubuntu VM, create a linux interface bridge - br0 - with the two shaping interfaces.
Find your existing .yaml file in /etc/netplan/ with</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">netplan</span><span class="o">/</span>
<span class="n">ls</span>
</pre></div>
</div>
<p>Then edit the .yaml file there with</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">nano</span> <span class="n">XX</span><span class="o">-</span><span class="n">cloud</span><span class="o">-</span><span class="n">init</span><span class="o">.</span><span class="n">yaml</span>
</pre></div>
</div>
<p>with XX corresponding to the name of the existing file.</p>
<p>Editing the .yaml file, we need to define the shaping interfaces (here, ens19 and ens20) and add the bridge with those two interfaces. Assuming your interfaces are ens18, ens19, and ens20, here is what your file might look like:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># This is the network config written by &#39;subiquity&#39;</span>
<span class="n">network</span><span class="p">:</span>
<span class="n">ethernets</span><span class="p">:</span>
<span class="n">ens18</span><span class="p">:</span>
<span class="n">addresses</span><span class="p">:</span>
<span class="o">-</span> <span class="mf">10.0.0.12</span><span class="o">/</span><span class="mi">24</span>
<span class="n">routes</span><span class="p">:</span>
<span class="o">-</span> <span class="n">to</span><span class="p">:</span> <span class="n">default</span>
<span class="n">via</span><span class="p">:</span> <span class="mf">10.0.0.1</span>
<span class="n">nameservers</span><span class="p">:</span>
<span class="n">addresses</span><span class="p">:</span>
<span class="o">-</span> <span class="mf">1.1.1.1</span>
<span class="o">-</span> <span class="mf">8.8.8.8</span>
<span class="n">search</span><span class="p">:</span> <span class="p">[]</span>
<span class="n">ens19</span><span class="p">:</span>
<span class="n">dhcp4</span><span class="p">:</span> <span class="n">no</span>
<span class="n">ens20</span><span class="p">:</span>
<span class="n">dhcp4</span><span class="p">:</span> <span class="n">no</span>
<span class="n">version</span><span class="p">:</span> <span class="mi">2</span>
<span class="n">bridges</span><span class="p">:</span>
<span class="n">br0</span><span class="p">:</span>
<span class="n">interfaces</span><span class="p">:</span>
<span class="o">-</span> <span class="n">ens19</span>
<span class="o">-</span> <span class="n">ens20</span>
</pre></div>
</div>
<p>Make sure to replace 10.0.0.12/24 with your LibreQoS VMs address and subnet, and to replace the default gateway 10.0.0.1 with whatever your default gateway is.</p>
<p>Then run</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">netplan</span> <span class="n">apply</span>
</pre></div>
</div>
</section>
<section id="install-influxdb-optional-but-recommended">
<h2>Install InfluxDB (Optional but Recommended)<a class="headerlink" href="#install-influxdb-optional-but-recommended" title="Permalink to this heading"></a></h2>
<p>InfluxDB allows you to track long-term stats beyond what lqos_node_manager can so far.</p>
<p>To install InfluxDB 2.x., follow the steps at <a class="reference external" href="https://portal.influxdata.com/downloads/">https://portal.influxdata.com/downloads/</a>.</p>
<p>For high throughput networks (5+ Gbps) you will likely want to install InfluxDB to a separate machine or VM from that of the LibreQoS server to avoid CPU load.</p>
<p>Restart your system that is running InfluxDB</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">reboot</span>
</pre></div>
</div>
<p>Check to ensure InfluxDB is running properly. This command should show “Active: active” with green dot.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">influxdb</span> <span class="n">status</span>
</pre></div>
</div>
<p>Check that Web UI is running:<br></p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">SERVER_IP_ADDRESS</span><span class="p">:</span><span class="mi">8086</span>
</pre></div>
</div>
<p>Create Bucket</p>
<ul class="simple">
<li><p>Data &gt; Buckets &gt; Create Bucket</p></li>
</ul>
<p>Call the bucket <code class="docutils literal notranslate"><span class="pre">libreqos</span></code> (all lowercase).<br>
Have it store as many days of data as you prefer. 7 days is standard.&lt;&gt;
Import Dashboard</p>
<ul class="simple">
<li><p>Boards &gt; Create Dashboard &gt; Import Dashboard
Then upload the file <a class="reference external" href="https://github.com/rchac/LibreQoS/blob/main/src/influxDBdashboardTemplate.json">influxDBdashboardTemplate.json</a> to InfluxDB.</p></li>
</ul>
<p><a class="reference external" href="https://docs.influxdata.com/influxdb/cloud/security/tokens/create-token/">Generate an InfluxDB Token</a>. It will be added to ispConfig.py in the following steps.</p>
</section>
</section>
<section id="install-libreqos">
<h1>Install LibreQoS<a class="headerlink" href="#install-libreqos" title="Permalink to this heading"></a></h1>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../System%20Requirements/Networking.html" class="btn btn-neutral float-left" title="Network Interface Requirements" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2023, LibreQoE.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>