Skip to content

Commit f54640f

Browse files
update minimal example
1 parent c7b8b58 commit f54640f

File tree

5 files changed

+90
-16
lines changed

5 files changed

+90
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ By default, this chart deploys:
2525

2626
### Quick Start
2727

28-
See the [minimal installation example](./examples/minimal-installation/) for a complete quick start guide.
28+
See the [minimal installation example](./examples/minimal-installation/) for a example deployment.
2929

3030
### Step-by-Step Installation
3131

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Minimal Sourcebot Installation
2+
3+
This example demonstrates the simplest way to deploy Sourcebot to a Kubernetes cluster using Helm.
4+
5+
## Quick Start
6+
7+
### 1. Add the Helm Repository
8+
9+
```bash
10+
helm repo add sourcebot https://sourcebot-dev.github.io/sourcebot-helm-chart
11+
helm repo update
12+
```
13+
14+
### 2. Generate Secrets
15+
16+
Edit `secrets.yaml` and replace the placeholder values:
17+
18+
```bash
19+
# Generate AUTH_SECRET
20+
openssl rand -base64 33
21+
22+
# Generate SOURCEBOT_ENCRYPTION_KEY
23+
openssl rand -base64 24
24+
```
25+
26+
Apply the secrets:
27+
28+
```bash
29+
kubectl apply -f secrets.yaml
30+
```
31+
32+
### 3. Configure Your Repositories
33+
34+
Edit `values.yaml` and update the repositories you want to index. See the [configuration docs](https://docs.sourcebot.dev/docs/configuration/config-file#config-file-schema) for more information.
35+
36+
### 4. Deploy
37+
38+
```bash
39+
helm install sourcebot sourcebot/sourcebot -f values.yaml
40+
```
41+
42+
### 5. Access Sourcebot
43+
44+
```bash
45+
kubectl port-forward svc/sourcebot 3000:3000
46+
```
47+
48+
Open http://localhost:3000
49+
50+
## Uninstalling
51+
52+
```bash
53+
helm uninstall sourcebot
54+
kubectl delete -f secrets.yaml
55+
56+
# Optionally, remove all PVCs (this will delete all data)
57+
kubectl delete pvc -l app.kubernetes.io/instance=sourcebot
58+
```
59+
60+
For more information, see the [main Helm chart documentation](../../README.md).

examples/minimal-installation/secret.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
kind: Secret
3+
type: Opaque
4+
metadata:
5+
name: sourcebot-secrets
6+
stringData:
7+
postgresql-password: password
8+
redis-password: password
9+
---
10+
# Environment variable secrets
11+
# See https://docs.sourcebot.dev/docs/configuration/environment-variables for more details
12+
apiVersion: v1
13+
kind: Secret
14+
type: Opaque
15+
metadata:
16+
name: sourcebot-env-secrets
17+
stringData:
18+
AUTH_SECRET: "000000000000000000000000000000000" # CHANGEME: generate via `openssl rand -base64 33`
19+
SOURCEBOT_ENCRYPTION_KEY: "000000000000000000000000000000000" # CHANGEME: generate via `openssl rand -base64 24`
20+
21+
# Additiona secret environment variables such as PAT tokens,
22+
# LLM API keys, etc. can be added here.
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# Minimal Sourcebot Installation Example
2-
# This configuration uses a single secret for all credentials and deploys PostgreSQL and Redis as subcharts.
32

43
# Sourcebot application configuration
54
sourcebot:
6-
image:
7-
tag: "main"
8-
95
# Sourcebot application configuration
106
config:
117
$schema: https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json
@@ -16,11 +12,16 @@ sourcebot:
1612
repos:
1713
- sourcebot-dev/sourcebot
1814

15+
# Load secret environment variables
16+
envFrom:
17+
- secretRef:
18+
name: sourcebot-env-secrets
19+
1920
# PostgreSQL configuration
2021
postgresql:
2122
auth:
2223
# Reference the existing secret created separately
23-
existingSecret: sourcebot
24+
existingSecret: sourcebot-secrets
2425
secretKeys:
2526
userPasswordKey: postgresql-password
2627
adminPasswordKey: postgresql-password
@@ -29,5 +30,5 @@ postgresql:
2930
redis:
3031
auth:
3132
# Reference the existing secret created separately
32-
existingSecret: sourcebot
33+
existingSecret: sourcebot-secrets
3334
existingSecretPasswordKey: redis-password

0 commit comments

Comments
 (0)