Add interactive NetBox host installer
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
</section>
|
||||
<section class="shell prose-shell install-guide">
|
||||
<aside class="notice"><strong>Vorher sichern:</strong> Erstelle ein Backup von NetBox und der Datenbank. Führe die Befehle auf dem NetBox-Host aus.</aside>
|
||||
<h2>Interaktive Komplettinstallation</h2>
|
||||
<p>Der Installer richtet NetBox-Plugin, Host-Agent, systemd-Socket, Requirements und den markierten Konfigurationsblock gemeinsam ein. Er fragt Pfade, Dienstkonto, NetBox-Version und Betriebsmodus ab, zeigt vorab eine Zusammenfassung und erstellt Sicherungskopien. Lade ihn zuerst herunter und prüfe seinen Inhalt; führe keinen ungeprüften Remote-Code direkt über eine Pipe als Root aus.</p>
|
||||
<pre><code>curl -fsSLo /tmp/netbox-store-install.sh \
|
||||
https://git.mrblake.cc/MrBlake/Netbox-Store/raw/branch/main/install.sh
|
||||
less /tmp/netbox-store-install.sh
|
||||
sudo bash /tmp/netbox-store-install.sh</code></pre>
|
||||
<p>Wähle für die erste Funktionsprüfung den sicheren Testmodus. Der Produktionsmodus verlangt zusätzlich die Eingabe <code>ECHT INSTALLIEREN</code>. Der folgende Abschnitt dokumentiert dieselben Schritte für eine manuelle Installation.</p>
|
||||
<h2>1. Plugin aus git.mrblake.cc installieren</h2>
|
||||
<p>Trage das Plugin dauerhaft in <code>/opt/netbox/local_requirements.txt</code> ein. Die empfohlene HTTPS-Archivvariante benötigt kein lokal installiertes Git. Für reproduzierbare Installationen solltest du <code>main</code> durch einen geprüften Commit-SHA ersetzen.</p>
|
||||
<pre><code>sudo sed -i '/^[[:space:]]*netbox-plugin-store[[:space:]]*@/d' /opt/netbox/local_requirements.txt
|
||||
@@ -94,7 +101,7 @@ sudo chmod 0644 /opt/netbox/netbox/netbox/store_plugins.py /opt/netbox/local_req
|
||||
grep -qxF -- '-r /opt/netbox/local_requirements_store.txt' /opt/netbox/local_requirements.txt \
|
||||
|| echo '-r /opt/netbox/local_requirements_store.txt' | sudo tee -a /opt/netbox/local_requirements.txt</code></pre>
|
||||
<p>Füge in <code>configuration.py</code> direkt nach der vorhandenen <code>PLUGINS</code>-Liste einmalig Folgendes ein:</p>
|
||||
<pre><code>from store_plugins import STORE_PLUGINS
|
||||
<pre><code>from netbox.store_plugins import STORE_PLUGINS
|
||||
|
||||
PLUGINS += STORE_PLUGINS</code></pre>
|
||||
<p>Prüfe zunächst die Agent-Konfiguration und den Socket im sicheren Dry-Run-Modus:</p>
|
||||
|
||||
@@ -492,6 +492,8 @@ test('public and admin templates render safely with complete artifact evidence',
|
||||
assertTrue(str_contains($detail, 'Wheel'));
|
||||
$installation = $view->render('installation', $common + ['title' => 'Installation']);
|
||||
assertTrue(str_contains($installation, 'https://git.mrblake.cc/MrBlake/Netbox-Store/archive/main.tar.gz'));
|
||||
assertTrue(str_contains($installation, 'raw/branch/main/install.sh'));
|
||||
assertTrue(str_contains($installation, 'ECHT INSTALLIEREN'));
|
||||
assertTrue(str_contains($installation, "sed -i '/^[[:space:]]*netbox-plugin-store"));
|
||||
assertTrue(str_contains($installation, 'sudo apt install -y git'));
|
||||
assertTrue(str_contains($installation, 'https://netbox.mrblake.cc'));
|
||||
|
||||
Reference in New Issue
Block a user