Skip to content

Commit 1a57e83

Browse files
graylikemeclaude
andcommitted
refactor: move infrastructure to battletech-infrastructure repo
Remove infra/ directory (Terraform, K8s manifests, upload script). Simplify deploy skill to API-only. Update CLAUDE.md to point to the new dedicated infrastructure repository. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 80cf8e2 commit 1a57e83

18 files changed

Lines changed: 3 additions & 708 deletions

.claude/skills/deploy/SKILL.md

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
---
22
name: deploy
3-
description: "Build, push, and deploy to production. Usage: /deploy api | /deploy roster | /deploy (defaults to api)"
3+
description: "Build, push, and deploy the API to production"
44
disable-model-invocation: true
55
allowed-tools: Bash, Read
66
---
77

8-
Deploy a service to production. Accepts one argument: `api` (default) or `roster`.
9-
10-
## Service: api
11-
12-
Run from the battletech repo root. Stop on any failure:
8+
Deploy the API to production. Run from the repo root. Stop on any failure:
139

1410
1. Push commits to origin:
1511
```
@@ -40,36 +36,4 @@ Run from the battletech repo root. Stop on any failure:
4036
-d '{"query":"{ metadata { version } }"}' | python3 -m json.tool
4137
```
4238

43-
## Service: roster
44-
45-
Run from the `../battletech-roster-builder/` repo root. Stop on any failure:
46-
47-
1. Push commits to origin:
48-
```
49-
git push origin main
50-
```
51-
52-
2. Build the amd64 Docker image and push to GHCR:
53-
```
54-
docker buildx build --platform linux/amd64 \
55-
-t ghcr.io/graylikeme/battletech-roster:sha-$(git rev-parse --short HEAD) \
56-
-t ghcr.io/graylikeme/battletech-roster:latest \
57-
--push .
58-
```
59-
60-
3. Restart the K8s deployment to pull the new image:
61-
```
62-
KUBECONFIG=~/.kube/battletech.yaml kubectl rollout restart deployment/battletech-roster -n battletech
63-
```
64-
65-
4. Wait for rollout to complete:
66-
```
67-
KUBECONFIG=~/.kube/battletech.yaml kubectl rollout status deployment/battletech-roster -n battletech --timeout=120s
68-
```
69-
70-
5. Verify the site is healthy:
71-
```
72-
curl -sf -o /dev/null -w '%{http_code}' https://roster.battledroids.ru/
73-
```
74-
7539
Report the result of each step. If the Docker build takes a while, run it in the background and check on it.

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,3 @@
66

77
# MUL scraped data (archived in mul-data.zip)
88
mul-data/
9-
10-
# Terraform
11-
infra/.terraform/
12-
infra/*.tfstate*
13-
infra/terraform.tfvars

CLAUDE.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,7 @@ cargo sqlx prepare --workspace
5050

5151
There is no test suite yet.
5252

53-
```bash
54-
# Terraform (infra/)
55-
cd infra && terraform init # download providers
56-
cd infra && terraform validate # check syntax
57-
cd infra && terraform plan # preview changes
58-
cd infra && terraform apply # provision infrastructure
59-
```
53+
Infrastructure (Terraform, K8s manifests) lives in the separate [battletech-infrastructure](https://github.com/graylikeme/battletech-infrastructure) repo.
6054

6155
## Environment
6256

infra/.terraform.lock.hcl

Lines changed: 0 additions & 15 deletions
This file was deleted.

infra/database.tf

Lines changed: 0 additions & 33 deletions
This file was deleted.

infra/dns.tf

Lines changed: 0 additions & 26 deletions
This file was deleted.

infra/k8s/api.yaml

Lines changed: 0 additions & 96 deletions
This file was deleted.

infra/k8s/cert-manager.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

infra/k8s/namespace.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

infra/k8s/roster.yaml

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)