Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/helm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ jobs:
echo "Image tag: $IMAGE_TAG"
cat helm/Chart.yaml

- name: Add Helm repositories
run: helm repo add bitnami https://charts.bitnami.com/bitnami

- name: Build Helm dependencies
run: helm dependency build helm/

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Lint
run: |
uv run ruff check
uv run ruff format --check
uv run ruff format --diff
- name: Run tests
run: |
NO_COLOR=true uv run pytest --reruns 2 --disable-warnings --log-cli-level=INFO --cov-report xml:cov.xml --cov=bbot_server .
Expand Down
75 changes: 75 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,81 @@ Note: this requires Docker and Docker Compose to be installed.
bbctl server start
```

## Deploy with Helm (Kubernetes)

BBOT Server can be deployed to Kubernetes using its official Helm chart. The chart deploys the API server, watchdog, MongoDB, and Redis.

### Quick Start

```bash
# Add the Helm repo
helm repo add blacklanternsecurity https://blacklanternsecurity.github.io/bbot-server

# Install
helm install bbot blacklanternsecurity/bbot-server
```

Or install directly from the OCI registry:

```bash
helm install bbot oci://registry-1.docker.io/blacklanternsecurity/bbot-server
```

### Configuration

Key values can be overridden with `--set` or a custom values file:

```bash
helm install bbot blacklanternsecurity/bbot-server \
--set ingress.enabled=true \
--set ingress.hosts[0].host=bbot.example.com \
--set ingress.hosts[0].paths[0].path=/ \
--set ingress.hosts[0].paths[0].pathType=Prefix
```

Or with a values file:

```yaml
# custom-values.yaml
ingress:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt
hosts:
- host: bbot.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: bbot-tls
hosts:
- bbot.example.com

secrets:
# provide your own API key, or leave empty to auto-generate
apiKey: ""
```

```bash
helm install bbot blacklanternsecurity/bbot-server -f custom-values.yaml
```

### Retrieving the API Key

If you didn't provide an API key, one is auto-generated. Retrieve it with:

```bash
kubectl get secret bbot-api-key -o jsonpath='{.data.api-key}' | base64 -d
```

### Upgrading

```bash
helm repo update
helm upgrade bbot blacklanternsecurity/bbot-server
```

## Interacting with BBOT Server Remotely (Multiplayer)

By default, BBOT Server listens on localhost. Use `--listen` to expose it to the network:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "bbot-server"
version = "0.1.0"
version = "0.1.1"
description = ""
authors = [{name = "TheTechromancer"}]
license = "AGPL-3.0"
Expand Down
4 changes: 3 additions & 1 deletion test_helm_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ def setUpClass(cls):
)
print("Image loaded successfully")

# Update Helm dependencies
# Add Helm repositories and update dependencies
print("Adding Helm repositories...")
cls.helm("repo", "add", "bitnami", "https://charts.bitnami.com/bitnami", timeout=30)
print("Updating Helm dependencies...")
cls.helm("dependency", "update", "helm/", timeout=60)

Expand Down
Loading