gitops-ai 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +74 -41
- package/dist/commands/bootstrap.js +641 -117
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/template-sync-wizard.d.ts +1 -0
- package/dist/commands/template-sync-wizard.js +169 -0
- package/dist/commands/template-sync-wizard.js.map +1 -0
- package/dist/commands/template-sync.d.ts +8 -0
- package/dist/commands/template-sync.js +41 -0
- package/dist/commands/template-sync.js.map +1 -0
- package/dist/core/bootstrap-runner.js +28 -11
- package/dist/core/bootstrap-runner.js.map +1 -1
- package/dist/core/cloudflare-oauth.d.ts +1 -0
- package/dist/core/cloudflare-oauth.js +311 -0
- package/dist/core/cloudflare-oauth.js.map +1 -0
- package/dist/core/dependencies.js +0 -12
- package/dist/core/dependencies.js.map +1 -1
- package/dist/core/encryption.js +1 -1
- package/dist/core/encryption.js.map +1 -1
- package/dist/core/flux.d.ts +1 -1
- package/dist/core/flux.js +57 -8
- package/dist/core/flux.js.map +1 -1
- package/dist/core/git-provider.d.ts +38 -0
- package/dist/core/git-provider.js +30 -0
- package/dist/core/git-provider.js.map +1 -0
- package/dist/core/github-oauth.d.ts +1 -0
- package/dist/core/github-oauth.js +110 -0
- package/dist/core/github-oauth.js.map +1 -0
- package/dist/core/github.d.ts +12 -0
- package/dist/core/github.js +188 -0
- package/dist/core/github.js.map +1 -0
- package/dist/core/gitlab-oauth.d.ts +1 -0
- package/dist/core/gitlab-oauth.js +194 -0
- package/dist/core/gitlab-oauth.js.map +1 -0
- package/dist/core/gitlab.d.ts +4 -9
- package/dist/core/gitlab.js +127 -56
- package/dist/core/gitlab.js.map +1 -1
- package/dist/core/kubernetes.d.ts +9 -0
- package/dist/core/kubernetes.js +51 -1
- package/dist/core/kubernetes.js.map +1 -1
- package/dist/core/template-sync.d.ts +46 -0
- package/dist/core/template-sync.js +249 -0
- package/dist/core/template-sync.js.map +1 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +17 -4
- package/dist/schemas.js +17 -3
- package/dist/schemas.js.map +1 -1
- package/package.json +32 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 everythings-gonna-be-alright
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
# GitOps AI Bootstrapper
|
|
1
|
+
# GitOps AI - Bootstrapper
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://gitops-ai.vercel.app) [](https://gitops-ai.vercel.app/#docs/prerequisites)
|
|
4
|
+
|
|
5
|
+
GitOps-managed Kubernetes infrastructure for AI-powered applications powered by the [Flux Operator](https://fluxoperator.dev/) and [Flux CD](https://fluxcd.io/). A single bootstrap application provisions a Kubernetes cluster, installs all infrastructure components, and enables continuous delivery from Git.
|
|
4
6
|
|
|
5
7
|
## Why GitOps for your infrastructure
|
|
6
8
|
|
|
7
9
|
**💾 Infrastructure as Code** -- your entire cluster is defined in Git. Every change is versioned, reviewable, and reversible. You can modify infrastructure with AI coding assistants (Cursor, Copilot, Claude) that understand YAML and Helm values -- describe what you want in natural language and commit the result.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
**🔒 Security by default** -- containers run as non-root with read-only filesystems and dropped capabilities. Network policies isolate workloads so pods can only communicate with explicitly allowed services. Secrets are encrypted at rest with SOPS/Age before they ever reach Git. SSL certificates are automatically managed by cert-manager.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
**🔄 Reproducible deployments** -- the same bootstrap script produces an identical cluster every time, on any supported machine. Drift is automatically corrected by Flux reconciliation -- if someone manually changes a resource, Flux reverts it to match Git within minutes.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
**🔌 Scalable and flexible** -- powered by Kubernetes, you can add worker nodes to grow capacity or drop in new components like Lego blocks. Need a database, a message queue, or another AI model? Add a HelmRelease to the repo and push -- Flux deploys it automatically.
|
|
14
16
|
|
|
15
17
|
## Quick Start
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
On your Mac or Linux machine:
|
|
20
|
+
|
|
18
21
|
```bash
|
|
19
22
|
npx gitops-ai bootstrap
|
|
20
23
|
```
|
|
@@ -31,17 +34,17 @@ Or, if you already have Node.js >= 18:
|
|
|
31
34
|
npx gitops-ai bootstrap
|
|
32
35
|
```
|
|
33
36
|
|
|
34
|
-
The interactive wizard will prompt for your GitLab
|
|
37
|
+
The interactive wizard will prompt for your Git provider (GitHub or GitLab), create or use a repository from the [GitOps AI Template](https://gitlab.com/everythings-gonna-be-alright/gitops_ai_template), and run the full bootstrap.
|
|
35
38
|
|
|
36
39
|
## Requirements
|
|
37
40
|
|
|
38
|
-
| Resource
|
|
39
|
-
|
|
40
|
-
| **CPU**
|
|
41
|
-
| **Memory**
|
|
42
|
-
| **Disk**
|
|
43
|
-
| **OS**
|
|
44
|
-
| **Node.js**
|
|
41
|
+
| Resource | Minimum |
|
|
42
|
+
|-------------|-----------------------------------------------|
|
|
43
|
+
| **CPU** | 2+ cores |
|
|
44
|
+
| **Memory** | 4+ GB |
|
|
45
|
+
| **Disk** | 20+ GB free |
|
|
46
|
+
| **OS** | Ubuntu 25.04+ or macOS |
|
|
47
|
+
| **Node.js** | 18+ (installed automatically by `install.sh`) |
|
|
45
48
|
|
|
46
49
|
You will also need a [GitLab PAT](docs/prerequisites.md#1-gitlab-personal-access-token), a [Cloudflare API Token](docs/prerequisites.md#2-cloudflare-api-token) (if using automatic DNS/TLS), and an [OpenAI API Key](docs/prerequisites.md#3-openai-api-key) (if using OpenClaw). See [Prerequisites](docs/prerequisites.md) for full details.
|
|
47
50
|
|
|
@@ -67,9 +70,21 @@ Keeping the template in a separate repository means:
|
|
|
67
70
|
- **Clean separation** -- the bootstrapper CLI handles provisioning logic; the template holds pure infrastructure declarations. Each can be versioned and tested independently.
|
|
68
71
|
- **Customisation without lock-in** -- after the fork you own the repo. Add namespaces, swap Helm charts, or restructure directories to fit your needs.
|
|
69
72
|
|
|
73
|
+
### Repository layout (template → your repo)
|
|
74
|
+
|
|
75
|
+
The upstream template (and your bootstrapped repo) is organised roughly as:
|
|
76
|
+
|
|
77
|
+
| Path | Role |
|
|
78
|
+
|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
79
|
+
| `templates/<category>/…` | Shared Helm bases and component manifests (e.g. `templates/system/`, `templates/ai/`, `templates/monitoring/`). |
|
|
80
|
+
| `clusters/_template/` | Prototype cluster layout; the CLI copies this to `clusters/<your-cluster-name>/` during bootstrap. |
|
|
81
|
+
| `clusters/<name>/` | Your live cluster overlay (`cluster-sync.yaml`, `components/`, encrypted secrets). |
|
|
82
|
+
|
|
83
|
+
See [Architecture](docs/architecture.md) for diagrams and a fuller tree.
|
|
84
|
+
|
|
70
85
|
## CLI Commands
|
|
71
86
|
|
|
72
|
-
The CLI provides
|
|
87
|
+
The CLI provides these commands:
|
|
73
88
|
|
|
74
89
|
### `bootstrap` (alias: `install`)
|
|
75
90
|
|
|
@@ -89,16 +104,16 @@ SOPS secret encryption management. Run without arguments for an interactive menu
|
|
|
89
104
|
npx gitops-ai sops [subcommand] [file]
|
|
90
105
|
```
|
|
91
106
|
|
|
92
|
-
| Subcommand | Description
|
|
93
|
-
|
|
107
|
+
| Subcommand | Description |
|
|
108
|
+
|------------------|------------------------------------------------------------------------|
|
|
94
109
|
| `init` | First-time setup: generate age key, create `.sops.yaml` and K8s secret |
|
|
95
|
-
| `encrypt` | Encrypt all unencrypted secret files
|
|
96
|
-
| `encrypt <file>` | Encrypt a specific file
|
|
97
|
-
| `decrypt <file>` | Decrypt a file for viewing (re-encrypt before commit)
|
|
98
|
-
| `edit <file>` | Open encrypted file in `$EDITOR` (auto re-encrypts on save)
|
|
99
|
-
| `status` | Show encryption status of all secret files
|
|
100
|
-
| `import` | Import an existing age key into a new cluster
|
|
101
|
-
| `rotate` | Rotate to a new age key and re-encrypt everything
|
|
110
|
+
| `encrypt` | Encrypt all unencrypted secret files |
|
|
111
|
+
| `encrypt <file>` | Encrypt a specific file |
|
|
112
|
+
| `decrypt <file>` | Decrypt a file for viewing (re-encrypt before commit) |
|
|
113
|
+
| `edit <file>` | Open encrypted file in `$EDITOR` (auto re-encrypts on save) |
|
|
114
|
+
| `status` | Show encryption status of all secret files |
|
|
115
|
+
| `import` | Import an existing age key into a new cluster |
|
|
116
|
+
| `rotate` | Rotate to a new age key and re-encrypt everything |
|
|
102
117
|
|
|
103
118
|
### `openclaw-pair`
|
|
104
119
|
|
|
@@ -108,41 +123,59 @@ Pair an OpenClaw device with the cluster after bootstrap:
|
|
|
108
123
|
npx gitops-ai openclaw-pair
|
|
109
124
|
```
|
|
110
125
|
|
|
126
|
+
### `template sync`
|
|
127
|
+
|
|
128
|
+
Fetch the upstream GitOps template and merge changes into your current branch. Run without flags for an **interactive wizard** (tag picker, diff preview with risk classification, merge/dry-run/cancel), or pass flags for non-interactive use:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npx gitops-ai template sync # interactive wizard
|
|
132
|
+
npx gitops-ai template sync --ref v1.0.0 # non-interactive merge
|
|
133
|
+
npx gitops-ai template sync --ref main --dry-run # non-interactive preview
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
See [Template synchronization](docs/template-sync.md).
|
|
137
|
+
|
|
111
138
|
## Components
|
|
112
139
|
|
|
113
140
|
The bootstrap wizard lets you select which components to install:
|
|
114
141
|
|
|
115
|
-
| Component | Required | Description
|
|
116
|
-
|
|
117
|
-
| Helm Repositories | Yes | Shared Helm chart repos
|
|
118
|
-
| Ingress Nginx (external) | Yes | External HTTP/HTTPS ingress controller
|
|
119
|
-
| Prometheus CRDs | Yes | Monitoring custom resource definitions
|
|
120
|
-
| Cert Manager | DNS/TLS | Automatic TLS certificates via Let's Encrypt
|
|
121
|
-
| External DNS | DNS/TLS | Automatic DNS records in Cloudflare
|
|
122
|
-
|
|
|
123
|
-
|
|
|
142
|
+
| Component | Required | Description |
|
|
143
|
+
|-----------------------------|----------|----------------------------------------------------|
|
|
144
|
+
| Helm Repositories | Yes | Shared Helm chart repos |
|
|
145
|
+
| Ingress Nginx (external) | Yes | External HTTP/HTTPS ingress controller |
|
|
146
|
+
| Prometheus CRDs | Yes | Monitoring custom resource definitions |
|
|
147
|
+
| Cert Manager | DNS/TLS | Automatic TLS certificates via Let's Encrypt |
|
|
148
|
+
| External DNS | DNS/TLS | Automatic DNS records in Cloudflare |
|
|
149
|
+
| Grafana Operator | No | Grafana dashboards and datasources via CRDs |
|
|
150
|
+
| Victoria Metrics Stack | No | Metrics collection, alerting and long-term storage |
|
|
151
|
+
| Flux Web UI | No | Web dashboard for Flux status |
|
|
152
|
+
| OpenClaw | No | AI assistant gateway (requires OpenAI key) |
|
|
124
153
|
|
|
125
154
|
Components marked **DNS/TLS** are automatically enabled when you opt into automatic DNS and TLS management during the wizard.
|
|
126
155
|
|
|
127
156
|
## Documentation
|
|
128
157
|
|
|
129
|
-
| Document
|
|
130
|
-
|
|
131
|
-
| [Prerequisites](docs/prerequisites.md)
|
|
132
|
-
| [Bootstrap](docs/bootstrap.md)
|
|
133
|
-
| [Architecture](docs/architecture.md)
|
|
134
|
-
| [Configuration](docs/configuration.md)
|
|
158
|
+
| Document | Description |
|
|
159
|
+
|---------------------------------------------------|---------------------------------------------------------------------|
|
|
160
|
+
| [Prerequisites](docs/prerequisites.md) | Node.js, Docker (macOS), Git provider, optional Cloudflare / OpenAI |
|
|
161
|
+
| [Bootstrap](docs/bootstrap.md) | What the bootstrap does, wizard walkthrough, resume capability |
|
|
162
|
+
| [Architecture](docs/architecture.md) | Repositories, bootstrap flow, Flux Operator & Instance, repo tree |
|
|
163
|
+
| [Configuration](docs/configuration.md) | Cluster variables, SOPS defaults, post-bootstrap changes |
|
|
164
|
+
| [Template synchronization](docs/template-sync.md) | Upstream merges, `template sync`, CI parity, risk tiers |
|
|
165
|
+
| [Scaling](docs/scaling.md) | Adding k3s worker and server nodes (Linux) |
|
|
166
|
+
| [Security](docs/security.md) | SOPS, Git auth, hardening, network |
|
|
135
167
|
|
|
136
168
|
## Development
|
|
137
169
|
|
|
138
170
|
```bash
|
|
139
|
-
git clone
|
|
171
|
+
git clone https://gitlab.com/everythings-gonna-be-alright/gitops_ai_bootstrapper.git
|
|
172
|
+
cd gitops_ai_bootstrapper
|
|
140
173
|
npm install
|
|
141
174
|
|
|
142
175
|
npm run dev # Run CLI locally via tsx
|
|
143
176
|
npm run build # Compile TypeScript to dist/
|
|
144
177
|
npm run typecheck # Type-check without emitting
|
|
145
|
-
npm run test:
|
|
178
|
+
npm run test:sync # Unit tests for template sync logic
|
|
146
179
|
npm run test:integration # Full k3d + Flux integration test (requires Docker)
|
|
147
180
|
```
|
|
148
181
|
|