|
| 1 | +# Deploying Tornjak via Helm Charts |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +You can deploy **Tornjak** using the [SPIFFE helm-charts-hardened repository](https://github.com/spiffe/helm-charts-hardened). |
| 6 | + |
| 7 | +This guide walks you through deploying both the frontend and backend of Tornjak with Direct Access, using Helm charts in a local Kubernetes environment via Minikube. |
| 8 | + |
| 9 | +By the end, you’ll have a working instance of SPIRE integrated with Tornjak for easier visibility and management of your SPIFFE identities. |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | + |
| 13 | +Make sure you have the following installed on your system: |
| 14 | + |
| 15 | +- [Minikube](https://minikube.sigs.k8s.io/docs/start/?arch=%2Fmacos%2Fx86-64%2Fstable%2Fbinary+download) |
| 16 | +- [Helm](https://helm.sh/docs/intro/install/) |
| 17 | + |
| 18 | +## Step-by-Step Deployment |
| 19 | + |
| 20 | +### 1. Clone Repo |
| 21 | + |
| 22 | +```sh |
| 23 | +git clone https://github.com/spiffe/tornjak.git |
| 24 | +cd tornjak |
| 25 | +cd docs/helm |
| 26 | +``` |
| 27 | + |
| 28 | +### 2. Start Minikube |
| 29 | + |
| 30 | +```sh |
| 31 | +minikube start |
| 32 | +``` |
| 33 | + |
| 34 | +### 3. Deploy SPIRE |
| 35 | + |
| 36 | +Now we can excute the following to deploy our SPIRE instance: |
| 37 | + |
| 38 | +```sh |
| 39 | +helm upgrade --install -n spire-server spire-crds spire-crds --repo https://spiffe.github.io/helm-charts-hardened/ --create-namespace |
| 40 | +``` |
| 41 | + |
| 42 | +### 4. Deploy Tornjak |
| 43 | + |
| 44 | +Now we can deploy Tornjak with SPIRE. |
| 45 | + |
| 46 | +First, we need to export the Tornjak backend API URL: |
| 47 | + |
| 48 | +```sh |
| 49 | +export TORNJAK_API=http://localhost:10000 |
| 50 | +``` |
| 51 | + |
| 52 | +Then, run the following Helm command to deploy Tornjak with the frontend and backend enabled: |
| 53 | + |
| 54 | +```sh |
| 55 | +helm upgrade --install -n spire-server spire spire \ |
| 56 | +--repo https://spiffe.github.io/helm-charts-hardened/ \ |
| 57 | +--set tornjak-frontend.apiServerURL=$TORNJAK_API \ |
| 58 | +--values values.yaml \ |
| 59 | +--render-subchart-notes |
| 60 | +``` |
| 61 | + |
| 62 | +### 5. Test Deployment |
| 63 | + |
| 64 | +You can verify the deployment with: |
| 65 | + |
| 66 | +```sh |
| 67 | +helm test spire -n spire-server |
| 68 | +``` |
| 69 | + |
| 70 | +### 6. Access Tornjak UI |
| 71 | + |
| 72 | +Run the backend. |
| 73 | + |
| 74 | +```sh |
| 75 | +kubectl -n spire-server port-forward service/spire-tornjak-backend 10000:10000 |
| 76 | +``` |
| 77 | + |
| 78 | +In a separate terminal, run the frontend. |
| 79 | + |
| 80 | +```sh |
| 81 | +kubectl -n spire-server port-forward service/spire-tornjak-frontend 3000:3000 |
| 82 | +``` |
| 83 | + |
| 84 | +Open your browser and go to [http://localhost:3000](http://localhost:3000) |
| 85 | +You should now see the Tornjak UI! |
0 commit comments