Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation spelling and grammar fixes. #1172

Merged
merged 6 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions docs/13-walkthroughs/0-using-zarf-package-create.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Using Zarf Package Create

In this walkthrough we will be demonstrating how to build a Zarf package with `zarf package create`. In fact, we will be building two packages: the first will be the zarf init-package (which will be very useful for nearly every other walkthrough) and the second will be a package that contains a handful of legacy DOS games that we will be using in the [deploying doom](./2-deploying-doom.md) walkthrough later.

When creating a Zarf package, you will need to have Internet connection so that Zarf can fetch all of the dependencies and resources necessary to build the package. If your package is using images from a private registry or is referencing repositories in a private repository, you will need to have your credentials configured on your machine in order for Zarf to be able to fetch the resources.
In this walkthrough, we will be demonstrating how to build a Zarf package with `zarf package create`. In fact, we will be building two packages: the first will be the zarf init-package (which will be very useful for nearly every other walkthrough) and the second will be a package that contains a handful of legacy DOS games that we will be using in the [deploying doom](./2-deploying-doom.md) walkthrough later.

When creating a Zarf package, you will need to have an Internet connection so that Zarf can fetch all of the dependencies and resources necessary to build the package. If your package is using images from a private registry or is referencing repositories in a private repository, you will need to have your credentials configured on your machine for Zarf to be able to fetch the resources.

## Walkthrough Prerequisites

1. The [Zarf](https://github.com/defenseunicorns/zarf) repository cloned: ([git clone instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository))
2. Zarf binary installed on your $PATH: ([install instructions](../3-getting-started.md#installing-zarf))


## Building the init-package

Creating zarf packages is a simple process that can be completed in a single command; [`zarf package create`](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_create.md). This command looks for a `zarf.yaml` file in the specified directory and creates a package containing all the resources the file defines. More information about what a Zarf package is can be found on the [Zarf Packages](../4-user-guide/2-zarf-packages/1-zarf-packages.md) page.
Expand All @@ -27,32 +25,32 @@ This set of commands will create a zarf package in the current directory. In thi

:::note

If you continue without entering an agent image, package create will fail. The Zarf Agent is required to rewrite kubernetes objects in the air gap via what is known as a Mutating Webhook. More technical information about it can be found [here](../6-developer-guide/3-nerd-notes.md).
If you continue without entering an agent image, package create will fail. The Zarf Agent is required to rewrite Kubernetes objects in the air gap via what is known as a Mutating Webhook. More technical information about it can be found [here](../6-developer-guide/3-nerd-notes.md).

:::

<br />

When you execute the `zarf package create` command, Zarf will prompt you to confirm that you want to create the package by printout out the package definition and asking you to respond with either `y` or `n`.
When you execute the `zarf package create` command, Zarf will prompt you to confirm that you want to create the package by displaying the package definition and asking you to respond with either `y` or `n`.

![Confirm Package Creation](../.images/walkthroughs/package_create_confirm.png)

:::info

You can skip this confirmation by adding the `--confirm` flag when running the command. This will look like: `zarf package create . --confirm`
You can skip this confirmation by adding the `--confirm` flag when running the command. This will look like: `zarf package create . --confirm`

:::

<br />
<br />

Congratulations! You've just created your first Zarf package!

## Building the game package

Creating the game package is just as simple as creating the init-package! Once again, we will be using the `zarf package create` command to create the package. Since the game package definition lives in `examples/game` within the Zarf repository the only thing we NEED to do differently than before is make sure we specify the correct directory when we execute the command. While we don't NEED to, when executing the command this time, we will skip the confirmation prompt by adding the `--confirm` flag just to save a bit of time/keystrokes.
Creating the game package is just as simple as creating the init-package! Once again, we will be using the `zarf package create` command to create the package. Since the game package definition lives in `examples/game` within the Zarf repository, the only thing we need to do differently is specify the correct directory. This time we will skip the confirmation prompt by adding the `--confirm` flag to save a bit of time.

```bash
zarf package create examples/game --confirm
```

This set of commands will create a zarf package in the current directory. In this case, the package name should look something like `zarf-package-dos-games-amd64.tar.zst`, although it might be slightly different depending on your system architecture.
This will create a zarf package in the current directory with a package name that looks something like `zarf-package-dos-games-amd64.tar.zst`, although it might be slightly different depending on your system architecture.

Congratulations! You've built the games package. Now, let's [deploy it](./2-deploying-doom.md) and start playing!
34 changes: 18 additions & 16 deletions docs/13-walkthroughs/2-deploying-doom.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# Deploying Doom

In this walkthrough, we are going to deploy a fun application onto your cluster. In some of the previous walkthroughs, we have figured out how to [create a package](./0-using-zarf-package-create.md) and [initialize a cluster](./1-initializing-a-k8s-cluster.md). We will be leveraging all that past work and then go the extra step of deploying an application onto our cluster with the `zarf package deploy` command. While this example game is nothing crazy, this walkthrough hopes to show how simple it is to deploy packages of functionality into a Kubernetes cluster.
# Deploying Packages

In this walkthrough, we are going to deploy a fun application onto your cluster. In previous walkthroughs, we learned how to [create a package](./0-using-zarf-package-create.md) and [initialize a cluster](./1-initializing-a-k8s-cluster.md). We will be leveraging all that past work and then go the extra step of deploying an application onto our cluster with the `zarf package deploy` command. While this example game is nothing crazy, this walkthrough hopes to show how simple it is to deploy packages of functionality into a Kubernetes cluster.

## Walkthrough Prerequisites
1. The [Zarf](https://github.com/defenseunicorns/zarf) repository cloned: ([`git clone` Instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository))
1. Zarf binary installed on your $PATH: ([Install Instructions](../3-getting-started.md#installing-zarf))
1. A Kubernetes cluster that has been initialized by Zarf: ([Initializing a Cluster Instructions](./1-initializing-a-k8s-cluster.md))

1. The [Zarf](https://github.com/defenseunicorns/zarf) repository cloned: ([`git clone` Instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository))
2. Zarf binary installed on your $PATH: ([Installing Zarf](../3-getting-started.md#installing-zarf))
3. A Kubernetes cluster initialized by Zarf: ([Initializing a Cluster](./1-initializing-a-k8s-cluster.md))
4. The [game package we created](./0-using-zarf-package-create.md).

## Deploying The Games

```bash
``` bash
cd zarf # Enter the zarf repository that you have cloned down
cd examples/game # Enter the games directory, this is where the zarf.yaml for the game package is located

zarf package create . --confirm # Create the games package

zarf package deploy # Deploy the games package
# NOTE: Since we are not providing the path to the package as an argument, we will enter that when prompted
Expand All @@ -26,6 +23,7 @@ zarf package deploy # Deploy the games package
<br />

### Selecting the Games Package

Since we did not provide the path to the package as an argument to the `zarf package deploy` command, Zarf will prompt you asking for you to choose which package you want to deploy. There is a useful tab-suggestions feature that makes selecting between different packages in your directories easier.

![Package Deploy Selection Tab](../.images/walkthroughs/package_deploy_tab.png)
Expand All @@ -39,27 +37,31 @@ As we have seen a few times now, we are going to be prompted with a confirmation
<br />

### Connecting to the Games
When the games package finishes deploying, you should get an output that lists a couple of new commands that you can use to connect to the games. These new commands were defined by the creators of the games package to make it easier to access the games. By typing the new command, your browser should automatically open up and connect into the application we just deployed into the cluster.

When the games package finishes deploying, you should get an output that lists a couple of new commands that you can use to connect to the games. These new commands were defined by the creators of the games package to make it easier to access the games. By typing the new command, your browser should automatically open up and connect to the application we just deployed into the cluster.
![Connecting to the Games](../.images/walkthroughs/game_connect_commands.png)

<br />

```bash
``` bash
zarf connect games
```

![Connected to the Games](../.images/walkthroughs/games_connected.png)

:::note
::: note
If your browser doesn't automatically open up, you can manually go to your browser and copy the IP address that the command printed out into the URL bar.
:::

:::note
::: note
The `zarf connect games` will continue running in the background until you close the connection by clicking onto your terminal and pressing the `control + c` keys on your keyboard at the same time.
:::

<br />

## Credits

:sparkles: Special thanks to these fine references! :sparkles:
- https://www.reddit.com/r/programming/comments/nap4pt/dos_gaming_in_docker/
- https://earthly.dev/blog/dos-gaming-in-docker/

- <https://www.reddit.com/r/programming/comments/nap4pt/dos_gaming_in_docker/>
- <https://earthly.dev/blog/dos-gaming-in-docker/>
25 changes: 8 additions & 17 deletions docs/3-getting-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Started

Welcome to the documentation about Zarf, the air-gap tool! Let's get you started down your Zarfing journey!
Welcome to the documentation about Zarf, the air-gap tool! Let's get you started on your Zarfing journey!

## Installing Zarf

Expand Down Expand Up @@ -28,16 +28,7 @@ mv ./path/to/downloaded/{ZARF_FILE} /usr/local/bin/zarf
### Building the CLI from scratch

If you want to build the CLI from scratch, you can do that too! Our local builds depend on [Go 1.19.x](https://golang.org/doc/install) and are built using [make](https://www.gnu.org/software/make/).

```bash
git clone [email protected]:defenseunicorns/zarf.git
cd zarf
make build-cli # This builds all combinations of OS and architecture
mv ./build/{ZARF_FILE} /usr/local/bin/zarf
```

:::note
The `make build-cli` command builds a binary for each combinations of OS and architecture. If you want to shorten the build time, you can use an alternative command to only build the binary you need:
::: note The `make` build-cli` command builds a binary for each combinations of OS and architecture. If you want to shorten the build time, you can use an alternative command to only build the binary you need:

- `make build-cli-mac-intel`
- `make build-cli-mac-apple`
Expand All @@ -47,7 +38,7 @@ The `make build-cli` command builds a binary for each combinations of OS and arc
You can learn more about building [here](./4-user-guide/1-the-zarf-cli/1-building-your-own-cli.md).
:::

<br />
---

## Verifying Zarf Install

Expand All @@ -62,16 +53,16 @@ vX.X.X # X.X.X is replaced with the version number of your specific installatio

If you are not seeing that, then it's possible that Zarf was not installed onto your $PATH, [this $PATH guide](https://zwbetz.com/how-to-add-a-binary-to-your-path-on-macos-linux-windows/) should help with that.

<br />
---

## Where to next?

Depending on how familiar you are with Kubernetes, DevOps, and Zarf, let's find what set of information would be most useful to you!

- If you want to dive straight into Zarf, you can find examples and guides in the [Walkthroughs](./13-walkthroughs/index.md) page.
- If you want to dive straight into Zarf, you can find examples and guides on the [Walkthroughs](./13-walkthroughs/index.md)](./13-walkthroughs/index.md) page.

- More information about the Zarf CLI is available in the [Zarf CLI](./4-user-guide/1-the-zarf-cli/index.md) page, or by browsing through the help descriptions of all the commands available through `zarf --help`.
- More information about the Zarf CLI is available on the [Zarf](./4-user-guide/1-the-zarf-cli/index.md) CLI](./4-user-guide/1-the-zarf-cli/index.md) page, or by browsing through the help descriptions of all the commands available through `zarf --help`.

- More information about the packages that Zarf create and deploy is available in the [Understanding Zarf Packages](./4-user-guide/2-zarf-packages/1-zarf-packages.md) page.
- More information about the packages that Zarf creates and deploy is available in the [Understanding Zarf Packages](./4-user-guide/2-zarf-packages/1-zarf-packages.md) page.

- If you want to take a step back and better understand the problem Zarf is trying to solve, you can find more context in the [Understand the Basics](./1-understand-the-basics.md) and [Core Concepts](./2-core-concepts.md) page.
- If you want to take a step back and better understand the problem Zarf is trying to solve, you can find more context on the [Understand](./1-understand-the-basics.md) the Basics](./1-understand-the-basics.md) and [Core Concepts](./2-core-concepts.md) pages.
24 changes: 12 additions & 12 deletions docs/4-user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ This guide is intended for end users who are using Zarf in a disconnected enviro

#### (0) - Identify software to-be-moved

Zarf doesn't build software&mdash;it helps you distribute software that already exists.
Zarf doesn't build software; it helps you distribute software that already exists.

Zarf can pull from lots of places like [Docker Hub](https://hub.docker.com/), [Iron Bank](https://p1.dso.mil/products/iron-bank), [GitHub](https://github.com/), local filesystems, etc. but you have to make sure that Zarf has a clear path & appropriate access credentials. Be sure you know what you want pack & how to access it before you Zarf.
Zarf can pull from sources like [Docker Hub](https://hub.docker.com/), [Iron Bank](https://p1.dso.mil/products/iron-bank), [GitHub](https://github.com/), local filesystems, etc. but you have to make sure that Zarf has a clear path & appropriate access credentials. Be sure you know what you want to pack & how to access it before you Zarf.

Find out more about the types of software Zarf can move in the "[What can be packaged?](#what-can-be-packaged)" section.
Find out more about the types of software Zarf can move in the "[What can be packaged?](../0-zarf-overview.md#what-can-be-packaged)" section.

#### (1) - Preparation

In order to build a Zarf package, you need to prepare:
To build a Zarf package, you need to prepare:

- a "packaging" workstation &mdash; which must have the `zarf` [CLI tool installed](../3-getting-started.md#installing-zarf), and
- a "packaging" workstation which must have the `zarf` [CLI tool installed](../3-getting-started.md#installing-zarf), and

- a `zarf.yaml` file &mdash; which tells the Zarf what you need packaged.
- a `zarf.yaml` file which tells Zarf what you need to package.

Find some detailed uses of the `zarf.yaml` file in [our examples](../../examples/).

#### (2) - Package

Actually making a Zarf package out of a `zarf.yaml` file is a matter of calling a single, simple command: `zarf package create`. You'll see a `zarf-package-*.tar.zst` file pop into existence afterward&mdash;that's your package.
Making a Zarf package out of a `zarf.yaml` file is a matter of calling a single, simple command: `zarf package create`. You'll see a `zarf-package-*.tar.zst` file pop into existence afterward. That's your package.

Find out more about that by calling the CLI for help, or check out an example package build in [our game example](../../examples/game#package-the-game).

Expand All @@ -51,24 +51,24 @@ Find out more about that by calling the CLI for help, or check out an example pa
<img alt="diagram showing the process to ship a package" src={require('../.images/what-is-zarf/ship-the-package.png').default} height="255" />
</a>

What this activity looks like is _very_ situational specific so Zarf tries not to have an opinion&mdash;transfer Zarf packages between production & operating locations using whatever mechanisms are available.
What this activity looks like is _very_ contextual to the target environment, so Zarf tries not to have an opinion. Transfer Zarf packages between production & operating locations using whatever mechanisms are appropriate.

Have to burn your package to disk & "sneakernet" it? That works.

Got an intermittent, super-secret satellite uplink you can use? Awesome.

Can you make a direct network connection? Even better.

Consider the art of the possible and use what you can&mdash;Zarf will continue to work, regardless.
Consider the art of the possible and use what you can. Zarf will work, regardless.

### Deploy Package

&nbsp;

## Other Resources

If you are looking for more advanced information on how to operate and custom configure Zarf to your specific environment needs, check out these additional resources.
If you are looking for more advanced information on how to operate and customize Zarf to your specific environment needs, check out these additional resources.

- For information on how to create custom configuration of the Zarf CLI see the [Operator Manual](../5-operator-manual/_category_.json)
- For information on how to create your own custom Zarf Packages see the [Developer Guide](../6-developer-guide/1-contributor-guide.md)
- For information on how to create a custom configuration of the Zarf CLI see the [Operator Manual](../5-operator-manual/_category_.json)
- For information on how to create your own Zarf Packages see the [Developer Guide](../6-developer-guide/1-contributor-guide.md)
- To see some of the ways our community is using Zarf to deploy code onto AirGap systems see the Zarf [Examples](../../examples/README.md)