mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-23 04:36:40 +00:00
132 lines
3.6 KiB
Markdown
132 lines
3.6 KiB
Markdown
---
|
|
title: "Air-Gapped Install"
|
|
description: "Deploy Spinifex in environments without internet connectivity. Covers offline package caching, USB deployment, and package verification."
|
|
category: "Getting Started"
|
|
tags:
|
|
- install
|
|
- air-gapped
|
|
- offline
|
|
resources:
|
|
- title: "Spinifex Repository"
|
|
url: "https://github.com/mulgadc/spinifex"
|
|
- title: "apt-cacher-ng"
|
|
url: "https://wiki.debian.org/AptCacherNg"
|
|
---
|
|
|
|
# Air-Gapped Installation
|
|
|
|
> Deploy Spinifex in environments without internet connectivity.
|
|
|
|
## Table of Contents
|
|
|
|
- [Overview](#overview)
|
|
- [Instructions](#instructions)
|
|
- [Troubleshooting](#troubleshooting)
|
|
|
|
---
|
|
|
|
## Overview
|
|
|
|
In air-gapped or disconnected environments, Spinifex can be deployed without internet access. This guide covers preparing offline packages on a connected machine, creating USB deployment media, and installing on the target server with package verification.
|
|
|
|
**Deployment methods:**
|
|
- **apt-cacher-ng** — Local APT cache for Debian/Ubuntu packages
|
|
- **Go module cache** — Pre-downloaded Go dependencies
|
|
- **USB deployment** — Portable installation media with all dependencies
|
|
- **GPG verification** — Cryptographic package integrity checks
|
|
|
|
## Instructions
|
|
|
|
## Step 1. Prepare Packages (on a connected machine)
|
|
|
|
Set up a local APT cache to collect all required packages:
|
|
|
|
```bash
|
|
sudo apt install apt-cacher-ng
|
|
sudo systemctl enable --now apt-cacher-ng
|
|
```
|
|
|
|
Pre-download all Spinifex dependencies:
|
|
|
|
```bash
|
|
sudo apt install --download-only nbdkit nbdkit-plugin-dev pkg-config \
|
|
qemu-system qemu-utils qemu-kvm libvirt-daemon-system \
|
|
libvirt-clients libvirt-dev make gcc unzip xz-utils file \
|
|
ovn-central ovn-host openvswitch-switch
|
|
```
|
|
|
|
## Step 2. Create USB Deployment Media
|
|
|
|
```bash
|
|
mkdir -p /media/spinifex-deploy/{apt-packages,go-cache,spinifex-source}
|
|
cp /var/cache/apt/archives/*.deb /media/spinifex-deploy/apt-packages/
|
|
cp -r ~/go/pkg/mod/cache/ /media/spinifex-deploy/go-cache/
|
|
cp -r ~/Development/mulga/spinifex /media/spinifex-deploy/spinifex-source/
|
|
```
|
|
|
|
## Step 3. Verify Package Integrity
|
|
|
|
Sign and verify packages before transferring to the target:
|
|
|
|
```bash
|
|
gpg --import /media/spinifex-deploy/mulga-signing-key.asc
|
|
gpg --verify spinifex-v1.0.tar.gz.sig spinifex-v1.0.tar.gz
|
|
sha256sum -c /media/spinifex-deploy/checksums.sha256
|
|
```
|
|
|
|
## Step 4. Install on the Target Server
|
|
|
|
Mount the USB and install:
|
|
|
|
```bash
|
|
sudo mount /dev/sdb1 /mnt/usb
|
|
sudo dpkg -i /mnt/usb/apt-packages/*.deb
|
|
cp -r /mnt/usb/spinifex-source ~/Development/mulga/spinifex
|
|
cd ~/Development/mulga/spinifex && make build
|
|
```
|
|
|
|
Then follow the [Source Install](/docs/install-source) guide from Step 3 (Setup OVN) onwards.
|
|
|
|
## Troubleshooting
|
|
|
|
### Missing Dependencies After dpkg Install
|
|
|
|
Some packages may have unresolved dependencies. Fix with:
|
|
|
|
```bash
|
|
sudo dpkg -i /mnt/usb/apt-packages/*.deb
|
|
sudo apt-get install -f
|
|
```
|
|
|
|
The `-f` flag tells apt to fix broken dependencies using what's available locally.
|
|
|
|
### GPG Verification Fails
|
|
|
|
The signing key may not match or the download was corrupted. Re-import the key and verify:
|
|
|
|
```bash
|
|
gpg --import /media/spinifex-deploy/mulga-signing-key.asc
|
|
gpg --verify spinifex-v1.0.tar.gz.sig spinifex-v1.0.tar.gz
|
|
```
|
|
|
|
If verification still fails, re-download the package on the connected machine and compare checksums:
|
|
|
|
```bash
|
|
sha256sum spinifex-v1.0.tar.gz
|
|
```
|
|
|
|
### Go Module Cache Errors
|
|
|
|
The Go module cache may have been incompletely copied. On the connected machine, re-export the full cache:
|
|
|
|
```bash
|
|
cp -r ~/go/pkg/mod/cache/ /media/spinifex-deploy/go-cache/
|
|
```
|
|
|
|
On the target, restore it:
|
|
|
|
```bash
|
|
mkdir -p ~/go/pkg/mod/
|
|
cp -r /mnt/usb/go-cache ~/go/pkg/mod/cache
|
|
```
|