diff --git a/.github/ISSUE_TEMPLATE/UX Test b/.github/ISSUE_TEMPLATE/ux_test.md similarity index 92% rename from .github/ISSUE_TEMPLATE/UX Test rename to .github/ISSUE_TEMPLATE/ux_test.md index 487ff8a43c..17d9376b02 100644 --- a/.github/ISSUE_TEMPLATE/UX Test +++ b/.github/ISSUE_TEMPLATE/ux_test.md @@ -2,7 +2,6 @@ *What are we hoping to validate?* - ## Testing Plan ## User persona: Sample Group: @@ -12,6 +11,6 @@ Sample Group: ## Additional context ## *Screenshot or link to what needs to be tested* -Related to issue +Related to issue ## Link to Test & Results ## diff --git a/.github/workflows/scan-labels.yml b/.github/workflows/scan-labels.yml index a28854d62f..3e56023e2b 100644 --- a/.github/workflows/scan-labels.yml +++ b/.github/workflows/scan-labels.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: yogevbd/enforce-label-action@2.2.2 with: - BANNED_LABELS: "needs-docs,needs-tests,needs-adr,needs-git-sign-off,needs-walkthrough" + BANNED_LABELS: "needs-docs,needs-tests,needs-adr,needs-git-sign-off,needs-tutorial" diff --git a/.markdownlintignore b/.markdownlintignore index 0cb7d9e706..7b24597e36 100644 --- a/.markdownlintignore +++ b/.markdownlintignore @@ -1 +1 @@ -docs/4-user-guide/1-the-zarf-cli/100-cli-commands/ +docs/2-the-zarf-cli/100-cli-commands/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7437aa3c88..3574f82f4e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ Our E2E tests can be found in the `/test` folder and follow the journey of someo Our Unit tests can be found as `*_test.go` files inside the package that they are designed to test. These are also run in CI and are designed to test small functions with clear interfaces that would be difficult to test otherwise. As a general rule, we are limiting unit tests to the `src/pkg/*` folder. All of our tests should be able to be run locally or in CI. -You can learn more about the testing of Zarf [here](docs/6-contribute-to-zarf/2-testing.md). +You can learn more about the testing of Zarf [here](docs/12-contribute-to-zarf/2-testing.md). ## Documentation diff --git a/README.md b/README.md index 59659187e6..44493b15df 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,11 @@ Zarf eliminates the [complexity of air gap software delivery](https://www.itopst __ -## Getting Started +## Getting Started To try Zarf out for yourself, visit the ["Try It Now"](https://zarf.dev/install) section on our website, and if you want to learn more about Zarf and its use cases visit [docs.zarf.dev](https://docs.zarf.dev/docs/zarf-overview). -From the docs you can learn more about [installation](docs/3-getting-started/0-set-up-and-install.md), [using the CLI](https://docs.zarf.dev/docs/user-guide/the-zarf-cli/), [making packages](https://docs.zarf.dev/docs/user-guide/zarf-packages/), and the [Zarf package schema](https://docs.zarf.dev/docs/user-guide/zarf-schema). +From the docs you can learn more about [installation](https://docs.zarf.dev/docs/getting-started/#installing-zarf), [using the CLI](https://docs.zarf.dev/docs/user-guide/the-zarf-cli/), [making packages](https://docs.zarf.dev/docs/user-guide/zarf-packages/), and the [Zarf package schema](https://docs.zarf.dev/docs/user-guide/zarf-schema). Using Zarf in Github workflows? Check out the [setup-zarf](https://github.com/defenseunicorns/setup-zarf) action. Install any version of Zarf and its `init` package with zero added dependencies. diff --git a/adr/0011-scripts-actions.md b/adr/0011-scripts-actions.md index 57ea4708eb..2ff92785eb 100644 --- a/adr/0011-scripts-actions.md +++ b/adr/0011-scripts-actions.md @@ -18,9 +18,9 @@ The `scripts` section of the `zarf.yaml` will be replaced with a new `actions` s - `onDeploy` - Runs during `zarf package deploy` - `onRemove` - Runs during `zarf package remove` -In addition to adding more lifecycle events, the `actions` section will also allow for more complex actions to be defined. New configurations include, setting the cmd directory, defining custom env variables, setting the number of retries, setting the max total seconds, muting the output, and [setting a variable](../docs/4-user-guide/5-component-actions.md#creating-dynamic-variables-from-actions) to be used in other actions or components. +In addition to adding more lifecycle events, the `actions` section will also allow for more complex actions to be defined. New configurations include, setting the cmd directory, defining custom env variables, setting the number of retries, setting the max total seconds, muting the output, and [setting a variable](../docs/3-create-a-zarf-package/7-component-actions.md#creating-dynamic-variables-from-actions) to be used in other actions or components. -Further details can be found in the `component-actions` [component actions documentation](../docs/4-user-guide/7-github-action.md), [component lifecycle documentation](../docs/4-user-guide/4-package-command-lifecycle.md), and the [example package](../examples/component-actions/README.md). +Further details can be found in the `component-actions` [component actions documentation](../docs/3-create-a-zarf-package/7-component-actions.md), [package create lifecycle documentation](../docs/3-create-a-zarf-package/6-package-create-lifecycle.md), [package deploy lifecycle documentation](../docs/4-deploy-a-zarf-package/2-package-deploy-lifecycle.md), and the [example package](../examples/component-actions/README.md). ## Consequences diff --git a/adr/0014-oci-publish.md b/adr/0014-oci-publish.md index 39d41e7816..aa5dcf8fa9 100644 --- a/adr/0014-oci-publish.md +++ b/adr/0014-oci-publish.md @@ -47,7 +47,7 @@ zarf-package-adr-arm64.tar.zst With this new structure in place, we can now publish Zarf packages as OCI artifacts. Under the hood this implements the `oras` Go library using Docker's authentication system. For interacting with these packages, the `oci://` package path prefix has been added (ex. `zarf package publish oci://...`). -For an example of this in action, please see the [walkthrough](./docs/../../docs/13-walkthroughs/7-publish-and-deploy.md). +For an example of this in action, please see the corresponding [tutorial](../docs/6-zarf-tutorials/7-publish-and-deploy.md). ## Consequences diff --git a/docs-website/docusaurus.config.js b/docs-website/docusaurus.config.js index caa4ef08e9..fb25c9893f 100644 --- a/docs-website/docusaurus.config.js +++ b/docs-website/docusaurus.config.js @@ -45,6 +45,23 @@ const config = { ...args }) { const sidebarItems = await defaultSidebarItemsGenerator(args) + if (args.item.dirName === 'docs') { + // This hack places the examples tree at the 7th position in the sidebar + sidebarItems.splice(7, 0, { + type: 'category', + label: 'Package Examples', + link: { + type: 'doc', + id: 'examples/README', + }, + items: [ + { + type: 'autogenerated', + dirName: 'examples', + }, + ], + }) + } if (args.item.dirName === 'examples') { // This hack removes the "Overview" page from the sidebar on the examples page return sidebarItems.slice(1) diff --git a/docs-website/src/sidebars.js b/docs-website/src/sidebars.js index 03711636e0..9bec92004e 100644 --- a/docs-website/src/sidebars.js +++ b/docs-website/src/sidebars.js @@ -4,20 +4,6 @@ const sidebars = { docsSidebar: [ { type: 'autogenerated', dirName: 'docs' }, - { - type: 'category', - label: 'Package Examples', - link: { - type: 'doc', - id: 'examples/README', - }, - items: [ - { - type: 'autogenerated', - dirName: 'examples', - }, - ], - }, ], } diff --git a/docs-website/static/docs/walkthroughs/k3s_init.html b/docs-website/static/docs/tutorials/k3s_init.html similarity index 100% rename from docs-website/static/docs/walkthroughs/k3s_init.html rename to docs-website/static/docs/tutorials/k3s_init.html diff --git a/docs-website/static/docs/walkthroughs/logging_credentials.html b/docs-website/static/docs/tutorials/logging_credentials.html similarity index 99% rename from docs-website/static/docs/walkthroughs/logging_credentials.html rename to docs-website/static/docs/tutorials/logging_credentials.html index 5eb8970ad2..c412ee8442 100644 --- a/docs-website/static/docs/walkthroughs/logging_credentials.html +++ b/docs-website/static/docs/tutorials/logging_credentials.html @@ -52,7 +52,7 @@ Application | Username | Password | Connect Registry | zarf-push | Tka7dWq4GEit5G3GDX2dQwdh | zarf connect registry - Logging | zarf-admin | ysC9TEWsSm37pBmA3hvqrLN3 | zarf connect logging + Logging | zarf-admin | ysC9TEWsSm37pBmA3hvqrLN3 | zarf connect logging diff --git a/docs-website/static/docs/walkthroughs/logging_init.html b/docs-website/static/docs/tutorials/logging_init.html similarity index 99% rename from docs-website/static/docs/walkthroughs/logging_init.html rename to docs-website/static/docs/tutorials/logging_init.html index 2e57e07450..0786a5c310 100644 --- a/docs-website/static/docs/walkthroughs/logging_init.html +++ b/docs-website/static/docs/tutorials/logging_init.html @@ -243,7 +243,7 @@ value: 2.8.1 This package has 9 artifacts with software bill-of-materials (SBOM) included. You can view them now in the zarf-sbom folder in this directory or to go directly to one, open this in your browser: -/Users/jason/src/github.com/jasonvanbrackel/zarf/docs/.examples/walkthroughs/zarf-sbom/sbom-viewer-docker.io_grafana_promtail_2.7.0.html +/Users/jason/src/github.com/jasonvanbrackel/zarf/docs/.examples/tutorials/zarf-sbom/sbom-viewer-docker.io_grafana_promtail_2.7.0.html * This directory will be removed after package deployment. diff --git a/docs-website/static/docs/walkthroughs/logging_init_manual.html b/docs-website/static/docs/tutorials/logging_init_manual.html similarity index 100% rename from docs-website/static/docs/walkthroughs/logging_init_manual.html rename to docs-website/static/docs/tutorials/logging_init_manual.html diff --git a/docs-website/static/docs/walkthroughs/logging_list.html b/docs-website/static/docs/tutorials/logging_list.html similarity index 95% rename from docs-website/static/docs/walkthroughs/logging_list.html rename to docs-website/static/docs/tutorials/logging_list.html index b0769d1499..2319fc86c0 100644 --- a/docs-website/static/docs/walkthroughs/logging_list.html +++ b/docs-website/static/docs/tutorials/logging_list.html @@ -51,7 +51,7 @@ Saving log file to /var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-22-13-13-47-3918845089.log Package | Components - dos-games | [baseline] + dos-games | [baseline] init | [zarf-injector zarf-seed-registry zarf-registry zarf-agent logging] diff --git a/docs-website/static/docs/walkthroughs/logging_remove.html b/docs-website/static/docs/tutorials/logging_remove.html similarity index 100% rename from docs-website/static/docs/walkthroughs/logging_remove.html rename to docs-website/static/docs/tutorials/logging_remove.html diff --git a/docs-website/static/docs/walkthroughs/package_create.html b/docs-website/static/docs/tutorials/package_create.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_create.html rename to docs-website/static/docs/tutorials/package_create.html diff --git a/docs-website/static/docs/walkthroughs/package_create_components.html b/docs-website/static/docs/tutorials/package_create_components.html similarity index 99% rename from docs-website/static/docs/walkthroughs/package_create_components.html rename to docs-website/static/docs/tutorials/package_create_components.html index bce51069be..21763d1a03 100644 --- a/docs-website/static/docs/walkthroughs/package_create_components.html +++ b/docs-website/static/docs/tutorials/package_create_components.html @@ -61,7 +61,7 @@ Downloading k3s-airgap-images-arm64.tar.zst Downloading https://github.com/k3s-io/k3s/releases/download/v1.24.1+k3s1/k3s-airgap-images-arm64.tar.zst -
+
📦 ZARF-INJECTOR COMPONENT @@ -96,7 +96,7 @@ 📦 ZARF-AGENT COMPONENT -
+
Running "make init-package-local-agent AGENT_IMAGE="agent:local"" docker buildx build --platform linux/amd64 --tag ghcr.io/defenseunicorns/zarf/agent:local . @@ -138,7 +138,7 @@ 📦 LOGGING COMPONENT - + Processing helm chart loki-stack:2.9.9 from repo https://grafana.github.io/helm-charts Loading 1 K8s manifests diff --git a/docs-website/static/docs/walkthroughs/package_create_error.html b/docs-website/static/docs/tutorials/package_create_error.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_create_error.html rename to docs-website/static/docs/tutorials/package_create_error.html diff --git a/docs-website/static/docs/walkthroughs/package_create_size.html b/docs-website/static/docs/tutorials/package_create_size.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_create_size.html rename to docs-website/static/docs/tutorials/package_create_size.html diff --git a/docs-website/static/docs/walkthroughs/package_deploy_connect.html b/docs-website/static/docs/tutorials/package_deploy_connect.html similarity index 89% rename from docs-website/static/docs/walkthroughs/package_deploy_connect.html rename to docs-website/static/docs/tutorials/package_deploy_connect.html index 95e2894dd5..e46c596719 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_connect.html +++ b/docs-website/static/docs/tutorials/package_deploy_connect.html @@ -51,10 +51,10 @@ /var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-23-10-41-26-1175297225.log Connect Command | Description zarf connect registry | Internal Zarf Registry (run zarf tools registry login to authenticate) - zarf connect doom | Play doom!!! - zarf connect games | Play some old dos games 🦄 + zarf connect doom | Play doom!!! + zarf connect games | Play some old dos games 🦄 -$ zarf connect games +$ zarf connect games diff --git a/docs-website/static/docs/walkthroughs/package_deploy_deploy.html b/docs-website/static/docs/tutorials/package_deploy_deploy.html similarity index 94% rename from docs-website/static/docs/walkthroughs/package_deploy_deploy.html rename to docs-website/static/docs/tutorials/package_deploy_deploy.html index fafc55a8f0..78ccd73a88 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_deploy.html +++ b/docs-website/static/docs/tutorials/package_deploy_deploy.html @@ -47,11 +47,11 @@
-$ zarf package deploy ./zarf-package-dos-games-arm64.tar.zst
+$ zarf package deploy sget://defenseunicorns/zarf-hello-world:$(uname -m)
 Saving log file to
 /var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-23-10-20-59-1265818177.log
-Loading Zarf Package ../examples/dos-games/zarf-package-dos-games-arm64.tar.zst
-Loading Zarf Package ../examples/dos-games/zarf-package-dos-games-arm64.tar.zst
+Loading Zarf Package sget://defenseunicorns/zarf-hello-world:$(uname -m)
+Loading Zarf Package sget://defenseunicorns/zarf-hello-world:$(uname -m)
 
 kind: ZarfPackageConfig
 metadata:
diff --git a/docs-website/static/docs/walkthroughs/package_deploy_deploy_bottom.html b/docs-website/static/docs/tutorials/package_deploy_deploy_bottom.html
similarity index 98%
rename from docs-website/static/docs/walkthroughs/package_deploy_deploy_bottom.html
rename to docs-website/static/docs/tutorials/package_deploy_deploy_bottom.html
index af0a35b903..277aa5fef7 100644
--- a/docs-website/static/docs/walkthroughs/package_deploy_deploy_bottom.html
+++ b/docs-website/static/docs/tutorials/package_deploy_deploy_bottom.html
@@ -70,7 +70,7 @@
  Zarf deployment complete
 
      Connect Command    | Description               
-     zarf connect doom  | Play doom!!!              
+     zarf connect doom  | Play doom!!!
      zarf connect games | Play some old dos games 🦄
 
diff --git a/docs-website/static/docs/walkthroughs/package_deploy_deploy_full.html b/docs-website/static/docs/tutorials/package_deploy_deploy_full.html similarity index 99% rename from docs-website/static/docs/walkthroughs/package_deploy_deploy_full.html rename to docs-website/static/docs/tutorials/package_deploy_deploy_full.html index c2d15c54d5..23a3bb7dc7 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_deploy_full.html +++ b/docs-website/static/docs/tutorials/package_deploy_deploy_full.html @@ -104,7 +104,7 @@ Zarf deployment complete Connect Command | Description - zarf connect doom | Play doom!!! + zarf connect doom | Play doom!!! zarf connect games | Play some old dos games 🦄 diff --git a/docs-website/static/docs/walkthroughs/package_deploy_helm.html b/docs-website/static/docs/tutorials/package_deploy_helm.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_deploy_helm.html rename to docs-website/static/docs/tutorials/package_deploy_helm.html diff --git a/docs-website/static/docs/walkthroughs/package_deploy_helm_bottom.html b/docs-website/static/docs/tutorials/package_deploy_helm_bottom.html similarity index 99% rename from docs-website/static/docs/walkthroughs/package_deploy_helm_bottom.html rename to docs-website/static/docs/tutorials/package_deploy_helm_bottom.html index 9301e246e0..b6a8a7c9ac 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_helm_bottom.html +++ b/docs-website/static/docs/tutorials/package_deploy_helm_bottom.html @@ -53,7 +53,7 @@ - + Loading the Zarf State from the Kubernetes cluster Loading the Zarf State from the Kubernetes cluster Opening tunnel 61264 -> 5000 for svc/zarf-docker-registry in namespace zarf diff --git a/docs-website/static/docs/walkthroughs/package_deploy_helm_list.html b/docs-website/static/docs/tutorials/package_deploy_helm_list.html similarity index 95% rename from docs-website/static/docs/walkthroughs/package_deploy_helm_list.html rename to docs-website/static/docs/tutorials/package_deploy_helm_list.html index d3b7d0f2a3..093e63c32b 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_helm_list.html +++ b/docs-website/static/docs/tutorials/package_deploy_helm_list.html @@ -52,7 +52,7 @@ /var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-23-10-05-29-1632940529.log Package | Components init | [zarf-injector zarf-seed-registry zarf-registry zarf-agent] - helm-oci-chart | [helm-oci-chart] + helm-oci-chart | [helm-oci-chart] diff --git a/docs-website/static/docs/walkthroughs/package_deploy_helm_no_confirm.html b/docs-website/static/docs/tutorials/package_deploy_helm_no_confirm.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_deploy_helm_no_confirm.html rename to docs-website/static/docs/tutorials/package_deploy_helm_no_confirm.html diff --git a/docs-website/static/docs/walkthroughs/package_deploy_helm_remove_by_file.html b/docs-website/static/docs/tutorials/package_deploy_helm_remove_by_file.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_deploy_helm_remove_by_file.html rename to docs-website/static/docs/tutorials/package_deploy_helm_remove_by_file.html diff --git a/docs-website/static/docs/walkthroughs/package_deploy_helm_suggestions.html b/docs-website/static/docs/tutorials/package_deploy_helm_suggestions.html similarity index 99% rename from docs-website/static/docs/walkthroughs/package_deploy_helm_suggestions.html rename to docs-website/static/docs/tutorials/package_deploy_helm_suggestions.html index b056182565..2d0db83097 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_helm_suggestions.html +++ b/docs-website/static/docs/tutorials/package_deploy_helm_suggestions.html @@ -54,4 +54,4 @@ > zarf-package-helm-oci-chart-arm64-0.0.1.tar.zst - \ No newline at end of file + diff --git a/docs-website/static/docs/walkthroughs/package_deploy_list.html b/docs-website/static/docs/tutorials/package_deploy_list.html similarity index 96% rename from docs-website/static/docs/walkthroughs/package_deploy_list.html rename to docs-website/static/docs/tutorials/package_deploy_list.html index f9984b97e1..5e0d681b9e 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_list.html +++ b/docs-website/static/docs/tutorials/package_deploy_list.html @@ -52,7 +52,7 @@ /var/folders/bk/rz1xx2sd5zn134c0_j1s2n5r0000gp/T/zarf-2023-03-23-10-05-29-1632940529.log Package | Components init | [zarf-injector zarf-seed-registry zarf-registry zarf-agent] - dos-games | [baseline] + dos-games | [baseline] diff --git a/docs-website/static/docs/walkthroughs/package_deploy_no_file.html b/docs-website/static/docs/tutorials/package_deploy_no_file.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_deploy_no_file.html rename to docs-website/static/docs/tutorials/package_deploy_no_file.html diff --git a/docs-website/static/docs/walkthroughs/package_deploy_remove_by_file.html b/docs-website/static/docs/tutorials/package_deploy_remove_by_file.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_deploy_remove_by_file.html rename to docs-website/static/docs/tutorials/package_deploy_remove_by_file.html diff --git a/docs-website/static/docs/walkthroughs/package_deploy_remove_no_confirm.html b/docs-website/static/docs/tutorials/package_deploy_remove_no_confirm.html similarity index 100% rename from docs-website/static/docs/walkthroughs/package_deploy_remove_no_confirm.html rename to docs-website/static/docs/tutorials/package_deploy_remove_no_confirm.html diff --git a/docs-website/static/docs/walkthroughs/package_deploy_suggest.html b/docs-website/static/docs/tutorials/package_deploy_suggest.html similarity index 99% rename from docs-website/static/docs/walkthroughs/package_deploy_suggest.html rename to docs-website/static/docs/tutorials/package_deploy_suggest.html index 6154aa7da9..8c4bd97430 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_suggest.html +++ b/docs-website/static/docs/tutorials/package_deploy_suggest.html @@ -53,4 +53,4 @@ ? Choose or type the package file [tab for suggestions] - \ No newline at end of file + diff --git a/docs-website/static/docs/walkthroughs/package_deploy_suggestions.html b/docs-website/static/docs/tutorials/package_deploy_suggestions.html similarity index 99% rename from docs-website/static/docs/walkthroughs/package_deploy_suggestions.html rename to docs-website/static/docs/tutorials/package_deploy_suggestions.html index 753f3e2acb..3d5f2fae1c 100644 --- a/docs-website/static/docs/walkthroughs/package_deploy_suggestions.html +++ b/docs-website/static/docs/tutorials/package_deploy_suggestions.html @@ -55,4 +55,4 @@ > zarf-package-dos-games-amd64.tar.zst - \ No newline at end of file + diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_create.html b/docs-website/static/docs/tutorials/publish_and_deploy_create.html similarity index 99% rename from docs-website/static/docs/walkthroughs/publish_and_deploy_create.html rename to docs-website/static/docs/tutorials/publish_and_deploy_create.html index 9b1f035c16..07afef7567 100644 --- a/docs-website/static/docs/walkthroughs/publish_and_deploy_create.html +++ b/docs-website/static/docs/tutorials/publish_and_deploy_create.html @@ -83,7 +83,7 @@ • Processing helm chart podinfo:6.3.3 from repo oci://ghcr.io/stefanprodan/charts/podinfoProcessing helm chart podinfo:6.3.3 from repo oci://ghcr.io/stefanprodan/charts/podinfo - +
📦 COMPONENT IMAGES diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_deploy.html b/docs-website/static/docs/tutorials/publish_and_deploy_deploy.html similarity index 99% rename from docs-website/static/docs/walkthroughs/publish_and_deploy_deploy.html rename to docs-website/static/docs/tutorials/publish_and_deploy_deploy.html index 153246c422..011823eacd 100644 --- a/docs-website/static/docs/walkthroughs/publish_and_deploy_deploy.html +++ b/docs-website/static/docs/tutorials/publish_and_deploy_deploy.html @@ -100,7 +100,7 @@ - ghcr.io/stefanprodan/podinfo:6.3.3 This package has 1 artifacts with software bill-of-materials (SBOM) included. You can view them now in the zarf-sbom folder in this directory or to go directly to one, open this in your browser: -/Users/jason/src/github.com/jasonvanbrackel/zarf/docs-website/static/docs/walkthroughs/zarf-sbom/sbom-viewer-ghcr.io_stefanprodan_podinfo_6.3.3.html +/Users/jason/src/github.com/jasonvanbrackel/zarf/docs-website/static/docs/tutorials/zarf-sbom/sbom-viewer-ghcr.io_stefanprodan_podinfo_6.3.3.html * This directory will be removed after package deployment. diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_docker_config.html b/docs-website/static/docs/tutorials/publish_and_deploy_docker_config.html similarity index 100% rename from docs-website/static/docs/walkthroughs/publish_and_deploy_docker_config.html rename to docs-website/static/docs/tutorials/publish_and_deploy_docker_config.html diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_inspect.html b/docs-website/static/docs/tutorials/publish_and_deploy_inspect.html similarity index 100% rename from docs-website/static/docs/walkthroughs/publish_and_deploy_inspect.html rename to docs-website/static/docs/tutorials/publish_and_deploy_inspect.html diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_list.html b/docs-website/static/docs/tutorials/publish_and_deploy_list.html similarity index 100% rename from docs-website/static/docs/walkthroughs/publish_and_deploy_list.html rename to docs-website/static/docs/tutorials/publish_and_deploy_list.html diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_login.html b/docs-website/static/docs/tutorials/publish_and_deploy_login.html similarity index 100% rename from docs-website/static/docs/walkthroughs/publish_and_deploy_login.html rename to docs-website/static/docs/tutorials/publish_and_deploy_login.html diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_manifest.html b/docs-website/static/docs/tutorials/publish_and_deploy_manifest.html similarity index 92% rename from docs-website/static/docs/walkthroughs/publish_and_deploy_manifest.html rename to docs-website/static/docs/tutorials/publish_and_deploy_manifest.html index aad375aa7a..74e8928a4a 100644 --- a/docs-website/static/docs/walkthroughs/publish_and_deploy_manifest.html +++ b/docs-website/static/docs/tutorials/publish_and_deploy_manifest.html @@ -48,9 +48,9 @@
 # Make a new directory to work in
-$ mkdir -p zarf-publish-walkthrough && cd zarf-publish-walkthrough
+$ mkdir -p zarf-publish-tutorial && cd zarf-publish-tutorial
 
-# For this walkthrough we will use the  example package
+# For this tutorial we will use the  example package
 # located here: https://github.com/defenseunicorns/zarf/blob/main/examples/helm-oci-chart/zarf.yaml
 $ cat <<EOF > zarf.yaml
 kind: ZarfPackageConfig
diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_publish.html b/docs-website/static/docs/tutorials/publish_and_deploy_publish.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/publish_and_deploy_publish.html
rename to docs-website/static/docs/tutorials/publish_and_deploy_publish.html
diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_pull.html b/docs-website/static/docs/tutorials/publish_and_deploy_pull.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/publish_and_deploy_pull.html
rename to docs-website/static/docs/tutorials/publish_and_deploy_pull.html
diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_remove.html b/docs-website/static/docs/tutorials/publish_and_deploy_remove.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/publish_and_deploy_remove.html
rename to docs-website/static/docs/tutorials/publish_and_deploy_remove.html
diff --git a/docs-website/static/docs/walkthroughs/publish_and_deploy_setup.html b/docs-website/static/docs/tutorials/publish_and_deploy_setup.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/publish_and_deploy_setup.html
rename to docs-website/static/docs/tutorials/publish_and_deploy_setup.html
diff --git a/docs-website/static/docs/walkthroughs/troubleshoot_insecure_registry.html b/docs-website/static/docs/tutorials/troubleshoot_insecure_registry.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/troubleshoot_insecure_registry.html
rename to docs-website/static/docs/tutorials/troubleshoot_insecure_registry.html
diff --git a/docs-website/static/docs/walkthroughs/troubleshoot_uninitialized.html b/docs-website/static/docs/tutorials/troubleshoot_uninitialized.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/troubleshoot_uninitialized.html
rename to docs-website/static/docs/tutorials/troubleshoot_uninitialized.html
diff --git a/docs-website/static/docs/walkthroughs/troubleshoot_uninitialized_helmOCI.html b/docs-website/static/docs/tutorials/troubleshoot_uninitialized_helmOCI.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/troubleshoot_uninitialized_helmOCI.html
rename to docs-website/static/docs/tutorials/troubleshoot_uninitialized_helmOCI.html
diff --git a/docs-website/static/docs/walkthroughs/troubleshoot_unreachable.html b/docs-website/static/docs/tutorials/troubleshoot_unreachable.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/troubleshoot_unreachable.html
rename to docs-website/static/docs/tutorials/troubleshoot_unreachable.html
diff --git a/docs-website/static/docs/walkthroughs/troubleshoot_version_required_no_version.html b/docs-website/static/docs/tutorials/troubleshoot_version_required_no_version.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/troubleshoot_version_required_no_version.html
rename to docs-website/static/docs/tutorials/troubleshoot_version_required_no_version.html
diff --git a/docs-website/static/docs/walkthroughs/troubleshoot_version_required_publish.html b/docs-website/static/docs/tutorials/troubleshoot_version_required_publish.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/troubleshoot_version_required_publish.html
rename to docs-website/static/docs/tutorials/troubleshoot_version_required_publish.html
diff --git a/docs-website/static/docs/walkthroughs/zarf_init.html b/docs-website/static/docs/tutorials/zarf_init.html
similarity index 100%
rename from docs-website/static/docs/walkthroughs/zarf_init.html
rename to docs-website/static/docs/tutorials/zarf_init.html
diff --git a/docs-website/static/docs/walkthroughs/dos_games_components.html b/docs-website/static/docs/walkthroughs/dos_games_components.html
deleted file mode 100644
index 0e9c3efa89..0000000000
--- a/docs-website/static/docs/walkthroughs/dos_games_components.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
- - 📦 BASELINE COMPONENT - - -
- - Loading 2 K8s manifests - -
- - 📦 COMPONENT IMAGES - - -
- Loading metadata for 1 images. - Pulling 1 images (24.89 MBs) - Creating SBOMs for 1 images and 0 components with files. -
- - diff --git a/docs-website/static/docs/walkthroughs/dos_games_create.html b/docs-website/static/docs/walkthroughs/dos_games_create.html deleted file mode 100644 index 5143918a5a..0000000000 --- a/docs-website/static/docs/walkthroughs/dos_games_create.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - -
-kind: ZarfPackageConfig
-metadata:
-  name: dos-games
-  description: Simple example to load classic DOS games into K8s in the airgap
-components:
-- name: baseline
-  required: true
-  manifests:
-  - name: multi-games
-    namespace: zarf
-    files:
-    - manifests/deployment.yaml
-    - manifests/service.yaml
-  images:
-  - defenseunicorns/zarf-game:multi-tile-dark
- ? Create this Zarf package? (y/N) Yes
-
- - diff --git a/docs-website/static/docs/walkthroughs/dos_games_size.html b/docs-website/static/docs/walkthroughs/dos_games_size.html deleted file mode 100644 index 2066169f27..0000000000 --- a/docs-website/static/docs/walkthroughs/dos_games_size.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -
-
-Specify a maximum file size for this package in Megabytes. Above this size, the package will be split into multiple files. 0 will disable this feature.
- ? Please provide a value for "Maximum Package Size"(0) 0
-
-
- - diff --git a/docs/.images/walkthroughs/games_connected.png b/docs/.images/tutorials/games_connected.png similarity index 100% rename from docs/.images/walkthroughs/games_connected.png rename to docs/.images/tutorials/games_connected.png diff --git a/docs/.images/walkthroughs/logging_login.png b/docs/.images/tutorials/logging_login.png similarity index 100% rename from docs/.images/walkthroughs/logging_login.png rename to docs/.images/tutorials/logging_login.png diff --git a/docs/.images/walkthroughs/logging_logs.png b/docs/.images/tutorials/logging_logs.png similarity index 100% rename from docs/.images/walkthroughs/logging_logs.png rename to docs/.images/tutorials/logging_logs.png diff --git a/docs/.images/walkthroughs/logging_query.png b/docs/.images/tutorials/logging_query.png similarity index 100% rename from docs/.images/walkthroughs/logging_query.png rename to docs/.images/tutorials/logging_query.png diff --git a/docs/.images/walkthroughs/logging_thumbnail.png b/docs/.images/tutorials/logging_thumbnail.png similarity index 100% rename from docs/.images/walkthroughs/logging_thumbnail.png rename to docs/.images/tutorials/logging_thumbnail.png diff --git a/docs/.images/walkthroughs/optional_init_comonents.png b/docs/.images/tutorials/optional_init_comonents.png similarity index 100% rename from docs/.images/walkthroughs/optional_init_comonents.png rename to docs/.images/tutorials/optional_init_comonents.png diff --git a/docs/.images/walkthroughs/package_deploy_confirm.png b/docs/.images/tutorials/package_deploy_confirm.png similarity index 100% rename from docs/.images/walkthroughs/package_deploy_confirm.png rename to docs/.images/tutorials/package_deploy_confirm.png diff --git a/docs/.images/walkthroughs/package_deploy_tab.png b/docs/.images/tutorials/package_deploy_tab.png similarity index 100% rename from docs/.images/walkthroughs/package_deploy_tab.png rename to docs/.images/tutorials/package_deploy_tab.png diff --git a/docs/.images/walkthroughs/package_deploy_thumbnail.jpg b/docs/.images/tutorials/package_deploy_thumbnail.jpg similarity index 100% rename from docs/.images/walkthroughs/package_deploy_thumbnail.jpg rename to docs/.images/tutorials/package_deploy_thumbnail.jpg diff --git a/docs/.images/walkthroughs/publish_and_deploy_thumbnail.png b/docs/.images/tutorials/publish_and_deploy_thumbnail.png similarity index 100% rename from docs/.images/walkthroughs/publish_and_deploy_thumbnail.png rename to docs/.images/tutorials/publish_and_deploy_thumbnail.png diff --git a/docs/.images/walkthroughs/zarf_tools_monitor.png b/docs/.images/tutorials/zarf_tools_monitor.png similarity index 100% rename from docs/.images/walkthroughs/zarf_tools_monitor.png rename to docs/.images/tutorials/zarf_tools_monitor.png diff --git a/docs/.templates/jsonschemaforhumans/section_examples.md b/docs/.templates/jsonschemaforhumans/section_examples.md index 9cbfa66d86..ba0fbd6072 100644 --- a/docs/.templates/jsonschemaforhumans/section_examples.md +++ b/docs/.templates/jsonschemaforhumans/section_examples.md @@ -1,4 +1,4 @@ -**Example{% if examples|length > 1 %}s{% endif %}:**{{ " " }} +**Example{% if examples|length > 1 %}s{% endif %}:** {% for example in examples %} diff --git a/docs/0-zarf-overview.md b/docs/0-zarf-overview.md index cebbf29e50..b32813d982 100644 --- a/docs/0-zarf-overview.md +++ b/docs/0-zarf-overview.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 0 +--- + import TabItem from "@theme/TabItem"; import Tabs from "@theme/Tabs"; import Admonition from "@theme/Admonition"; @@ -18,7 +22,7 @@ It also simplifies the installation, updating, and maintenance of DevSecOps capa :::note -Check out our [glossary](3-getting-started/1-understand-the-basics.md) for an explanation of common terms used in the project. +Check out our [glossary](1-getting-started/0-understand-the-basics.md) for an explanation of common terms used in the project. ::: @@ -43,7 +47,7 @@ A typical Zarf deployment is made up of three parts: :::note -For more technical information on how Zarf works and to view the Zarf architecture, visit our [Nerd Notes page](./6-contribute-to-zarf/3-nerd-notes.md). +For more technical information on how Zarf works and to view the Zarf architecture, visit our [Nerd Notes page](./12-contribute-to-zarf/3-nerd-notes.md). ::: @@ -61,7 +65,7 @@ Given Zarf's being a "K8s cluster to serve _other_ K8s clusters", the following - Container images: to serve images for the Zarf and downstream clusters to run containers from. - Repositories: to serve as the git-based "source of truth" for downstream "GitOps"ed K8s clusters to watch. - Pre-compiled binaries: to provide the software necessary to start and support the Zarf cluster. -- [Component actions](4-user-guide/7-github-action.md): to support scripts and commands that run at various stages of the Zarf [component lifecycle](4-user-guide/4-package-command-lifecycle.md). +- [Component actions](3-create-a-zarf-package/7-component-actions.md): to support scripts and commands that run at various stages of the Zarf [package create lifecycle](./3-create-a-zarf-package/6-package-create-lifecycle.md), and [package deploy lifecycle](./4-deploy-a-zarf-package/2-package-deploy-lifecycle.md). - Helm charts, kustomizations, and other K8s manifests: to apply in a Kubernetes cluster. - [Data injections](../examples/data-injection/README.md): to declaratively inject data into running containers in a Kubernetes cluster. @@ -81,7 +85,7 @@ Zarf can pull from various places like Docker Hub, Iron Bank, GitHub, and local This part of the process requires access to the internet. The `zarf` binary is presented with a `zarf.yaml`, it then begins downloading, packing, and compressing the software that you requested. It then outputs a single, ready-to-move distributable called "a package". -For additional information, see the [Building a package](./13-walkthroughs/0-using-zarf-package-create.md) section. +For additional information, see the [Building a package](./6-zarf-tutorials/0-using-zarf-package-create.md) section. ### (2) Ship the Package to the System Location @@ -130,23 +134,23 @@ In the more complex use case, your package consists of updates for many apps/sys - Automate Kubernetes deployments in disconnected environments - Automate [Software Bill of Materials (SBOM)](https://www.linuxfoundation.org/tools/the-state-of-software-bill-of-materials-sbom-and-cybersecurity-readiness/) generation -- Provide a [web dashboard](./7-dashboard-ui/1-sbom-dashboard.md) for viewing SBOM output +- Provide a [web dashboard](./5-dashboard-ui/1-sbom-dashboard.md) for viewing SBOM output - Create and verify package signatures with [cosign](https://github.com/sigstore/cosign) -- [Publish](./4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_publish.md), [pull](./4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_pull.md), and [deploy](./4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_deploy.md) packages from an [OCI registry](https://opencontainers.org/) -- Powerful component lifecycle [actions](./4-user-guide/5-component-actions.md) +- [Publish](./2-the-zarf-cli/100-cli-commands/zarf_package_publish.md), [pull](./2-the-zarf-cli/100-cli-commands/zarf_package_pull.md), and [deploy](./2-the-zarf-cli/100-cli-commands/zarf_package_deploy.md) packages from an [OCI registry](https://opencontainers.org/) +- Powerful component lifecycle [actions](./3-create-a-zarf-package/7-component-actions.md) - Deploy a new cluster while fully disconnected with [K3s](https://k3s.io/) or into any existing cluster using a [kube config](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) - Builtin logging stack with [Loki](https://grafana.com/oss/loki/) - Builtin Git server with [Gitea](https://gitea.com/) - Builtin Docker registry - Builtin [K9s Dashboard](https://k9scli.io/) for managing a cluster from the terminal - [Mutating Webhook](adr/0005-mutating-webhook.md) to automatically update Kubernetes pod's image path and pull secrets as well as [Flux Git Repository](https://fluxcd.io/docs/components/source/gitrepositories/) URLs and secret references -- Builtin [command to find images](./4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_find-images.md) and resources from a Helm chart -- Tunneling capability to [connect to Kuberenetes resources](./4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_connect.md) without network routing, DNS, TLS or Ingress configuration required +- Builtin [command to find images](./2-the-zarf-cli/100-cli-commands/zarf_prepare_find-images.md) and resources from a Helm chart +- Tunneling capability to [connect to Kuberenetes resources](./2-the-zarf-cli/100-cli-commands/zarf_connect.md) without network routing, DNS, TLS or Ingress configuration required ### 🛠️ Configurable Features - Customizable [variables and package templates](examples/variables/README.md) with defaults and user prompting -- [Composable packages](./4-user-guide/2-zarf-packages/2-zarf-components.md#composing-package-components) to include multiple sub-packages/components +- [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 @@ -165,7 +169,7 @@ 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](./3-getting-started/index.md). +For more install options please visit our [Getting Started page](./1-getting-started/index.md). @@ -203,7 +207,7 @@ 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](./3-getting-started/index.md). +For more install options please visit our [Getting Started page](./1-getting-started/index.md). diff --git a/docs/3-getting-started/1-understand-the-basics.md b/docs/1-getting-started/0-understand-the-basics.md similarity index 99% rename from docs/3-getting-started/1-understand-the-basics.md rename to docs/1-getting-started/0-understand-the-basics.md index 614ff64d67..e0a3b3352b 100644 --- a/docs/3-getting-started/1-understand-the-basics.md +++ b/docs/1-getting-started/0-understand-the-basics.md @@ -12,7 +12,7 @@ Before you can effectively use Zarf, it is useful to have an understanding of th - [Learn Kubernetes Basics](https://kubernetes.io/docs/tutorials/kubernetes-basics/) - [Free Introduction to Kubernetes Course](https://www.edx.org/course/introduction-to-kubernetes) - [Super charge your Kubernetes deployments](https://www.youtube.com/watch?v=N6UCKF7JD7k) - + ### AirGap Basics - [What is AirGap](https://ibm.github.io/kubernetes-networking/vpc/airgap/) diff --git a/docs/1-getting-started/1-core-concepts.md b/docs/1-getting-started/1-core-concepts.md new file mode 100644 index 0000000000..f965a35204 --- /dev/null +++ b/docs/1-getting-started/1-core-concepts.md @@ -0,0 +1,9 @@ +# 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. + +## Zarf Concepts + +- [**Zarf Package**](../3-create-a-zarf-package/1-zarf-packages.md) - A binary file that contains the instructions and dependencies necessary to install an application on a system. +- [**Zarf Component**](../3-create-a-zarf-package/2-zarf-components.md) - A set of defined functionality and resources that build up a package. +- [**Zarf Init Package**](../3-create-a-zarf-package/3-the-zarf-init-package.md) - The initial package that lays the groundwork for other packages. diff --git a/docs/3-getting-started/0-set-up-and-install.md b/docs/1-getting-started/2-set-up-and-install.md similarity index 66% rename from docs/3-getting-started/0-set-up-and-install.md rename to docs/1-getting-started/2-set-up-and-install.md index 76a8e8cf9d..1748a18577 100644 --- a/docs/3-getting-started/0-set-up-and-install.md +++ b/docs/1-getting-started/2-set-up-and-install.md @@ -5,7 +5,7 @@ ## Installing Zarf - + In order to install the Zarf CLI, which is not yet available in common Linux package managers, you may follow the steps below: @@ -27,7 +27,7 @@ For macOS or Linux, you may also install the Zarf CLI by using [brew](https://za Once the Zarf CLI is installed, you can create a cluster using the built-in K3s cluster available in the init package (if another cluster isn't already available). You can find the relevant [init package release](https://github.com/defenseunicorns/zarf/releases) from the GitHub releases page. -Once downloaded, you can install the init package by navigating to the directory containing the init package and running the command [zarf init](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_init.md). Zarf will prompt you, asking if you want to deploy the k3s component, you can type `y` and hit enter to have Zarf startup a local single node k3s cluster on your current machine. Other useful information about initializing a cluster with Zarf is available in the [Initializing a Cluster](#initializing-a-cluster) section later on in this page. +Once downloaded, you can install the init package by navigating to the directory containing the init package and running the command [zarf init](../2-the-zarf-cli/100-cli-commands/zarf_init.md). Zarf will prompt you, asking if you want to deploy the k3s component, you can type `y` and hit enter to have Zarf startup a local single node k3s cluster on your current machine. Other useful information about initializing a cluster with Zarf is available in the [Initializing a Cluster](#initializing-a-cluster) section later on in this page. :::note Depending on the permissions of your user, if you are installing K3s through the `zarf init` command you may need to run the command as a privileged user. To accomplish this, you can: @@ -40,7 +40,7 @@ Depending on the permissions of your user, if you are installing K3s through the -Zarf offers the flexibility of deploying to a wide range of clusters beyond the K3s cluster included in the [init package](../4-user-guide/2-zarf-packages/3-the-zarf-init-package.md). This means that you can utilize various options, including local dockerized K8s clusters such as [k3d](https://k3d.io/v5.4.1/) or [Kind](https://kind.sigs.k8s.io/), Rancher's next-generation K8s distribution [RKE2](https://docs.rke2.io/), or cloud-provided clusters such as [eks](https://aws.amazon.com/eks/). Such a diverse set of deployment choices frees you from being tethered to a single cluster option, allowing you to select the best-suited cluster environment for your specific needs. +Zarf offers the flexibility of deploying to a wide range of clusters beyond the K3s cluster included in the [init package](../3-create-a-zarf-package/3-the-zarf-init-package.md). This means that you can utilize various options, including local dockerized K8s clusters such as [k3d](https://k3d.io/v5.4.1/) or [Kind](https://kind.sigs.k8s.io/), Rancher's next-generation K8s distribution [RKE2](https://docs.rke2.io/), or cloud-provided clusters such as [eks](https://aws.amazon.com/eks/). Such a diverse set of deployment choices frees you from being tethered to a single cluster option, allowing you to select the best-suited cluster environment for your specific needs. ## Initializing a Cluster @@ -48,14 +48,14 @@ Zarf offers the flexibility of deploying to a wide range of clusters beyond the After installing the CLI and setting up a cluster, the next step is to initialize the cluster to enable the deployment of application packages. -Initializing a cluster is necessary since most K8 clusters do not come pre-installed with a container registry. This presents a challenging situation since pushing container images into a registry requires a registry to exist in the first place. For more information, please see the [init package](./../4-user-guide/2-zarf-packages/3-the-zarf-init-package.md) page. +Initializing a cluster is necessary since most K8 clusters do not come pre-installed with a container registry. This presents a challenging situation since pushing container images into a registry requires a registry to exist in the first place. For more information, please see the [init package](./../3-create-a-zarf-package/3-the-zarf-init-package.md) page. -As part of the initialization process, Zarf creates a dedicated namespace called `zarf` and deploys several essential components within the cluster. These include an in-cluster Docker registry (serves as the container image host for future packages), a `zarf agent` mutating webhook (to redirect outgoing requests to the internally hosted resources), and a set of secrets. Additionally, users can optionally deploy a gitea server that hosts the Git repositories needed for future packages. For more information regarding package components, see the [init package](./../4-user-guide/2-zarf-packages/3-the-zarf-init-package.md) page. +As part of the initialization process, Zarf creates a dedicated namespace called `zarf` and deploys several essential components within the cluster. These include an in-cluster Docker registry (serves as the container image host for future packages), a `zarf agent` mutating webhook (to redirect outgoing requests to the internally hosted resources), and a set of secrets. Additionally, users can optionally deploy a gitea server that hosts the Git repositories needed for future packages. For more information regarding package components, see the [init package](./../3-create-a-zarf-package/3-the-zarf-init-package.md) page. -To access the relevant init package release, visit the [GitHub releases](https://github.com/defenseunicorns/zarf/releases) page. Once downloaded, navigate to the directory containing the init package and execute the command [`zarf init`](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_init.md) to install it. Zarf will prompt you to confirm whether you wish to deploy the optional component. You can type 'y' or 'n' depending on your specific use case. +To access the relevant init package release, visit the [GitHub releases](https://github.com/defenseunicorns/zarf/releases) page. Once downloaded, navigate to the directory containing the init package and execute the command [`zarf init`](../2-the-zarf-cli/100-cli-commands/zarf_init.md) to install it. Zarf will prompt you to confirm whether you wish to deploy the optional component. You can type 'y' or 'n' depending on your specific use case. After the initialization process is complete, you can verify that the pods have come up healthy by running the command `zarf tools kubectl get pods -n zarf`. You should expect to see two `agent-hook` pods, a `zarf-docker-registry` pod, and optionally a `zarf-gitea` pod. ## Set Up Complete -At this point, you have successfully installed the Zarf CLI and initialized a K8s cluster. You are now ready to begin deploying packages to your cluster. The [Walkthroughs](../13-walkthroughs/index.md) section of the documentation provides a step-by-step guide on how to deploy packages to your cluster, and the [Deploying Zarf Packages](../13-walkthroughs/2-deploying-zarf-packages.md) is a great place to start. Follow along with the guide to learn more about deploying packages to your cluster and get started with your first deployment. +At this point, you have successfully installed the Zarf CLI and initialized a K8s cluster. You are now ready to begin deploying packages to your cluster. The [Tutorials](../6-zarf-tutorials/index.md) section of the documentation provides a step-by-step guide on how to deploy packages to your cluster, and the [Deploying Zarf Packages](../6-zarf-tutorials/2-deploying-zarf-packages.md) is a great place to start. Follow along with the guide to learn more about deploying packages to your cluster and get started with your first deployment. diff --git a/docs/1-getting-started/_category_.json b/docs/1-getting-started/_category_.json new file mode 100644 index 0000000000..e3878c322d --- /dev/null +++ b/docs/1-getting-started/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 1, + "label": "Getting Started" +} diff --git a/docs/3-getting-started/index.md b/docs/1-getting-started/index.md similarity index 86% rename from docs/3-getting-started/index.md rename to docs/1-getting-started/index.md index b52c6b147d..878b79f094 100644 --- a/docs/3-getting-started/index.md +++ b/docs/1-getting-started/index.md @@ -41,7 +41,7 @@ The `make` build-cli` command builds a binary for each combination of OS and arc - `make build-cli-linux-amd` - `make build-cli-linux-arm` -For additional information, see the [Building Your Own Zarf CLI](../4-user-guide/1-the-zarf-cli/1-building-your-own-cli.md) page. +For additional information, see the [Building Your Own Zarf CLI](../2-the-zarf-cli/0-building-your-own-cli.md) page. ::: --- @@ -64,10 +64,10 @@ If you are not seeing this then Zarf was not installed onto your $PATH correctly 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 become more familiar with Zarf and it's features, see the [Walkthroughs](../13-walkthroughs/index.md) page. +- If you want to become more familiar with Zarf and it's features, see the [Tutorials](../6-zarf-tutorials/index.md) page. -- More information about the Zarf CLI is available on 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 CLI](../2-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 creates and deploys 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 deploys is available in the [Understanding Zarf Packages](../3-create-a-zarf-package/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 on the [Understand the Basics](../1-understand-the-basics.md) and [Core Concepts](../2-core-concepts.md) pages. +- 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 the Basics](./0-understand-the-basics.md) and [Core Concepts](./1-core-concepts.md) pages. diff --git a/docs/11-community.md b/docs/10-community.md similarity index 93% rename from docs/11-community.md rename to docs/10-community.md index 0bd2c1a673..2f1e041891 100644 --- a/docs/11-community.md +++ b/docs/10-community.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 10 +--- + # Community :::caution Hard Hat Area diff --git a/docs/12-support.md b/docs/11-support.md similarity index 60% rename from docs/12-support.md rename to docs/11-support.md index d044d6a8ab..972571814b 100644 --- a/docs/12-support.md +++ b/docs/11-support.md @@ -1,9 +1,13 @@ +--- +sidebar_position: 11 +--- + # Support 1. Make sure you've read the guides in: - [Zarf Overview](./0-zarf-overview.md) - - [Understanding the Basics](3-getting-started/1-understand-the-basics.md) - - [Getting Started](./3-getting-started/index.md) -2. Look for an answer in the [Frequently Asked Questions](./9-faq.md). + - [Understanding the Basics](1-getting-started/0-understand-the-basics.md) + - [Getting Started](./1-getting-started/index.md) +2. Look for an answer in the [Frequently Asked Questions](./8-faq.md). 3. Ask a question in [the Zarf Slack Channel](https://kubernetes.slack.com/archives/C03B6BJAUJ3) 4. [Read issues, report a bug, or request a new feature](https://github.com/defenseunicorns/zarf/issues) diff --git a/docs/6-contribute-to-zarf/1-contributor-guide.md b/docs/12-contribute-to-zarf/1-contributor-guide.md similarity index 100% rename from docs/6-contribute-to-zarf/1-contributor-guide.md rename to docs/12-contribute-to-zarf/1-contributor-guide.md diff --git a/docs/6-contribute-to-zarf/2-testing.md b/docs/12-contribute-to-zarf/2-testing.md similarity index 100% rename from docs/6-contribute-to-zarf/2-testing.md rename to docs/12-contribute-to-zarf/2-testing.md diff --git a/docs/6-contribute-to-zarf/3-nerd-notes.md b/docs/12-contribute-to-zarf/3-nerd-notes.md similarity index 100% rename from docs/6-contribute-to-zarf/3-nerd-notes.md rename to docs/12-contribute-to-zarf/3-nerd-notes.md diff --git a/docs/6-contribute-to-zarf/4-style-guide.md b/docs/12-contribute-to-zarf/4-style-guide.md similarity index 96% rename from docs/6-contribute-to-zarf/4-style-guide.md rename to docs/12-contribute-to-zarf/4-style-guide.md index dc104360f7..674711c385 100644 --- a/docs/6-contribute-to-zarf/4-style-guide.md +++ b/docs/12-contribute-to-zarf/4-style-guide.md @@ -56,7 +56,7 @@ To create useful code examples, identify tasks and scenarios that are meaningful Follow these guidelines for creating Defense Unicorns code examples: * Create concise examples that exemplify key development tasks. Start with simple examples and build up the complexity after you cover common scenarios. -* Create code examples that are easy to scan and understand. Reserve complicated examples for tutorials and walkthroughs, where you can provide a step-by-step explanation of how the example works. +* Create code examples that are easy to scan and understand. Reserve complicated examples for tutorials, where you can provide a step-by-step explanation of how the example works. * Add an introduction to describe the scenario and explain anything that might not be clear from the code. List the requirements and dependencies for using or running the example. * Provide an easy way for developers to copy and run the code. Ideally a copy button in the code block itself. * Show expected output, either in a separate section after the code example or by using code comments within the code example. @@ -74,7 +74,7 @@ Follow these guidelines for creating proper Defense Unicorns text formatting: * Titles may be center aligned on websites and marketing materials. ### Procedures and Instructions -It is important to ensure that our communication is clear, concise, and useful. Many portions of our documentation consists of examples and walkthroughs for users to deploy our software. Creating consistent formatting helps users locate and interpret steps and procedures efficiently. +It is important to ensure that our communication is clear, concise, and useful. Many portions of our documentation consists of examples and tutorials for users to deploy our software. Creating consistent formatting helps users locate and interpret steps and procedures efficiently. Follow these guidelines for creating Defense Unicorn instructions and procedures: @@ -146,7 +146,7 @@ To avoid confusion and ensure understanding for all users, follow these guidelin * Government/Civilian (Gov/Civ) ### Admonitions -A footnote is an annotation with additional information usually provided at the end of a page. Footnotes can provide the reader with more insight, or warn them of a possible caveat. For our documentation, we will be using [Docusaurus admonitions](https://docusaurus.io/docs/markdown-features/admonitions) to pupulate footnotes. +A footnote is an annotation with additional information usually provided at the end of a page. Footnotes can provide the reader with more insight, or warn them of a possible caveat. For our documentation, we will be using [Docusaurus admonitions](https://docusaurus.io/docs/markdown-features/admonitions) to populate footnotes. Use *Note* when: you need to provide additional insight on the main text that could be one-off or situational. @@ -162,9 +162,9 @@ Linking to other forms of documentation or references is a great way to provide Follow these guidelines to efficiently link the reader to other resources: * To write link text, use descriptive phrases that provide context for the material that you're linking to. - * "For more information on what Zarf consists of, see [Zarf Packages](../4-user-guide/2-zarf-packages/index.md). + * "For more information on what Zarf consists of, see [Zarf Packages](../3-create-a-zarf-package/1-zarf-packages.md). * When you write a complete sentence that refers the reader to another topic, introduce the link with the phrase For more information, see or For more information about..., see. - * "For more information, see [Getting Started](../3-getting-started/index.md)." + * "For more information, see [Getting Started](../1-getting-started/index.md)." When linking text, **avoid** using non-descriptive terms as the text. Using text such as "here" or "see more" can depreciate the usability for readers. For example, do **not** say: * "For more information, see [here.]" diff --git a/docs/12-contribute-to-zarf/_category_.json b/docs/12-contribute-to-zarf/_category_.json new file mode 100644 index 0000000000..bcc0792616 --- /dev/null +++ b/docs/12-contribute-to-zarf/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 12, + "label": "Contribute to Zarf" +} diff --git a/docs/13-walkthroughs/3-deploy-a-retro-arcade.md b/docs/13-walkthroughs/3-deploy-a-retro-arcade.md deleted file mode 100644 index 140cee2215..0000000000 --- a/docs/13-walkthroughs/3-deploy-a-retro-arcade.md +++ /dev/null @@ -1,126 +0,0 @@ -# Deploying a Retro Arcade - -## Introduction - -In previous walkthroughs, we learned how to [create a package](./0-using-zarf-package-create.md), [initialize a cluster](./1-initializing-a-k8s-cluster.md), and [deploy a package](./2-deploying-zarf-packages.md). In this walkthrough, we will leverage all that past work and deploy a fun application onto your cluster. While this example game is nothing crazy, this walkthrough hopes to show how simple it is to build packages and deploy them into a Kubernetes cluster. - -## System Requirements - -- You'll need an internet connection to grab the Zarf source code that includes the games example. - -## 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: ([Installing Zarf](../3-getting-started/index.md#installing-zarf)) -3. [An initialized cluster](./1-initializing-a-k8s-cluster.md) - -## YouTube Walkthrough -[![Deploying Packages with Zarf Video on YouTube](../.images/walkthroughs/package_deploy_thumbnail.jpg)](https://youtu.be/7hDK4ew_bTo "Deploying Packages with Zarf") - -1. Navigate to the folder where you created the package in a previous walkthrough. (see [prerequisites](#prerequisites)) - -```sh -$ cd src/github.com/defenseunicorns/zarf/examples/dos-games -``` - -2. Use the `zarf package create .` command to create the Zarf games package. Enter `y` to confirm package creation. - - - -3. Provide a file size for the package, or enter `0` to disable the feature. - - - -Once you enter your response for the package size, the output that follows will show the package being created. - - - -4. Use the `zarf package deploy` command to deploy the Zarf games package. - - - -5. If you do not provide the path to the package as an argument to the `zarf package deploy` command, Zarf will prompt you to choose which package you want to deploy. - - - -You can list all packages in the current directory by hitting `tab`. Then, use the arrow keys to select which package you want to deploy. If there is only one package available, hitting `tab` will autofill that one option. Since we are deploying the games package in this walkthrough, we will select that package and hit `enter`. - - -As we have seen a few times now, we are going to be prompted to confirm that we want to deploy this package onto our cluster. - - - - -6. If you did not use the `--confirm` flag to automatically confirm that you want to deploy this package, press `y` for yes. Then hit the `enter` key. - - - -### 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 to the application we just deployed into the cluster, using the `zarf connect` command. - - - -![Connected to the Games](../.images/walkthroughs/games_connected.png) - -:::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 -The `zarf connect games` will continue running in the background until you close the connection by pressing the `ctrl + c` (`control + c` on a mac) in your terminal to terminate the process. -::: - -## Removal - -1. Use the `zarf package list` command to get a list of the installed packages. This will give you the name of the games package to remove it. - - - -2. Use the `zarf package remove` command to remove the `dos-games` package. Don't forget the `--confirm` flag. Otherwise you'll receive an error. - - - -3. You can also use the `zarf package remove` command with the zarf package file, to remove the package. Again don't forget the `--confirm` flag. - - - -The dos-games package has now been removed from your cluster. - -## Troubleshooting - -### Unable to connect to the Kubernetes cluster - -#### Example - - - -#### Remediation - -If you receive this error, either you don't have a Kubernetes cluster, your cluster is down, or your cluster is unreachable. - -1. Check your kubectl configuration, then try again. For more information about kubectl configuration see [Configure Access to Multiple Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) from the Kubernetes documentation. - -If you need to setup a cluster, you can perform the following. - -1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) walkthrough. -2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) walkthrough. - -After that you can try deploying the package again. - -### Secrets "zarf-state" not found - -#### Example - - - -#### Remediation - -If you receive this error when zarf is attempting to deploy the `BASELINE COMPONENT`, this means you have not initialized the kubernetes cluster. This is one of the prerequisites for this walkthrough. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) walkthrough, then try again. - -## Credits - -:sparkles: Special thanks to these fine references! :sparkles: - -- -- diff --git a/docs/13-walkthroughs/_category_.json b/docs/13-walkthroughs/_category_.json deleted file mode 100644 index 792c998371..0000000000 --- a/docs/13-walkthroughs/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Walkthroughs" -} - \ No newline at end of file diff --git a/docs/4-user-guide/1-the-zarf-cli/1-building-your-own-cli.md b/docs/2-the-zarf-cli/0-building-your-own-cli.md similarity index 98% rename from docs/4-user-guide/1-the-zarf-cli/1-building-your-own-cli.md rename to docs/2-the-zarf-cli/0-building-your-own-cli.md index 1ca4dd8a79..84a978cc13 100644 --- a/docs/4-user-guide/1-the-zarf-cli/1-building-your-own-cli.md +++ b/docs/2-the-zarf-cli/0-building-your-own-cli.md @@ -17,7 +17,7 @@ If you are running `make` targets other than the `build-cli-*` targets described ::: -If you don't want to build the CLI yourself, you can download a pre-compiled binary from the 'Assets' tab of our latest [releases](https://github.com/defenseunicorns/zarf/releases) on GitHub. The pre-compiled binary is available for both arm64 and amd64 machines. +If you don't want to build the CLI yourself, you can download a pre-compiled binary from the 'Assets' tab of our latest [releases](https://github.com/defenseunicorns/zarf/releases) on GitHub. The pre-compiled binary is available for both arm64 and amd64 machines. ## Building the CLI @@ -37,7 +37,7 @@ The `make build-cli` command builds a binary for each combination of OS and arch - `make build-cli-mac-apple` - `make build-cli-linux-amd` - `make build-cli-linux-arm` -- `make build-cli-windows-amd` +- `make build-cli-windows-amd` - `make build-cli-windows-arm` ::: diff --git a/docs/4-user-guide/1-the-zarf-cli/2-cli-common-uses.md b/docs/2-the-zarf-cli/1-cli-common-uses.md similarity index 90% rename from docs/4-user-guide/1-the-zarf-cli/2-cli-common-uses.md rename to docs/2-the-zarf-cli/1-cli-common-uses.md index ba44e1fe35..e99d3e139b 100644 --- a/docs/4-user-guide/1-the-zarf-cli/2-cli-common-uses.md +++ b/docs/2-the-zarf-cli/1-cli-common-uses.md @@ -4,18 +4,18 @@ Zarf is a tool that optimizes the delivery of applications and capabilities into ## Building Packages: `zarf package create` -To create a Zarf Package, you must execute the [`zarf package create`](./100-cli-commands/zarf_package_create.md) command, which generates a `tar.zst` archive that includes all the required dependencies and instructions to deploy the capabilities onto another machine. The `zarf package create` command uses a `zarf.yaml` configuration file that describes the package's components and performs all necessary actions, such as downloading container images and git repositories, to build the final package. Additional information on Zarf Packages can be found on the [Zarf Packages](../2-zarf-packages/index.md) page. +To create a Zarf Package, you must execute the [`zarf package create`](./100-cli-commands/zarf_package_create.md) command, which generates a `tar.zst` archive that includes all the required dependencies and instructions to deploy the capabilities onto another machine. The `zarf package create` command uses a `zarf.yaml` configuration file that describes the package's components and performs all necessary actions, such as downloading container images and git repositories, to build the final package. Additional information on Zarf Packages can be found on the [Understanding Zarf Packages](../3-create-a-zarf-package/1-zarf-packages.md) page. ## Initializing a Cluster: `zarf init` -Before deploying a package to a cluster, you must initialize the cluster using the [`zarf init`](./100-cli-commands/zarf_init.md) command. This command creates and bootstraps an in-cluster container registry and provides the option to install optional tools and services necessary for future packages. +Before deploying a package to a cluster, you must initialize the cluster using the [`zarf init`](./100-cli-commands/zarf_init.md) command. This command creates and bootstraps an in-cluster container registry and provides the option to install optional tools and services necessary for future packages. -For Windows and macOS environments, a cluster must already exist before initializing it using Zarf. You can use [Kind](https://kind.sigs.k8s.io/), [K3d](https://k3d.io/), [Docker Desktop](https://docs.docker.com/desktop/kubernetes/), or any other local or remote Kubernetes cluster. +For Windows and macOS environments, a cluster must already exist before initializing it using Zarf. You can use [Kind](https://kind.sigs.k8s.io/), [K3d](https://k3d.io/), [Docker Desktop](https://docs.docker.com/desktop/kubernetes/), or any other local or remote Kubernetes cluster. -For Linux environments, Zarf can, itself, create and update a local K3s cluster, in addition to using any other local or remote Kubernetes cluster. The init package used by `zarf init` contains all the resources necessary to create a local [K3s](https://k3s.io/) cluster on your machine. This package may be located in your current working directory, the directory where the Zarf CLI binary is located, or downloaded from GitHub releases during command execution. Further details on the initialization process can be found on the [init package](../2-zarf-packages/3-the-zarf-init-package.md) page. +For Linux environments, Zarf can, itself, create and update a local K3s cluster, in addition to using any other local or remote Kubernetes cluster. The init package used by `zarf init` contains all the resources necessary to create a local [K3s](https://k3s.io/) cluster on your machine. This package may be located in your current working directory, the directory where the Zarf CLI binary is located, or downloaded from GitHub releases during command execution. Further details on the initialization process can be found on the [init package](../3-create-a-zarf-package/3-the-zarf-init-package.md) page. :::note Depending on the permissions of your user, if you are installing K3s with `zarf init`, you may need to run it as a privileged user. This can be done by either: @@ -29,6 +29,6 @@ Depending on the permissions of your user, if you are installing K3s with `zarf -The [`zarf package deploy`](./100-cli-commands/zarf_package_deploy.md) command deploys the packaged capabilities into the target environment. The package can be deployed on any cluster, even those without an external internet connection, since it includes all of its external resources. The external resources are pushed into the cluster to services Zarf either deployed itself or that it was told about on `init`, such as the init package's Gitea Git server or a pre-existing Harbor image registry. Then, the application is deployed according to the instructions in the zarf.yaml file, such as deploying a helm chart, deploying raw K8s manifests, or executing a series of shell commands. Generally, it is presumed that the `zarf init` command has already been executed on the target machine. However, there are a few exceptional cases where this assumption does not apply, such as [YOLO Mode](../../9-faq.md#what-is-yolo-mode-and-why-would-i-use-it). +The [`zarf package deploy`](./100-cli-commands/zarf_package_deploy.md) command deploys the packaged capabilities into the target environment. The package can be deployed on any cluster, even those without an external internet connection, since it includes all of its external resources. The external resources are pushed into the cluster to services Zarf either deployed itself or that it was told about on `init`, such as the init package's Gitea Git server or a pre-existing Harbor image registry. Then, the application is deployed according to the instructions in the zarf.yaml file, such as deploying a helm chart, deploying raw K8s manifests, or executing a series of shell commands. Generally, it is presumed that the `zarf init` command has already been executed on the target machine. However, there are a few exceptional cases where this assumption does not apply, such as [YOLO Mode](../8-faq.md#what-is-yolo-mode-and-why-would-i-use-it). -Additional information about Zarf Packages can found on the [Understanding Zarf Packages](../2-zarf-packages/1-zarf-packages.md) page. +Additional information about Zarf Packages can found on the [Understanding Zarf Packages](../3-create-a-zarf-package/1-zarf-packages.md) page. diff --git a/docs/2-the-zarf-cli/100-cli-commands/_category_.json b/docs/2-the-zarf-cli/100-cli-commands/_category_.json new file mode 100644 index 0000000000..9bdb104732 --- /dev/null +++ b/docs/2-the-zarf-cli/100-cli-commands/_category_.json @@ -0,0 +1 @@ +{"label": "CLI Commands"} diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf.md b/docs/2-the-zarf-cli/100-cli-commands/zarf.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_completion.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_completion.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion_bash.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_completion_bash.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion_bash.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_completion_bash.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion_fish.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_completion_fish.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion_fish.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_completion_fish.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion_powershell.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_completion_powershell.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion_powershell.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_completion_powershell.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion_zsh.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_completion_zsh.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_completion_zsh.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_completion_zsh.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_connect.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_connect.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_connect.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_connect.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_connect_list.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_connect_list.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_connect_list.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_connect_list.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_destroy.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_destroy.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_destroy.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_destroy.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_init.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_init.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_init.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_init.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_package.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_package.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_create.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_package_create.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_create.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_package_create.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_deploy.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_package_deploy.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_deploy.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_package_deploy.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_inspect.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_package_inspect.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_inspect.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_package_inspect.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_list.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_package_list.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_list.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_package_list.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_publish.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_package_publish.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_publish.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_package_publish.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_pull.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_package_pull.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_pull.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_package_pull.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_remove.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_package_remove.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_remove.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_package_remove.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_prepare.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_prepare.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_find-images.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_prepare_find-images.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_find-images.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_prepare_find-images.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_generate-config.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_prepare_generate-config.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_generate-config.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_prepare_generate-config.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_patch-git.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_prepare_patch-git.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_patch-git.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_prepare_patch-git.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_sha256sum.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_prepare_sha256sum.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_prepare_sha256sum.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_prepare_sha256sum.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_archiver.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_archiver.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_archiver.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_archiver.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_archiver_compress.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_archiver_compress.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_archiver_compress.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_archiver_compress.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_archiver_decompress.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_archiver_decompress.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_archiver_decompress.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_archiver_decompress.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_clear-cache.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_clear-cache.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_clear-cache.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_clear-cache.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_gen-key.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_gen-key.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_gen-key.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_gen-key.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_gen-pki.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_gen-pki.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_gen-pki.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_gen-pki.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_get-creds.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_get-creds.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_get-creds.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_get-creds.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_kubectl.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_kubectl.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_kubectl.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_kubectl.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_monitor.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_monitor.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_monitor.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_monitor.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_catalog.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_catalog.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_catalog.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_catalog.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_copy.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_copy.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_copy.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_copy.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_login.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_login.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_login.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_login.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_pull.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_pull.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_pull.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_pull.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_push.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_push.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_registry_push.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_registry_push.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_attest.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_attest.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_attest.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_attest.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_convert.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_convert.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_convert.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_convert.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_login.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_login.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_login.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_login.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_packages.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_packages.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_packages.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_packages.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_version.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_version.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom_version.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_sbom_version.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_wait-for.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_tools_wait-for.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_wait-for.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_tools_wait-for.md diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_version.md b/docs/2-the-zarf-cli/100-cli-commands/zarf_version.md similarity index 100% rename from docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_version.md rename to docs/2-the-zarf-cli/100-cli-commands/zarf_version.md diff --git a/docs/2-the-zarf-cli/_category_.json b/docs/2-the-zarf-cli/_category_.json new file mode 100644 index 0000000000..ddc868463c --- /dev/null +++ b/docs/2-the-zarf-cli/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 2, + "label": "The Zarf CLI" +} diff --git a/docs/4-user-guide/1-the-zarf-cli/index.md b/docs/2-the-zarf-cli/index.md similarity index 94% rename from docs/4-user-guide/1-the-zarf-cli/index.md rename to docs/2-the-zarf-cli/index.md index a1e4b4c396..a8b55cff37 100644 --- a/docs/4-user-guide/1-the-zarf-cli/index.md +++ b/docs/2-the-zarf-cli/index.md @@ -14,7 +14,7 @@ Zarf is a command line interface (CLI) tool that enables secure software deliver -You can get the Zarf CLI on your machine in a few different ways. You can use the Defense Unicorns Homebrew Tap, download a prebuilt binary from our GitHub releases, or build the CLI from scratch on your own. We provide instructions for all of these methods in the [Installing Zarf](../../3-getting-started/index.md#installing-zarf) section of the Getting Started guide. If you're eager to start using Zarf and you already have Homebrew installed, you can quickly install it by copying and pasting the relevant commands for your operating system into your terminal: +You can get the Zarf CLI on your machine in a few different ways. You can use the Defense Unicorns Homebrew Tap, download a prebuilt binary from our GitHub releases, or build the CLI from scratch on your own. We provide instructions for all of these methods in the [Installing Zarf](../1-getting-started/index.md#installing-zarf) section of the Getting Started guide. If you're eager to start using Zarf and you already have Homebrew installed, you can quickly install it by copying and pasting the relevant commands for your operating system into your terminal: @@ -121,13 +121,13 @@ Throughout the rest of the documentation, we will often be describing commands a Zarf provides a suite of commands that streamline the creation, deployment, and maintenance of packages. Some of these commands contain additional sub-commands to further assist with package management. When executed with the "--help" flag, each command and sub-command provides a concise summary of its functionality. As you navigate deeper into the command hierarchy, the provided descriptions become increasingly detailed. We encourage you to explore the various commands available to gain a comprehensive understanding of Zarf's capabilities. -As previously mentioned, Zarf was specifically designed to facilitate the deployment of applications in disconnected environments with ease. As a result, the most commonly utilized commands are `zarf init`, `zarf package create`, and `zarf package deploy`. Detailed information on all commands can be found in the [CLI Commands](./100-cli-commands/zarf.md) section. However, brief descriptions of the most frequently used commands are provided below. It's worth noting that these three commands are closely linked to what we refer to as a "Zarf Package". Additional information on Zarf Packages can be found in the following section: [Zarf Packages](../2-zarf-packages/1-zarf-packages.md). +As previously mentioned, Zarf was specifically designed to facilitate the deployment of applications in disconnected environments with ease. As a result, the most commonly utilized commands are `zarf init`, `zarf package create`, and `zarf package deploy`. Detailed information on all commands can be found in the [CLI Commands](./100-cli-commands/zarf.md) section. However, brief descriptions of the most frequently used commands are provided below. It's worth noting that these three commands are closely linked to what we refer to as a "Zarf Package". Additional information on Zarf Packages can be found in the following section: [Zarf Packages](../3-create-a-zarf-package/1-zarf-packages.md). ### zarf init -The `zarf init` command is utilized to configure a K8s cluster in preparation for the deployment of future Zarf Packages. The init command uses a specialized 'init-package' to operate. This package may be located in your current working directory, the directory where the Zarf CLI binary is located, or downloaded from GitHub releases during command execution. For further details regarding the init-package, please refer to the [init-package](../2-zarf-packages/3-the-zarf-init-package.md) page. +The `zarf init` command is utilized to configure a K8s cluster in preparation for the deployment of future Zarf Packages. The init command uses a specialized 'init-package' to operate. This package may be located in your current working directory, the directory where the Zarf CLI binary is located, or downloaded from GitHub releases during command execution. For further details regarding the init-package, please refer to the [init-package](../3-create-a-zarf-package/3-the-zarf-init-package.md) page. ### zarf package deploy @@ -151,4 +151,4 @@ While config files set default values, these values can still be overwritten by 3. Config file 4. Default values -For additional information, see the [Config File Example](../../../examples/config-file/README.md). +For additional information, see the [Config File Example](../../examples/config-file/README.md). diff --git a/docs/4-user-guide/2-zarf-packages/1-zarf-packages.md b/docs/3-create-a-zarf-package/1-zarf-packages.md similarity index 92% rename from docs/4-user-guide/2-zarf-packages/1-zarf-packages.md rename to docs/3-create-a-zarf-package/1-zarf-packages.md index 412801a462..2bcdaa73a9 100644 --- a/docs/4-user-guide/2-zarf-packages/1-zarf-packages.md +++ b/docs/3-create-a-zarf-package/1-zarf-packages.md @@ -1,7 +1,3 @@ ---- -sidebar_position: 1 ---- - # Understanding Zarf Packages Zarf offers a comprehensive solution for deploying system software or capabilities while fully disconnected. This is accomplished through the use of a single tarball archive, which includes all necessary components and is defined by a `zarf.yaml` file. @@ -28,11 +24,11 @@ Throughout the rest of the documentation, we will refer to the `ZarfInitConfig` The init package is used to initialize a cluster, making it ready for deployment of other Zarf Packages. It must be executed once on each cluster that you want to deploy another package onto, even if multiple clusters share the same host. For additional information on the init package, we provide detailed documentation on the Zarf ['init' package page](./3-the-zarf-init-package.md). -If there is no running cluster, the init package can be used to create one. It has a deployable K3s cluster component that can be optionally deployed on your machine. Usually, an init package is the first Zarf Package to be deployed on a cluster as other packages often depend on the services installed or configured by the init package. If you want to install a K8s cluster with Zarf, but you don’t want to use K3s as your cluster, you will need to create or find another Zarf Package that will stand up your cluster before you run the zarf init command. +If there is no running cluster, the init package can be used to create one. It has a deployable K3s cluster component that can be optionally deployed on your machine. Usually, an init package is the first Zarf Package to be deployed on a cluster as other packages often depend on the services installed or configured by the init package. If you want to install a K8s cluster with Zarf, but you don't want to use K3s as your cluster, you will need to create or find another Zarf Package that will stand up your cluster before you run the zarf init command. :::note -To clarify, in most cases, the first Zarf Package you deploy onto a cluster should be the init package since other packages often depend on the services it installs onto your cluster. However, if you don't want to use the K3s distribution included in the init package or if you already have a preferred K8s distribution, you can deploy the distribution package first, followed by the init package, and then any other packages you want. This only applies if you don't have a K8s cluster yet. +To clarify, in most cases, the first Zarf Package you deploy onto a cluster should be the init package since other packages often depend on the services it installs onto your cluster. However, if you don't want to use the K3s distribution included in the init package or if you already have a preferred K8s distribution, you can deploy the distribution package first, followed by the init package, and then any other packages you want. This only applies if you don't have a K8s cluster yet. ::: @@ -56,17 +52,17 @@ During the deployment process, Zarf will leverage the infrastructure created dur ## Package Components -Zarf Packages consist of smaller units known as 'components'. These components are further defined on the [Zarf Components page](./2-zarf-components.md), but to summarize, they represent the named capabilities that packages offer. For additional information regarding the `zarf.yaml` package structure, please refer to the [Zarf Package Schema](../3-zarf-schema.md) documentation. +Zarf Packages consist of smaller units known as 'components'. These components are further defined on the [Zarf Components page](./2-zarf-components.md), but to summarize, they represent the named capabilities that packages offer. For additional information regarding the `zarf.yaml` package structure, please refer to the [Zarf Package Schema](./5-zarf-schema.md) documentation. ## Creating a Zarf Package The following list outlines the dependencies for creating a Zarf Package: - A local K8s cluster to work with ([K3s](https://k3s.io/)/[k3d](https://k3d.io/v5.4.1/)/[Kind](https://kind.sigs.k8s.io/docs/user/quick-start#installation)). -- A Zarf CLI ([downloaded](https://github.com/defenseunicorns/zarf/releases) or [manually built](../1-the-zarf-cli/1-building-your-own-cli.md)). -- A Zarf init package ([downloaded](https://github.com/defenseunicorns/zarf/releases) or [manually built](../1-the-zarf-cli/1-building-your-own-cli.md)). +- A Zarf CLI ([downloaded](https://github.com/defenseunicorns/zarf/releases) or [manually built](../2-the-zarf-cli/0-building-your-own-cli.md)). +- A Zarf init package ([downloaded](https://github.com/defenseunicorns/zarf/releases) or [manually built](../2-the-zarf-cli/0-building-your-own-cli.md)). -The process of defining a package is elaborated in detail on the [Creating a Package](../../13-walkthroughs/0-using-zarf-package-create.md) page. Once a package has been defined, building it is a relatively straightforward task. +The process of defining a package is elaborated in detail on the [Creating a Package](../6-zarf-tutorials/0-using-zarf-package-create.md) page. Once a package has been defined, building it is a relatively straightforward task. The `zarf package create` command locates the `zarf.yaml` file in the current directory and constructs the package from that file. The command utilizes internet or intranet resources to retrieve all the required assets and stores them in a temporary directory. After the required resources have been obtained, Zarf generates a tarball of the temporary directory and performs necessary cleanup actions. diff --git a/docs/4-user-guide/2-zarf-packages/2-zarf-components.md b/docs/3-create-a-zarf-package/2-zarf-components.md similarity index 97% rename from docs/4-user-guide/2-zarf-packages/2-zarf-components.md rename to docs/3-create-a-zarf-package/2-zarf-components.md index ff63c3315a..0d434ddd9b 100644 --- a/docs/4-user-guide/2-zarf-packages/2-zarf-components.md +++ b/docs/3-create-a-zarf-package/2-zarf-components.md @@ -1,7 +1,3 @@ ---- -sidebar_position: 2 ---- - # Understanding Zarf Components The actual capabilities that Zarf Packages provided are defined within named components. These components define what dependencies they have and a declarative definition of how they should be deployed. Each package can have as many components as the package creator wants but a package isn't anything without at least one component. @@ -49,4 +45,4 @@ components: ## What Makes Up A Component -Zarf components can contain different key/value pairs which you can learn more about here under the `components` section: [ZarfComponent Schema Docs](../3-zarf-schema.md#components) +Zarf components can contain different key/value pairs which you can learn more about here under the `components` section: [ZarfComponent Schema Docs](./5-zarf-schema.md#components) diff --git a/docs/4-user-guide/2-zarf-packages/3-the-zarf-init-package.md b/docs/3-create-a-zarf-package/3-the-zarf-init-package.md similarity index 82% rename from docs/4-user-guide/2-zarf-packages/3-the-zarf-init-package.md rename to docs/3-create-a-zarf-package/3-the-zarf-init-package.md index 208fd01854..2d045855fd 100644 --- a/docs/4-user-guide/2-zarf-packages/3-the-zarf-init-package.md +++ b/docs/3-create-a-zarf-package/3-the-zarf-init-package.md @@ -1,7 +1,3 @@ ---- -sidebar_position: 3 ---- - # The Zarf 'init' Package The init package is the `zarf.yaml` file that lives at the [root of the Zarf repository](https://github.com/defenseunicorns/zarf/blob/main/zarf.yaml). @@ -9,7 +5,7 @@ It is defined by composed components which provide a foundation for future packa ## Required Component -Zarf's capabilities require that the [`zarf-agent`](../../9-faq.md#what-is-the-zarf-agent) component of the init package is constantly active, meaning that it cannot be disabled and is always on. This component is automatically deployed whenever a `zarf init` command is executed. +Zarf's capabilities require that the [`zarf-agent`](../8-faq.md#what-is-the-zarf-agent) component of the init package is constantly active, meaning that it cannot be disabled and is always on. This component is automatically deployed whenever a `zarf init` command is executed. | Component | Description | | ----------------------- | -------------------------------------------------------------------------------------------------------------------- | @@ -19,7 +15,7 @@ Zarf's capabilities require that the [`zarf-agent`](../../9-faq.md#what-is-the-z In addition to the required `zarf-agent` component, Zarf also offers components that provide additional functionality and can be enabled as needed based on your desired end-state. -In most scenarios, Zarf will also deploy an internal registry using the components described below. However, Zarf can be configured to use an already existing registry with the `--registry-*` flags when running `zarf init` (detailed information on all `zarf init` command flags can be found in the [zarf init CLI](../1-the-zarf-cli/100-cli-commands/zarf_init.md) section). This option skips the injector and seed process, and will not deploy a registry to the cluster. Instead, it uploads any images to the externally configured registry. +In most scenarios, Zarf will also deploy an internal registry using the components described below. However, Zarf can be configured to use an already existing registry with the `--registry-*` flags when running `zarf init` (detailed information on all `zarf init` command flags can be found in the [zarf init CLI](../2-the-zarf-cli/100-cli-commands/zarf_init.md) section). This option skips the injector and seed process, and will not deploy a registry to the cluster. Instead, it uploads any images to the externally configured registry. | Components | Description | ----------------------- | -------------------------------------------------------------------------------------------------------------------- | @@ -45,6 +41,6 @@ Deploying the 'k3s' component will require root access (not just sudo), as it mo ## What Makes the Init Package Special -Deploying onto air-gapped environments is a [hard problem](../../3-getting-started/1-understand-the-basics.md#airgap-basics), particularly when the K8s environment doesn't have a container registry for you to store images. This results in a dilemma where the container registry image must be introduced to the cluster, but there is no container registry to push it to as the image is not yet in the cluster. To ensure that our approach is distro-agnostic, we developed a unique solution to seed the container registry into the cluster. +Deploying onto air-gapped environments is a [hard problem](../1-getting-started/0-understand-the-basics.md#airgap-basics), particularly when the K8s environment doesn't have a container registry for you to store images. This results in a dilemma where the container registry image must be introduced to the cluster, but there is no container registry to push it to as the image is not yet in the cluster. To ensure that our approach is distro-agnostic, we developed a unique solution to seed the container registry into the cluster. To address this problem, we use the `zarf-injector` [component](https://github.com/defenseunicorns/zarf/blob/main/packages/zarf-injector/zarf.yaml) within the init-package. This resolves the issue by injecting a single rust binary (statically compiled) and a series of configmap chunks of a `registry:2` image into an ephemeral pod that is based on an existing image in the cluster. diff --git a/docs/4-user-guide/3-zarf-schema.md b/docs/3-create-a-zarf-package/5-zarf-schema.md similarity index 99% rename from docs/4-user-guide/3-zarf-schema.md rename to docs/3-create-a-zarf-package/5-zarf-schema.md index 5108dc7ecf..bd88f9cdea 100644 --- a/docs/4-user-guide/3-zarf-schema.md +++ b/docs/3-create-a-zarf-package/5-zarf-schema.md @@ -163,7 +163,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "arm64", "amd64" @@ -882,7 +882,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "powershell", "cmd", "pwsh", "sh", "bash", "gsh" @@ -903,7 +903,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "sh", "bash", "fish", "zsh", "pwsh" @@ -924,7 +924,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "sh", "bash", "fish", "zsh", "pwsh" @@ -1243,7 +1243,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "Pod", "Deployment)" @@ -1266,7 +1266,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "podinfo", "app=podinfo" @@ -1303,7 +1303,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "Ready", "Available" @@ -1371,7 +1371,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "localhost:8080", "1.1.1.1" @@ -1392,7 +1392,7 @@ Must be one of: | -------- | --------- | | **Type** | `integer` | -**Examples:** +**Examples:** 200, 404 @@ -1789,7 +1789,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Examples:** +**Examples:** "OCI registry: oci://ghcr.io/stefanprodan/charts/podinfo", "helm chart repo: https://stefanprodan.github.io/podinfo", "git repo: https://github.com/stefanprodan/podinfo" @@ -1873,7 +1873,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Example:** +**Example:** "charts/your-chart" @@ -2218,7 +2218,7 @@ Must be one of: | -------- | -------- | | **Type** | `string` | -**Example:** +**Example:** "app=data-injection" diff --git a/docs/3-create-a-zarf-package/6-package-create-lifecycle.md b/docs/3-create-a-zarf-package/6-package-create-lifecycle.md new file mode 100644 index 0000000000..58da969df8 --- /dev/null +++ b/docs/3-create-a-zarf-package/6-package-create-lifecycle.md @@ -0,0 +1,55 @@ +# Package Create Lifecycle + +The following diagram shows the order of operations for the `zarf package create` command and the hook locations for [actions](../../examples/component-actions/README.md). + +## `zarf package create` + +```mermaid +graph TD + A1(set working directory)-->A2 + A2(parse zarf.yaml)-->A3 + A3(filter components by architecture)-->A4 + A4(detect init package)-->A5 + A5(handle deprecations)-->A6 + A6(parse component imports)-->A7 + A7(process create-time variables)-->A8 + A8(write build data and zarf.yaml)-->A9 + + A9(run validations)-->A10 + A10(confirm package create):::prompt-->A11 + A11{Init package?} + A11 -->|Yes| A12(add seed image)-->A13 + A11 -->|No| A13 + + subgraph + A13(add each component)-->A13 + A13 --> A14(run each '.actions.onCreate.before'):::action-->A14 + A14 --> A15(load '.charts')-->A16 + A16(load '.files')-->A17 + A17(load '.dataInjections')-->A18 + A18(load '.manifests')-->A19 + A19(load '.repos')-->A20 + A20(run each '.actions.onCreate.after'):::action-->A20 + A20-->A21{Success?} + A21-->|Yes|A22(run each\n'.actions.onCreate.success'):::action-->A22 + A21-->|No|A23(run each\n'.actions.onCreate.failure'):::action-->A23-->A999 + end + + A22-->A24(load all '.images') + A24-->A25{Skip SBOM?} + A25-->|Yes|A27 + A25-->|No|A26 + A26(generate SBOM)-->A27 + A27(reset working directory)-->A28 + A28(create package archive)-->A29 + A29{Is multipart?} + A29-->|Yes|A30(split package archive)-->A31 + A29-->|No|A31 + A31(handle sbom view/out flags) + + A999[Abort]:::fail + + classDef prompt fill:#4adede,color:#000000 + classDef action fill:#bd93f9,color:#000000 + classDef fail fill:#aa0000 +``` diff --git a/docs/4-user-guide/5-component-actions.md b/docs/3-create-a-zarf-package/7-component-actions.md similarity index 95% rename from docs/4-user-guide/5-component-actions.md rename to docs/3-create-a-zarf-package/7-component-actions.md index c8a28cf1b0..56653da4c6 100644 --- a/docs/4-user-guide/5-component-actions.md +++ b/docs/3-create-a-zarf-package/7-component-actions.md @@ -1,6 +1,6 @@ # Component Actions -Component Actions offer several exec entrypoints that allow a component to perform additional logic at key stages of its lifecycle. These actions are executed within the same context as the Zarf binary. For a detailed overview of the execution sequence of component actions, please refer to the [Zarf Package Lifecycle](4-package-command-lifecycle.md) documentation. Additionally, you can experiment with the component actions example located in the [Component Actions](../../examples/component-actions/README.md) example page. +Component Actions offer several exec entrypoints that allow a component to perform additional logic at key stages of its lifecycle. These actions are executed within the same context as the Zarf binary. For a detailed overview of the execution sequence of component actions, please refer to the Zarf [package create lifecycle documentation](./6-package-create-lifecycle.md), [package deploy lifecycle documentation](../4-deploy-a-zarf-package/2-package-deploy-lifecycle.md). Additionally, you can experiment with the component actions example located in the [Component Actions](../../examples/component-actions/README.md) example page. ## Action Sets @@ -83,7 +83,7 @@ components: ## Action Set Defaults -In addition to the `action` lists above, an `action set` also contains a `defaults` section that will be applied to all actions in the set. The `defaults` section contains all of the same elements as an action configuration, with the exception of the `cmd` element, which is not allowed in the `defaults` section. Below is an example of `action set` defaults: +In addition to the `action` lists above, an `action set` also contains a `defaults` section that will be applied to all actions in the set. The `defaults` section contains all of the same elements as an action configuration, with the exception of the `cmd` element, which is not allowed in the `defaults` section. Below is an example of `action set` defaults: ```yaml actions: @@ -115,7 +115,7 @@ The following keys are common to all action configurations (wait or command): ## Command Action Configuration -A command action executes arbitrary commands or scripts within a shell wrapper. You can use the `cmd` key to define the command(s) to run. This can also be a multi-line script. _You cannot use `cmd` and `wait` in the same action_. +A command action executes arbitrary commands or scripts within a shell wrapper. You can use the `cmd` key to define the command(s) to run. This can also be a multi-line script. _You cannot use `cmd` and `wait` in the same action_. Within each of the `action` lists (`before`, `after`, `onSuccess`, and `onFailure`), the following action configurations are available: diff --git a/docs/4-user-guide/6-vscode.md b/docs/3-create-a-zarf-package/8-vscode.md similarity index 96% rename from docs/4-user-guide/6-vscode.md rename to docs/3-create-a-zarf-package/8-vscode.md index d59c8f4116..79e10ce663 100644 --- a/docs/4-user-guide/6-vscode.md +++ b/docs/3-create-a-zarf-package/8-vscode.md @@ -7,7 +7,7 @@ Zarf uses the [Zarf package schema](https://github.com/defenseunicorns/zarf/blob 1. Open VS Code. 2. Install the [YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) by RedHat. 3. Open the VS Code command pallete by typing `CTRL/CMD + SHIFT + P`. -4. Type `Preferences: Open User Settings (JSON)`into the search bar to open the `settings.json` file. +4. Type `Preferences: Open User Settings (JSON)`into the search bar to open the `settings.json` file. 5. Add the below code to the settings.json config, or modify the existing `yaml.schemas` object to include the Zarf schema. ```json @@ -31,6 +31,6 @@ To ensure consistent validation of the Zarf schema version in a `zarf.yaml` file In the above example, `` should be replaced with the specific [Zarf release](https://github.com/defenseunicorns/zarf/releases). -### Code Example +### Code Example ![yaml schema](https://user-images.githubusercontent.com/92826525/226490465-1e6a56f7-41c4-45bf-923b-5242fa4ab64e.png) diff --git a/docs/4-user-guide/7-github-action.md b/docs/3-create-a-zarf-package/9-github-action.md similarity index 100% rename from docs/4-user-guide/7-github-action.md rename to docs/3-create-a-zarf-package/9-github-action.md diff --git a/docs/3-create-a-zarf-package/_category_.json b/docs/3-create-a-zarf-package/_category_.json new file mode 100644 index 0000000000..d5ace4d347 --- /dev/null +++ b/docs/3-create-a-zarf-package/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 3, + "label": "Create a Zarf Package" +} diff --git a/docs/3-getting-started/2-core-concepts.md b/docs/3-getting-started/2-core-concepts.md deleted file mode 100644 index 518ad272f5..0000000000 --- a/docs/3-getting-started/2-core-concepts.md +++ /dev/null @@ -1,9 +0,0 @@ -# Core Concepts - -Now, assuming you're familiar with Kubernetes, AirGap, and GitOps from [Understanding the Basics](../3-getting-started/1-understand-the-basics.md), we can get started on the core concepts of Zarf. - -## Zarf Concepts - -- [**Zarf Package**](./4-user-guide/2-zarf-packages/1-zarf-packages.md) - A binary file that contains the instructions and dependencies necessary to install an application on a system. -- [**Zarf Component**](./4-user-guide/2-zarf-packages/2-zarf-components.md) - A set of defined functionality and resources that build up a package. -- [**Zarf Init Package**](./4-user-guide/2-zarf-packages/3-the-zarf-init-package.md) - The initial package that lays the groundwork for other packages. diff --git a/docs/3-getting-started/_category_.json b/docs/3-getting-started/_category_.json deleted file mode 100644 index a60259b806..0000000000 --- a/docs/3-getting-started/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "Getting Started" - } \ No newline at end of file diff --git a/docs/4-deploy-a-zarf-package/1-package-deploy-overview.md b/docs/4-deploy-a-zarf-package/1-package-deploy-overview.md new file mode 100644 index 0000000000..7ac3b92f20 --- /dev/null +++ b/docs/4-deploy-a-zarf-package/1-package-deploy-overview.md @@ -0,0 +1,61 @@ +# Intro to Package Deploy + +Zarf Packages are designed to be easily deployable on a variety of systems, including air-gapped systems. All of the necessary dependencies are included within the package, eliminating the need for outbound internet connectivity. When deploying the package onto a cluster, the dependencies contained in each component are automatically pushed into a Docker registry and/or Git server created by or known to Zarf on the air-gapped system. + +Once the Zarf package has arrived in your target environment, run the `zarf package deploy` command to deploy the package onto your [Zarf initialized](../3-create-a-zarf-package/3-the-zarf-init-package.md) cluster. This command deploys the package's capabilities into the target environment, including all external resources required for the package. The `zarf.yaml` file included in the package will be used to orchestrate the deployment of the application according to the instructions provided. + +:::tip + +For a comprehensive tutorial of deploying a Zarf Package, see the [Deploying Zarf Packages tutorial](../6-zarf-tutorials/2-deploying-zarf-packages.md). + +::: + +## Deployment Options + +Zarf provides a few options that can provide control over how a deployment of a Zarf Package proceeds in a given environment. These are baked into a Zarf Package by a package creator and include: + +- **Package Variables** - Templates resources with environment specific values such as domain names or secrets. +- **Optional Components** - Allows for components to be optionally chosen when they are needed for a subset of environments. +- **Components Groups** - Provides a choice of one component from a defined set of components in the same component group. + +## Additional Deployment-modes + +Zarf normally expects to operate against a Kubernetes cluster that has been [Zarf initialized](../3-create-a-zarf-package/3-the-zarf-init-package.md), but there are additional modes that can be configured by package creators including: + +- **YOLO Mode** - Yaml-OnLy Online mode allows for a faster deployment without requiring the `zarf init` command to be run beforehand. It can be useful for testing or for environments that manage their own registries and Git servers completely outside of Zarf. Given this mode does not use the [Zarf Agent](../8-faq.md#what-is-the-zarf-agent) any resources specified will need to be manually modified for the environment. + +- **Cluster-less** - Zarf normally interacts with clusters and kubernetes resources, but it is possible to have Zarf perform actions before a cluster exists (including [deploying the cluster itself](../6-zarf-tutorials/5-creating-a-k8s-cluster-with-zarf.md)). These packages generally have more dependencies on the host or environment that they run within. + +## Additional Resources + +To learn more about deploying a Zarf package, you can check out the following resources: + +- [Getting Started with Zarf](../1-getting-started/index.md): A step-by-step guide to using Zarf to create and deploy packages. +- [Zarf CLI Documentation](../2-the-zarf-cli/index.md): A comprehensive guide to using the Zarf command-line interface. + +## Typical Deployment Workflow: + +The general flow of a Zarf package deployment on an existing initialized cluster is as follows: + +```shell +# To deploy a package run the following: +$ zarf package deploy +# - Find and select the package using tab (shows packages from the local system) +# - Review Supply Chain and other pre-deploy information (clicking on the link to view SBOMs) +# - Type "y" to confirm package deployment or "N" to cancel +# - Enter any variables that have not yet been defined +# - Select any optional components that you want to add to the deployment +# - Select any component groups for this deployment + +# Once the deployment finishes you can interact with the package +$ zarf connect [service name] +# - Your browser window should open to the service you selected +# - Not all packages define `zarf connect` services +# - You can list those that are available with `zarf connect list` +``` + +:::note + +You can also specify a package locally, or via oci or sget such as `zarf package deploy sget://defenseunicorns/zarf-hello-world:$(uname -m)` + +::: diff --git a/docs/4-deploy-a-zarf-package/2-package-deploy-lifecycle.md b/docs/4-deploy-a-zarf-package/2-package-deploy-lifecycle.md new file mode 100644 index 0000000000..3a55fc0b15 --- /dev/null +++ b/docs/4-deploy-a-zarf-package/2-package-deploy-lifecycle.md @@ -0,0 +1,46 @@ +# Package Deploy Lifecycle + +The following diagram shows the order of operations for the `zarf package deploy` command and the hook locations for [actions](../../examples/component-actions/README.md). + +## `zarf package deploy` + +```mermaid +graph TD + B1(load package archive)-->B2 + B2(handle multipart package)-->B3 + B3(extract archive to temp dir)-->B4 + B4(filter components by architecture & OS)-->B5 + B5(save SBOM files to current dir)-->B6 + B6(handle deprecations)-->B9 + B9(confirm package deploy):::prompt-->B10 + B10(process deploy-time variables)-->B11 + B11(prompt for missing variables)-->B12 + B12(prompt to confirm components)-->B13 + B13(prompt to choose components in '.group')-->B14 + + subgraph + B14(deploy each component)-->B14 + B14 --> B15(run each '.actions.onDeploy.before'):::action-->B15 + B15 --> B16(copy '.files')-->B17 + B17(load Zarf State)-->B18 + B18(push '.images')-->B19 + B19(push '.repos')-->B20 + B20(process '.dataInjections')-->B21 + B21(install '.charts')-->B22 + B22(apply '.manifests')-->B23 + B23(run each '.actions.onDeploy.after'):::action-->B23 + B23-->B24{Success?} + B24-->|Yes|B25(run each\n'.actions.onDeploy.success'):::action-->B25 + B24-->|No|B26(run each\n'.actions.onDeploy.failure'):::action-->B26-->B999 + + B999[Abort]:::fail + end + + B25-->B27(print Zarf connect table) + B27-->B28(save package data to cluster) + + + classDef prompt fill:#4adede,color:#000000 + classDef action fill:#bd93f9,color:#000000 + classDef fail fill:#aa0000 +``` diff --git a/docs/4-user-guide/2-zarf-packages/4-supported-packages.md b/docs/4-deploy-a-zarf-package/3-supported-packages.md similarity index 100% rename from docs/4-user-guide/2-zarf-packages/4-supported-packages.md rename to docs/4-deploy-a-zarf-package/3-supported-packages.md diff --git a/docs/4-deploy-a-zarf-package/_category_.json b/docs/4-deploy-a-zarf-package/_category_.json new file mode 100644 index 0000000000..8b608f4691 --- /dev/null +++ b/docs/4-deploy-a-zarf-package/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 4, + "label": "Deploy a Zarf Package" +} diff --git a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/_category_.json b/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/_category_.json deleted file mode 100644 index 24ee6d65d4..0000000000 --- a/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/_category_.json +++ /dev/null @@ -1 +0,0 @@ -{"label": "CLI Commands"} \ No newline at end of file diff --git a/docs/4-user-guide/1-the-zarf-cli/_category_.json b/docs/4-user-guide/1-the-zarf-cli/_category_.json deleted file mode 100644 index 424e2a1b7e..0000000000 --- a/docs/4-user-guide/1-the-zarf-cli/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "The Zarf CLI" - } - \ No newline at end of file diff --git a/docs/4-user-guide/2-zarf-packages/_category_.json b/docs/4-user-guide/2-zarf-packages/_category_.json deleted file mode 100644 index 7b356f3060..0000000000 --- a/docs/4-user-guide/2-zarf-packages/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Zarf Packages" - } - \ No newline at end of file diff --git a/docs/4-user-guide/2-zarf-packages/index.md b/docs/4-user-guide/2-zarf-packages/index.md deleted file mode 100644 index b9507a49af..0000000000 --- a/docs/4-user-guide/2-zarf-packages/index.md +++ /dev/null @@ -1,24 +0,0 @@ -# Zarf Packages - -## What is a Zarf Package? - -Zarf enables you to consolidate portions of the internet into a single package that can be conveniently installed at a later time by following specific instructions. A Zarf Package is a single tarball file that includes all of the essential elements required for efficiently managing a system or capability, even when entirely disconnected from the internet. In this context, a disconnected system refers to a system that either consistently operates in an offline mode or occasionally disconnects from the network. - -## How Does a Zarf Package Work? - -Zarf facilitates the installation or updating of software on a desired system through a single file, referred to as a package. This package contains comprehensive instructions on assembling various software components once deployed on the targeted system. The instructions are fully "declarative", meaning that all components are represented by code and automated, eliminating the need for manual intervention. Zarf significantly streamlines the process of installing, updating, and maintaining even the most intricate systems in disconnected environments. - -## Using Zarf Packages - -Zarf Packages are highly distributable, allowing for seamless operation in diverse environments, such as edge systems, embedded systems, secure cloud, data centers, or even local environments. This is especially beneficial for organizations requiring the integration and deployment of software from multiple, secure development environments across development teams into disconnected IT operational environments. With Zarf, development teams can seamlessly integrate with the production environment they are deploying to, even if they have no direct contact with said environment. - -## Dependencies for Deploying Zarf Packages - -The following is a list of dependencies necessary for deploying Zarf Packages: - -- A Zarf CLI ([downloaded](https://github.com/defenseunicorns/zarf/releases) or [manually built](../1-the-zarf-cli/1-building-your-own-cli.md)). -- A Zarf init package ([downloaded](https://github.com/defenseunicorns/zarf/releases) or [manually built](../1-the-zarf-cli/1-building-your-own-cli.md)). -- A Zarf Package (provided externally or [manually built](./1-zarf-packages.md#building-a-package)). -- kube-context into a K8s cluster. - - (Not needed if you plan on deploying the cluster with `zarf init` step). - diff --git a/docs/4-user-guide/4-package-command-lifecycle.md b/docs/4-user-guide/4-package-command-lifecycle.md deleted file mode 100644 index 355f870e14..0000000000 --- a/docs/4-user-guide/4-package-command-lifecycle.md +++ /dev/null @@ -1,98 +0,0 @@ -# Zarf Package Lifecycle - -The following diagrams show the order of operations for the `zarf package` commands and the hook locations for [actions](../../examples/component-actions/README.md). - -## `zarf package create` - -```mermaid -graph TD - A1(set working directory)-->A2 - A2(parse zarf.yaml)-->A3 - A3(filter components by architecture)-->A4 - A4(detect init package)-->A5 - A5(handle deprecations)-->A6 - A6(parse component imports)-->A7 - A7(process create-time variables)-->A8 - A8(write build data and zarf.yaml)-->A9 - - A9(run validations)-->A10 - A10(confirm package create):::prompt-->A11 - A11{Init package?} - A11 -->|Yes| A12(add seed image)-->A13 - A11 -->|No| A13 - - subgraph - A13(add each component)-->A13 - A13 --> A14(run each '.actions.onCreate.before'):::action-->A14 - A14 --> A15(load '.charts')-->A16 - A16(load '.files')-->A17 - A17(load '.dataInjections')-->A18 - A18(load '.manifests')-->A19 - A19(load '.repos')-->A20 - A20(run each '.actions.onCreate.after'):::action-->A20 - A20-->A21{Success?} - A21-->|Yes|A22(run each\n'.actions.onCreate.success'):::action-->A22 - A21-->|No|A23(run each\n'.actions.onCreate.failure'):::action-->A23-->A999 - end - - A22-->A24(load all '.images') - A24-->A25{Skip SBOM?} - A25-->|Yes|A27 - A25-->|No|A26 - A26(generate SBOM)-->A27 - A27(reset working directory)-->A28 - A28(create package archive)-->A29 - A29{Is multipart?} - A29-->|Yes|A30(split package archive)-->A31 - A29-->|No|A31 - A31(handle sbom view/out flags) - - A999[Abort]:::fail - - classDef prompt fill:#4adede,color:#000000 - classDef action fill:#bd93f9,color:#000000 - classDef fail fill:#aa0000 -``` - -## `zarf package deploy` - -```mermaid -graph TD - B1(load package archive)-->B2 - B2(handle multipart package)-->B3 - B3(extract archive to temp dir)-->B4 - B4(filter components by architecture & OS)-->B5 - B5(save SBOM files to current dir)-->B6 - B6(handle deprecations)-->B9 - B9(confirm package deploy):::prompt-->B10 - B10(process deploy-time variables)-->B11 - B11(prompt for missing variables)-->B12 - B12(prompt to confirm components)-->B13 - B13(prompt to choose components in '.group')-->B14 - - subgraph - B14(deploy each component)-->B14 - B14 --> B15(run each '.actions.onDeploy.before'):::action-->B15 - B15 --> B16(copy '.files')-->B17 - B17(load Zarf State)-->B18 - B18(push '.images')-->B19 - B19(push '.repos')-->B20 - B20(process '.dataInjections')-->B21 - B21(install '.charts')-->B22 - B22(apply '.manifests')-->B23 - B23(run each '.actions.onDeploy.after'):::action-->B23 - B23-->B24{Success?} - B24-->|Yes|B25(run each\n'.actions.onDeploy.success'):::action-->B25 - B24-->|No|B26(run each\n'.actions.onDeploy.failure'):::action-->B26-->B999 - - B999[Abort]:::fail - end - - B25-->B27(print Zarf connect table) - B27-->B28(save package data to cluster) - - - classDef prompt fill:#4adede,color:#000000 - classDef action fill:#bd93f9,color:#000000 - classDef fail fill:#aa0000 -``` diff --git a/docs/4-user-guide/_category_.json b/docs/4-user-guide/_category_.json deleted file mode 100644 index e5dcc382eb..0000000000 --- a/docs/4-user-guide/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "User Guide" - } - \ No newline at end of file diff --git a/docs/4-user-guide/index.md b/docs/4-user-guide/index.md deleted file mode 100644 index baecf4b253..0000000000 --- a/docs/4-user-guide/index.md +++ /dev/null @@ -1,88 +0,0 @@ -# User Guide - -Using Zarf optimizes the delivery of applications and capabilities in air-gapped and complex environments. This tool eliminates the complexity of air gap software delivery for Kubernetes clusters and cloud-native workloads using a declarative packaging strategy to support DevSecOps. This guide is intended for end users using Zarf to securely and efficiently deploy modern stacks onto remote/constrained/independent environments. - -The below list contains information on how to use and configure Zarf's major features: - -- Deploy Zarf [Packages](2-zarf-packages/1-zarf-packages.md) (Zpkg). -- Maintain Zarf Packages in the cluster. -- A reference of all [CLI commands](1-the-zarf-cli/100-cli-commands/zarf.md). -- Autogenerate and view a package SBOM. -- Add logging to your cluster. -- A list of [supported Zarf Packages](2-zarf-packages/1-zarf-packages.md). - -## Overview of Zarf Workflow - -### Create a Package - - - diagram showing the process to build a package - - -#### (0) Identify Software to be Packaged - -Zarf doesn't build software—it helps you distribute software that already exists. - -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/), and local filesystems. In order to do this, you must ensure that Zarf has a clear path and appropriate access credentials. Be sure you know what you want to pack and how to access it before you begin using Zarf. - -:::note - -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 - -To build a Zarf package, you will need to prepare: - -- A "packaging" workstation which must have the `zarf` [CLI tool installed](../3-getting-started/index.md#installing-zarf). - -- A `zarf.yaml` file which tells Zarf what you need to package. - -:::note - -For additional information and detailed uses of the `zarf.yaml` file, see [our examples](../../examples/) page. - -::: - -#### (2) Package - -Making a Zarf Package out of a `zarf.yaml` file is a matter of calling a single command: `zarf package create`. You will see a `zarf-package-*.tar.zst` file populate aftwerards—that's your package. - -:::note - -For more information you can call the CLI for help, or check out an example package build in [our game example](../../examples/dos-games#package-the-game). - -::: - -### Ship Package - - - diagram showing the process to ship a package - - -Shipping a Zarf Package is _very_ contextual to the target environment. Considering there are various target environments with their own appropriate transferring mechanisms, Zarf does not determine _how_ packages are moved so long as they can arrive in your downstream environment. Transfer Zarf Packages between production and operating locations using whatever mechanisms are appropriate for your mission. - -There are numerous methods to transport your Zarf Package, for example: - -- Burning your package onto a disk. -- Using a satellite uplink. -- Creating a direct internet connection. - -No matter the system complexity or internet connectivity, Zarf will work regardless. - -### Deploy Package - -Once your package has arrived, you will need to: - -1. Install the binary onto the system. -2. Run the zarf init package. -3. Deploy the package to your cluster. - -## 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 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 [Zarf Packages](./2-zarf-packages/index.md) page. -- To see some of the ways our community is using Zarf to deploy code onto air-gapped systems see the [Zarf Examples](../../examples/README.md). diff --git a/docs/7-dashboard-ui/1-sbom-dashboard.md b/docs/5-dashboard-ui/1-sbom-dashboard.md similarity index 100% rename from docs/7-dashboard-ui/1-sbom-dashboard.md rename to docs/5-dashboard-ui/1-sbom-dashboard.md diff --git a/docs/7-dashboard-ui/2-k9s-dashboard.md b/docs/5-dashboard-ui/2-k9s-dashboard.md similarity index 100% rename from docs/7-dashboard-ui/2-k9s-dashboard.md rename to docs/5-dashboard-ui/2-k9s-dashboard.md diff --git a/docs/7-dashboard-ui/3-Zarf-deployment-ui.md b/docs/5-dashboard-ui/3-zarf-deployment-ui.md similarity index 85% rename from docs/7-dashboard-ui/3-Zarf-deployment-ui.md rename to docs/5-dashboard-ui/3-zarf-deployment-ui.md index f541858a36..56a630ac90 100644 --- a/docs/7-dashboard-ui/3-Zarf-deployment-ui.md +++ b/docs/5-dashboard-ui/3-zarf-deployment-ui.md @@ -10,7 +10,7 @@ The Zarf Deployment Web UI can easily be spun up with a single command from the Follow these steps to get started using the Web UI -1. Step one: [Install the Zarf binary](/docs/3-getting-started/index.md) +1. Step one: [Install the Zarf binary](../1-getting-started/index.md#installing-zarf) 2. Step two: Open a terminal shell 3. Step three: Type in the following command: ```zarf dev UI``` @@ -98,17 +98,17 @@ Once a package is deployed into the cluster, the Web UI offers additional comman The web UI is packaged into the Zarf binary, so you don't have to worry about additional dependencies or trying to install it yourself! The Web UI is served through your machine's local browser, running on `localhost`, and utilizes the Zarf go binary as the backend. Use the Zarf Deployment UI to execute the existing Zarf CLI commands: -- [Zarf tools Kubectl top](/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_kubectl.md) -- [Zarf Init](/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_init.md) -- [Zarf Package Deploy](/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_deploy.md) -- [Zarf Package Remove](/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_remove.md) -- [Zarf Package List](/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_list.md) -- [Zarf Package Inspect](/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_inspect.md) (coming soon) -- [Zarf Tools Sbom](/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_tools_sbom.md) (Coming soon) -- [Zarf Connect](/docs/4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_connect.md) (coming soon) +- [Zarf tools Kubectl top](../2-the-zarf-cli/100-cli-commands/zarf_tools_kubectl.md) +- [Zarf Init](../2-the-zarf-cli/100-cli-commands/zarf_init.md) +- [Zarf Package Deploy](../2-the-zarf-cli/100-cli-commands/zarf_package_deploy.md) +- [Zarf Package Remove](../2-the-zarf-cli/100-cli-commands/zarf_package_remove.md) +- [Zarf Package List](../2-the-zarf-cli/100-cli-commands/zarf_package_list.md) +- [Zarf Package Inspect](../2-the-zarf-cli/100-cli-commands/zarf_package_inspect.md) (coming soon) +- [Zarf Tools Sbom](../2-the-zarf-cli/100-cli-commands/zarf_tools_sbom.md) (Coming soon) +- [Zarf Connect](../2-the-zarf-cli/100-cli-commands/zarf_connect.md) (coming soon) :::info -All other zarf [CLI commands](../4-user-guide/1-the-zarf-cli/index.md) will require interfacing with the CLI directly. +All other zarf [CLI commands](../2-the-zarf-cli/index.md) will require interfacing with the CLI directly. ::: diff --git a/docs/5-dashboard-ui/_category_.json b/docs/5-dashboard-ui/_category_.json new file mode 100644 index 0000000000..b0ba0f5a48 --- /dev/null +++ b/docs/5-dashboard-ui/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 5, + "label": "UI Dashboards" +} diff --git a/docs/6-contribute-to-zarf/_category_.json b/docs/6-contribute-to-zarf/_category_.json deleted file mode 100644 index 1fc92b801a..0000000000 --- a/docs/6-contribute-to-zarf/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Contribute to Zarf" - } - \ No newline at end of file diff --git a/docs/13-walkthroughs/0-using-zarf-package-create.md b/docs/6-zarf-tutorials/0-using-zarf-package-create.md similarity index 72% rename from docs/13-walkthroughs/0-using-zarf-package-create.md rename to docs/6-zarf-tutorials/0-using-zarf-package-create.md index 1d0cf89473..48a3d31924 100644 --- a/docs/13-walkthroughs/0-using-zarf-package-create.md +++ b/docs/6-zarf-tutorials/0-using-zarf-package-create.md @@ -1,6 +1,8 @@ # Using Zarf Package Create -In this walkthrough, we will demonstrate how to build a Zarf package with `zarf package create`. We will build 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 Helm OCI chart package. +## Introduction + +In this tutorial, we will demonstrate how to build a Zarf package with `zarf package create`. We will build two packages: the first will be the zarf init-package (which will be very useful for nearly every other tutorial) and the second will be a Helm OCI chart package. When creating a Zarf package, you must 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. @@ -8,15 +10,17 @@ When creating a Zarf package, you must have an Internet connection so that Zarf - You'll need an internet connection so Zarf can pull in anything required to build the package. -## Walkthrough Prerequisites +## Prerequisites + +Before beginning this tutorial you will need the following: - 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)) -- Zarf binary installed on your $PATH: ([install instructions](../3-getting-started/index.md#installing-zarf)) -- The [Docker CLI](https://docs.docker.com/desktop/) installed for building the [`zarf-agent`](../9-faq.md#what-is-the-zarf-agent) image. +- Zarf binary installed on your $PATH: ([Installing Zarf](../1-getting-started/index.md#installing-zarf)) +- The [Docker CLI](https://docs.docker.com/desktop/) installed for building the [`zarf-agent`](../8-faq.md#what-is-the-zarf-agent) image. ## Building the init-package -Creating zarf packages is a simple process you can complete with 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. You can find more information about Zarf packages on the [Zarf Packages](../4-user-guide/2-zarf-packages/1-zarf-packages.md) page. +Creating zarf packages is a simple process you can complete with a single command; [`zarf package create`](../2-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. You can find more information about Zarf packages on the [Zarf Packages](../3-create-a-zarf-package/1-zarf-packages.md) page. ```bash cd zarf # Enter the zarf repository that you have cloned down @@ -29,7 +33,7 @@ This set of commands will create a Zarf package in the current directory. In thi 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`. - + :::info You can skip this confirmation by adding the `--confirm` flag when running the command. This will look like: `zarf package create . --confirm` @@ -37,12 +41,11 @@ You can skip this confirmation by adding the `--confirm` flag when running the c After you confirm package creation, you have the option to specify a maximum file size for the package. To disable this feature, enter `0`. - + Once you enter your response for the package size, the output that follows will show the package being created. - - + Congratulations! You've just created your first Zarf package! @@ -64,7 +67,7 @@ Congratulations! You've built the Helm OCI chart package. Now, let's [deploy it] #### Example - + #### Remediation diff --git a/docs/13-walkthroughs/1-initializing-a-k8s-cluster.md b/docs/6-zarf-tutorials/1-initializing-a-k8s-cluster.md similarity index 53% rename from docs/13-walkthroughs/1-initializing-a-k8s-cluster.md rename to docs/6-zarf-tutorials/1-initializing-a-k8s-cluster.md index a4baa2d4d1..93a16eadd7 100644 --- a/docs/13-walkthroughs/1-initializing-a-k8s-cluster.md +++ b/docs/6-zarf-tutorials/1-initializing-a-k8s-cluster.md @@ -1,15 +1,19 @@ # Initializing a K8s Cluster -In this walkthrough, we will demonstrate how to initialize Zarf onto a K8s cluster. This is done by running the [`zarf init`](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_init.md) command, which uses a specialized package called an 'init-package'. More information about this specific package can be found [here](../4-user-guide/2-zarf-packages/3-the-zarf-init-package.md). +## Introduction + +In this tutorial, we will demonstrate how to initialize Zarf onto a K8s cluster. This is done by running the [`zarf init`](../2-the-zarf-cli/100-cli-commands/zarf_init.md) command, which uses a specialized package called an 'init-package'. More information about this specific package can be found [here](../3-create-a-zarf-package/3-the-zarf-init-package.md). ## Prerequisites +Before beginning this tutorial you will need the following: + - 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)) -- Zarf binary installed on your $PATH: ([Install Instructions](../3-getting-started/index.md#installing-zarf)) +- Zarf binary installed on your $PATH: ([Installing Zarf](../1-getting-started/index.md#installing-zarf)) - An init-package built/downloaded: ([init-package Build Instructions](./0-using-zarf-package-create.md)) or ([Download Location](https://github.com/defenseunicorns/zarf/releases)) - A Kubernetes cluster to work with: ([Local k8s Cluster Instructions](./#setting-up-a-local-kubernetes-cluster)) -## Walkthrough +## Initializing the Cluster 1. Run the `zarf init` command on your cluster. @@ -22,9 +26,9 @@ $ zarf init 3. Decline Optional Components :::info -More information about the init-package and its components can be found [here](../4-user-guide/2-zarf-packages/3-the-zarf-init-package.md) +More information about the init-package and its components can be found [here](../3-create-a-zarf-package/3-the-zarf-init-package.md) ::: - + :::note You will only be prompted to deploy the k3s component if you are on a Linux machine @@ -38,12 +42,12 @@ zarf tools monitor # Note you can press `0` if you want to see all namespaces and CTRL-C to exit ``` -![Zarf Tools Monitor](../.images/walkthroughs/zarf_tools_monitor.png) +![Zarf Tools Monitor](../.images/tutorials/zarf_tools_monitor.png) ## Cleaning Up -The [`zarf destroy`](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_destroy.md) command will remove all of the resources that were created by the initialization command. This command will leave you with a clean cluster that you can either destroy or use for another walkthrough. +The [`zarf destroy`](../2-the-zarf-cli/100-cli-commands/zarf_destroy.md) command will remove all of the resources that were created by the initialization command. This command will leave you with a clean cluster that you can either destroy or use for another tutorial. ```sh zarf destroy --confirm -``` \ No newline at end of file +``` diff --git a/docs/13-walkthroughs/2-deploying-zarf-packages.md b/docs/6-zarf-tutorials/2-deploying-zarf-packages.md similarity index 55% rename from docs/13-walkthroughs/2-deploying-zarf-packages.md rename to docs/6-zarf-tutorials/2-deploying-zarf-packages.md index e0e591a843..f8997345b3 100644 --- a/docs/13-walkthroughs/2-deploying-zarf-packages.md +++ b/docs/6-zarf-tutorials/2-deploying-zarf-packages.md @@ -1,8 +1,8 @@ -# Deploying Zarf Packages +# Deploying Local Zarf Packages ## Introduction -In this walkthrough, we are going to deploy the Helm OCI chart package 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. +In this tutorial, we are going to deploy the Helm OCI chart package onto your cluster using the local package we created in the earlier [create a package](./0-using-zarf-package-create.md) tutorial and the cluster we initialized in the [initialize a k8s cluster](./1-initializing-a-k8s-cluster.md) tutorial. We will be leveraging that past work and then go the extra step of deploying an application onto our cluster with the `zarf package deploy` command. ## System Requirements @@ -10,14 +10,15 @@ In this walkthrough, we are going to deploy the Helm OCI chart package onto your ## Prerequisites -Prior to this walkthrough you'll want to have a working cluster with Zarf initialized -1. Zarf binary installed on your $PATH: ([Installing Zarf](../3-getting-started/index.md#installing-zarf)) -2. [An initialized cluster](./1-initializing-a-k8s-cluster.md) -3. The [Helm OCI chart package created](./0-using-zarf-package-create.md) +Prior to this tutorial you'll want to have a working cluster with Zarf initialized. + +- Zarf binary installed on your $PATH: ([Installing Zarf](../1-getting-started/index.md#installing-zarf)) +- [An initialized cluster](./1-initializing-a-k8s-cluster.md) +- The [Helm OCI chart package created](./0-using-zarf-package-create.md) ## Deploying the Helm OCI chart package -1. Navigate to the folder when you created the package in a previous walkthrough. (see [prerequisites](#prerequisites)) +1. Navigate to the folder when you created the package in a previous tutorial. (see [prerequisites](#prerequisites)) ```sh $ cd src/github.com/defenseunicorns/zarf/examples/helm-oci-chart @@ -25,40 +26,42 @@ $ cd src/github.com/defenseunicorns/zarf/examples/helm-oci-chart 2. Use the `zarf package deploy` command to deploy the package. - + 3. If you do 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. You can use the `tab` key, to be prompted for avaiable packages in the current working directory. - -By hitting 'tab', you can use the arrow keys to select which package you want to deploy. Since we are deploying the Helm OCI chart package in this walkthrough, we will select that package and hit 'enter'. + + +By hitting 'tab', you can use the arrow keys to select which package you want to deploy. Since we are deploying the Helm OCI chart package in this tutorial, we will select that package and hit 'enter'. + + - As we have seen a few times now, we are going to be prompted with a confirmation dialog asking us to confirm that we want to deploy this package onto our cluster. - + 4. If you did not use the `--confirm` flag to automatically confirm that you want to install this package, press `y` for yes. Then hit the `enter` key. - + 5. Confirm the deployment by running `zarf tools monitor`. Once confirmed, hit `ctrl/control c` to exit. -![Zarf Tools Monitor](../.images/walkthroughs/zarf_tools_monitor.png) +![Zarf Tools Monitor](../.images/tutorials/zarf_tools_monitor.png) ## Removal 1. Use the `zarf package list` command to get a list of the installed packages. This will give you the name of the Helm OCI chart package to remove it. - + 2. Use the `zarf package remove` command to remove the `helm-oci-chart` package. Don't forget the `--confirm` flag. Otherwise you'll receive an error. - + 3. You can also use the `zarf package remove` command with the zarf package file, to remove the package. Again, don't forget the `--confirm` flag. - + The helm-oci-chart package has now been removed from your cluster. @@ -68,7 +71,7 @@ The helm-oci-chart package has now been removed from your cluster. #### Example - + #### Remediation @@ -78,8 +81,8 @@ If you receive this error, either you don't have a Kubernetes cluster, your clus If you need to setup a cluster, you can perform the following. -1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) walkthrough. -2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) walkthrough. +1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) tutorial. +2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial. After that you can try deploying the package again. @@ -87,8 +90,8 @@ After that you can try deploying the package again. #### Example - + #### Remediation -If you receive this error when zarf is attempting to deploy a package, this means you have not initialized the kubernetes cluster. This is one of the prerequisites for this walkthrough. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) walkthrough, then try again. +If you receive this error when zarf is attempting to deploy a package, this means you have not initialized the kubernetes cluster. This is one of the prerequisites for this tutorial. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial, then try again. diff --git a/docs/6-zarf-tutorials/3-deploy-a-retro-arcade.md b/docs/6-zarf-tutorials/3-deploy-a-retro-arcade.md new file mode 100644 index 0000000000..e1e56d2c85 --- /dev/null +++ b/docs/6-zarf-tutorials/3-deploy-a-retro-arcade.md @@ -0,0 +1,119 @@ +# Deploying a Retro Arcade + +## Introduction + +In previous tutorials, we learned how to [create a package](./0-using-zarf-package-create.md), [initialize a cluster](./1-initializing-a-k8s-cluster.md), and [deploy a package](./2-deploying-zarf-packages.md). In this tutorial, we will leverage all that past work and deploy a fun application onto your cluster. + +## System Requirements + +- You'll need an internet connection to grab the Zarf source code that includes the games example. + +## Prerequisites + +Before beginning this tutorial you will need the following: + +- 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)) +- Zarf binary installed on your $PATH: ([Installing Zarf](../1-getting-started/index.md#installing-zarf)) +- [An initialized cluster](./1-initializing-a-k8s-cluster.md) + +## YouTube Tutorial +[![Deploying Packages with Zarf Video on YouTube](../.images/tutorials/package_deploy_thumbnail.jpg)](https://youtu.be/7hDK4ew_bTo "Deploying Packages with Zarf") + +## Deploying the Arcade + + + +1. The `dos-games` package is easily deployable via `sget://` by running `zarf package deploy sget://defenseunicorns/zarf-hello-world:$(uname -m)`. + +:::tip + +You can publish your own packages for deployment too via `oci://`. See the [Store and Deploy Packages with OCI](./7-publish-and-deploy.md) tutorial for more information. + +::: + + + +2. If you do not provide the path to the package as an argument to the `zarf package deploy` command, Zarf will prompt you to choose which package you want to deploy. + + + +You can list all packages in the current directory by hitting `tab`. Then, use the arrow keys to select which package you want to deploy. If there is only one package available, hitting `tab` will autofill that one option. Since we are deploying the games package in this tutorial, we will select that package and hit `enter`. + + +As we have seen a few times now, we are going to be prompted to confirm that we want to deploy this package onto our cluster. + + + +3. If you did not use the `--confirm` flag to automatically confirm that you want to deploy this package, press `y` for yes. Then hit the `enter` key. + + + +### 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 to the application we just deployed into the cluster, using the `zarf connect` command. + + + +![Connected to the Games](../.images/tutorials/games_connected.png) + +:::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 +The `zarf connect games` will continue running in the background until you close the connection by pressing the `ctrl + c` (`control + c` on a mac) in your terminal to terminate the process. +::: + +## Removal + +1. Use the `zarf package list` command to get a list of the installed packages. This will give you the name of the games package to remove it. + + + +2. Use the `zarf package remove` command to remove the `dos-games` package. Don't forget the `--confirm` flag. Otherwise you'll receive an error. + + + +3. You can also use the `zarf package remove` command with the zarf package file, to remove the package. Again don't forget the `--confirm` flag. + + + +The dos-games package has now been removed from your cluster. + +## Troubleshooting + +### Unable to connect to the Kubernetes cluster + +#### Example + + + +#### Remediation + +If you receive this error, either you don't have a Kubernetes cluster, your cluster is down, or your cluster is unreachable. + +1. Check your kubectl configuration, then try again. For more information about kubectl configuration see [Configure Access to Multiple Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) from the Kubernetes documentation. + +If you need to setup a cluster, you can perform the following. + +1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) tutorial. +2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial. + +After that you can try deploying the package again. + +### Secrets "zarf-state" not found + +#### Example + + + +#### Remediation + +If you receive this error when zarf is attempting to deploy the `BASELINE COMPONENT`, this means you have not initialized the kubernetes cluster. This is one of the prerequisites for this tutorial. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial, then try again. + +## Credits + +:sparkles: Special thanks to these fine references! :sparkles: + +- +- diff --git a/docs/13-walkthroughs/4-add-logging.md b/docs/6-zarf-tutorials/4-add-logging.md similarity index 63% rename from docs/13-walkthroughs/4-add-logging.md rename to docs/6-zarf-tutorials/4-add-logging.md index d21d171253..755093d8be 100644 --- a/docs/13-walkthroughs/4-add-logging.md +++ b/docs/6-zarf-tutorials/4-add-logging.md @@ -2,9 +2,9 @@ ## Introduction -In this walkthrough, we are going to show how you can use a Zarf component to inject zero-config, centralized logging into your Zarf cluster. +In this tutorial, we are going to show how you can use a Zarf component to inject zero-config, centralized logging into your Zarf cluster. -More specifically, you'll be adding a [Promtail / Loki / Grafana (PLG)](https://github.com/grafana/loki) stack to the [Retro Arcade Walkthrough](./3-deploy-a-retro-arcade.md) by installing Zarf's "logging" component. +More specifically, you'll be adding a [Promtail / Loki / Grafana (PLG)](https://github.com/grafana/loki) stack to the [Retro Arcade Tutorial](./3-deploy-a-retro-arcade.md) by installing Zarf's "logging" component. ## System Requirements @@ -12,13 +12,16 @@ More specifically, you'll be adding a [Promtail / Loki / Grafana (PLG)](https:// ## Prerequisites -Prior to this walkthrough you'll want to have a working cluster with Zarf initialized -1. Zarf binary installed on your $PATH: ([Installing Zarf](../3-getting-started/index.md#installing-zarf)) -2. [Initialize a cluster](./1-initializing-a-k8s-cluster.md). -3. Perform the [Retro Arcade Walkthrough](./3-deploy-a-retro-arcade.md). +Prior to this tutorial you'll want to have a working cluster with Zarf initialized. -## Walkthrough -[![Walkthrough: Add Logging to an existing Zarf Cluster with Zarf Init](../.images/walkthroughs/logging_thumbnail.png)](https://youtu.be/FYkafs1idlQ "Add Logging to an existing Zarf Cluster with Zarf Init") +- Zarf binary installed on your $PATH: ([Installing Zarf](../1-getting-started/index.md#installing-zarf)) +- [Initialize a cluster](./1-initializing-a-k8s-cluster.md). +- Perform the [Retro Arcade Tutorial](./3-deploy-a-retro-arcade.md). + +## Youtube Tutorial +[![Tutorial: Add Logging to an existing Zarf Cluster with Zarf Init](../.images/tutorials/logging_thumbnail.png)](https://youtu.be/FYkafs1idlQ "Add Logging to an existing Zarf Cluster with Zarf Init") + +## Installing the Logging Component 1. Run the `zarf init` command on your cluster. @@ -29,24 +32,25 @@ $ zarf init 2. When prompted to deploy the package select `y` for Yes, then hit the `enter` key.
When prompted to deploy the logging component select `y` for Yes, then hit the `enter` key. - + 4. You can automatically accept the logging component, and confirm the package using the `--confirm` and `--components` flags. - + ### Connecting to the Logging Component #### Note the Credentials 1. Review the `zarf init` command output for the following: - + + You should see a section for `Logging`. You will need these credentials later on. -## Deploy the Retro Arcade Walkthrough +## Deploy the Retro Arcade Tutorial -1. If you haven't already in the prerequisites, deploy the [Retro Arcade Walkthrough](./3-deploy-a-retro-arcade.md). +1. If you haven't already in the prerequisites, deploy the [Retro Arcade Tutorial](./3-deploy-a-retro-arcade.md). ## Check the logs @@ -63,30 +67,29 @@ To open Grafana you can use the `zarf connect logging` command. You'll be redirected the `/login` page where you have to sign in with the Grafana credentials you saved [in a previous step](#note-the-credentials). -![zarf user logging into Loki](../.images/walkthroughs/logging_login.png) +![zarf user logging into Loki](../.images/tutorials/logging_login.png) Once you've successfully logged in go to: 1. The "Explore" page (Button on the left that looks like a compass) - 2. Select `Loki` in the dropdown, and then 3. Enter `{app="game"}` into the Log Browser query input field -![zarf user typing {app='game'} into the Loki Log Browser](../.images/walkthroughs/logging_query.png) +![zarf user typing {app='game'} into the Loki Log Browser](../.images/tutorials/logging_query.png) Submit that query and you'll get back a dump of all the game pod logs that Loki has collected. -![Loki query results](../.images/walkthroughs/logging_logs.png) +![Loki query results](../.images/tutorials/logging_logs.png) ## Removal 1. Use the `zarf package list` command to get a list of the installed packages and their components. This will give you the name of the init package and the logging component to remove it. - + 2. Use the `zarf package remove` command to remove the `logging` component from the init package. Don't forget the `--confirm` flag. Otherwise you'll receive an error. - + ## Troubleshooting @@ -95,7 +98,7 @@ Submit that query and you'll get back a dump of all the game pod logs that Loki #### Example - + #### Remediation @@ -105,7 +108,7 @@ If you receive this error, either you don't have a Kubernetes cluster, your clus If you need to setup a cluster, you can perform the following. -1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) walkthrough. -2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) walkthrough. +1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) tutorial. +2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial. After that you can try deploying the package again. diff --git a/docs/13-walkthroughs/5-creating-a-k8s-cluster-with-zarf.md b/docs/6-zarf-tutorials/5-creating-a-k8s-cluster-with-zarf.md similarity index 75% rename from docs/13-walkthroughs/5-creating-a-k8s-cluster-with-zarf.md rename to docs/6-zarf-tutorials/5-creating-a-k8s-cluster-with-zarf.md index acd8afb56b..cc67f673b3 100644 --- a/docs/13-walkthroughs/5-creating-a-k8s-cluster-with-zarf.md +++ b/docs/6-zarf-tutorials/5-creating-a-k8s-cluster-with-zarf.md @@ -1,8 +1,9 @@ # Creating a K8s Cluster with Zarf -In this walkthrough, we will demonstrate how to use Zarf on a fresh Linux machine to deploy a [k3s](https://k3s.io/) cluster through Zarf's `k3s` component. +In this tutorial, we will demonstrate how to use Zarf on a fresh Linux machine to deploy a [k3s](https://k3s.io/) cluster through Zarf's `k3s` component. ## System Requirements + - `root` access on a Linux machine :::info REQUIRES ROOT @@ -10,11 +11,14 @@ The 'k3s' component requires root access (not just `sudo`!) when deploying as it ::: ## Prerequisites + +Before beginning this tutorial you will need the following: + - 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)) -- Zarf binary installed on your $PATH: ([Install Instructions](../3-getting-started/index.md#installing-zarf)) +- Zarf binary installed on your $PATH: ([Installing Zarf](../1-getting-started/index.md#installing-zarf)) - An init-package built/downloaded: ([init-package Build Instructions](./0-using-zarf-package-create.md)) or ([Download Location](https://github.com/defenseunicorns/zarf/releases)) -## Walkthrough +## Creating the Cluster 1. Run the `zarf init` command as `root`. @@ -28,7 +32,7 @@ The 'k3s' component requires root access (not just `sudo`!) when deploying as it 3. Confirm k3s Component Deployment:
- When prompted to deploy the k3s component select `y` for Yes, then hit the `enter` key. - + :::tip You can automatically accept the k3s component and confirm the package using the `--components` and `--confirm` flags. @@ -59,7 +63,7 @@ By default, the k3s component will only automatically provide cluster access to ## Cleaning Up -The [`zarf destroy`](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_destroy.md) command will remove all of the resources, including the k3s cluster, that was created by the initialization command. +The [`zarf destroy`](../2-the-zarf-cli/100-cli-commands/zarf_destroy.md) command will remove all of the resources, including the k3s cluster, that was created by the initialization command. ```sh zarf destroy --confirm diff --git a/docs/13-walkthroughs/6-big-bang.md b/docs/6-zarf-tutorials/6-big-bang.md similarity index 84% rename from docs/13-walkthroughs/6-big-bang.md rename to docs/6-zarf-tutorials/6-big-bang.md index bc6b67f332..3d4c8755c6 100644 --- a/docs/13-walkthroughs/6-big-bang.md +++ b/docs/6-zarf-tutorials/6-big-bang.md @@ -2,7 +2,7 @@ ## Introduction -This walkthrough describes how to use Big Bang with Zarf for Air Gap deployments through the use of the Big Bang Zarf extension. If you are not familiar with Big Bang you can learn more about it here: https://p1.dso.mil/products/big-bang, but in short it is a DevSecOps platform that contains many useful tools for building, managing, and running software projects while adhering to the [United States Department of Defense DevSecOps Reference Design](https://public.cyber.mil/devsecops/). +This tutorial describes how to use Big Bang with Zarf for Air Gap deployments through the use of the Big Bang Zarf extension. If you are not familiar with Big Bang you can learn more about it here: https://p1.dso.mil/products/big-bang, but in short it is a DevSecOps platform that contains many useful tools for building, managing, and running software projects while adhering to the [United States Department of Defense DevSecOps Reference Design](https://public.cyber.mil/devsecops/). Zarf integrates with Big Bang through the use of an extension that simplifies the selection of Big Bang packages and the pulling of the required artifacts to deploy those packages in an Air Gap. @@ -23,18 +23,17 @@ components: ## System Requirements -Big Bang requires a reasonably powerful `amd64` system that scales up with the number of components deployed. We recommend at least `32 GB` of RAM and a high-speed internet connection to complete this walkthrough. +Big Bang requires a reasonably powerful `amd64` system that scales up with the number of components deployed. We recommend at least `32 GB` of RAM and a high-speed internet connection to complete this tutorial. To learn more about Big Bang's requirements in general, see their documentation: https://docs-bigbang.dso.mil/latest/docs/prerequisites/minimum-hardware-requirements/ -## Pre-requisites +## Prerequisites -Before beginning this walkthrough you will need the following: +Before beginning this tutorial you will need the following: - A local copy of the Zarf repository - `git clone https://github.com/defenseunicorns/zarf.git` - A kubernetes cluster onto which you can deploy Zarf and Big Bang - - Follow steps 3 through 5 of the [Big Bang Quick Start](https://docs-bigbang.dso.mil/1.54.0/docs/guides/deployment-scenarios/quickstart/) to setup `docker` and a `k3d` cluster. - The latest version of the Zarf `cli` - Follow instructions on https://zarf.dev/install/ - An account on `https://registry1.dso.mil` to retrieve Big Bang images @@ -42,9 +41,10 @@ Before beginning this walkthrough you will need the following: :::note -Big Bang requires some additional [configuration options](https://docs-bigbang.dso.mil/1.54.0/docs/guides/deployment-scenarios/quickstart/#Explanation-of-k3d-Command-Flags-Relevant-to-the-Quick-Start) to be passed to `k3d` than is required in most other Zarf walkthroughs. Below are some examples: +If you followed the [Setting Up a Local Kubernetes Cluster](./index.md#setting-up-a-local-kubernetes-cluster) instructions for other Zarf tutorials, you will need to pass additional command flags to `k3d` for it to work with Big Bang. See the below to create a working cluster: ```bash +k3d cluster create # Required by the PLG stack --volume /etc/machine-id:/etc/machine-id @@ -58,7 +58,7 @@ Big Bang requires some additional [configuration options](https://docs-bigbang.d --api-port 6443 ``` -If you tweak the packages that are deployed there may be other configuration options you need to specify, please refer to the [Big Bang documentation](https://docs-bigbang.dso.mil/1.54.0/docs/) for more details. +If you tweak the packages that are deployed there may be other configuration options you need to specify, please refer to the [Big Bang documentation](https://docs-bigbang.dso.mil/latest/) for more details. ::: @@ -83,7 +83,7 @@ Now navigate to the `examples/big-bang` folder within the Zarf repository you cl ### Configure Big Bang -Within the `examples/big-bang` folder you will see a `zarf.yaml` that has the following [component](../4-user-guide/2-zarf-packages/2-zarf-components.md) defined: +Within the `examples/big-bang` folder you will see a `zarf.yaml` that has the following [component](../3-create-a-zarf-package/2-zarf-components.md) defined: ```yaml components: @@ -193,7 +193,7 @@ zarf tools k9s ## Package Removal -The Big Bang package is not fully integrated into the Zarf package remove lifecycle (see [known issues](#known-issues)), but for the purposes of this walkthrough you can simply remove your k3d cluster: +The Big Bang package is not fully integrated into the Zarf package remove lifecycle (see [known issues](#known-issues)), but for the purposes of this tutorial you can simply remove your k3d cluster: ```bash k3d cluster delete diff --git a/docs/13-walkthroughs/7-publish-and-deploy.md b/docs/6-zarf-tutorials/7-publish-and-deploy.md similarity index 50% rename from docs/13-walkthroughs/7-publish-and-deploy.md rename to docs/6-zarf-tutorials/7-publish-and-deploy.md index 29b9e97b97..2f981e0ace 100644 --- a/docs/13-walkthroughs/7-publish-and-deploy.md +++ b/docs/6-zarf-tutorials/7-publish-and-deploy.md @@ -1,39 +1,40 @@ -# Using OCI to Store & Deploy Zarf Packages +# Store & Deploy Packages with OCI ## Introduction -In this walkthrough, we are going to run through how to publish a Zarf package to an [OCI](https://github.com/opencontainers/image-spec) compliant registry, allowing end users to pull and deploy packages without needing to build locally, or transfer the package to their environment. +In this tutorial, we are going to run through how to publish a Zarf package to an [OCI](https://github.com/opencontainers/image-spec) compliant registry, allowing end users to pull and deploy packages without needing to build locally, or transfer the package to their environment. ## System Requirements - Internet access to download resources or upload packages -- Access to a registry (this walkthrough uses Docker Hub) +- Access to a registry (this tutorial uses Docker Hub) ## Prerequisites For following along locally, please ensure the following prerequisites are met: -1. Zarf binary installed on your `$PATH`: ([Install Instructions](../3-getting-started/index.md#installing-zarf)) -2. Access to a [Registry supporting the OCI Distribution Spec](https://oras.land/implementors/#registries-supporting-oci-artifacts), this walkthrough will be using Docker Hub -3. Access to a cluster that has been [initialized with zarf](./1-initializing-a-k8s-cluster.md). +- Zarf binary installed on your `$PATH`: ([Installing Zarf](../1-getting-started/index.md#installing-zarf)) +- Access to a [Registry supporting the OCI Distribution Spec](https://oras.land/implementors/#registries-supporting-oci-artifacts), this tutorial will be using Docker Hub +- Access to a cluster that has been [initialized with zarf](./1-initializing-a-k8s-cluster.md). -## Setup +## Youtube Tutorial +[![Using OCI to Store & Deploy Zarf Packages Video on YouTube](../.images/tutorials/publish_and_deploy_thumbnail.png)](https://www.youtube.com/watch?v=QKxgJnC_37Y "Using OCI to Store & Deploy Zarf Packages") -[![Using OCI to Store & Deploy Zarf Packages Video on YouTube](../.images/walkthroughs/publish_and_deploy_thumbnail.png)](https://www.youtube.com/watch?v=QKxgJnC_37Y "Using OCI to Store & Deploy Zarf Packages") +## Working with OCI Packages -This walkthrough will require a registry to be configured (see [prerequisites](#prerequisites) for more information). The below sets up some variables for us to use when logging into the registry: +This tutorial will require a registry to be configured (see [prerequisites](#prerequisites) for more information). The below sets up some variables for us to use when logging into the registry: - + With those set, you can tell Zarf to login to your registry with the following: - + :::note If you do not have the Docker CLI installed, you may need to create a Docker compliant auth config file manually: - + ::: @@ -41,14 +42,14 @@ If you do not have the Docker CLI installed, you may need to create a Docker com First, create a valid Zarf package definition (`zarf.yaml`), with the `metadata.version` key set. - + Create the package locally: -[CLI Reference](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_create.md) +[CLI Reference](../2-the-zarf-cli/100-cli-commands/zarf_package_create.md) - + Then publish the package to the registry: @@ -58,9 +59,9 @@ Your package tarball may be named differently based on your machine's architectu ::: -[CLI Reference](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_publish.md) +[CLI Reference](../2-the-zarf-cli/100-cli-commands/zarf_package_publish.md) - + :::note @@ -72,39 +73,39 @@ To modify, edit `zarf.yaml` and re-run `zarf package create .` ### Inspect Package -[CLI Reference](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_inspect.md) +[CLI Reference](../2-the-zarf-cli/100-cli-commands/zarf_package_inspect.md) Inspecting a Zarf package stored in an OCI registry is the same as inspecting a local package and has the same flags: - + ### Deploy Package -[CLI Reference](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_deploy.md) +[CLI Reference](../2-the-zarf-cli/100-cli-commands/zarf_package_deploy.md) Deploying a package stored in an OCI registry is nearly the same experience as deploying a local package: - + ### Pull Package -[CLI Reference](../4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_pull.md) +[CLI Reference](../2-the-zarf-cli/100-cli-commands/zarf_package_pull.md) Packages can be saved to the local disk in order to deploy a package multiple times without needing to fetch it every time. - + ## Removal 1. Use the `zarf package list` command to get a list of the installed packages. This will give you the name of the games package to remove it. - + 2. Use the `zarf package remove` command to remove the `helm-oci-chart` package. Don't forget the `--confirm` flag. Otherwise you'll receive an error. - + ## Troubleshooting @@ -112,13 +113,13 @@ Packages can be saved to the local disk in order to deploy a package multiple ti #### Example - + #### Remediation You attempted to publish a package with no version metadata. - + 1. Open the zarf.yaml file. 2. Add a version attribute to the [package metadata](https://docs.zarf.dev/docs/user-guide/zarf-schema#metadata) @@ -129,7 +130,7 @@ You attempted to publish a package with no version metadata. #### Example - + #### Remediation @@ -141,7 +142,7 @@ You attempted to publish a package to an insecure registry, using http instead o #### Example - + #### Remediation @@ -151,8 +152,8 @@ If you receive this error, either you don't have a Kubernetes cluster, your clus If you need to setup a cluster, you can perform the following. -1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) walkthrough. -2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) walkthrough. +1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) tutorial. +2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial. After that you can try deploying the package again. @@ -160,8 +161,8 @@ After that you can try deploying the package again. #### Example - + #### Remediation -If you receive this error when zarf is attempting to deploy any component, this means you have not initialized the kubernetes cluster. This is one of the prerequisites for this walkthrough. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) walkthrough, then try again. +If you receive this error when zarf is attempting to deploy any component, this means you have not initialized the kubernetes cluster. This is one of the prerequisites for this tutorial. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial, then try again. diff --git a/docs/6-zarf-tutorials/_category_.json b/docs/6-zarf-tutorials/_category_.json new file mode 100644 index 0000000000..78e8d1dd09 --- /dev/null +++ b/docs/6-zarf-tutorials/_category_.json @@ -0,0 +1,4 @@ +{ + "position": 6, + "label": "Zarf Tutorials" +} diff --git a/docs/13-walkthroughs/index.md b/docs/6-zarf-tutorials/index.md similarity index 52% rename from docs/13-walkthroughs/index.md rename to docs/6-zarf-tutorials/index.md index ac042459eb..8317cfcd73 100644 --- a/docs/13-walkthroughs/index.md +++ b/docs/6-zarf-tutorials/index.md @@ -1,19 +1,19 @@ -# Walkthroughs +# Zarf Tutorials -This section of the documentation has a collection of walkthroughs that will help you get more familiar with Zarf and its features. The walkthroughs assume that you have a very basic understanding of what Zarf is and aims to help expand your working knowledge of how to use Zarf and what Zarf is capable of doing. +This section of the documentation has a collection of tutorials that will help you get more familiar with Zarf and its features. The tutorials assume that you have a very basic understanding of what Zarf is and aims to help expand your working knowledge of how to use Zarf and what Zarf is capable of doing. -## Walk Through Prerequisites -If a walkthrough has any prerequisites, they will be listed at the beginning of the walkthrough with instructions on how to fulfill them. -Almost all walkthroughs will have the following prerequisites/assumptions: +## Tutorial Prerequisites +If a tutorial has any prerequisites, they will be listed at the beginning of the tutorial with instructions on how to fulfill them. +Almost all tutorials will have the following prerequisites/assumptions: 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. You have a Zarf binary installed on your $PATH: ([Zarf Install Instructions](../3-getting-started/index.md#installing-zarf)) +1. You have a Zarf binary installed on your $PATH: ([Installing Zarf](../1-getting-started/index.md#installing-zarf)) 1. You have an init-package built/downloaded: ([init-package Build Instructions](./0-using-zarf-package-create.md)) or ([Download Location](https://github.com/defenseunicorns/zarf/releases)) 1. Have a kubernetes cluster running/available (ex. [k3s](https://k3s.io/)/[k3d](https://k3d.io/v5.4.1/)/[Kind](https://kind.sigs.k8s.io/docs/user/quick-start#installation)) ## Setting Up a Local Kubernetes Cluster -While Zarf is able to deploy a local k3s Kubernetes cluster for you, (as you'll find out more in the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) walkthrough), that k3s cluster will only work if you are on a root user on a Linux machine. If you are on a Mac, or you're on Linux but don't have root access, you'll need to set up a local dockerized Kubernetes cluster manually. We provide instructions on how to quickly set up a local k3d cluster that you can use for the majority of the walkthroughs. +While Zarf is able to deploy a local k3s Kubernetes cluster for you, (as you'll find out more in the [Creating a K8s Cluster with Zarf](./5-creating-a-k8s-cluster-with-zarf.md) tutorial), that k3s cluster will only work if you are on a root user on a Linux machine. If you are on a Mac, or you're on Linux but don't have root access, you'll need to set up a local dockerized Kubernetes cluster manually. We provide instructions on how to quickly set up a local k3d cluster that you can use for the majority of the tutorials. ### Install k3d diff --git a/docs/7-dashboard-ui/_category_.json b/docs/7-dashboard-ui/_category_.json deleted file mode 100644 index ffca5e203c..0000000000 --- a/docs/7-dashboard-ui/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "UI Dashboards" - } diff --git a/docs/9-faq.md b/docs/8-faq.md similarity index 93% rename from docs/9-faq.md rename to docs/8-faq.md index b994d5216c..e32606f8e4 100644 --- a/docs/9-faq.md +++ b/docs/8-faq.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 8 +--- + # FAQ ## Do I have to use Homebrew to install Zarf? @@ -30,7 +34,7 @@ Resources can be excluded at the namespace or resources level by adding the `zar During the `zarf init` operation, the Zarf Agent will patch any existing namespaces with the `zarf.dev/agent: ignore` label to prevent the Agent from modifying any resources in that namespace. This is done because there is no way to guarantee the images used by pods in existing namespaces are available in the Zarf Registry. -If you would like to adopt pre-existing resources into a Zarf deployment you can use the `--adopt-existing-resources` flag on [`zarf package deploy`](./4-user-guide/1-the-zarf-cli/100-cli-commands/zarf_package_deploy.md) to adopt those resources into the Helm Releases that Zarf manages (including namespaces). This will add the requisite annotations and labels to those resources and drop the `zarf.dev/agent: ignore` label from any namespaces specified by those resources. +If you would like to adopt pre-existing resources into a Zarf deployment you can use the `--adopt-existing-resources` flag on [`zarf package deploy`](./2-the-zarf-cli/100-cli-commands/zarf_package_deploy.md) to adopt those resources into the Helm Releases that Zarf manages (including namespaces). This will add the requisite annotations and labels to those resources and drop the `zarf.dev/agent: ignore` label from any namespaces specified by those resources. :::note @@ -42,7 +46,7 @@ Additionally, when adopting resources, you should ensure that the namespaces you ## How can I improve the speed of loading large images from Docker on `zarf package create`? -Due to some limitations with how Docker provides access to local image layers, `zarf package create` has to rely on `docker save` under the hood which is [very slow overall](https://github.com/defenseunicorns/zarf/issues/1214) and also takes a long time to report progress. We experimented with many ways to improve this, but for now recommend leveraging a local docker registry to speed up the process. This can be done by running a local registry and pushing the images to it before running `zarf package create`. This will allow `zarf package create` to pull the images from the local registry instead of Docker. This can also be combined with [component actions](4-user-guide/5-component-actions.md) to make the process automatic. Given an example image of `my-giant-image:###ZARF_PKG_TMPL_IMG###` you could do something like this: +Due to some limitations with how Docker provides access to local image layers, `zarf package create` has to rely on `docker save` under the hood which is [very slow overall](https://github.com/defenseunicorns/zarf/issues/1214) and also takes a long time to report progress. We experimented with many ways to improve this, but for now recommend leveraging a local docker registry to speed up the process. This can be done by running a local registry and pushing the images to it before running `zarf package create`. This will allow `zarf package create` to pull the images from the local registry instead of Docker. This can also be combined with [component actions](3-create-a-zarf-package/7-component-actions.md) to make the process automatic. Given an example image of `my-giant-image:###ZARF_PKG_TMPL_IMG###` you could do something like this: ```sh # Create a local registry diff --git a/docs/10-roadmap.md b/docs/9-roadmap.md similarity index 97% rename from docs/10-roadmap.md rename to docs/9-roadmap.md index 15191554d4..bf4930a08a 100644 --- a/docs/10-roadmap.md +++ b/docs/9-roadmap.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 9 +--- + # Roadmap :::caution Hard Hat Area diff --git a/docs/gen-cli-docs.sh b/docs/gen-cli-docs.sh index 83fc5d6ef8..01c5105627 100755 --- a/docs/gen-cli-docs.sh +++ b/docs/gen-cli-docs.sh @@ -4,14 +4,14 @@ ZARF_CONFIG=hack/empty-config.toml go run main.go internal generate-cli-docs # Create the top menu label for the sidebar menu printf "Generating sidebar menu label\n" -MENU_LABEL='{"label": "CLI Commands"}' -printf "${MENU_LABEL}" > docs/4-user-guide/1-the-zarf-cli/100-cli-commands/_category_.json +MENU_LABEL='{"label": "CLI Commands"}\n' +printf "${MENU_LABEL}" > docs/2-the-zarf-cli/100-cli-commands/_category_.json # The GenMarkdownTree function from cobra/docs starts the headers at H2. # This breaks the sidebar menu naming for Docusaurus. This command drops # all headers by 1 level to fix the menu. printf "Updating section header levels\n" -for FILE in `find docs/4-user-guide/1-the-zarf-cli/100-cli-commands -name "*.md"` +for FILE in `find docs/2-the-zarf-cli/100-cli-commands -name "*.md"` do sed -i.bak 's/^##/#/g' ${FILE} sed -i.bak '2s/^/\n/' ${FILE} diff --git a/examples/README.md b/examples/README.md index 789d4581c5..9cdea4b4ce 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 7 +--- + import DocCardList from '@theme/DocCardList'; import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; diff --git a/examples/big-bang/README.md b/examples/big-bang/README.md index 8c75101acd..8ae07a81dd 100644 --- a/examples/big-bang/README.md +++ b/examples/big-bang/README.md @@ -24,4 +24,4 @@ The `bigbang` noun sits within the `extensions` specification of Zarf and provid - `skipFlux` - Whether to skip deploying flux; Defaults to false - `valuesFiles` - The list of values files to pass to Big Bang; these will be merged together -To walkthrough the creation and deployment of this package see the [Big Bang Walkthrough](../../docs/13-walkthroughs/6-big-bang.md). +To see a tutorial for the creation and deployment of this package see the [Big Bang Tutorial](../../docs/6-zarf-tutorials/6-big-bang.md). diff --git a/examples/component-actions/README.md b/examples/component-actions/README.md index b450b6f03b..cc52cbf97e 100644 --- a/examples/component-actions/README.md +++ b/examples/component-actions/README.md @@ -14,7 +14,7 @@ To view the example source code, select the `Edit this page` link below the arti This example demonstrates how to define actions within your package that can run either on `zarf package create`, `zarf package deploy` or `zarf package remove`. These actions will be executed with the context that the Zarf binary is executed with. -For more details on component actions, see the [component actions](../../docs/4-user-guide/5-component-actions.md) documentation. +For more details on component actions, see the [component actions](../../docs/3-create-a-zarf-package/7-component-actions.md) documentation. ```yaml components: diff --git a/examples/config-file/README.md b/examples/config-file/README.md index 2bf970ea61..5d4c993b66 100644 --- a/examples/config-file/README.md +++ b/examples/config-file/README.md @@ -1,3 +1,3 @@ # Config File Example -This example shows how to use a config file to configure the Zarf CLI, for more details on the usage of config files, see the documentation at [docs/user-guide/the-zarf-cli](../../docs/4-user-guide/1-the-zarf-cli/index.md#using-a-config-file-to-make-cli-command-flags-declarative). +This example shows how to use a config file to configure the Zarf CLI, for more details on the usage of config files, see the documentation at [docs/user-guide/the-zarf-cli](../../docs/2-the-zarf-cli/index.md#using-a-config-file-to-make-cli-command-flags-declarative). diff --git a/examples/dos-games/README.md b/examples/dos-games/README.md index 9d5a4896c6..9d42139205 100644 --- a/examples/dos-games/README.md +++ b/examples/dos-games/README.md @@ -1,6 +1,6 @@ # DOS Games in the Cluster! -This example provides the basis for Zarf's [Retro Arcade](../../docs/13-walkthroughs/3-deploy-a-retro-arcade.md) tutorial. It deploys a Dos Games arcade into the cluster and provides an easy way to connect and play games. +This example provides the basis for Zarf's [Retro Arcade](../../docs/6-zarf-tutorials/3-deploy-a-retro-arcade.md) tutorial. It deploys a Dos Games arcade into the cluster and provides an easy way to connect and play games. :::note diff --git a/examples/git-data/README.md b/examples/git-data/README.md index bdf360f542..761d37849f 100644 --- a/examples/git-data/README.md +++ b/examples/git-data/README.md @@ -36,7 +36,7 @@ Full clones are used in this example with the `stefanprodan/podinfo` repository ## Example Usage -This example assumes you have already initialized a Zarf cluster. If that is not the case, refer to the [Initializing the Cluster Walkthrough](../../docs/13-walkthroughs/1-initializing-a-k8s-cluster.md). Be sure when initializing the Zarf cluster to deploy the `git` component, or be ready to specify an external `git` repository. +This example assumes you have already initialized a Zarf cluster. If that is not the case, refer to the [Initializing the Cluster Tutorial](../../docs/6-zarf-tutorials/1-initializing-a-k8s-cluster.md). Be sure when initializing the Zarf cluster to deploy the `git` component, or be ready to specify an external `git` repository. ### Create the Zarf Package diff --git a/examples/postgres-operator/README.md b/examples/postgres-operator/README.md index e3650efadf..c779ac82b3 100644 --- a/examples/postgres-operator/README.md +++ b/examples/postgres-operator/README.md @@ -24,7 +24,7 @@ This example uses Zalando's Postgres operator as after looking at several altern 4. Build the package using `zarf package create examples/postgres-operator` -5. Create a Zarf cluster as described in the [Initializing a Cluster Walkthrough](../../docs/13-walkthroughs/1-initializing-a-k8s-cluster.md/) +5. Create a Zarf cluster as described in the [Initializing a Cluster Tutorial](../../docs/6-zarf-tutorials/1-initializing-a-k8s-cluster.md/) ## Instructions diff --git a/examples/tiny-kafka/README.md b/examples/tiny-kafka/README.md index b93128471a..455bbe97b1 100644 --- a/examples/tiny-kafka/README.md +++ b/examples/tiny-kafka/README.md @@ -20,7 +20,7 @@ Before the magic can happen you have to do a few things: 1. Build the package using `zarf package create examples/tiny-kafka` -1. Create a Zarf cluster as described in the [Initializing a Cluster Walkthrough](../../docs/13-walkthroughs/1-initializing-a-k8s-cluster.md/) +1. Create a Zarf cluster as described in the [Initializing a Cluster Tutorial](../../docs/6-zarf-tutorials/1-initializing-a-k8s-cluster.md/) ## Instructions diff --git a/hack/create-zarf-schema.sh b/hack/create-zarf-schema.sh index fc274f2cc9..7255171036 100755 --- a/hack/create-zarf-schema.sh +++ b/hack/create-zarf-schema.sh @@ -7,4 +7,4 @@ go run main.go internal config-schema > zarf.schema.json go run main.go internal api-schema | npx quicktype -s schema -o src/ui/lib/api-types.ts # Create docs from the zarf.yaml JSON schema -docker run -v $(pwd):/app -w /app --rm python:3.8-alpine /bin/sh -c "pip install json-schema-for-humans && generate-schema-doc --config-file docs/.templates/jsfh-config.json zarf.schema.json docs/4-user-guide/3-zarf-schema.md" +docker run -v $(pwd):/app -w /app --rm python:3.8-alpine /bin/sh -c "pip install json-schema-for-humans && generate-schema-doc --config-file docs/.templates/jsfh-config.json zarf.schema.json docs/3-create-a-zarf-package/5-zarf-schema.md" diff --git a/src/cmd/internal.go b/src/cmd/internal.go index 57611aeeb0..ee5c53aff2 100644 --- a/src/cmd/internal.go +++ b/src/cmd/internal.go @@ -56,13 +56,13 @@ var generateCLIDocs = &cobra.Command{ // Don't include the datestamp in the output rootCmd.DisableAutoGenTag = true //Generate markdown of the Zarf command (and all of its child commands) - if err := os.RemoveAll("./docs/4-user-guide/1-the-zarf-cli/100-cli-commands"); err != nil { + if err := os.RemoveAll("./docs/2-the-zarf-cli/100-cli-commands"); err != nil { message.Fatalf("Unable to generate the CLI documentation: %s", err.Error()) } - if err := os.Mkdir("./docs/4-user-guide/1-the-zarf-cli/100-cli-commands", 0775); err != nil { + if err := os.Mkdir("./docs/2-the-zarf-cli/100-cli-commands", 0775); err != nil { message.Fatalf("Unable to generate the CLI documentation: %s", err.Error()) } - if err := doc.GenMarkdownTree(rootCmd, "./docs/4-user-guide/1-the-zarf-cli/100-cli-commands"); err != nil { + if err := doc.GenMarkdownTree(rootCmd, "./docs/2-the-zarf-cli/100-cli-commands"); err != nil { message.Fatalf("Unable to generate the CLI documentation: %s", err.Error()) } else { message.Successf(lang.CmdInternalGenerateCliDocsSuccess) diff --git a/src/pkg/packager/create.go b/src/pkg/packager/create.go index 81f45ba759..1360a5c19d 100755 --- a/src/pkg/packager/create.go +++ b/src/pkg/packager/create.go @@ -474,7 +474,7 @@ func generatePackageChecksums(basePath string) (string, error) { // Add a '/' or '\' to the basePath so that the checksums file lists paths from the perspective of the basePath basePathWithModifier := basePath + string(filepath.Separator) - // Walk through all files in the package path and calculate their checksums + // Walk all files in the package path and calculate their checksums err := filepath.Walk(basePath, func(path string, info os.FileInfo, err error) error { if !info.IsDir() { sum, err := utils.GetSHA256OfFile(path) diff --git a/src/pkg/utils/io.go b/src/pkg/utils/io.go index 315d0d1da3..28e7d2226c 100755 --- a/src/pkg/utils/io.go +++ b/src/pkg/utils/io.go @@ -293,7 +293,7 @@ func IsTextFile(path string) (bool, error) { func GetDirSize(path string) (int64, error) { dirSize := int64(0) - // Walk through all files in the path + // Walk all files in the path err := filepath.Walk(path, func(_ string, info os.FileInfo, err error) error { if err != nil { return err