Skip to content

Commit

Permalink
merge pull request #5 from zackbradys/main
Browse files Browse the repository at this point in the history
added docs for hauler release
  • Loading branch information
zackbradys authored Nov 7, 2023
2 parents 18bc376 + f6674ef commit 2474d05
Show file tree
Hide file tree
Showing 55 changed files with 1,806 additions and 144 deletions.
25 changes: 20 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# Makefile for hauler-docs

# run all build commands
all: install build serve

run:
npm start
# install dependencies
install:
npm install

# test and run hauler-docs
# opens localhost:3000/hauler-docs
test:
npm run start

# build and compile hauler-docs
build:
npm run build

# server hauler-docs from build
# opens localhost:5000/hauler-docs
serve:
npm run serve

# `npm run build`
# Bundles your website into static files for production.

# clear build outputs
clear:
npm run clear
4 changes: 2 additions & 2 deletions blog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ authors: [zackbradys]
tags: [informational, update, hauler, rgs]
---

# Welcome to Hauler!
## Welcome to the Hauler Blog!

Welcome to the Blog for Rancher Government Hauler. Please check back later for updates!
**Welcome to the Blog for Rancher Government Hauler!** We're still hard at work developing the docs and specifically the Hauler Blog. Please back later for updates!
10 changes: 10 additions & 0 deletions docs/airgap-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Airgap Workflow
description: Airgap Workflow Documentation for Hauler
sidebar_label: Airgap Workflow
---

## Workflow Diagram
![hauler-workflow-diagram](/img/hauler-workflow-diagram.png)

Airgap Workflow Documentation pending a future release!
53 changes: 53 additions & 0 deletions docs/core-concepts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Core Concepts
description: Core Concepts Documentation for Hauler
sidebar_label: Core Concepts
---

![hauler-diagram](/img/hauler-diagram.png)

## Haul

:::tip TLDR:

`Hauls` are Compressed Archive (Tarball) of Hauler Collections and Content.

:::

At the heart of Hauler lies the concept of a `Haul`. A `Haul` is a compressed archive, often in the form of a tarball, containing Hauler collections and content. It serves as a container for grouping and transporting various data types, making it a fundamental element in the Hauler ecosystem.

## Collections

:::tip TLDR:

`Collections` are Grouping of one or more Hauler Contents.

:::

`Collections` are the building blocks of Hauler. These are groupings of one or more Hauler `contents`. Think of `collections` as organized sets of data that collectively represent something desirable.

### Community Collections

While `collections` (and `contents`) are built into Hauler, our goal is to empower users to define their own `collections`. This way, you can tailor Hauler to your unique requirements and take full control of your artifacts.

### RGS Carbide Collections

`Hauler` provides the ability to import `collections` for the Rancher products, making it seamless for RGS Supported Customers to airgap any of the Rancher products or projects. If you haven't heard of Rancher Government Carbide, check it out [here](https://ranchergovernment.com/carbide)!

## Content

:::tip TLDR:

`Contents` are Artifacts such as Images, Charts, or Files.

:::

In Hauler's terminology, `content` refers to artifacts such as images, charts, or files. These are the fundamental types of resources that Hauler understands and manages. To understand the term better, let's break it down:

* `Content`: The fundamental type of artifacts that Hauler recognizes (images, charts, and files).
* `Artifact`: Anything that can be represented as an OCI (Open Container Initiative) artifact.
* OCI Artifacts provide a standardized way to store arbitrary files, making it easier to manage content efficiently.

### Declaritive Content

While manually adding content to `Hauler` is a straightforward way to get started, we recommend a much more sustainable approach. `Hauler` provides a declaritive approach for each `content` type, allowing you to define all the `content` within a manifest. This approach ensures a more reproducable workflow for managing the lifecycle of your `hauls`.
10 changes: 0 additions & 10 deletions docs/getting-started/_category_.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions docs/getting-started/intro.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/getting-started/quickstart.md

This file was deleted.

66 changes: 66 additions & 0 deletions docs/guides-references/cluster-images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Fetching Cluster Images
description: Fetching Images on a Cluster Documentation
sidebar_label: Fetch Cluster Images
---

It may be difficult to understand exactly what `content` is actively within your environment. Below is a simple way to generate a list of all images running in your environment, store it as an environment variable, and show the list by echoing the environment variable.

```bash
export IMAGE_LIST=$(kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c | cut -c 9-)
echo "$IMAGE_LIST"
```

### Example Output

```yaml
index.docker.io/rancher/hardened-etcd:v3.5.1-k3s1-build20220112
index.docker.io/rancher/hardened-kubernetes:v1.23.5-rke2r1-build20220316
index.docker.io/rancher/rke2-cloud-provider:v0.0.3-build20211118
rancher/hardened-calico:v3.21.4-build20220228
rancher/hardened-cluster-autoscaler:v1.8.5-build20211119
rancher/hardened-coredns:v1.9.1-build20220318
rancher/hardened-flannel:v0.17.0-build20220317
rancher/hardened-k8s-metrics-server:v0.5.0-build20211119
rancher/klipper-helm:v0.7.0-build20220315
rancher/nginx-ingress-controller:nginx-1.0.2-hardened4
```

### Hauler Manifest using the Images

```yaml
IMAGE_LIST_MODIFIED=$(cat "$IMAGE_LIST" | sed 's/^/ - name: /')
# sed, stream editor, appends 2 spaces of indentation denotes
# an entry in a list, then adds name: to match expected syntax
```

```yaml title="hauler-manfiest.yaml"
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Images
metadata:
name: hauler-cluster-images-example
spec:
images:
$IMAGE_LIST_MODIFIED
```

### Resulting Hauler Manifest

```yaml title="hauler-manfiest.yaml"
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Images
metadata:
name: hauler-cluster-images-example
spec:
images:
- name: index.docker.io/rancher/hardened-etcd:v3.5.1-k3s1-build20220112
- name: index.docker.io/rancher/hardened-kubernetes:v1.23.5-rke2r1-build20220316
- name: index.docker.io/rancher/rke2-cloud-provider:v0.0.3-build20211118
- name: rancher/hardened-calico:v3.21.4-build20220228
- name: rancher/hardened-cluster-autoscaler:v1.8.5-build20211119
- name: rancher/hardened-coredns:v1.9.1-build20220318
- name: rancher/hardened-flannel:v0.17.0-build20220317
- name: rancher/hardened-k8s-metrics-server:v0.5.0-build20211119
- name: rancher/klipper-helm:v0.7.0-build20220315
- name: rancher/nginx-ingress-controller:nginx-1.0.2-hardened4
```
143 changes: 143 additions & 0 deletions docs/guides-references/command-line/hauler-completion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
title: Hauler Completion (Command)
description: Hauler CLI Reference for hauler completion
sidebar_label: Hauler Completion
---

### Command Overview

* Generate an autocompletion script for hauler for the specified shell.

```yaml
Usage:
hauler completion [command]

Available Commands:
bash Generate the autocompletion script for bash
fish Generate the autocompletion script for fish
powershell Generate the autocompletion script for powershell
zsh Generate the autocompletion script for zsh

Flags:
-h, --help help for completion

Global Flags:
-l, --log-level string (default "info")

Use "hauler completion [command] --help" for more information about a command.
```


#### `hauler completion bash`:

* Generate the autocompletion script for the bash shell.
* **Note:** This script depends on the 'bash-completion' package.

```yaml
To load completions in your current shell session:

source <(hauler completion bash)

To load completions for every new session, execute once:

#### Linux:

hauler completion bash > /etc/bash_completion.d/hauler

#### macOS:

hauler completion bash > $(brew --prefix)/etc/bash_completion.d/hauler

You will need to start a new shell for this setup to take effect.

Usage:
hauler completion bash

Flags:
-h, --help help for bash
--no-descriptions disable completion descriptions

Global Flags:
-l, --log-level string (default "info")
```

#### `hauler completion fish`:

* Generate the autocompletion script for the fish shell.

```yaml
To load completions in your current shell session:

hauler completion fish | source

To load completions for every new session, execute once:

hauler completion fish > ~/.config/fish/completions/hauler.fish

You will need to start a new shell for this setup to take effect.

Usage:
hauler completion fish [flags]

Flags:
-h, --help help for fish
--no-descriptions disable completion descriptions

Global Flags:
-l, --log-level string (default "info")
```

#### `hauler completion powershell`:

* Generate the autocompletion script for powershell.

```yaml
To load completions in your current shell session:

hauler completion powershell | Out-String | Invoke-Expression

To load completions for every new session, add the output of the above command
to your powershell profile.

Usage:
hauler completion powershell [flags]

Flags:
-h, --help help for powershell
--no-descriptions disable completion descriptions

Global Flags:
-l, --log-level string (default "info")
```

#### `hauler completion zsh`:

* Generate the autocompletion script for the zsh shell.
* **Note:** If shell completion is not already enabled in your environment you will need to enable it.

```yaml
To load completions in your current shell session:

source <(hauler completion zsh)

To load completions for every new session, execute once:

#### Linux:

hauler completion zsh > "${fpath[1]}/_hauler"

#### macOS:

hauler completion zsh > $(brew --prefix)/share/zsh/site-functions/_hauler

You will need to start a new shell for this setup to take effect.

Usage:
hauler completion zsh [flags]

Flags:
-h, --help help for zsh
--no-descriptions disable completion descriptions

Global Flags:
```
Loading

0 comments on commit 2474d05

Please sign in to comment.