github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/docs/5-jackal-tutorials/6-big-bang.md (about) 1 # Using Big Bang with Jackal 2 3 ## Introduction 4 5 This tutorial describes how to use Big Bang with Jackal for Air Gap deployments through the use of the Big Bang Jackal 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/). 6 7 Jackal 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. 8 9 ### Limitations 10 11 The current version of this extension requires Big Bang version `1.54.0` or later, and is not fully integrated into the `jackal package remove` lifecycle (see the [Big Bang example](../../examples/big-bang/README.md) for how to introduce those lifecycle hooks manually). Jackal also relies on [helm.sh/images annotations](https://github.com/helm/community/blob/main/hips/hip-0015.md) to discover images within charts (e.g. [GitLab](https://repo1.dso.mil/big-bang/product/packages/gitlab/-/blob/main/chart/Chart.yaml#L61)) - 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: 12 13 ``` 14 components: 15 - name: bigbang 16 required: true 17 images: 18 - registry1.dso.mil/ironbank/gitlab/gitlab/gitlab-exporter:15.9.2 19 extensions: 20 bigbang: 21 version: 1.54.0 22 ``` 23 24 ## System Requirements 25 26 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. 27 28 To learn more about Big Bang's requirements in general, see their documentation: https://docs-bigbang.dso.mil/latest/docs/prerequisites/minimum-hardware-requirements/ 29 30 ## Prerequisites 31 32 Before beginning this tutorial you will need the following: 33 34 - A local copy of the Jackal repository 35 - `git clone https://github.com/Racer159/jackal.git` 36 - A kubernetes cluster onto which you can deploy Jackal and Big Bang 37 - The latest version of the Jackal `cli` 38 - Follow instructions on https://jackal.dev/install/ 39 - An account on `https://registry1.dso.mil` to retrieve Big Bang images 40 - You can register for an account [here](https://login.dso.mil/auth/realms/baby-yoda/protocol/openid-connect/registrations?client_id=account&response_type=code) 41 42 :::note 43 44 If you followed the [Setting Up a Local Kubernetes Cluster](./index.md#setting-up-a-local-kubernetes-cluster) instructions for other Jackal 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: 45 46 ```bash 47 k3d cluster create 48 # Required by the PLG stack 49 --volume /etc/machine-id:/etc/machine-id 50 51 # Required for Istio ingress 52 --k3s-arg "--disable=traefik@server:0" 53 --port 80:80@loadbalancer 54 --port 443:443@loadbalancer 55 56 # Required for TLS to work correctly with kubectl 57 --k3s-arg "--tls-san=$SERVER_IP@server:0" 58 --api-port 6443 59 ``` 60 61 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. 62 63 ::: 64 65 ## Package Creation 66 67 The below section covers creating and tuning the Big Bang package: 68 69 ### Setup 70 71 By default, Big Bang uses images from [Iron Bank](https://p1.dso.mil/products/iron-bank) which will require you to set your login credentials for [Registry One](https://registry1.dso.mil) (see [pre-requisites](#pre-requisites) for information on account setup). 72 73 ```bash 74 # Authenticate to https://registry1.dso.mil/, then retrieve your CLI secret from your User Profile and run the following: 75 set +o history 76 export REGISTRY1_USERNAME=<REPLACE_ME> 77 export REGISTRY1_CLI_SECRET=<REPLACE_ME> 78 echo $REGISTRY1_CLI_SECRET | jackal tools registry login registry1.dso.mil --username $REGISTRY1_USERNAME --password-stdin 79 set -o history 80 ``` 81 82 Now navigate to the `examples/big-bang` folder within the Jackal repository you cloned in the [pre-requisites](#pre-requisites) section. 83 84 ### Configure Big Bang 85 86 Within the `examples/big-bang` folder you will see a `jackal.yaml` that has the following [component](../3-create-a-jackal-package/2-jackal-components.md) defined: 87 88 ```yaml 89 components: 90 - name: bigbang 91 required: true 92 extensions: 93 bigbang: 94 version: 1.54.0 95 skipFlux: false 96 valuesFiles: 97 - config/minimal.yaml #turns on just istio 98 - config/ingress.yaml # adds istio certs for *.bigbang.dev 99 - config/kyverno.yaml # turns on kyverno 100 - config/loki.yaml # turns on loki and monitoring 101 ``` 102 103 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/ 104 105 :::note 106 107 The `valuesFiles` are applied from top to bottom and will apply the last value that was provided for any given key. 108 109 ::: 110 111 :::note 112 113 This extension requires Big Bang version `1.54.0` or later. 114 115 ::: 116 117 118 ### Package Big Bang 119 120 When you're ready to continue you can create a Big Bang package by running the following command in `examples/big-bang`: 121 122 ```bash 123 jackal package create 124 ``` 125 126 Now wait for the package creation to complete and you should see a `jackal-package-big-bang-example-amd64-x.x.x.tar.zst` file in the directory. 127 128 129 ## Package Deployment 130 131 The below section covers deploying the Big Bang package from the previous section: 132 133 ### Initialize Jackal 134 135 Before you can deploy the Big Bang package you must first initialize Jackal on the cluster you created in the [pre-requisites](#pre-requisites) section. To do so you can run the following: 136 137 ```bash 138 # Initialize Jackal (interactively) 139 jackal init 140 # Make these choices at the prompts 141 # ? Do you want to download this init package? Yes 142 # ? Deploy this Jackal package? Yes 143 # ? Deploy the k3s component? No 144 # ? Deploy the logging component? No 145 # ? Deploy the git-server component? Yes 146 147 # (Optional) Inspect the results 148 jackal tools k9s 149 ``` 150 151 :::note 152 153 The `git-server` component is required by Big Bang as it uses it as a source for Flux deployments. 154 155 ::: 156 157 158 ### Deploy Big Bang 159 160 Now you are ready to deploy Big Bang, and can do so with the following in the `examples/big-bang` directory: 161 162 ```bash 163 # Deploy Big Bang (interactively) 164 jackal package deploy 165 # Make these choices at the prompts 166 # ? Choose or type the package file [tab for suggestions] jackal-package-big-bang-example-amd64-x.x.x.tar.zst 167 # ? Deploy this Jackal package? Yes 168 ``` 169 170 ### See The Results 171 172 Once the install completes you can inspect the results and watch the Big Bang components deploy using the following: 173 174 ```bash 175 jackal tools k9s 176 177 # To view different k8s objects you can use the following: 178 179 # Helm Releases: 180 # :hr [Enter] 181 # Pods: 182 # :pods [Enter] 183 # Services: 184 # :svc [Enter] 185 # Secrets: 186 # :secret [Enter] 187 # ConfigMaps: 188 # :configmap [Enter] 189 190 # When you are done use the following to quit 191 # :q [Enter] 192 ``` 193 194 ## Package Removal 195 196 The Big Bang extension is not fully integrated into the Jackal package remove lifecycle (see [known issues](#known-issues)). To get around this limitation, an onRemove.before action has been added to the bigbang component in the jackal.yaml file that ensures all the Big Bang resources are torn down in the correct order when Jackal is used to remove the package: 197 198 ```bash 199 jackal package remove big-bang-example --confirm 200 ``` 201 202 ## Troubleshooting 203 204 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 205 206 Also, ensure that you have followed all of the steps required in the [pre-requisites](#pre-requisites) section and have reviewed the [known issues](#known-issues). 207 208 If you feel that the error you are encountering is one with Jackal feel free to [open an issue](https://github.com/Racer159/jackal/issues/new/choose) or reach out via [slack](https://kubernetes.slack.com/archives/C03B6BJAUJ3).