Skip to content

Commit

Permalink
docs: promote quick start page in docs (#2182)
Browse files Browse the repository at this point in the history
## Description

This PR promotes the Quick Start page in the docs to allow easier
discovery and linking from other sources.

## Related Issue

Fixes #N/A

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Other (security config, docs update, etc)

## Checklist before merging

- [X] Test, docs, adr added or updated as needed
- [X] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
Racer159 authored Dec 11, 2023
1 parent f5c4a8d commit 5c33424
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 210 deletions.
111 changes: 2 additions & 109 deletions docs/0-zarf-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
sidebar_position: 0
---

import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

# Overview

![Zarf Underwater](.images/Zarf%20Left%20Underwater%20-%20Behind%20rock.svg)
Expand All @@ -21,7 +18,7 @@ It also simplifies the installation, update, and maintenance of supporting DevSe

:::note

Check out our [glossary](1-getting-started/0-understand-the-basics.md) for an explanation of common terms used in the project.
Check out our [glossary](1-getting-started/1-understand-the-basics.md) for an explanation of common terms used in the project.

:::

Expand Down Expand Up @@ -160,112 +157,8 @@ In this use case, you configure Zarf to initialize a cluster that already exists
- [Composable packages](./3-create-a-zarf-package/2-zarf-components.md#composing-package-components) to include multiple sub-packages/components
- Component-level OS/architecture filtering

## Quick Start

1. 💻 Select your system's OS below.
2. ❗ Ensure you have the pre-requisite applications running.
3. `$` Enter the commands into your terminal.

<Tabs>
<TabItem value="Linux">

:::info

This quick start requires you to already have:

- [Homebrew](https://brew.sh/) package manager installed on your machine.
- [Docker](https://www.docker.com/) installed and running on your machine.

For more install options please visit our [Getting Started page](./1-getting-started/index.md).

:::

## Linux Commands

```bash
# To install Zarf
brew tap defenseunicorns/tap && brew install zarf

# Next, you will need a Kubernetes cluster. This example uses KIND.
brew install kind && kind delete cluster && kind create cluster


# Then, you will need to deploy the Zarf Init Package
zarf init


# You are ready to deploy any Zarf Package, try out our Retro Arcade!!
zarf package deploy oci://defenseunicorns/dos-games:1.0.0-$(uname -m) --key=https://zarf.dev/cosign.pub
```

:::note

This example shows how to install Zarf with the official (📜) `defenseunicorns` Homebrew tap, however there are many other options to install Zarf on Linux such as:

- 📜 **[official]** Downloading Zarf directly from [GitHub releases](https://github.com/defenseunicorns/zarf/releases)
- 🧑‍🤝‍🧑 **[community]** `apk add` on [Alpine Linux Edge](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/zarf)
- 🧑‍🤝‍🧑 **[community]** `asdf install` with the [ASDF Version Manager](https://github.com/defenseunicorns/asdf-zarf)
- 🧑‍🤝‍🧑 **[community]** `nix-shell`/`nix-env` with [Nix Packages](https://search.nixos.org/packages?channel=23.05&show=zarf&from=0&size=50&sort=relevance&type=packages&query=zarf)

:::

:::tip

Zarf can deploy it's own `k3s` cluster on Linux if you have `root` access by selecting the `k3s` component on `zarf init`.
To quickly try out Zarf for yourself see the [Zarf Quick Start](./1-getting-started/index.md#quick-start)!

:::

</TabItem>
<TabItem value="macOS">

:::info

This quick start requires you to already have:

- [Homebrew](https://brew.sh/) package manager installed on your machine.
- [Docker](https://www.docker.com/) installed and running on your machine.

For more install options please visit our [Getting Started page](./1-getting-started/index.md).

:::

## MacOS Commands

```bash
# To install Zarf
brew tap defenseunicorns/tap && brew install zarf

# Next, you will need a Kubernetes cluster. This example uses KIND.
brew install kind && kind delete cluster && kind create cluster


# Then, you will need to deploy the Zarf Init Package
zarf init


# You are ready to deploy any Zarf Package, try out our Retro Arcade!!
zarf package deploy oci://🦄/dos-games:1.0.0-$(uname -m) --key=https://zarf.dev/cosign.pub
```

</TabItem>
<TabItem value="Windows">

## Windows Commands


:::info

There is currently no Zarf Quick Start for Windows, though you can learn how to install Zarf from our Github Releases by visiting the [Getting Started page](./1-getting-started/index.md#downloading-from-github-releases)

:::

```text
Coming soon!
```

</TabItem>
</Tabs>

Zarf is being actively developed by the community. For more information, see our [release notes](https://github.com/defenseunicorns/zarf/releases).
151 changes: 151 additions & 0 deletions docs/1-getting-started/0-installing-zarf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

# Installing Zarf

Depending on your operating system and specific setup there are a few ways you can get the Zarf CLI onto your machine:

- [Install from Homebrew](#installing-from-the-defense-unicorns-homebrew-tap).
- [Download a prebuilt binary](#downloading-a-prebuilt-binary-from-our-github-releases).
- [Build the CLI](#building-the-cli-from-scratch) from scratch.

[Post-Install](#post-install-steps), you can verify that Zarf is correctly on your `$PATH` and that you have an 'init' package for your environment and Zarf version.

## Installing the CLI with Homebrew

[Homebrew](https://brew.sh/) is an open-source software package manager that simplifies the installation of software on macOS and Linux.


<Tabs>
<TabItem value="macOS">

With Homebrew on macOS, installing Zarf is as simple as:

```bash
brew tap defenseunicorns/tap && brew install zarf
```

</TabItem>
<TabItem value="Linux">

With Homebrew on Linux, installing Zarf is as simple as:

```bash
brew tap defenseunicorns/tap && brew install zarf
```

</TabItem>
</Tabs>

:::note

The above command detects your OS and system architecture and installs the correct Zarf CLI binary for your machine. Once the above command is entered, the CLI should be installed on your `$PATH` and is ready for immediate use.

:::

## Downloading the CLI from GitHub Releases

All [Zarf releases](https://github.com/defenseunicorns/zarf/releases) on GitHub include prebuilt binaries that you can download and use. We offer range of combinations of OS and architecture for you to choose from.

<Tabs>
<TabItem value="Linux">

To download Zarf on Linux you can run the following (replacing `<zarf-version>` with a version of Zarf):

```bash
ZARF_VERSION=<zarf-version>
ZARF_ARCH=$([ $(uname -m) == "x86_64" ] && echo "amd64" || echo "arm64";)

curl -sL https://github.com/defenseunicorns/zarf/releases/download/${ZARF_VERSION}/zarf_${ZARF_VERSION}_Linux_${ZARF_ARCH} -o zarf
chmod +x zarf
```

On most Linux distributions, you can also install the binary onto your `$PATH` by simply moving the downloaded binary to the `/usr/local/bin` directory:

```bash
sudo mv zarf /usr/local/bin/zarf
```

</TabItem>
<TabItem value="macOS">

To download Zarf on macOS you can run the following (replacing `<zarf-version>` with a version of Zarf):

```bash
ZARF_VERSION=<zarf-version>
ZARF_ARCH=$([ $(uname -m) == "x86_64" ] && echo "amd64" || echo "arm64";)

curl -sL https://github.com/defenseunicorns/zarf/releases/download/${ZARF_VERSION}/zarf_${ZARF_VERSION}_Darwin_${ZARF_ARCH} -o zarf
chmod +x zarf
```

You can also install the binary onto your `$PATH` by simply moving the downloaded binary to the `/usr/local/bin` directory:

```bash
sudo mv zarf /usr/local/bin/zarf
```

</TabItem>
<TabItem value="Windows">


To download Zarf on Windows you can run the following (replacing `<zarf-version>` with a version of Zarf and `<zarf-arch>` with either `amd64` or `arm64` depending on your system):

```bash
$ZarfVersion="<zarf-version>"
$ZarfArch="<zarf-arch>"

Start-BitsTransfer -Source "https://github.com/defenseunicorns/zarf/releases/download/$($ZarfVersion)/zarf_$($ZarfVersion)_Windows_$($ZarfArch).exe" -Destination zarf.exe
```

You can also install the binary onto your `$PATH` by moving the downloaded binary to the desired directory and modifying the `$PATH` environment variable to include that directory.

</TabItem>
</Tabs>

## 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 [Node 18.x](https://nodejs.org/en) and are built using [make](https://www.gnu.org/software/make/).

:::note

The `make build-cli` command builds a binary for each combination 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`
- `make build-cli-linux-amd`
- `make build-cli-linux-arm`
- `make build-cli-windows-amd`
- `make build-cli-windows-arm`

For additional information, see the [Building Your Own Zarf CLI](../2-the-zarf-cli/0-building-your-own-cli.md) page.

:::

## Post-Install Steps

Once you have installed Zarf with one of the above methods, you can verify it is working with the following:

```bash
$ zarf version

vX.X.X # X.X.X is replaced with the version number of your specific installation
```

:::info

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

:::

In most usage scenarios ([but not all](../../examples/yolo/README.md)) you will also need an ['init' package](../3-create-a-zarf-package/3-zarf-init-package.md) to be initialized before you deploy your own packages. This is a special Zarf package that initializes a cluster with services that are used to store package resources while in the air gap.

You can get the default 'init' package for your version of Zarf by visiting the [Zarf releases](https://github.com/defenseunicorns/zarf/releases) page and downloading it into your working directory or into `~/.zarf-cache/zarf-init-<amd64|arm64>-vX.X.X.tar.zst`.

If you are online on the machine with cluster access you can also run `zarf init` without the `--confirm` flag to be given the option to download the matching version of the default 'init' package or you can use the `zarf tools download-init` command to download a copy to your machine.

:::tip

You can build your own custom 'init' package too if you'd like. For this you should check out the [Creating a Custom 'init' Package Tutorial](../5-zarf-tutorials/8-custom-init-packages.md).

:::
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Core Concepts

Now, assuming you're familiar with Kubernetes, AirGap, and GitOps from [Understanding the Basics](../1-getting-started/0-understand-the-basics.md), we can get started on the core concepts of Zarf.
Now, assuming you're familiar with Kubernetes, AirGap, and GitOps from [Understanding the Basics](../1-getting-started/1-understand-the-basics.md), we can get started on the core concepts of Zarf.

## Zarf Concepts

Expand Down
Loading

0 comments on commit 5c33424

Please sign in to comment.