Deploy Software Factory
Prerequisites
Section titled “Prerequisites”- K3D version v5.6.0 for development and testing environments.
- Any CNCF Certified Kubernetes Cluster for production environments.
- UDS CLI version 0.10.4 or later.
Apple Silicon Mac Users
Section titled “Apple Silicon Mac Users”When deploying on an Apple Silicon Mac, you have the option to utilize Colima, an open-source alternative to Docker Desktop, for deploying this bundle. You can install Colima via Homebrew by executing the command brew install colima
.
To set up an appropriately configured Colima virtual machine, run the following command:
colima start --cpu 11 --memory 32 --disk 100 --vm-type vz --vz-rosetta --arch aarch64 --profile uds
Certain configurations must be set on the host to ensure a smooth deployment of SonarQube and UDS Core. Note: From our testing these steps are not required with Docker Desktop.
SSH To the colima VM:
colima ssh --profile uds
Then run the following commands:
sudo sysctl -w vm.max_map_count=1524288sudo sysctl -w fs.file-max=1000000ulimit -n 1000000ulimit -u 8192sudo sysctl --loadsudo swapoff -asudo sysctl fs.inotify.max_user_instances=8192sudo sysctl -pexit
Linux Users
Section titled “Linux Users”Depending on your Linux distribution and its configuration, you may need to execute the following steps to ensure the proper deployment of Software Factory and/or UDS Core:
sudo sysctl -w vm.max_map_count=1524288sudo sysctl -w fs.file-max=1000000ulimit -n 1000000ulimit -u 8192sudo sysctl --loadsudo swapoff -asudo sysctl fs.inotify.max_user_instances=8192sudo sysctl -p
Quickstart
Section titled “Quickstart”**Step 1: Install UDS CLI
brew tap defenseunicorns/tap && brew install uds
Step 2: Deploy
To experiment with the UDS Software Factory, you can use the k3d-swf-demo
bundle to create a local K3d cluster featuring complete installations of UDS Core and Software Factory.
To deploy this bundle, run the following command:
uds deploy k3d-swf-demo:0.2.2
Optional:
Use the following command to visualize resources in the cluster via K9s:
uds zarf tools monitor
Step 3: Clean Up
Upon completion of the Software Factory demo bundle, execute the following command to tear down the K3d cluster:
k3d cluster delete uds
Alternatively, you have the option to deploy the swf-dev
bundle, designed to be deployed atop k3d-core-slim-dev
. This bundle encompasses the entire Software Factory, while leveraging only a portion of the underlying UDS Core baseline. This design allows the bundle to run on a broader range of hardware, specifically tailored for local development environments.
If using the swf-dev
bundle, users have two options for deployment:
- Build and deploy directly from the source.
- Deploy the pre-built artifacts hosted in the GHCR OCI registry.
Run the below command to deploy the k3d-core-slim-dev
bundle:
uds deploy k3d-core-slim-dev:0.22.0
Then run the following command to deploy the swf-dev
bundle on top of the development cluster:
uds deploy swf-dev:0.2.2
You can then configure keycloak. Use zarf connect to establish a connection to the keycloak admin endpoint:
uds zarf connect keycloak
Refer to the UDS Core documentation for more details on how to configure keycloak users and groups.
Source
Section titled “Source”Step 1: Clone the Software Factory Repository
git clone https://github.com/defenseunicorns/uds-software-factory.git
To build and deploy from the source you can utilize the UDS tasks by running:
uds run
If you need to create a test user in keyloak you can then run:
uds run setup:create-doug-user