Skip to content

An example / experiment on how to include development dependencies inside of a Zarf package

License

Notifications You must be signed in to change notification settings

defenseunicorns/zarf-package-dev-dependencies

Repository files navigation

[EXPERIMENTAL] zarf-package-dev-dependencies

CI Status

This is a package that demonstrates an example using Zarf in its redirector proxy mode. This allows you to include development dependencies inside of a Zarf package and serve them in an airgap.

Note: This package and functionality is still in early development and will have rough edges. This functionality also only supports npm, pypi, generic, and git artifacts and repositories. We also rely heavily on how Gitea and Gitlab handle package registries.

creating the package

You need the following installed locally before creating this package:

zarf
curl
npm
pip
jq
sed
sha1sum

Then you simply need to run the following (see the Makefile for more information)

$ make build

deploying the package

You need the following installed/available locally before deploying this package:

zarf
zarf-init-*.tar.zst
zarf-package-dev-dependencies-amd64.tar.zst
tar
sed
awk

Before you begin you must zarf init your k8s cluster (including a git and artifact host):

$ zarf init --components git-server --confirm

Note: You can configure an external git and/or artifact host if you desire.

You must also specify a TLS certificate and key that matches the upstream web hosts used by this package.

To create this, copy zarf-config.example.toml to zarf-config.toml and run the following command (see the Makefile for more information):

$ make setup-certificates

Then you simply need to run the following (see the Makefile for more information)

$ zarf package deploy zarf-package-dev-dependencies-amd64.tar.zst

Note: If you do not have a kubernetes cluster in your airgap you will need to add the k3s component to the commands above

testing the package

After deploying the package you can test that it can properly deploy and build the code in the src directory by running:

$ make test

building the docker container

To locally build the zarf-uploader docker container in this repo, run:

docker build .

About

An example / experiment on how to include development dependencies inside of a Zarf package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages