feat(k3s-baseline): complete WP-0002 T01-T05
- bootstrap.yml: install k3s (server+cluster-init, pinned v1.35.1+k3s1)
and Helm (v3.17.3 with checksum verify); fetch kubeconfig to control node
- tests/smoke_kube.sh: assert node Ready, helm, CoreDNS, Traefik
- docs/kubeconfig.md: usage, merge, context-switch, security note
- Makefile: k3s-install and smoke targets with make help
Closes T01, T02, T03, T04, T05 of RAIL-BS-WP-0002.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 09:43:16 +00:00
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
|
|
|
|
|
|
INVENTORY ?= ansible/hosts.ini
|
|
|
|
|
|
2026-03-10 15:21:29 +01:00
|
|
|
##@ Safety Net
|
|
|
|
|
|
2026-03-10 16:52:40 +00:00
|
|
|
backup: ## Backup k3s etcd + Helm values + kubeconfig (age-encrypted, root required)
|
2026-03-10 22:33:49 +00:00
|
|
|
sudo tools/cmd/railiance-backup-s2
|
2026-03-10 16:52:40 +00:00
|
|
|
|
|
|
|
|
restore: ## List available backups and print restore guide
|
|
|
|
|
tools/cmd/railiance-restore-s2
|
2026-03-10 15:21:29 +01:00
|
|
|
|
|
|
|
|
preflight: ## Pre-migration safety gate — must pass before cluster work
|
|
|
|
|
bin/railiance preflight
|
|
|
|
|
|
feat(k3s-baseline): complete WP-0002 T01-T05
- bootstrap.yml: install k3s (server+cluster-init, pinned v1.35.1+k3s1)
and Helm (v3.17.3 with checksum verify); fetch kubeconfig to control node
- tests/smoke_kube.sh: assert node Ready, helm, CoreDNS, Traefik
- docs/kubeconfig.md: usage, merge, context-switch, security note
- Makefile: k3s-install and smoke targets with make help
Closes T01, T02, T03, T04, T05 of RAIL-BS-WP-0002.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 09:43:16 +00:00
|
|
|
##@ Kubernetes
|
|
|
|
|
|
|
|
|
|
k3s-install: ## Install k3s and Helm on all inventory hosts
|
|
|
|
|
ansible-playbook -i $(INVENTORY) ansible/bootstrap.yml
|
|
|
|
|
|
|
|
|
|
smoke: ## Run Kubernetes smoke tests
|
|
|
|
|
bash tests/smoke_kube.sh
|
|
|
|
|
|
2026-03-10 14:16:22 +01:00
|
|
|
test-ha-failover: ## Run HA failover test (D3) — kills primary PG pod, asserts recovery
|
|
|
|
|
bash tests/test_ha_failover.sh $(if $(GITEA_URL),$(GITEA_URL),)
|
|
|
|
|
|
2026-06-16 03:51:01 +02:00
|
|
|
verify-activity-core: ## Reconcile activity-core runtime and verify disabled ops inventory probe evidence
|
|
|
|
|
tools/cmd/railiance-verify-activity-core
|
|
|
|
|
|
feat(k3s-baseline): complete WP-0002 T01-T05
- bootstrap.yml: install k3s (server+cluster-init, pinned v1.35.1+k3s1)
and Helm (v3.17.3 with checksum verify); fetch kubeconfig to control node
- tests/smoke_kube.sh: assert node Ready, helm, CoreDNS, Traefik
- docs/kubeconfig.md: usage, merge, context-switch, security note
- Makefile: k3s-install and smoke targets with make help
Closes T01, T02, T03, T04, T05 of RAIL-BS-WP-0002.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 09:43:16 +00:00
|
|
|
##@ Help
|
|
|
|
|
|
|
|
|
|
help: ## Show this help
|
|
|
|
|
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} \
|
|
|
|
|
/^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } \
|
|
|
|
|
/^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) }' $(MAKEFILE_LIST)
|
|
|
|
|
|
2026-06-16 03:51:01 +02:00
|
|
|
.PHONY: backup restore preflight k3s-install smoke test-ha-failover verify-activity-core help
|