From 6b9307289b5086a2d6d8e52828bf0ff2c7020deb Mon Sep 17 00:00:00 2001 From: Bernd Worsch Date: Fri, 12 Sep 2025 01:46:14 +0200 Subject: [PATCH] railiance: initial bootstrap scaffold --- .editorconfig | 7 +++++++ .github/workflows/tests.yml | 11 +++++++++++ .gitignore | 17 +++++++++++++++++ README.md | 18 ++++++++++++++++++ ansible/bootstrap.yml | 25 +++++++++++++++++++++++++ docs/OODA.md | 5 +++++ tests/smoke_kube.sh | 5 +++++ 7 files changed, 88 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/tests.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 ansible/bootstrap.yml create mode 100644 docs/OODA.md create mode 100644 tests/smoke_kube.sh diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..67b4835 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..bfd3dd9 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,11 @@ +name: railiance-tests +on: [push, pull_request] +jobs: + smoke: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: K8s smoke (placeholder) + run: | + echo "Provide kubeconfig in CI or run locally:" + echo " KUBECONFIG=/etc/rancher/k3s/k3s.yaml ./tests/smoke_kube.sh" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..736d212 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# OS +.DS_Store + +# Python +__pycache__/ +*.pyc + +# Ansible artifacts +*.retry + +# Helm build +charts/*/charts/ +charts/*/tmp/ + +# Local secrets (do not commit) +secrets/ +*.enc diff --git a/README.md b/README.md new file mode 100644 index 0000000..5f3c6ed --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# railiance-bootstrap + +**Railiance Bootstrap** — opinionated, reproducible IaC to rebuild Coulomb infra from scratch. + +## Goals +- Two Linux machines + this Git repo + credentials ⇒ full rebuild +- GitOps-first with ArgoCD/Flux +- OODA (Observe→Orient→Decide→Act) encoded as pipelines +- Tests define success at every step + +## Layout +``` +ansible/ # host bootstrap +helm/ # charts & values +k8s/ # raw manifests/CRDs +tests/ # expectation tests (bash/py) +docs/ # operator notes, OODA SOPs +``` diff --git a/ansible/bootstrap.yml b/ansible/bootstrap.yml new file mode 100644 index 0000000..7c7450f --- /dev/null +++ b/ansible/bootstrap.yml @@ -0,0 +1,25 @@ +--- +- name: Railiance host bootstrap + hosts: all + become: true + tasks: + - name: Ensure base packages + apt: + name: + - curl + - git + - jq + update_cache: yes + state: present + + - name: Install k3s (server) + shell: | + curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --write-kubeconfig-mode=644" sh - + args: { creates: /usr/local/bin/k3s } + + - name: Verify k3s node + shell: k3s kubectl get nodes + register: nodes + changed_when: false + + - debug: var=nodes.stdout_lines diff --git a/docs/OODA.md b/docs/OODA.md new file mode 100644 index 0000000..bc5cda9 --- /dev/null +++ b/docs/OODA.md @@ -0,0 +1,5 @@ +# OODA in Railiance +- Observe: telemetry & test results +- Orient: AI analyzes deltas & proposes remediations +- Decide: specify → review → authorize (Git PR) +- Act: GitOps applies automatically (human independent) diff --git a/tests/smoke_kube.sh b/tests/smoke_kube.sh new file mode 100644 index 0000000..8ccd99c --- /dev/null +++ b/tests/smoke_kube.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail +kubectl get nodes +kubectl get ns +echo "[OK] basic k8s API reachable"