Skip to content

Commit

Permalink
Update README with config updates and remove release logic pull with …
Browse files Browse the repository at this point in the history
…config
  • Loading branch information
wajihyassine committed Sep 13, 2024
1 parent e3938f0 commit 77f0255
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/turbinia/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: turbinia
version: 1.1.1
version: 1.1.2
description: A Helm chart for Turbinia Kubernetes deployments.
keywords:
- turbinia
Expand Down
94 changes: 94 additions & 0 deletions charts/turbinia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,100 @@ chart with the updated values.
helm install my-release ../turbinia
```

### Managing and updating the Turbinia config

This section outlines how to deploy and manage the Turbinia configuration file
within OSDFIR infrastructure. There are three primary methods:

1. **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.
2. **Embedding Turbinia config in the Helm Chart**

To customize Turbinia with your own config file and include it directly in
the Helm chart deployment, follow these steps:

1. Download and extract the Helm chart:

```console
helm pull osdfir-charts/turbinia --untar
cd turbinia/
```

2. Download the default Turbinia config:

```console
wget https://raw.githubusercontent.com/google/turbinia/master/turbinia/config/turbinia_config_tmpl.py > turbinia.conf
```

3. Modify the config file then deploy the Helm chart:

```console
helm install my-release ../turbinia
```

> **NOTE**: The Helm chart uses the `config.override` value in the `values.yaml` file to determine the location of your config file. By default, `config.override` is set to the root directory of the Helm chart.

To update config changes using this method:

1. Modify your Config File

Make the necessary changes to your Turbinia config file.

2. Upgrade the Helm Release:

```console
helm upgrade my-release ../turbinia
```

This will automatically apply the updated config changes and restart the Turbinia deployment so the changes can be picked up.


3. **Managing Turbinia configs externally**

For more advanced configuration management, you can manage the Turbinia config
file independently of the Helm chart:

1. Prepare your Config File:

Organize the Turbinia config file with your desired customizations.

2. Create a ConfigMap:

```console
kubectl create configmap turbinia-configs --from-file=turbinia.conf
```

Replace `turbinia.conf` with the actual name of your config file.

3. Install or Upgrade the Helm Chart:

```console
helm install my-release osdfir-charts/turbinia --set config.existingConfigMap="turbinia-configs"
```

This command instructs the Helm chart to use the `turbinia-configs` ConfigMap for
Turbinia's config file.

To update the config changes using this method:

1. Update the ConfigMap:

```console
kubectl create configmap turbinia-configs --from-file=turbinia.conf --dry-run -o yaml | kubectl replace -f -
```

2. Restart the Turbinia deployment to apply the new configs

```console
kubectl rollout restart deployment -l app.kubernetes.io/name=turbinia
```

## Persistence

The Turbinia deployment stores data at the `/mnt/turbiniavolume` path of the container and stores configuration files at the `/etc/turbinia` path of the container.
Expand Down
7 changes: 0 additions & 7 deletions charts/turbinia/templates/init-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,9 @@ data:
cp /tmp/turbinia/* /etc/turbinia/turbinia.conf
else
# Pull default config if one is not already provided
{{- $turbiniaWorker := "us-docker.pkg.dev/osdfir-registry/turbinia/release/turbinia-worker" -}}
{{- if eq .Values.worker.image.repository $turbiniaWorker }}
echo -n "* Fetching the release Turbinia configuration file..."
RELEASE_TAG=$(wget -O- https://api.github.com/repos/google/turbinia/releases | jq -r '.[0] | .tag_name')
wget "https://raw.githubusercontent.com/google/turbinia/$RELEASE_TAG/turbinia/config/turbinia_config_tmpl.py" -O turbinia.conf
{{- else }}
echo -n "* Fetching the latest Turbinia configuration file..."
wget "https://raw.githubusercontent.com/google/turbinia/master/turbinia/config/turbinia_config_tmpl.py" -O turbinia.conf
echo "OK"
{{- end }}
fi
# Set up the Redis connection
Expand Down

0 comments on commit 77f0255

Please sign in to comment.