Development Guide
This document is a guide for developers who want to contribute to the project. It provides an overview of the development process, tools, and best practices.
Development Process
Each of the components is developed in its own repository under the sbomer-project organization on GitHub.
The following are based around sbom-service component, but the general principles apply to all components; each component has its own scripts customized for that component.
0. Set up environment
To deploy the system locally, we deploy all the necessary components using Helm to the local Minikube Kubernetes cluster. In addition to the components, we need to install Tekton to the cluster since we are using Tekton pipelines to orchestrate the generation process.
Scripts for setting up the environment can be found in the hack directory.
Run
bash setup-local-dev.sh
from the root directory to set up the Minikube local cluster environment.
This has to be done only once. You do not need to run this while changing the component code.
1. Build into cluster
Run
bash ./hack/run-helm-with-local-build.sh
to deploy all the components to the local cluster sbomer-test.
Component versions, apart from the current component, which is built from the current (changed) code, are decided by the central Helm chart in sbomer-platform repository.
2. Test
Upon successful deployment, you should see all the pods running or completed.
To view pods, run
kubectl get pods -n sbomer-test
To gain access to the gateway, which is the entry point to the system (UI, API, other component ports), expose it by running
kubectl port-forward svc/sbomer-release-gateway 8080:8080 -n sbomer-test
Now the system is fully deployed.
Depending on the component, you can additionally test it using curl or the UI.
For example, if you are working on the sbom-service, you can send a request to the API to trigger a generation and see how it is processed by the system.
Note: Some components can be developed on their own, such as the sbom-service API, so you don’t need to deploy the whole system to test them.