@gapi/gcli 1.8.234 → 1.8.236
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/README.md +104 -0
- package/package.json +1 -1
- package/release/index.js +1688 -872
package/README.md
CHANGED
|
@@ -89,6 +89,84 @@ gcli environment:create --name 'staging' --minCpu 100 --maxCpu 500 --minMemory 1
|
|
|
89
89
|
|
|
90
90
|
# Get environment details
|
|
91
91
|
gcli environment:get --name 'staging'
|
|
92
|
+
|
|
93
|
+
# Target an environment at a private cluster instead of the shared one
|
|
94
|
+
# (omit --clusterId to use the shared cluster - the default). Immutable
|
|
95
|
+
# after creation.
|
|
96
|
+
gcli environment:create --name 'staging' --clusterId '<clusterId>'
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Private Clusters
|
|
100
|
+
|
|
101
|
+
A project isn't limited to the shared cluster - it can provision its own private, single-tenant Talos cluster on Hetzner (gated by your plan's entitlements). Environments, RabbitMQ brokers, and plugins can each independently target the shared cluster or any of a project's private clusters.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Provision a cluster (runs in the background - takes several minutes)
|
|
105
|
+
gcli cluster:create --name 'prod' --imageId '<hcloud-image-id>' \
|
|
106
|
+
--serverType 'cpx22' --location 'nbg1' --workers 2
|
|
107
|
+
|
|
108
|
+
# Same, but block until it's ready (or errors) instead of returning immediately
|
|
109
|
+
gcli cluster:create --spec cluster.yaml --wait
|
|
110
|
+
|
|
111
|
+
# List every cluster this project has (it may have several - dev/stage/prod)
|
|
112
|
+
gcli cluster:list
|
|
113
|
+
|
|
114
|
+
# Download a ready cluster's kubeconfig
|
|
115
|
+
gcli cluster:kubeconfig --cluster '<clusterId>' --output ./kubeconfig.yaml
|
|
116
|
+
|
|
117
|
+
# Tear one down
|
|
118
|
+
gcli cluster:teardown --cluster '<clusterId>' --wait
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
`cluster.yaml`:
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
name: prod
|
|
125
|
+
imageId: <hcloud-image-id>
|
|
126
|
+
serverType: cpx22
|
|
127
|
+
location: nbg1
|
|
128
|
+
workers: 2
|
|
129
|
+
singleNode: false
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### RabbitMQ Brokers
|
|
133
|
+
|
|
134
|
+
A project may have several RabbitMQ brokers, each optionally scoped to one of its private clusters.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Provision a broker on the shared cluster
|
|
138
|
+
gcli rabbitmq:create --spec rabbitmq.yaml
|
|
139
|
+
|
|
140
|
+
# Provision a broker on a private cluster instead
|
|
141
|
+
gcli rabbitmq:create --spec rabbitmq.yaml --cluster '<clusterId>'
|
|
142
|
+
|
|
143
|
+
gcli rabbitmq:list
|
|
144
|
+
gcli rabbitmq:delete --id '<brokerId>'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
`rabbitmq.yaml`:
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
name: events-broker
|
|
151
|
+
description: Async event bus for order processing
|
|
152
|
+
user: admin
|
|
153
|
+
password: <secret>
|
|
154
|
+
region: EU_CENTRAL
|
|
155
|
+
storage:
|
|
156
|
+
enabled: true
|
|
157
|
+
size: SMALL
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Marketplace Plugins
|
|
161
|
+
|
|
162
|
+
Plugins (Redis, MongoDB, NATS, FalkorDB, ...) can be installed on the shared cluster or on any private cluster - the same plugin can be installed on several clusters at once.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
gcli plugin:list # browse the catalog
|
|
166
|
+
gcli plugin:install --name 'redis-plugin' # installs on the shared cluster
|
|
167
|
+
gcli plugin:install --name 'redis-plugin' --cluster '<clusterId>'
|
|
168
|
+
gcli plugin:installed # what's installed, and where
|
|
169
|
+
gcli plugin:uninstall --name 'redis-plugin' --cluster '<clusterId>'
|
|
92
170
|
```
|
|
93
171
|
|
|
94
172
|
## Serverless Functions (Lambdas)
|
|
@@ -194,6 +272,7 @@ environment:
|
|
|
194
272
|
minMemory: 0
|
|
195
273
|
maxMemory: 0
|
|
196
274
|
region: EU_BALKANS
|
|
275
|
+
clusterId: '' # omit/empty for the shared cluster; see cluster:list
|
|
197
276
|
|
|
198
277
|
options:
|
|
199
278
|
bundler:
|
|
@@ -205,6 +284,31 @@ options:
|
|
|
205
284
|
external: []
|
|
206
285
|
```
|
|
207
286
|
|
|
287
|
+
The same file can also carry `cluster:`, `rabbitmq:`, and `plugin:` sections, read by `cluster:create`, `rabbitmq:create`, and `plugin:install` respectively (each also accepts its own dedicated `--spec` file, e.g. `cluster.yaml`, if you'd rather keep them separate):
|
|
288
|
+
|
|
289
|
+
```yaml
|
|
290
|
+
cluster:
|
|
291
|
+
name: prod
|
|
292
|
+
imageId: <hcloud-image-id>
|
|
293
|
+
serverType: cpx22
|
|
294
|
+
location: nbg1
|
|
295
|
+
workers: 2
|
|
296
|
+
|
|
297
|
+
rabbitmq:
|
|
298
|
+
name: events-broker
|
|
299
|
+
user: admin
|
|
300
|
+
password: <secret>
|
|
301
|
+
region: EU_CENTRAL
|
|
302
|
+
storage:
|
|
303
|
+
enabled: true
|
|
304
|
+
size: SMALL
|
|
305
|
+
clusterId: '' # targets whichever cluster this project's cluster:create produced
|
|
306
|
+
|
|
307
|
+
plugin:
|
|
308
|
+
name: redis-plugin
|
|
309
|
+
clusterId: ''
|
|
310
|
+
```
|
|
311
|
+
|
|
208
312
|
### MCP Server Functions
|
|
209
313
|
|
|
210
314
|
A function can be provisioned as an **MCP Server** in front of a **federation graph** by setting `mcp: true`. The MCP lambda has **no source code** — it is fully described by config: the selected `mcpGraph` (a federation lambda in the same project) is resolved to its internal router URL and **introspected** (single source of truth, no schema file), and the curated `mcpOperations` become MCP tools. Use the MCP runtime image and `newdeploy` + `minScale: 1` (MCP holds long-lived streamable-HTTP sessions).
|