turbinia
A Helm chart for Turbinia Kubernetes deployments.
About this chart
Turbinia Helm Chart
Turbinia is an open-source framework for deploying, managing, and running distributed forensic workloads.
TL;DR
helm repo add osdfir-charts https://google.github.io/osdfir-infrastructure/
helm install my-release osdfir-charts/turbinia
Note: By default, Turbinia is not externally accessible and can be reached via
kubectl port-forwardwithin the cluster.
Introduction
This chart bootstraps a Turbinia deployment on a Kubernetes cluster using the Helm package manager.
For a quick start with a local Kubernetes cluster on your desktop, check out the getting started with Minikube guide.
Prerequisites
- Kubernetes 1.23+
- Helm 3.8.0+
- PV provisioner support in the underlying infrastructure
- Shared storage for clusters larger then one machine.
Installing the Chart
The first step is to add the repo and then update to pick up any new changes.
helm repo add osdfir-charts https://google.github.io/osdfir-infrastructure/
helm repo update
To install the chart, specify any release name of your choice.
For example, using my-release as the release name, run:
helm install my-release osdfir-charts/turbinia
The command deploys Turbinia on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: See the Managing and updating the Turbinia config section for more details on managing the Turbinia config.
Configuration and installation details
Use a different Turbinia version
The Turbinia Helm chart utilizes the latest container release tags by default. OSDFIR Infrastructure actively monitors for new versions of the main containers and releases updated charts accordingly.
To modify the application version used in Turbinia, specify a different version
of the image using the image.tag parameter and/or a different repository using
the image.repository parameter.
For example, to use the most recent development version instead, set the following variables:
turbinia.server.image.repository="us-docker.pkg.dev/osdfir-registry/turbinia/release/turbinia-server-dev"
turbinia.server.image.tag="latest"
turbinia.api.image.repository="us-docker.pkg.dev/osdfir-registry/turbinia/release/turbinia-api-server-dev"
turbinia.api.image.tag="latest"
turbinia.worker.image.repository="us-docker.pkg.dev/osdfir-registry/turbinia/release/turbinia-worker-dev"
turbinia.worker.image.tag="latest"
Upgrading the Helm chart
Helm chart updates can be retrieved by running helm repo update.
To explore available charts and versions, use helm search repo osdfir-charts/.
Install a specific chart version with helm install my-release osdfir-charts/turbinia --version <version>.
A major Helm chart version change (like v1.0.0 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.
Managing and updating the Turbinia config
This section outlines how to deploy and manage the Turbinia configuration file within OSDFIR infrastructure.
There are two primary methods:
Using Default Configurations
If you don't provide your own Turbinia config file during deployment, the Turbinia deployment will automatically retrieve the latest default configs from the Turbinia Github repository. This method requires no further action from you.
NOTE: When using the default method, you cannot update the Turbinia config file directly. See the next section below for instructions on using a custom Turbinia config instead.
Managing Turbinia configs externally
For more advanced configuration management, you can manage the Turbinia config file independently of the Helm chart:
-
Prepare your Config File:
Organize the Turbinia config file with your desired customizations.
-
Create a ConfigMap:
kubectl create configmap turbinia-configs --from-file=turbinia.confReplace
turbinia.confwith the actual name of your config file. -
Install or Upgrade the Helm Chart:
helm install my-release osdfir-charts/turbinia --set config.existingConfigMap="turbinia-configs"This command instructs the Helm chart to use the
turbinia-configsConfigMap for Turbinia's config file.
To update the config changes using this method:
-
Update the ConfigMap:
kubectl create configmap turbinia-configs --from-file=turbinia.conf --dry-run -o yaml | kubectl replace -f - -
Restart the Turbinia deployment to apply the new configs
kubectl rollout restart deployment -l app.kubernetes.io/name=turbinia
Metrics and monitoring
The chart starts a metrics exporter for prometheus. The metrics endpoint (port 9200) is exposed in the service. Metrics can be scraped from within the cluster by either a Prometheus server running in your cluster or a cloud-based Prometheus service. Currently, Turbinia application metrics and system metrics are available.
One recommended option for an integrated monitoring solution would be the kube-prometheus-stack.
To setup, first add the repository containing the kube-prometheus-stack Helm chart:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
Create a file to disable the default selector:
cat >> values-monitoring.yaml << EOF
prometheus:
prometheusSpec:
serviceMonitorSelectorNilUsesHelmValues: false
EOF
Then to install the kube prometheus chart in a namespace called monitoring:
helm install kube-prometheus prometheus-community/kube-prometheus-stack -f values-monitoring.yaml --namespace monitoring
NOTE: To confirm Turbinia is recording metrics, check Prometheus or Grafana for entries starting with
turbinia_. If nothing shows up, you might need to update your Turbinia installation (helm upgrade) to apply the necessary CustomResourceDefinition (CRD).
Resource requests and limits
OSDFIR Infrastructure charts allow setting resource requests and limits for all
containers inside the chart deployment. These are inside the resources value
(check parameter table). Setting requests is essential for production workloads
and these should be adapted to your specific use case.
To maximize deployment success across different environments, resources are minimally defined by default.
Persistence
By default, the chart mounts a Persistent Volume at the /mnt/turbiniavolume path.
The volume is created using dynamic volume provisioning.
Configuration files can be found at the /etc/turbinia path of the container
while logs can be found at /mnt/turbiniavolume/logs/.
For clusters running more than one node or machine, the Persistent Volume will need to have the ability to be mounted by multiple machines, such as NFS, GCP Filestore, AWS EFS, and other shared file storage equivalents.
Installing Turbinia for Google Kubernetes Engine (GKE)
In order to process Google Cloud Platform (GCP) disks with Turbinia, some additional setup steps are required.
The first is to create a Turbinia GCP account using the helper script in
tools/create-gcp-sa.sh prior to installing the chart.
Once done, install the chart with the appropriate values to enable GCP disk
processing for Turbinia. Using a release name such as my-release, run:
helm install my-release osdfir-charts/turbinia \
--set gcp.enabled=true \
--set gcp.projectID=<GCP_PROJECT_ID> \
--set gcp.projectRegion=<GKE_CLUSTER_REGION> \
--set gcp.projectZone=<GKE_ClUSTER_ZONE>
Turbinia offers worker autoscaling based on CPU utilization. This feature can significantly increase the speed of task processing by automatically adjusting the number of active worker pods. To enable autoscaling on your existing deployment, run the following command:
helm upgrade my-release osdfir-charts/turbinia \
--reuse-values \
--set autoscaling.enabled.true
Enabling External Access and OIDC Authentication
Follow these steps to externally expose Turbinia and enable Google Cloud OIDC using the Oauth2 Proxy to control user access to Turbinia.
-
Create a global static IP address:
gcloud compute addresses create turbinia-webapps --global -
Register a new domain or use an existing one, ensuring a DNS entry points to the IP created earlier.
-
Create OAuth web client credentials following the Google Support guide. If using the CLI client, also create a Desktop/Native OAuth client.
- Fill in Authorized JavaScript origins with your domain as
https://<DOMAIN_NAME>.com - Fill in Authorized redirect URIs with
https://<DOMAIN_NAME>.com/oauth2/callback/
- Fill in Authorized JavaScript origins with your domain as
-
Generate a cookie secret:
openssl rand -base64 32 | head -c 32 | base64 -
Store your new OAuth credentials in a K8s secret:
kubectl create secret generic oauth-secrets \ --from-literal=client-id=<WEB_CLIENT_ID> \ --from-literal=client-secret=<WEB_CLIENT_SECRET> \ --from-literal=cookie-secret=<COOKIE_SECRET> \ --from-literal=client-id-native=<NATIVE_CLIENT_ID> -
Make a list of allowed emails in a text file, one per line:
touch authenticated-emails.txt -
Apply the authenticated email list as a K8s secret:
kubectl create secret generic authenticated-emails --from-file=authenticated-emails-list=authenticated-emails.txt -
Then to upgrade an existing release, externally expose Turbinia through a load balancer with GCP managed certificates, and deploy the Oauth2 Proxy for authentication, run:
helm upgrade my-release osdfir-charts/turbinia \ --reuse-values \ --set ingress.enabled=true \ --set ingress.className="gce" \ --set ingress.host=<DOMAIN> \ --set ingress.gcp.managedCertificates=true \ --set ingress.gcp.staticIPName=<GCP_STATIC_IP_NAME> \ --set oauth2proxy.enabled=true \ --set oauth2proxy.configuration.existingSecret=<OAUTH_SECRET_NAME> \ --set oauth2proxy.configuration.authenticatedEmailsFile.existingSecret=<AUTHENTICATED_EMAILS_SECRET_NAME>
Warning: Turbinia relies on the Oauth2 Proxy for authentication. If you plan to expose Turbinia with a public facing IP, it is highly recommended that the Oauth2 Proxy is deployed alongside with the command provided above. Otherwise, Turbinia will be accessible from anyone on the internet without authentication.
Installing Turbinia for Other Cloud Platforms
Turbinia currently offers native support only for Google Cloud Disks. This means you can seamlessly process evidence from Google Cloud Disks. For other cloud providers, you'll need to manually mount the disk to your Turbinia instance or copy the evidence into Turbinia for processing. We are actively working to expand native disk processing support for other cloud environments in the future. Installing the Turbinia Helm Chart remains the same regardless of your cloud provider.
Uninstalling the Chart
To uninstall/delete a Helm deployment with a release name of my-release:
helm uninstall my-release
Tip: Please update based on the release name chosen. You can list all releases using
helm list
The command removes all the Kubernetes components but Persistent Volumes (PVC) associated with the chart and deletes the release.
To delete the PVC's associated with a release name of my-release:
kubectl delete pvc -l release=my-release
Note: Deleting the PVC's will delete Turbinia data as well. Please be cautious before doing it.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.timesketch.enabled | Enables the Timesketch deployment (only used in the main OSDFIR Infrastructure Helm chart) | false |
global.timesketch.servicePort | Timesketch service port (overrides timesketch.service.port) | nil |
global.turbinia.enabled | Enables the Turbinia deployment (only used within the main OSDFIR Infrastructure Helm chart) | false |
global.turbinia.servicePort | Turbinia API service port (overrides turbinia.service.port) | nil |
global.dfdewey.enabled | Enables the dfDewey deployment along with Turbinia | false |
global.yeti.enabled | Enables the Yeti deployment (only used in the main OSDFIR Infrastructure Helm chart) | false |
global.yeti.servicePort | Yeti API service port (overrides yeti.api.service.port) | nil |
global.ingress.enabled | Enable the global loadbalancer for external access | false |
global.existingPVC | Existing claim for Turbinia persistent volume (overrides persistent.name) | "" |
global.storageClass | StorageClass for the Turbinia persistent volume (overrides `persistent.storageC |
Deploy turbinia with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has turbinia on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartturbinia is pinned at v1.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply