Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Initial docs updates for alpha/beta/stable #1812

Merged
merged 41 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c781647
Initial docs updates for alpha/beta/stable
Racer159 Jun 13, 2023
dc9c9aa
Update authors docs to give more guidance
Racer159 Jun 13, 2023
af5a24c
Fix docs build issues
Racer159 Jun 13, 2023
ba19b87
Fix docs build issues
Racer159 Jun 13, 2023
130b28a
Merge branch 'main' into 1652-define-alpha-beta-release
Racer159 Jun 14, 2023
f40716d
update archiver and cache messaging
Racer159 Jun 14, 2023
6b2b068
resolve #1804
Racer159 Jun 14, 2023
58089a2
Fix api types
Racer159 Jun 14, 2023
d877ced
Capitalize the S
Racer159 Jun 14, 2023
8019f61
Merge branch 'main' into 1652-define-alpha-beta-release
Racer159 Jun 14, 2023
07df715
Fixup destroy tagline
Racer159 Jun 14, 2023
bba5212
Update docs/8-faq.md
Racer159 Jun 15, 2023
e55bc9d
Update docs/9-roadmap.md
Racer159 Jun 15, 2023
810c2e6
Update docs/8-faq.md
Racer159 Jun 15, 2023
71d3698
Add definitions to the roadmap page
Racer159 Jun 15, 2023
33aaf8a
Merge branch 'main' into 1652-define-alpha-beta-release
Racer159 Jun 15, 2023
08b9196
Add definitions to the roadmap page
Racer159 Jun 15, 2023
36b8720
Fix the UI test to be less flakey and don't use ioutil
Racer159 Jun 15, 2023
dc86df9
Increase timeout and revert some changes
Racer159 Jun 15, 2023
9b500cd
Simplify the upgrade test
Racer159 Jun 15, 2023
b7939ad
Wait for deployment instead of pod to reduce flake chances
Racer159 Jun 16, 2023
145f460
Fix a remove bug and improve logging in the upgrade test
Racer159 Jun 16, 2023
8715d0e
No longer rely on repo1 for annotations test
Racer159 Jun 16, 2023
6fc6262
Move UI testing into make
Racer159 Jun 16, 2023
562deb4
Reduce disk pressure during upgrade test
Racer159 Jun 16, 2023
58e6584
Add ephemeral storage to podinfo
Racer159 Jun 16, 2023
cadd7ee
Make ephemeral storage quote-less
Racer159 Jun 16, 2023
0605718
Tolerate disk pressure
Racer159 Jun 17, 2023
9b3b78c
Change toleration to NoSchedule
Racer159 Jun 17, 2023
4623077
Attempt to remove taints
Racer159 Jun 17, 2023
8f08e49
Print more debug logs and try to cleanup images too
Racer159 Jun 17, 2023
8d67c26
Look at disk usage after cleaning too
Racer159 Jun 17, 2023
95cba03
Properly restart k3s on upgrade
Racer159 Jun 17, 2023
30f343b
Initial implementation of deprecation handling
Racer159 Jun 20, 2023
c77ec16
Fix TODOs around version handling and error handling
Racer159 Jun 21, 2023
db72bb9
Add descriptions to the init package actions
Racer159 Jun 21, 2023
345e768
Initial pluto implementation
Racer159 Jun 21, 2023
b256456
Test with a different kubelet directory
Racer159 Jun 21, 2023
3f2203d
Test different kubelet args and fix lint
Racer159 Jun 21, 2023
b648b14
Fixup Use strings
Racer159 Jun 21, 2023
ec7bf05
Update packages/zarf-agent/zarf.yaml
Racer159 Jun 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/test-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,11 @@ jobs:
path: "~/.cache/ms-playwright/"
key: ${{ runner.os }}-browsers

- name: Ensure playright is installed
- name: Ensure playwright is installed
run: npx playwright install

- name: Run UI tests
run: >
export NODE_PATH=$(pwd)/src/ui/node_modules &&
npm --prefix src/ui run test:pre-init &&
npm --prefix src/ui run test:init &&
npm --prefix src/ui run test:post-init &&
npm --prefix src/ui run test:connect
run: make test-ui

- name: Save logs
if: always()
Expand Down
32 changes: 30 additions & 2 deletions .github/workflows/test-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ jobs:
with:
download-init-package: true

# Note we move the kubelet data to reduce the chance for disk pressure during the tests
- name: Move the kubelet root directory for 'k3s'
run: |
sudo mkdir -p /mnt/kubelet-data
echo >> zarf-config.toml
echo [package.deploy.set] >> zarf-config.toml
echo "k3s_args = '--disable traefik --kubelet-arg \"eviction-hard=imagefs.available<1%,nodefs.available<1%\" --kubelet-arg \"eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%\"'" >> zarf-config.toml

- name: Initialize the cluster with the release version
# NOTE: "PATH=$PATH" preserves the default user $PATH. This is needed to maintain the version of zarf installed
# in a previous step. This test run will the current release to create a K3s cluster.
Expand All @@ -47,14 +55,15 @@ jobs:
sudo env "PATH=$PATH" CI=true zarf init --components k3s,git-server,logging --confirm
sudo chown $USER /tmp/zarf-*.log

- name: Create the upgrade test packages
- name: Create and deploy the upgrade test packages
# NOTE: "PATH=$PATH" preserves the default user $PATH. This is needed to maintain the version of zarf installed
# in a previous step. This test run will the current release to create a K3s cluster.
# chown the logs since they were originally created as root
run: |
zarf package create src/test/upgrade --set PODINFO_VERSION=6.3.3 --confirm
zarf package create src/test/upgrade --set PODINFO_VERSION=6.3.4 --confirm
sudo env "PATH=$PATH" CI=true zarf package deploy zarf-package-test-upgrade-package-amd64-6.3.3.tar.zst --confirm
sudo env "PATH=$PATH" CI=true zarf tools kubectl describe deployments -n=podinfo-upgrade
sudo env "PATH=$PATH" CI=true zarf tools kubectl describe pods -n=podinfo-upgrade
sudo chown $USER /tmp/zarf-*.log

- name: Build PR binary and zarf packages
Expand All @@ -68,11 +77,30 @@ jobs:
sudo env "PATH=$PATH" CI=true APPLIANCE_MODE=true make test-e2e ARCH=amd64
sudo chown $USER /tmp/zarf-*.log

- name: "Cleanup after running tests"
# NOTE: This reduces disk pressure before the upgrade-specific tests begin
run: |
sudo lsblk -f
sudo k3s crictl images
sudo env "PATH=$PATH" CI=true zarf tools kubectl describe nodes
sudo env "PATH=$PATH" CI=true zarf tools kubectl describe deployments -n=podinfo-upgrade
sudo env "PATH=$PATH" CI=true zarf tools kubectl describe pods -n=podinfo-upgrade

sudo k3s crictl rmi --prune
sudo rm -rf zarf-sbom /tmp/zarf-*/
sudo env "PATH=$PATH" CI=true make delete-packages
sudo build/zarf tools clear-cache

sudo lsblk -f
sudo env "PATH=$PATH" CI=true zarf tools kubectl describe nodes

- name: Run the upgrade tests
# NOTE: "PATH=$PATH" preserves the default user $PATH. This is needed to maintain the version of zarf installed
# in a previous step. This test run will the current release to create a K3s cluster.
# chown the logs since they were originally created as root
run: |
zarf package create src/test/upgrade --set PODINFO_VERSION=6.3.4 --confirm

sudo env "PATH=$PATH" CI=true make test-upgrade ARCH=amd64
sudo chown $USER /tmp/zarf-*.log

Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

First off, thanks so much for wanting to help out! :tada:

This document describes the steps and requirements for contributing a bug fix or feature in a Pull Request to Zarf! If you have any questions about the process or the pull request you are working on feel free to reach out in the [Zarf Dev Kubernetes Slack Channel](https://kubernetes.slack.com/archives/C03BP9Z3CMA).

## Developer Experience

Continuous Delivery is core to our development philosophy. Check out [https://minimumcd.org](https://minimumcd.org/) for a good baseline agreement on what that means.
Expand Down
23 changes: 20 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ build-examples: ## Build all of the example packages

@test -s ./build/zarf-package-dos-games-$(ARCH).tar.zst || $(ZARF_BIN) package create examples/dos-games -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-remote-manifests-$(ARCH)-0.0.1.tar.zst || $(ZARF_BIN) package create examples/remote-manifests -o build -a $(ARCH) --confirm
@test -s ./build/zarf-package-manifests-$(ARCH)-0.0.1.tar.zst || $(ZARF_BIN) package create examples/manifests -o build -a $(ARCH) --confirm

@test -s ./build/zarf-package-component-actions-$(ARCH).tar.zst || $(ZARF_BIN) package create examples/component-actions -o build -a $(ARCH) --confirm

Expand Down Expand Up @@ -168,8 +168,25 @@ test-unit: ensure-ui-build-dir ## Run unit tests within the src/pkg and the bigb
cd src/pkg && go test ./... -failfast -v -timeout 30m
cd src/extensions/bigbang && go test ./. -failfast -v timeout 30m

.PHONY: test-built-ui
test-built-ui: ## Run the Zarf UI E2E tests (requires `make build-ui` first)
.PHONY: test-ui
test-ui: ## Run the Zarf UI E2E tests (requires `make build-ui` first) (run with env CI=true to use build/zarf)
export NODE_PATH=$(CURDIR)/src/ui/node_modules && \
npm --prefix src/ui run test:pre-init && \
npm --prefix src/ui run test:init && \
npm --prefix src/ui run test:post-init && \
npm --prefix src/ui run test:connect

.PHONY: test-ui-dev-server
# INTERNAL: used to start a dev version of the API server for the Zarf Web UI tests (locally)
test-ui-dev-server:
API_DEV_PORT=5173 \
API_PORT=3333 \
API_TOKEN=insecure \
go run -ldflags="$(BUILD_ARGS)" main.go dev ui -l=trace

.PHONY: test-ui-build-server
# INTERNAL: used to start the built version of the API server for the Zarf Web UI (in CI)
test-ui-build-server:
API_PORT=3333 API_TOKEN=insecure $(ZARF_BIN) dev ui

# INTERNAL: used to test that a dev has ran `make docs-and-schema` in their PR
Expand Down
2 changes: 1 addition & 1 deletion adr/0015-artifact-server-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ It was decided to go with #2 since this would allow us to support a wider array

## Consequences

For now this should be an internal-only feature while we work through issues and continue to experiment with this functionality given that it may be confusing to use or have rough edges for a while. This also ties us to building specific http request matching logic for various artifact technologies which currently is done first via User Agent, then by parsing the URL to look for the artifact protocol specific path information. While this works, it must be created per artifact technology and right now only supports git (http), pip, npm, and generic repositories and registries in Gitea and Gitlab.
For now this should be an `internal`-only "alpha" feature while we work through issues and continue to experiment with this functionality given that it may be confusing to use or have rough edges for a while. This also ties us to building specific http request matching logic for various artifact technologies which currently is done first via User Agent, then by parsing the URL to look for the artifact protocol specific path information. While this works, it must be created per artifact technology and right now only supports git (http), pip, npm, and generic repositories and registries in Gitea and Gitlab.
8 changes: 4 additions & 4 deletions docs/2-the-zarf-cli/100-cli-commands/zarf.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Zarf eliminates the complexity of air gap software delivery for Kubernetes clust
using a declarative packaging strategy to support DevSecOps in offline and semi-connected environments.

```
zarf [COMMAND] [flags]
zarf COMMAND [flags]
```

## Options
Expand All @@ -28,10 +28,10 @@ zarf [COMMAND] [flags]
## SEE ALSO

* [zarf completion](zarf_completion.md) - Generate the autocompletion script for the specified shell
* [zarf connect](zarf_connect.md) - Access services or pods deployed in the cluster.
* [zarf destroy](zarf_destroy.md) - Tear it all down, we'll miss you Zarf...
* [zarf connect](zarf_connect.md) - Accesses services or pods deployed in the cluster
* [zarf destroy](zarf_destroy.md) - Tears down Zarf and removes its components from the environment
* [zarf init](zarf_init.md) - Prepares a k8s cluster for the deployment of Zarf packages
* [zarf package](zarf_package.md) - Zarf package commands for creating, deploying, and inspecting packages
* [zarf prepare](zarf_prepare.md) - Tools to help prepare assets for packaging
* [zarf tools](zarf_tools.md) - Collection of additional tools to make airgap easier
* [zarf version](zarf_version.md) - Version of the Zarf binary
* [zarf version](zarf_version.md) - Shows the version of the running Zarf binary
6 changes: 3 additions & 3 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_connect.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# zarf connect
<!-- Auto-generated by docs/gen-cli-docs.sh -->

Access services or pods deployed in the cluster.
Accesses services or pods deployed in the cluster

## Synopsis

Expand All @@ -14,7 +14,7 @@ Packages can provide service manifests that define their own shortcut connection
Even if the packages you deploy don't define their own shortcut connection options, you can use the command flags to connect into specific resources. You can read the command flag descriptions below to get a better idea how to connect to whatever resource you are trying to connect to.

```
zarf connect {REGISTRY|LOGGING|GIT|connect-name} [flags]
zarf connect { REGISTRY | LOGGING | GIT | connect-name } [flags]
```

## Options
Expand Down Expand Up @@ -44,4 +44,4 @@ zarf connect {REGISTRY|LOGGING|GIT|connect-name} [flags]
## SEE ALSO

* [zarf](zarf.md) - DevSecOps for Airgap
* [zarf connect list](zarf_connect_list.md) - List all available connection shortcuts.
* [zarf connect list](zarf_connect_list.md) - Lists all available connection shortcuts
4 changes: 2 additions & 2 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_connect_list.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# zarf connect list
<!-- Auto-generated by docs/gen-cli-docs.sh -->

List all available connection shortcuts.
Lists all available connection shortcuts

```
zarf connect list [flags]
Expand All @@ -27,4 +27,4 @@ zarf connect list [flags]

## SEE ALSO

* [zarf connect](zarf_connect.md) - Access services or pods deployed in the cluster.
* [zarf connect](zarf_connect.md) - Accesses services or pods deployed in the cluster
4 changes: 2 additions & 2 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_destroy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# zarf destroy
<!-- Auto-generated by docs/gen-cli-docs.sh -->

Tear it all down, we'll miss you Zarf...
Tears down Zarf and removes its components from the environment

## Synopsis

Expand All @@ -14,7 +14,7 @@ If Zarf deployed your k8s cluster, this command will also tear your cluster down
If Zarf did not deploy your k8s cluster, this command will delete the Zarf namespace, delete secrets and labels that only Zarf cares about, and optionally uninstall components that Zarf deployed onto the cluster. Since this is a cleanup operation, Zarf will not stop the uninstalls if one of the resources produce an error while being deleted.

```
zarf destroy [flags]
zarf destroy --confirm [flags]
```

## Options
Expand Down
31 changes: 16 additions & 15 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,33 @@ zarf init [flags]
## Examples

```
# Initializing without any optional components:
zarf init

# Initializing w/ Zarfs internal git server:
zarf init --components=git-server
# Initializing without any optional components:
zarf init

# Initializing w/ Zarfs internal git server and PLG stack:
zarf init --components=git-server,logging
# Initializing w/ Zarfs internal git server:
zarf init --components=git-server

# Initializing w/ an internal registry but with a different nodeport:
zarf init --nodeport=30333
# Initializing w/ Zarfs internal git server and PLG stack:
zarf init --components=git-server,logging

# Initializing w/ an external registry:
zarf init --registry-push-password={PASSWORD} --registry-push-username={USERNAME} --registry-url={URL}
# Initializing w/ an internal registry but with a different nodeport:
zarf init --nodeport=30333

# Initializing w/ an external git server:
zarf init --git-push-password={PASSWORD} --git-push-username={USERNAME} --git-url={URL}
# Initializing w/ an external registry:
zarf init --registry-push-password={PASSWORD} --registry-push-username={USERNAME} --registry-url={URL}

# Initializing w/ an external git server:
zarf init --git-push-password={PASSWORD} --git-push-username={USERNAME} --git-url={URL}

```

## Options

```
--artifact-push-token string API Token for the push-user to access the artifact registry
--artifact-push-username string Username to access to the artifact registry Zarf is configured to use. User must be able to upload package artifacts.
--artifact-url string External artifact registry url to use for this Zarf cluster
--artifact-push-token string [alpha] API Token for the push-user to access the artifact registry
--artifact-push-username string [alpha] Username to access to the artifact registry Zarf is configured to use. User must be able to upload package artifacts.
--artifact-url string [alpha] External artifact registry url to use for this Zarf cluster
--components string Specify which optional components to install. E.g. --components=git-server,logging
--confirm Confirms package deployment without prompting. ONLY use with packages you trust. Skips prompts to review SBOM, configure variables, select optional components and review potential breaking changes.
--git-pull-password string Password for the pull-only user to access the git server
Expand Down
14 changes: 7 additions & 7 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_package.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Zarf package commands for creating, deploying, and inspecting packages
## SEE ALSO

* [zarf](zarf.md) - DevSecOps for Airgap
* [zarf package create](zarf_package_create.md) - Use to create a Zarf package from a given directory or the current directory
* [zarf package deploy](zarf_package_deploy.md) - Use to deploy a Zarf package from a local file or URL (runs offline)
* [zarf package inspect](zarf_package_inspect.md) - Lists the payload of a Zarf package (runs offline)
* [zarf package list](zarf_package_list.md) - List out all of the packages that have been deployed to the cluster
* [zarf package publish](zarf_package_publish.md) - Publish a Zarf package to a remote registry
* [zarf package pull](zarf_package_pull.md) - Pull a Zarf package from a remote registry and save to the local file system
* [zarf package remove](zarf_package_remove.md) - Use to remove a Zarf package that has been deployed already
* [zarf package create](zarf_package_create.md) - Creates a Zarf package from a given directory or the current directory
* [zarf package deploy](zarf_package_deploy.md) - Deploys a Zarf package from a local file or URL (runs offline)
* [zarf package inspect](zarf_package_inspect.md) - Displays the definition of a Zarf package (runs offline)
* [zarf package list](zarf_package_list.md) - Lists out all of the packages that have been deployed to the cluster (runs offline)
* [zarf package publish](zarf_package_publish.md) - Publishes a Zarf package to a remote registry
* [zarf package pull](zarf_package_pull.md) - Pulls a Zarf package from a remote registry and save to the local file system
* [zarf package remove](zarf_package_remove.md) - Removes a Zarf package that has been deployed already (runs offline)
8 changes: 4 additions & 4 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_package_create.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# zarf package create
<!-- Auto-generated by docs/gen-cli-docs.sh -->

Use to create a Zarf package from a given directory or the current directory
Creates a Zarf package from a given directory or the current directory

## Synopsis

Builds an archive of resources and dependencies defined by the 'zarf.yaml' in the active directory.
Builds an archive of resources and dependencies defined by the 'zarf.yaml' in the specified directory.
Private registries and repositories are accessed via credentials in your local '~/.docker/config.json', '~/.git-credentials' and '~/.netrc'.


```
zarf package create [DIRECTORY] [flags]
zarf package create [ DIRECTORY ] [flags]
```

## Options

```
--confirm Confirm package creation without prompting
--differential string Build a package that only contains the differential changes from local resources and differing remote resources from the specified previously built package
--differential string [beta] Build a package that only contains the differential changes from local resources and differing remote resources from the specified previously built package
-h, --help help for create
-k, --key string Path to private key file for signing packages
--key-pass string Password to the private key file used for signing packages
Expand Down
7 changes: 4 additions & 3 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_package_deploy.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# zarf package deploy
<!-- Auto-generated by docs/gen-cli-docs.sh -->

Use to deploy a Zarf package from a local file or URL (runs offline)
Deploys a Zarf package from a local file or URL (runs offline)

## Synopsis

Uses current kubecontext to deploy the packaged tarball onto a k8s cluster.
Unpacks resources and dependencies from a Zarf package archive and deploys them onto the target system.
Kubernetes clusters are accessed via credentials in your current kubecontext defined in '~/.kube/config'

```
zarf package deploy [PACKAGE] [flags]
zarf package deploy [ PACKAGE ] [flags]
```

## Options
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# zarf package inspect
<!-- Auto-generated by docs/gen-cli-docs.sh -->

Lists the payload of a Zarf package (runs offline)
Displays the definition of a Zarf package (runs offline)

## Synopsis

Lists the payload of a compiled package file (runs offline)
Unpacks the package tarball into a temp directory and displays the contents of the archive.
Displays the 'zarf.yaml' definition for the specified package and optionally allows SBOMs to be viewed

```
zarf package inspect [PACKAGE] [flags]
zarf package inspect [ PACKAGE ] [flags]
```

## Options
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# zarf package list
<!-- Auto-generated by docs/gen-cli-docs.sh -->

List out all of the packages that have been deployed to the cluster
Lists out all of the packages that have been deployed to the cluster (runs offline)

```
zarf package list [flags]
Expand Down
12 changes: 6 additions & 6 deletions docs/2-the-zarf-cli/100-cli-commands/zarf_package_publish.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# zarf package publish
<!-- Auto-generated by docs/gen-cli-docs.sh -->

Publish a Zarf package to a remote registry
Publishes a Zarf package to a remote registry

```
zarf package publish [PACKAGE|SKELETON DIRECTORY] [REPOSITORY] [flags]
zarf package publish { PACKAGE | SKELETON DIRECTORY } REPOSITORY [flags]
```

## Examples

```

# Publish a package to a remote registry
zarf package publish my-package.tar oci://my-registry.com/my-namespace
# Publish a package to a remote registry
zarf package publish my-package.tar oci://my-registry.com/my-namespace

# Publish a skeleton package to a remote registry
zarf package publish ./path/to/dir oci://my-registry.com/my-namespace
# Publish a skeleton package to a remote registry
zarf package publish ./path/to/dir oci://my-registry.com/my-namespace

```

Expand Down
Loading