Skip to content

Commit

Permalink
merge pull request #7 from zackbradys/main
Browse files Browse the repository at this point in the history
updated docs for new release and fixed install docs
  • Loading branch information
zackbradys authored Dec 15, 2023
2 parents 3a07611 + f524182 commit 29d904c
Show file tree
Hide file tree
Showing 27 changed files with 932 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/introduction/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Hauler is a purpose built to be a single binary with no specific prerequistes or

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

# install specific release
curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.0 sh
curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.1 bash
```

### Windows
Expand All @@ -43,7 +43,7 @@ curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.0 sh
## Manual Installation Steps

```bash
# set the hauler version (i.e. "0.4.0")
# set the hauler version (i.e. "0.4.1")
export vHauler=HAULER_VERSION

# set the specific platform (i.e. "linux")
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Skipping past most of the documentation? Here's an easy to follow Quick Start Gu

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

## Example Use of Hauler
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hauler",
"version": "0.4.0",
"version": "0.4.1",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-0.4.0/introduction/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Hauler is a purpose built to be a single binary with no specific prerequistes or

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

# install specific release
curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.0 sh
curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.0 bash
```

### Windows
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-0.4.0/introduction/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Skipping past most of the documentation? Here's an easy to follow Quick Start Gu

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

## Example Use of Hauler
Expand Down
10 changes: 10 additions & 0 deletions versioned_docs/version-0.4.1/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 versioned_docs/version-0.4.1/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`.
66 changes: 66 additions & 0 deletions versioned_docs/version-0.4.1/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
```
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 29d904c

Please sign in to comment.