Skip to content

Commit

Permalink
cleaned up repo for release
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbradys committed Dec 17, 2023
1 parent 891bbb8 commit 93885cc
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 37 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- name: Rancher Airgap - Build Hauler
run: |
sh hauler/scripts/hauler/hauler-hauler.sh
mv /opt/rancher/hauler/hauler/hauler hauler/hauler/hauler
mv /opt/rancher/hauler/rancher-airgap-hauler.tar.zst hauler/hauler/rancher-airgap-hauler.tar.zst
mv /opt/rancher/hauler/hauler/rancher-airgap-hauler.yaml hauler/hauler/rancher-airgap-hauler.yaml
mv /opt/rancher/hauler/hauler/rancher-airgap-hauler.tar.zst hauler/hauler/rancher-airgap-hauler.tar.zst
pwd && ls -la hauler/hauler
- name: Rancher Airgap - Build Helm
Expand Down Expand Up @@ -113,6 +113,12 @@ jobs:
run: |
pwd && ls -la
- name: Rancher Airgap - Test/Lint Hauler
run: |
cd /opt/rancher/hauler/hauler
hauler store info
rm -rf /opt/rancher/hauler/hauler
- name: Rancher Airgap - Test/Lint Helm
run: |
cd /opt/rancher/hauler/helm
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,16 @@ fetch -> validate -> save -> | <airgap> | -> load -> validate -> distribute

### Addons
* [hauler/hauler](hauler/hauler/README.md) - provides the content manifest for Hauler
* currently supports: `Hauler v0.4.0`
* currently supports: `Hauler v0.4.1`
* [hauler/helm](hauler/helm/README.md) - provides the content manifest for Helm
* currently supports: `Helm v3.13.3`
* [hauler/cosign](hauler/cosign/README.md) - provides the content manifest for Cosign
* currently supports: `Cosign v2.22.1`
* currently supports: `Cosign v2.2.2`

**Note:** We are currently planning and working towards supporting every major version of our products. We will continue to update to the latest until we implement previous major verions.

## Hauler Installation
```bash
### Hauler v0.4.0 (latest)
### https://github.com/rancherfederal/hauler
curl -#OL https://github.com/rancherfederal/hauler/releases/download/v0.4.0/hauler_0.4.0_linux_amd64.tar.gz
tar -xf hauler_0.4.0_linux_amd64.tar.gz && sudo cp hauler /usr/bin/hauler
curl -sfL https://get.hauler.dev | bash
```
24 changes: 13 additions & 11 deletions examples/hauler-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,27 @@ mkdir -p /opt/rancher/hauler
cd /opt/rancher/hauler

### Download and Install Hauler
curl -#OL curl -#OL https://github.com/rancherfederal/hauler/releases/download/v0.4.0/hauler_0.4.0_linux_amd64.tar.gz
tar -xf hauler_0.4.0_linux_amd64.tar.gz && sudo cp hauler /usr/bin/hauler
curl -sfL https://get.hauler.dev | bash

### Fetch Rancher Airgap Manifests
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/hauler/rancher-airgap-hauler.yaml
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/helm/rancher-airgap-helm.yaml
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/cosign/rancher-airgap-cosign.yaml
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/rke2/rancher-airgap-rke2.yaml
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/rancher/rancher-airgap-rancher.yaml
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/longhorn/rancher-airgap-longhorn.yaml
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/neuvector/rancher-airgap-neuvector.yaml
### curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/harvester/rancher-airgap-harvester.yaml
# curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/harvester/rancher-airgap-harvester.yaml

### Sync Manifests to Hauler Store
hauler store sync -f rancher-airgap-hauler.yaml
hauler store sync -f rancher-airgap-helm.yaml
hauler store sync -f rancher-airgap-cosign.yaml
hauler store sync -f rancher-airgap-rke2.yaml
hauler store sync -f rancher-airgap-rancher.yaml
hauler store sync -f rancher-airgap-longhorn.yaml
hauler store sync -f rancher-airgap-neuvector.yaml
### hauler store sync -f rancher-airgap-harvester.yaml
# hauler store sync -f rancher-airgap-harvester.yaml

### Verify Hauler Store
hauler store info
Expand All @@ -44,18 +45,22 @@ Using Rancher Airgaps Tarballs (complied from the manifests):
### Set Variables
export vRancherAirgap=v1.6.1

### Fetch Individual Hauler TARs
### Setup Directories
mkdir -p /opt/rancher/hauler
cd /opt/rancher/hauler

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

### Fetch Rancher Airgap Tarballs
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/hauler/rancher-airgap-hauler.tar.zst
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/helm/rancher-airgap-helm.tar.zst
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/cosign/rancher-airgap-cosign.tar.zst
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/rke2/rancher-airgap-rke2.tar.zst
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/rancher/rancher-airgap-rancher.tar.zst
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/longhorn/rancher-airgap-longhorn.tar.zst
curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/neuvector/rancher-airgap-neuvector.tar.zst
### curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/harvester/rancher-airgap-harvester.tar.zst
# curl -#OL https://rancher-airgap.s3.amazonaws.com/${vRancherAirgap}/hauler/harvester/rancher-airgap-harvester.tar.zst

### Optional: Create Single TAR
tar -czvf /opt/rancher/hauler/rancher-airgap.tar.zst .
Expand All @@ -69,19 +74,16 @@ tar -czvf /opt/rancher/hauler/rancher-airgap.tar.zst .

## Disconnected Build Server
```bash
### Sudo to Root User
sudo su

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

### Untar and Install Hauler
tar -xf /opt/rancher/hauler/rancher-airgap-hauler.tar.zst
rm -rf README.md hauler_0.4.0_linux_amd64.tar.gz && mv hauler /usr/bin/hauler
rm -rf README.md hauler_0.4.1_linux_amd64.tar.gz && mv hauler /usr/bin/hauler

### Import Hauler TARs (will take a minute)
hauler store load rancher-airgap-helm.tar.zst rancher-airgap-cosign.tar.zst rancher-airgap-rke2.tar.zst rancher-airgap-rancher.tar.zst rancher-airgap-longhorn.tar.zst rancher-airgap-neuvector.tar.zst ### rancher-airgap-harvester.tar.zst
hauler store load rancher-airgap-helm.tar.zst rancher-airgap-cosign.tar.zst rancher-airgap-rke2.tar.zst rancher-airgap-rancher.tar.zst rancher-airgap-longhorn.tar.zst rancher-airgap-neuvector.tar.zst # rancher-airgap-harvester.tar.zst

### Verify Hauler Store
hauler store info
2 changes: 1 addition & 1 deletion examples/rancher-airgap-rke2-private-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cd /opt/rancher/hauler

### Untar and Install Hauler
tar -xf /opt/rancher/hauler/rancher-airgap-hauler.tar.zst
rm -rf README.md hauler_0.4.0_linux_amd64.tar.gz && mv hauler /usr/bin/hauler
rm -rf README.md hauler_0.4.1_linux_amd64.tar.gz && mv hauler /usr/bin/hauler

### Import Hauler TARs (will take a minute)
hauler store load rancher-airgap-hauler.tar.zst rancher-airgap-rke2.tar.zst
Expand Down
2 changes: 1 addition & 1 deletion hauler/cosign/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Collection and Packaging

### Cosign v2.22.1 - Sigstore
### Cosign v2.2.2 - Sigstore

[hauler/cosign/cosign](https://rancher-airgap.s3.amazonaws.com/v1.6.1/hauler/cosign/cosign) - provides the binary for Cosign.

Expand Down
2 changes: 1 addition & 1 deletion hauler/hauler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Collection and Packaging

### Hauler v0.4.0 - Rancher Government Solutions
### Hauler v0.4.1 - Rancher Government Solutions

[hauler/hauler/hauler](https://rancher-airgap.s3.amazonaws.com/v1.6.1/hauler/hauler/hauler) - provides the binary for Hauler.

Expand Down
6 changes: 1 addition & 5 deletions hauler/scripts/cosign/hauler-cosign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ rm -rf /opt/rancher/hauler/cosign
mkdir -p /opt/rancher/hauler/cosign
cd /opt/rancher/hauler/cosign

### Download Cosign
### https://github.com/sigstore/cosign
curl -#OL https://github.com/sigstore/cosign/releases/download/v${vCosign}/cosign-linux-amd64
mv cosign-linux-amd64 cosign && chmod 755 cosign

### Create Hauler Manifest
### Cosign -> https://github.com/sigstore/cosign
cat << EOF >> /opt/rancher/hauler/cosign/rancher-airgap-cosign.yaml
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Files
Expand Down
23 changes: 17 additions & 6 deletions hauler/scripts/hauler/hauler-hauler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,21 @@ rm -rf /opt/rancher/hauler/hauler
mkdir -p /opt/rancher/hauler/hauler
cd /opt/rancher/hauler/hauler

### Download Hauler
### https://github.com/rancherfederal/hauler
curl -#OL https://github.com/rancherfederal/hauler/releases/download/v${vHauler}/hauler_${vHauler}_linux_amd64.tar.gz
tar -xf hauler_${vHauler}_linux_amd64.tar.gz
### Create Hauler Manifest
### Hauler -> https://github.com/rancherfederal/hauler
cat << EOF >> /opt/rancher/hauler/hauler/rancher-airgap-hauler.yaml
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Files
metadata:
name: rancher-airgap-files-hauler
spec:
files:
- path: https://github.com/rancherfederal/hauler/releases/download/v${vHauler}/hauler_${vHauler}_linux_amd64.tar.gz
name: hauler
EOF

### Compress Hauler
tar -czvf /opt/rancher/hauler/rancher-airgap-hauler.tar.zst .
### Load Hauler Manifest into Store
hauler store sync -f rancher-airgap-hauler.yaml

### Compress Hauler Store Contents
hauler store save --filename rancher-airgap-hauler.tar.zst
6 changes: 1 addition & 5 deletions hauler/scripts/helm/hauler-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ rm -rf /opt/rancher/hauler/helm
mkdir -p /opt/rancher/hauler/helm
cd /opt/rancher/hauler/helm

### Download Helm
### https://github.com/helm/helm
curl -#OL https://get.helm.sh/helm-v${vHelm}-linux-amd64.tar.gz
tar -xf helm-v${vHelm}-linux-amd64.tar.gz && mv linux-amd64 helm && chmod 755 helm

### Create Hauler Manifest
### Helm -> https://github.com/helm/helm
cat << EOF >> /opt/rancher/hauler/helm/rancher-airgap-helm.yaml
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Files
Expand Down

0 comments on commit 93885cc

Please sign in to comment.