Overview
This repository contains the installer for Binarly On-Prem. The installer uses Helmfile and various Helm charts to set up all necessary components.Prerequisites
- Access to a Kubernetes cluster (at least with version
1.29.0or newer). kubectlconfigured to interact with your cluster.helmandhelmfileinstalled.- A Linux, macOS, or Windows with WSL enabled.
- Access credentials for Binarlyβs Artifact Registry (provided with the installer).
- A domain name, like βbinarly.domain.comβ.
Dependencies
The following table lists the exact dependencies known to work and necessary for the Binarly On-Prem Installer:| Dependency | Description | Minimum Version | Installation Instructions |
|---|---|---|---|
| helmfile | A declarative specification for deploying Helm charts | 0.162.0 | Helmfile Installation |
| helm | The Kubernetes package manager | 3.15.0 | Helm Installation |
| helm-diff | A Helm plugin that shows a diff explaining what a Helm upgrade would change | 3.9.5 | Helm-diff Installation |
| helm-secrets | A Helm plugin that helps manage secrets with Git workflows and store them securely | 4.6.0 | Helm-secrets Installation |
Checking Dependencies are Installed Correctly
To ensure all dependencies are installed correctly, you can run the following commands:[!NOTE] Make sure the versions of the installed dependencies meet or exceed the minimum versions specified in the table above.
Unpacking the Installer
-
Unpack the provided
tgzfile containing the Binarly On-Prem Installer: -
Verify the contents match the following directory structure:
Directory Structure
The installer package contains the following key files and directories:.envrc.local-template: Template for environment configuration file with required env variables. Should be renamed/copied to.envrc.local.helmfile.yaml.gotmpl: Helmfile template for deployment of the Kubernetes helm charts.k8s/apps/: Contains configuration for various applications necessary to deploy Binarly On Prem to Kuberentes (ArgoCD, Binarly, cert-manager, etc.).secrets/: Directory for storing sensitive information (i.e: the Artifact Registry credentials).
Kubernetes Helm Chart Configuration
The filehelmfile.yaml.gotmpl contains all of the charts to install Binarly On-Prem on your Kubernetes cluster. There are two main groups of charts listed:
External Dependencies
Binarly On-Prem depends on the following projects: Each of these dependencies can be easily configured by just going to thek8s/apps directory and the name of the dependency. Default settings should be more than enough to have
a working cluster but, we recommend configuring each dependency to meet your requirements and policies towards security and best practices. We offer below some advice to some of them.
Configuring ArgoCD
By default, ArgoCD does not need any configuration. There are optional steps in the configuration document.
Installation
Configure Environment Variables
-
Enter the
binarly-installerdirectory. -
Rename
.envrc.local-templateto.envrc.local: -
Put your Binarly Artifact Registry credentials inside a file called
binarly-registry-credentialsin asecrets/directory.
-
Edit
.envrc.localand you will see the following environment variables:
-
Source the
.envrc.localto have the variables available to your shell session:
echo commands to test the output of the previous variables on your terminal.
Configure binarly-secrets chart
Please see the configuration section for more information on the secrets chart.- Ensure you have added to the
.envrc.localthe following variables for the secrets:BINARLY_SECRET_NVD_API_KEY: NVD API Key.BINARLY_SECRET_SERVER_INTEGRATION_SECRET: Encryption Key for Jira Integration setup. Must be random 32 character string.
Configure binarly chart
Please see the configuration section for more information on the secrets chart.- Edit
k8s/apps/binarly/values.yaml.gotmpl, make sure to specify:basedomain: Base domain name at which Binarly Transparency Platform should be available on the local network.keycloakHelmChart.chart.values.ingress.hostname: Should be"auth.{{basedomain}}"withbasedomainsubstituted with Base domain name.clusterIssuer: Certificate Issuer to configure cert-manager to issue TLS certificates for the chosen domain name (for ex. βdashboard.binarly.domain.comβ).
Install helm charts
Once everything is configured, letβs install Binarly On-Prem on your Kubernetes cluster. To do so, first letβs do it in batches. If we have a look to thehelmfile.yaml.gotmpl file, we can discover we have two kind of helm charts defined:
- Dependencies (or base) charts: All extra necessary charts for Binarly to run.
- binarly: Charts specific for Binarly.
selectors, i.e: this allows to select group of chars inside the relase entry.
- We will start first those base dependencies on the cluster, to do so:
releases inside the helmfile.yaml.gotmpl with a label of kind=base).
- Now itβs time to install the second group, the Binarly charts. To do so:
secrets and binarly charts.
Sync Binarly ArgoCD applications
ArgoCD will be installed on theargocd namespace, and if itβs using the default settings, we can do the following for displaying the UI (otherwise if we have added an Ingress, we can use the domain assigned to ArgoCD):
- Obtain the credentials (from
argocd-initial-admin-secretif you havenβt changed the ArgoCD password or fromargocd-secret):
- And now do a port-forward:
-
Navigate with your browser to
http://localhost:9090and fill the credentials with useradminand password the one you obtained before. It should list all of the Binarly applications. -
We can proceed to sync the applications in the following order:
minio-buckets(wait for it to behealthyin ArgoCD).fetch-artefacts(wait for it to behealthyin ArgoCD).common(donβt wait for it to behealthyin ArgoCD and deploykeycloak).keycloak(wait forcommonandkeycloakto be healthy in ArgoCD).dashboard(wait for it to behealthyin ArgoCD).server(wait for it to behealthyin ArgoCD).
Extra Helm chart additions
There are additional projects that can be used alongside the Binarly application: Your environment may require more charts to be installed. These can be added to thehelmfile.yaml file and a corresponding values.yaml file in the k8s/apps directory.