Using Big Bang with Zarf
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.
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.
The current version of this extension requires Big Bang version 1.54.0
or later, and is not fully integrated into the zarf package remove
lifecycle (see the Big Bang example for how to introduce those lifecycle hooks manually). Zarf also relies on helm.sh/images annotations to discover images within charts (e.g. GitLab) - this is a relatively new feature for Big Bang so if you see an ImagePullBackOff
error, check that these annotations are set correctly for the sub charts you are using. To work around this issue if you come across it, simply add the missing image to the images list on the same component that contains the Big Bang extension like the following:
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/
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
- The latest version of the Zarf
cli
- Follow instructions on https://docs.zarf.dev/getting-started/install/
- An account on
https://registry1.dso.mil
to retrieve Big Bang images- You can register for an account here
The below section covers creating and tuning the Big Bang package:
By default, Big Bang uses images from Iron Bank which will require you to set your login credentials for Registry One (see pre-requisites for information on account setup).
Now navigate to the examples/big-bang
folder within the Zarf repository you cloned in the pre-requisites section.
Within the examples/big-bang
folder you will see a zarf.yaml
that has the following component defined:
This component uses the bigbang
extension to define the version of Big Bang to use and the values files to apply. Feel free to inspect and configure the values.yaml files as you wish and to learn more about Big Bang’s configuration see their values guide: https://docs-bigbang.dso.mil/latest/docs/guides/using-bigbang/values-guide/
When you’re ready to continue you can create a Big Bang package by running the following command in examples/big-bang
:
Now wait for the package creation to complete and you should see a zarf-package-big-bang-example-amd64-x.x.x.tar.zst
file in the directory.
The below section covers deploying the Big Bang package from the previous section:
Before you can deploy the Big Bang package you must first initialize Zarf on the cluster you created in the pre-requisites section. To do so you can run the following:
Now you are ready to deploy Big Bang, and can do so with the following in the examples/big-bang
directory:
Once the install completes you can inspect the results and watch the Big Bang components deploy using the following:
The Big Bang extension is not fully integrated into the Zarf package remove lifecycle. To get around this limitation, an onRemove.before
action has been added to the bigbang component in the zarf.yaml file that ensures all the Big Bang resources are torn down in the correct order when Zarf is used to remove the package:
See the Troubleshooting section of the Big Bang Quick Start for help troubleshooting the Big Bang deployment: https://repo1.dso.mil/big-bang/bigbang/-/blob/master/docs/guides/deployment-scenarios/quickstart.md#troubleshooting
Also, ensure that you have followed all of the steps required in the pre-requisites section.
If you feel that the error you are encountering is one with Zarf feel free to open an issue or reach out via slack.