Skip to main content
Version: 2.0.x

Quickstart

This quickstart guide walks you through installing Hauler and getting started with the basics, including adding artifacts to the Hauler store, saving and loading content, and serving it.

Installation​

# install latest release
curl -sfL https://get.hauler.dev | bash

Getting Started with Hauler​

Add Artifacts to the Hauler Store​

Using the Command Line:
# add a image... defaults to docker.io
hauler store add image neuvector/scanner:latest

# add a image with a specific platform and with supply chain artifacts
# may not work for all users due to the specified registry
hauler store add image rgcrprod.azurecr.us/longhornio/longhorn-ui:v1.7.1 --platform linux/amd64 --key carbide-key.pub

# add a helm chart with a specific version
hauler store add chart rancher --repo https://releases.rancher.com/server-charts/stable --version 2.20.1

# add a file and assign it a new name
hauler store add file https://get.rke2.io --name install.sh
Using a Hauler Manifest:
# fetch the content via a declarative manifest
hauler store sync --filename hauler-manifest.yaml

hauler-manifest.yaml
apiVersion: content.hauler.cattle.io/v1
kind: Images
metadata:
name: hauler-content-images-example
spec:
images:
- name: busybox
- name: busybox:stable
platform: linux/amd64
- name: gcr.io/distroless/base@sha256:7fa7445dfbebae4f4b7ab0e6ef99276e96075ae42584af6286ba080750d6dfe5
---
apiVersion: content.hauler.cattle.io/v1
kind: Charts
metadata:
name: hauler-content-charts-example
spec:
charts:
- name: rancher
repoURL: https://releases.rancher.com/server-charts/stable
version: 2.10.1
- name: hauler-helm
repoURL: oci://ghcr.io/hauler-dev
---
apiVersion: content.hauler.cattle.io/v1
kind: Files
metadata:
name: hauler-content-files-example
spec:
files:
- path: https://get.rke2.io
name: install.sh
- path: hauler-manifest.yaml

View the Hauler Store​

# view and verify the content in the local hauler store
hauler store info

Save the Hauler Store​

# save and export the content in the local hauler store
hauler store save --filename haul.tar.zst

Airgap the haul.tar.zst (aka the "haul")​

In a real airgap workflow, you would physically transfer the haul.tar.zst tarball and the Hauler CLI to your disconnected environment. For this quickstart, we can simulate that move by deleting the local store directory:

# remove the local store to simulate moving to an airgapped environment
rm -rf store

Load the Airgapped Hauler Store​

# load and import the airgapped content to the new local hauler store
hauler store load --filename haul.tar.zst

Serve the Hauler Store​

# serve the content as a readonly registry from the hauler store
# if you have an existing registry, please see the next step
# defaults to <FQDN or IP>:5000
hauler store serve registry

# serve the file content as a fileserver from the hauler store
# if you have an existing fileserver, please see the next step
# defaults to <FQDN or IP>:8080
hauler store serve fileserver

Copy the Hauler Store​

# optional step to authenicate into your registry
hauler login <registry-url> --username <username> --password <password>

# copy the content to a registry from the hauler store
# copies oci compliant artifacts
hauler store copy registry://<registry-url>

Extract Content from the Hauler Store​

# extracts artifacts from the hauler store to disk
hauler store extract hauler/rancher:2.10.1