Skip to content

Commit

Permalink
cleaned up repo formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbradys committed Feb 1, 2025
1 parent e60d19f commit ec006f5
Show file tree
Hide file tree
Showing 27 changed files with 185 additions and 185 deletions.
42 changes: 21 additions & 21 deletions examples/os-packages-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
Complete the following commands on the Internet Connected Server. For the initial airgap, we recommend you bring all packages over the airgap and then individual packages as required in the future.

```bash
### Setup Directories
# Setup Directories
mkdir -p /opt/hauler
cd /opt/hauler

### Download and Install Hauler
# Download and Install Hauler
curl -sfL https://get.hauler.dev | bash

### Download and Install createrepo
# Download and Install createrepo
# https://github.com/rpm-software-management/createrepo
yum install -y createrepo

### Setup Directories
# Setup Directories
mkdir -p /opt/hauler/repos
cd /opt/hauler/repos

### Download Required Packages
# Download Required Packages
# https://man7.org/linux/man-pages/man1/repotrack.1.html
repotrack iptables container-selinux libnetfilter_conntrack libnfnetlink libnftnl policycoreutils-python-utils cryptsetup nfs-utils iscsi-initiator-utils git zip zstd tree jq createrepo

### Create YUM Repo
# Create YUM Repo
cd /opt/hauler
createrepo /opt/hauler/repos

### Compile Package List
# Compile Package List
find /opt/hauler/repos > /opt/hauler/repos/package-list.txt

### Generate the Hauler Manifest for Packages
# Generate the Hauler Manifest for Packages
cat <<EOF > rancher-airgap-packages.yaml
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Files
Expand All @@ -40,13 +40,13 @@ spec:
$(cat /opt/hauler/repos/package-list.txt | sed 's/^/ - path: /')
EOF

### Sync Manifests to Hauler Store
# Sync Manifests to Hauler Store
hauler store sync --store packages --files rancher-airgap-packages.yaml

### Compress Hauler Store Contents
# Compress Hauler Store Contents
hauler store save --store packages --filename rancher-airgap-packages.tar.zst

### Fetch Hauler Binary
# Fetch Hauler Binary
curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v1.1.1/hauler_1.1.1_linux_amd64.tar.gz
```

Expand All @@ -61,31 +61,31 @@ curl -sfOL https://github.com/hauler-dev/hauler/releases/download/v1.1.1/hauler_
Complete the following commands on the Disconnected Server. We recommend to **not** use this server in the cluster.

```bash
### Setup Directories
# Setup Directories
mkdir -p /opt/hauler
cd /opt/hauler

### SCP TARBALLS HERE
# SCP TARBALLS HERE

### Untar and Install Hauler
# Untar and Install Hauler
tar -xf hauler_1.0.3_linux_amd64.tar.gz
rm -rf LICENSE README.md
chmod 755 hauler && mv hauler /usr/bin/hauler

### Load Hauler Tarballs
# Load Hauler Tarballs
hauler store load rancher-airgap-packages.tar.zst

### Verify Hauler Store Contents
# Verify Hauler Store Contents
hauler store info

### Serve Hauler Content
# Serve Hauler Content
hauler store serve fileserver
# nohup hauler store serve fileserver &

### Verify File Server Content
# Verify File Server Content
curl http://<FQDN or IP>:<PORT>

### Create YUM Repo File
# Create YUM Repo File
cat << EOF > /etc/yum.repos.d/rancher-airgap.repo
[rancher-airgap]
name=Rancher Airgap YUM Repository
Expand All @@ -95,10 +95,10 @@ exactarch=0
gpgcheck=0
EOF

### Disable Default YUM Repos
# Disable Default YUM Repos
# useful when simulating airgapped servers
yum-config-manager --disable appstream baseos extras

### List Available YUM Repos
# List Available YUM Repos
yum repolist all
```
Loading

0 comments on commit ec006f5

Please sign in to comment.