empeira 0.1.0.pre.alpha.9 → 0.1.0.pre.alpha.10
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.
- checksums.yaml +4 -4
- data/README.md +23 -5
- data/config/defaults.yaml +2 -0
- data/docs/addons.md +5 -4
- data/docs/architecture.md +44 -8
- data/docs/configuration.md +42 -0
- data/docs/development.md +69 -15
- data/docs/installation.md +168 -236
- data/docs/networking.md +15 -1
- data/docs/nodes.md +36 -15
- data/docs/troubleshooting.md +6 -4
- data/lib/empeira/agent/acquisition.rb +7 -2
- data/lib/empeira/agent/artifact.rb +2 -0
- data/lib/empeira/agent/cache.rb +22 -4
- data/lib/empeira/agent/cache_storage.rb +3 -2
- data/lib/empeira/build.json +3 -3
- data/lib/empeira/cli/base.rb +1 -0
- data/lib/empeira/cli/main.rb +1 -1
- data/lib/empeira/cli/node.rb +1 -6
- data/lib/empeira/cli/presentation.rb +89 -0
- data/lib/empeira/configuration/loader.rb +1 -0
- data/lib/empeira/configuration/schema.rb +1 -1
- data/lib/empeira/control_plane/controller.rb +126 -57
- data/lib/empeira/control_plane/discovery.rb +35 -10
- data/lib/empeira/control_plane/dns_configuration.rb +1 -1
- data/lib/empeira/control_plane/files.rb +2 -2
- data/lib/empeira/control_plane/health.rb +3 -1
- data/lib/empeira/control_plane/plan.rb +3 -2
- data/lib/empeira/execution/console.rb +2 -1
- data/lib/empeira/execution/runner.rb +2 -2
- data/lib/empeira/infrastructure/cleanup.rb +188 -33
- data/lib/empeira/infrastructure/operation.rb +173 -0
- data/lib/empeira/infrastructure/resource_lock.rb +57 -0
- data/lib/empeira/infrastructure/service.rb +87 -44
- data/lib/empeira/infrastructure/store.rb +58 -21
- data/lib/empeira/network/bootstrap_proxy.rb +130 -23
- data/lib/empeira/network/gateway.rb +21 -11
- data/lib/empeira/network/peer/backend.rb +5 -0
- data/lib/empeira/network/peer/docker_adapter.rb +1 -2
- data/lib/empeira/network/peer/layout.rb +1 -1
- data/lib/empeira/network/peer/linux_podman.rb +14 -4
- data/lib/empeira/network/policy.rb +6 -0
- data/lib/empeira/node/agent_installer.rb +7 -4
- data/lib/empeira/node/certificates.rb +4 -1
- data/lib/empeira/node/container.rb +29 -28
- data/lib/empeira/node/container_agent_bootstrap.rb +2 -1
- data/lib/empeira/node/container_guest.rb +5 -3
- data/lib/empeira/node/container_lifecycle.rb +31 -45
- data/lib/empeira/node/container_preparation.rb +30 -19
- data/lib/empeira/node/container_state.rb +3 -10
- data/lib/empeira/node/inventory.rb +24 -1
- data/lib/empeira/node/service.rb +1 -1
- data/lib/empeira/node/ssh_credentials.rb +15 -2
- data/lib/empeira/node/transaction.rb +96 -0
- data/lib/empeira/node/user_ssh.rb +9 -3
- data/lib/empeira/node/vm.rb +19 -13
- data/lib/empeira/node/vm_lifecycle.rb +34 -68
- data/lib/empeira/node/vm_preparation.rb +40 -26
- data/lib/empeira/node/vm_state.rb +20 -17
- data/lib/empeira/runtime/agent_helper.rb +24 -8
- data/lib/empeira/server/java_arguments.rb +73 -0
- data/lib/empeira/server/runtime.rb +12 -5
- data/lib/empeira/updates/modules.rb +1 -1
- data/lib/empeira/updates/service.rb +1 -1
- data/lib/empeira/vm/agent.rb +3 -2
- data/lib/empeira/vm/guest.rb +3 -1
- data/lib/empeira/vm/interfaces.rb +1 -1
- data/lib/empeira/vm/qemu_runtime.rb +25 -8
- data/lib/empeira/vm/removal.rb +7 -9
- data/lib/empeira/vm/system_ssh.rb +20 -4
- data/lib/empeira.rb +5 -4
- data/resources/modules/Gemfile +4 -5
- data/resources/modules/Gemfile.lock +7 -6
- data/resources/nodes/ssh/connect.sh +45 -0
- data/resources/nodes/ssh/proxy.rb +3 -2
- metadata +22 -6
- data/lib/empeira/compatibility/data.rb +0 -61
- data/lib/empeira/infrastructure/session_lock.rb +0 -60
- data/lib/empeira/node/session_lock.rb +0 -19
- data/lib/empeira/vm/session_lock.rb +0 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9b68cb45d34e9ac5447157097acbdc7e634ed7c0d7cd63aaee1f07fccb7a8b3
|
|
4
|
+
data.tar.gz: 208e14bf6d7cf4901cea448075007beb225186f8639276289f65006a5c454574
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 648ec61e183143d137ca6f73645e0258f176da330f3c5badb09e501e47f5a5347b6e2ca9ec7b5ec694bfc8e99c07cf71d190739999b4d893dda8cd5206cee186
|
|
7
|
+
data.tar.gz: 67eb788897db64130a74a4826b07119d1322e62c0d7938fb5f955f96cc4624ce2bdc190979617386dcae4e534a8db34c350138da55740c4f6f620de1b0952b0c
|
data/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/c8m6/empeira/actions/workflows/ci.yml)
|
|
6
6
|
[](https://github.com/c8m6/empeira/actions/workflows/openvox.yml)
|
|
7
7
|
[](https://github.com/c8m6/empeira/releases)
|
|
8
|
-
[](docs/installation.md)
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
|
|
11
11
|
**ἐμπειρία (empeiría)** — experience gained through practice. The name reflects
|
|
@@ -46,8 +46,8 @@ signed repositories or verified package artifacts are selected separately.
|
|
|
46
46
|
- An internal Chromium desktop and small additional infrastructure services.
|
|
47
47
|
- Explicit Puppetfile module and image updates.
|
|
48
48
|
|
|
49
|
-
Hosts: Linux, macOS and Windows through WSL2/Linux. Ruby 3.
|
|
50
|
-
CI runs deterministic tests and official addon/Core acceptance on all
|
|
49
|
+
Hosts: Linux, macOS and Windows through WSL2/Linux. Ruby 3.2 is the minimum; Ruby 3.2, 3.3, 3.4 and 4.0 are supported;
|
|
50
|
+
CI runs deterministic tests and official addon/Core acceptance on all four versions
|
|
51
51
|
on Linux and macOS, plus the existing Linux Docker/OpenVox smoke on every Ruby.
|
|
52
52
|
Podman with Netavark is the default; Docker requires a Linux engine 28+ with
|
|
53
53
|
isolated bridge support. VMs require usable KVM or HVF. Platform setup and
|
|
@@ -56,7 +56,7 @@ validation limits are in [installation](docs/installation.md).
|
|
|
56
56
|
## Installation
|
|
57
57
|
|
|
58
58
|
The [Empeira gem on RubyGems.org](https://rubygems.org/gems/empeira) is the
|
|
59
|
-
recommended installation. With Ruby 3.
|
|
59
|
+
recommended installation. With Ruby 3.2, 3.3, 3.4 or 4.0 already installed:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
gem install --user-install empeira --pre
|
|
@@ -70,7 +70,7 @@ No source checkout or Bundler is needed for a gem installation. Install Git,
|
|
|
70
70
|
a supported container runtime and any optional VM tools separately; see
|
|
71
71
|
[installation](docs/installation.md) for host prerequisites, exact-version
|
|
72
72
|
installation and Bash completion. Developers can also
|
|
73
|
-
[run from source](docs/installation.md#
|
|
73
|
+
[run from source](docs/installation.md#run-from-source).
|
|
74
74
|
|
|
75
75
|
## Quickstart
|
|
76
76
|
|
|
@@ -112,6 +112,24 @@ empeira destroy
|
|
|
112
112
|
`status` reports observed resources. Use `empeira status --verify` when diagnosing
|
|
113
113
|
live gateway firewall or Docker bridge drift.
|
|
114
114
|
|
|
115
|
+
On interactive terminals, `status` aligns its keys and highlights healthy states
|
|
116
|
+
in green, warnings in yellow and failures in red. `node list` aligns its existing
|
|
117
|
+
columns and colors node states and Puppet results (0/2 succeed). Unknown values
|
|
118
|
+
stay neutral. `NO_COLOR` disables colors while retaining alignment; pipes and
|
|
119
|
+
redirected output preserve the original plain text and spacing. For example:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
Server: running
|
|
123
|
+
Control plane: degraded
|
|
124
|
+
Network policy: not checked; use empeira status --verify
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Warnings include `stale`, `degraded`, `not checked`, incomplete/preparing nodes,
|
|
128
|
+
unverified policy and unverifiable development-build requirements. Failures
|
|
129
|
+
include `unhealthy`, `failed`, `missing`, `stopped`, incompatible requirements
|
|
130
|
+
and unsafe isolation. Coloring changes presentation only; `status` still reports
|
|
131
|
+
observations without reconciling infrastructure.
|
|
132
|
+
|
|
115
133
|
`destroy` permanently removes the workspace's owned nodes, CA and database data.
|
|
116
134
|
The control repository, module directory and shared image caches are preserved.
|
|
117
135
|
Destroy works independently of release requirements and guest management versions.
|
data/config/defaults.yaml
CHANGED
data/docs/addons.md
CHANGED
|
@@ -264,7 +264,7 @@ invoked from a subdirectory. No workspace infrastructure is created for an addon
|
|
|
264
264
|
Context variables are omitted if a caller has no such context.
|
|
265
265
|
|
|
266
266
|
The schema explicitly excludes `vm.console.root_password`, `eyaml.private_key`,
|
|
267
|
-
`browser.start_url`, `server.runtime.startup.arguments`,
|
|
267
|
+
`browser.start_url`, `server.runtime.startup.arguments`, `server.runtime.java_arguments`,
|
|
268
268
|
`puppetdb.runtime.java_arguments`, `puppetdb.runtime.main_arguments`, and each
|
|
269
269
|
additional container's `environment`, `command` and `configuration.content`.
|
|
270
270
|
These include opaque content which may contain secrets under ordinary names; this
|
|
@@ -336,12 +336,13 @@ Bash completion again after an Empeira upgrade.
|
|
|
336
336
|
|
|
337
337
|
## Ruby support and addon development
|
|
338
338
|
|
|
339
|
-
Core
|
|
340
|
-
|
|
339
|
+
Core supports Ruby 3.2, 3.3, 3.4 and 4.0 on Linux, macOS and WSL2. It tests
|
|
340
|
+
compatibility with the official Convert, Pre-Commit and Sync addons on Linux and
|
|
341
|
+
macOS for each supported Ruby. Ruby 3.2 is the minimum. Keep API 1
|
|
341
342
|
entrypoints runnable directly, preserve argv, terminal streams, environment and
|
|
342
343
|
exit status, and explicitly require libraries that newer Rubies no longer ship.
|
|
343
344
|
Do not install gems implicitly. Convert's XML support needs user-installed REXML.
|
|
344
|
-
Test complete standalone behavior and actual execution through Core on all
|
|
345
|
+
Test complete standalone behavior and actual execution through Core on all four
|
|
345
346
|
Rubies; syntax checks alone are insufficient. See the [development gate](development.md#ruby-compatibility)
|
|
346
347
|
for the required Linux/macOS matrix, pinned source checkouts and local commands.
|
|
347
348
|
Real container/VM and WSL2 capabilities require their own integration gates.
|
data/docs/architecture.md
CHANGED
|
@@ -17,7 +17,7 @@ configuration, definitions, fingerprints or inventory.
|
|
|
17
17
|
flowchart TD
|
|
18
18
|
CLI[CLI and completion] --> App[Application and context]
|
|
19
19
|
App --> Config[Configuration and version gate]
|
|
20
|
-
App --> State[Inventory and
|
|
20
|
+
App --> State[Inventory transactions and resource locks]
|
|
21
21
|
App --> Plane[Control-plane lifecycle]
|
|
22
22
|
App --> Nodes[Node lifecycle]
|
|
23
23
|
Plane --> Runtime[Docker / Podman]
|
|
@@ -116,7 +116,7 @@ The QEMU monitor verifies workspace/node/instance identity before management.
|
|
|
116
116
|
A 0700 host directory and 0600 Unix socket restrict access; recorded device/inode
|
|
117
117
|
identity rejects replaced sockets. Sessions also verify the instance identity and
|
|
118
118
|
operation ID. No management NIC, host port, additional privileged host helper or
|
|
119
|
-
SSH credentials are needed.
|
|
119
|
+
SSH credentials are needed. Execution pins the node instance; stop and destroy remain available during commands.
|
|
120
120
|
`node puppet` uses this targeted path without server readiness or full guest
|
|
121
121
|
reconciliation.
|
|
122
122
|
|
|
@@ -165,9 +165,45 @@ and recovery context. Runtime migration is explicit: destroy with the owning eng
|
|
|
165
165
|
then change configuration. `down` preserves CA and database storage; `destroy`
|
|
166
166
|
removes them. Both preserve control code, modules and caches.
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
Mutations validate the version requirement and use brief inventory read-modify-write
|
|
169
|
+
transactions. The inventory `flock` waits only for an active transaction. Long
|
|
170
|
+
provisioning, downloads, Puppet and user sessions do not hold it. Each operation
|
|
171
|
+
pins the workspace incarnation and immutable node instance (container MAC/ID or VM
|
|
172
|
+
peer token). Snapshot writes merge only changed fields into the latest inventory;
|
|
173
|
+
old incarnations and deleted/replaced instances cannot write back.
|
|
174
|
+
`up` pins both the incarnation observed before validation and the published intent;
|
|
175
|
+
removal between these phases cannot restart the old infrastructure operation.
|
|
176
|
+
|
|
177
|
+
Node reservation and native creation/publication use a lock for that hostname.
|
|
178
|
+
Initial reservation also pins the infrastructure resource phase while observing
|
|
179
|
+
DNS and platform capabilities; the inventory transaction then allocates and
|
|
180
|
+
publishes the lease without executing native commands. Container SSH known-hosts
|
|
181
|
+
directories are prepared only when access to an existing instance is requested.
|
|
182
|
+
Destroy first marks the instance as deleting and interrupts its native resource,
|
|
183
|
+
then completes the short resource phase and removes verified files, helpers and
|
|
184
|
+
bindings before releasing the hostname/IP. Stop invalidates a pending start or
|
|
185
|
+
provisioning revision. Workspace destroy invalidates the entire incarnation before
|
|
186
|
+
teardown. Failed cleanup retains ownership records and reports an error. A later
|
|
187
|
+
`up` creates a fresh incarnation only after successful workspace removal.
|
|
188
|
+
|
|
189
|
+
Shared configuration has separate locks for discovery, gateway policy and the
|
|
190
|
+
bootstrap proxy. Discovery always derives hosts and client grants from a fresh
|
|
191
|
+
inventory. Previously observed container resources are reused only while their
|
|
192
|
+
native IDs still match that inventory. The single bootstrap Squid aggregates private, source-bound credentials
|
|
193
|
+
per immutable node instance; finishing one client revokes only its grant. Control
|
|
194
|
+
plane initialization serializes its dependency graph independently of nodes;
|
|
195
|
+
readiness waits release the native resource phase so destroy can interrupt it.
|
|
196
|
+
Per-instance guest configuration locks protect owned file/device intents, never
|
|
197
|
+
Puppet execution or user sessions. Image/module updates have artifact-specific locks. Agent cache readers share a
|
|
198
|
+
validated artifact; acquisition/publication excludes writers without serializing
|
|
199
|
+
package installation. VirtIO locks protect individual protocol slots only.
|
|
200
|
+
|
|
201
|
+
Read-only status takes no exclusive lock. Lock inodes remain stable across destroy;
|
|
202
|
+
never delete them as stale-lock recovery. Existing schema-2 inventories acquire
|
|
203
|
+
additive incarnation metadata on their first mutation. Do not mix CLI processes
|
|
204
|
+
from older revisions with this implementation during an upgrade: those processes
|
|
205
|
+
do not enforce incarnation checks. Unsupported schemas still
|
|
206
|
+
fail closed for ordinary operations; ownership-based recovery remains available.
|
|
171
207
|
|
|
172
208
|
## Definitions and live code
|
|
173
209
|
|
|
@@ -175,7 +211,7 @@ Canonical SHA-256 fingerprints cover relevant managed definitions, independently
|
|
|
175
211
|
of application versions, YAML formatting and unrelated node defaults. Component
|
|
176
212
|
fingerprints allow selective service reconciliation while preserving owned storage.
|
|
177
213
|
Each `up` batches service and volume observations and reuses them only within that
|
|
178
|
-
|
|
214
|
+
control-plane reconciliation. Starts, replacements and network attachments are inspected
|
|
179
215
|
again; destructive operations verify fresh ownership and recorded IDs. Later CLI
|
|
180
216
|
invocations never inherit these observations. Local image inspection results are
|
|
181
217
|
shared by availability, reviewed-recipe, ID and architecture checks within one
|
|
@@ -189,7 +225,7 @@ reload Squid after readiness without replacing its container; unchanged policy
|
|
|
189
225
|
and bindings do not trigger HUP. The existing inventory records a validated
|
|
190
226
|
proxy ID and small-file digest only after native reload success; failed reloads
|
|
191
227
|
are retried even if generated files are already current. Gateway lockdown is
|
|
192
|
-
reused only while the same instance remains
|
|
228
|
+
reused only while the same instance remains owned in that reconciliation. Policy apply clears that checkpoint
|
|
193
229
|
before execution so every uncertain outcome attempts fresh lockdown. Firewall
|
|
194
230
|
policy and namespace routing are still reconciled on every `up`.
|
|
195
231
|
Node access verifies network ownership and isolation with one bounded native network inspection; membership counts are collected separately
|
|
@@ -278,7 +314,7 @@ resize and normal guest job control; cancellation kills the owned session groups
|
|
|
278
314
|
Container exec uses native numeric-root execution and a guest Ruby supervisor with a
|
|
279
315
|
private completion receipt so native-client errors cannot impersonate guest exits.
|
|
280
316
|
|
|
281
|
-
Recovery uses the same
|
|
317
|
+
Recovery uses the same inventory transactions and existing runtime, QEMU monitor
|
|
282
318
|
and peer teardown adapters. It reads ownership fields without operational schema,
|
|
283
319
|
version, guest, base-image or current configuration gates. Every mutation still
|
|
284
320
|
checks native identity and safe paths. Resource records are removed only after confirmed
|
data/docs/configuration.md
CHANGED
|
@@ -141,6 +141,7 @@ release version. A partial project mapping may omit it and inherit the default.
|
|
|
141
141
|
| `requirements.empeira` | RubyGems requirement string, or `null` (default) |
|
|
142
142
|
| `runtime.container_engine` | `podman` (default) or `docker` |
|
|
143
143
|
| `server.runtime` | OpenVox startup defaults; optional startup, configuration path and environment-key overrides for compatible custom images |
|
|
144
|
+
| `server.runtime.java_arguments` | `null` derives the JVM heap from `server.memory`; an explicit argument array replaces the automatic values |
|
|
144
145
|
| `puppetdb.runtime` | OpenVoxDB process defaults; optional entrypoint, user, Java arguments, paths and environment key overrides for compatible custom images |
|
|
145
146
|
| `images.server` | OpenVox Server OCI image by default; repository/tag, digest or exact reference |
|
|
146
147
|
| `images.puppetdb` | OpenVoxDB OCI image by default; independent of the server image |
|
|
@@ -437,6 +438,47 @@ therefore stays unchanged in the checkout while the managed server uses zero.
|
|
|
437
438
|
To verify it, run `puppet config print environment_timeout --section server
|
|
438
439
|
--environment ENVIRONMENT` inside the server with the configured environment name.
|
|
439
440
|
|
|
441
|
+
### Server JVM memory
|
|
442
|
+
|
|
443
|
+
By default, `server.runtime.java_arguments: null` derives the maximum heap (`-Xmx`)
|
|
444
|
+
as half of `server.memory` in MiB, rounded down. The initial heap (`-Xms`) is one
|
|
445
|
+
third of that maximum, rounded down to at least 1 MiB. The default 1536 MiB limit
|
|
446
|
+
therefore retains `-Xms256m -Xmx768m`. Limits of 2048, 4096, 8192 and 16384 MiB
|
|
447
|
+
give maximum heaps of 1024, 2048, 4096 and 8192 MiB respectively. Half the container
|
|
448
|
+
budget remains for Metaspace, thread stacks, native libraries and other process
|
|
449
|
+
memory; JRuby also consumes heap. This is a conservative starting point, not a
|
|
450
|
+
guarantee that every catalog fits.
|
|
451
|
+
|
|
452
|
+
An explicit array replaces the automatic arguments completely, following the same
|
|
453
|
+
configuration convention as `puppetdb.runtime.java_arguments`:
|
|
454
|
+
|
|
455
|
+
```yaml
|
|
456
|
+
server:
|
|
457
|
+
memory: 4096
|
|
458
|
+
runtime:
|
|
459
|
+
java_arguments: [-Xms512m, -Xmx2g, -XX:+UseG1GC]
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Explicit arrays require exactly one maximum heap (`-Xmx` or `-XX:MaxHeapSize=`).
|
|
463
|
+
The initial heap is optional. Heap sizes accept bytes or case-insensitive `k`, `m`
|
|
464
|
+
and `g` suffixes, must be positive multiples of 1024 bytes, and must satisfy
|
|
465
|
+
minimum <= initial <= maximum when specified. Duplicate heap settings, including
|
|
466
|
+
aliases, are rejected. The maximum must be strictly below `server.memory`;
|
|
467
|
+
when overriding, reserve sufficient additional memory for your actual workload.
|
|
468
|
+
Other JVM options are passed through for the image's JVM to validate.
|
|
469
|
+
|
|
470
|
+
Each array item must be one JVM option without whitespace or control characters;
|
|
471
|
+
argument files are unsupported because they could conceal heap overrides. The
|
|
472
|
+
existing `server.runtime.environment_keys.java_args` mapping receives the joined
|
|
473
|
+
arguments (by default `OPENVOXSERVER_JAVA_ARGS`), including for custom images.
|
|
474
|
+
The custom entrypoint must honor that mapping. No image defaults are appended.
|
|
475
|
+
Do not put credentials in JVM arguments.
|
|
476
|
+
|
|
477
|
+
`empeira config show` displays the effective array, including automatically
|
|
478
|
+
derived values. Changing the heap arguments or memory budget marks the server
|
|
479
|
+
definition stale. The next `up` replaces only the affected server, preserving
|
|
480
|
+
nodes, CA, SSL and database volumes. An unchanged `up` reuses it.
|
|
481
|
+
|
|
440
482
|
`puppetdb.runtime` holds the independent OpenVoxDB process contract. Custom
|
|
441
483
|
images may override its executable, numeric user, Java and main arguments,
|
|
442
484
|
`paths.jar`, `paths.config`, `paths.bootstrap_config`, and `paths.data`.
|
data/docs/development.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Environment and quality checks
|
|
4
4
|
|
|
5
|
-
Install Git, Ruby 3.
|
|
6
|
-
[installation](installation.md). The gem requires Ruby 3.
|
|
7
|
-
runs deterministic RSpec on Ruby 3.
|
|
5
|
+
Install Git, Ruby 3.2+, Bundler and the platform prerequisites in
|
|
6
|
+
[installation](installation.md). The gem requires Ruby 3.2+; normal Ubuntu and macOS CI
|
|
7
|
+
runs deterministic RSpec on Ruby 3.2, 3.3, 3.4 and 4.0, with
|
|
8
8
|
RuboCop and both dependency audits only on Ubuntu with Ruby 3.4. Release builds use Ruby 3.4.
|
|
9
9
|
Use synthetic control repositories and disposable credentials.
|
|
10
10
|
|
|
@@ -24,6 +24,18 @@ To reproduce a CI test job, activate the corresponding Ruby, install the locked
|
|
|
24
24
|
bundle and run `bundle exec rspec --exclude-pattern 'spec/integration/**/*_spec.rb'`.
|
|
25
25
|
Runtime and VM compatibility remain separate manual gates.
|
|
26
26
|
|
|
27
|
+
The opt-in server heap gate uses the local `bin/empeira`, an isolated home and a
|
|
28
|
+
synthetic 1200-resource Puppet catalog. It checks the running Java process arguments
|
|
29
|
+
and actual container memory at 1536, 2048 and 4096 MiB, an explicit heap override,
|
|
30
|
+
catalogs in PuppetDB, node/CA/database retention and unchanged `up`:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
EMPEIRA_INTEGRATION=server-heap EMPEIRA_HEAP_RUNTIMES=podman bundle exec rspec spec/integration/server_heap_spec.rb
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Repeat with `docker` on a capable host. This synthetic catalog does not reproduce
|
|
37
|
+
the contributor's private catalog size or prove its previous OOM is resolved.
|
|
38
|
+
|
|
27
39
|
Mark examples that need only temporary files with `:files_only`; they retain an
|
|
28
40
|
isolated home but skip Git initialization and the project marker. Project behavior
|
|
29
41
|
continues to use a real isolated Git repository. Syntax checks compile all Ruby
|
|
@@ -46,6 +58,12 @@ files, covering login/non-login behavior, PATH preservation, duplicate preventio
|
|
|
46
58
|
and ownership failures. The manual runtime management gate also checks installed
|
|
47
59
|
agent commands on retained guests after restart.
|
|
48
60
|
|
|
61
|
+
`spec/ssh_transport_spec.rb` exercises the agent-independent Bash byte relay over
|
|
62
|
+
loopback TCP, including native macOS Bash 3.2. It verifies binary output, remote
|
|
63
|
+
and local EOF, and termination cleanup while both streams remain open. Relay
|
|
64
|
+
completion uses an explicit signal because Bash 3.2 defers `CHLD` traps during
|
|
65
|
+
`wait`; the tests retain bounded waits rather than increasing their timeouts.
|
|
66
|
+
|
|
49
67
|
The manual runtime management gate checks real VirtIO execution while Puppet sets
|
|
50
68
|
root shadow to `!`, replaces sudoers, removes the regular `empeira` account and
|
|
51
69
|
changes, restarts and disables system SSH. It verifies subsequent `node puppet`,
|
|
@@ -98,18 +116,30 @@ For workflow changes, parse `.github/workflows/*.yml` and run `actionlint` when
|
|
|
98
116
|
available. Review action pins, triggers and permissions as well as YAML syntax.
|
|
99
117
|
See [contributing](../CONTRIBUTING.md) for review, commit and label conventions.
|
|
100
118
|
|
|
119
|
+
The manual DNS recovery gate stops the owned DNS and gateway containers with a
|
|
120
|
+
managed Ubuntu 24.04 container node retained, then runs `up`. It verifies unchanged service
|
|
121
|
+
and node identities, reserved IP addresses, CA and volume records, working node
|
|
122
|
+
DNS and a subsequent Puppet run. This exercises native stopped-container recovery;
|
|
123
|
+
it does not reboot the host or cover VM guest restart. Select `docker` to repeat
|
|
124
|
+
the same gate with Docker:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
EMPEIRA_DNS_RECOVERY_INTEGRATION=1 EMPEIRA_DNS_RECOVERY_RUNTIME=podman \
|
|
128
|
+
bundle exec rspec spec/integration/dns_recovery_spec.rb
|
|
129
|
+
```
|
|
130
|
+
|
|
101
131
|
### Ruby compatibility
|
|
102
132
|
|
|
103
|
-
Ruby 3.
|
|
133
|
+
Ruby 3.2 is the minimum. Ruby 3.2, 3.3, 3.4 and 4.0 run the complete
|
|
104
134
|
deterministic suite on Ubuntu 24.04 and native macOS 15 in regular CI. Every
|
|
105
135
|
combination is required, including Ruby 4.0. The suite covers the CLI, Bash
|
|
106
136
|
completion, providers, networking, bootstrap, updates, addon contracts and gem
|
|
107
|
-
build/install/start. The existing Docker/OpenVox node smoke also runs on all
|
|
137
|
+
build/install/start. The existing Docker/OpenVox node smoke also runs on all four
|
|
108
138
|
Rubies on Ubuntu, with at most two concurrent jobs. Broader manual runtime
|
|
109
139
|
integrations and release builds remain on Ruby 3.4;
|
|
110
140
|
a unit test does not establish Docker, rootless Podman, KVM/HVF or WSL2 results.
|
|
111
141
|
|
|
112
|
-
Both committed lockfiles use Bundler 2.6.9, compatible with Ruby 3.
|
|
142
|
+
Both committed lockfiles use Bundler 2.6.9, compatible with Ruby 3.2. Ruby 4.0
|
|
113
143
|
requires the explicit Bundler 4.0.22 selection to avoid RubyGems platform-constant
|
|
114
144
|
warnings. Frozen installation keeps the same dependencies and lockfiles on every
|
|
115
145
|
Ruby. To reproduce Ruby 4 CI without editing either lockfile:
|
|
@@ -121,13 +151,26 @@ bundle install
|
|
|
121
151
|
bundle exec rspec --exclude-pattern 'spec/integration/**/*_spec.rb'
|
|
122
152
|
```
|
|
123
153
|
|
|
124
|
-
For Ruby 3.x, use `BUNDLER_VERSION=2.6.9` instead. The
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
154
|
+
For Ruby 3.x, use `BUNDLER_VERSION=2.6.9` instead. The CLI development bundle
|
|
155
|
+
contains only Core and its test tools. The module-helper bundle is independent:
|
|
156
|
+
its Ruby requirements do not raise the CLI's Ruby 3.2 minimum. The helper image
|
|
157
|
+
uses Bundler 2.6.9 on its separately pinned Ruby 3.4 base.
|
|
158
|
+
|
|
159
|
+
The real module-worker acceptance suite runs on Ruby 3.4 on both Ubuntu and macOS,
|
|
160
|
+
using the helper's frozen lockfile in child processes and synthetic Git/Forge
|
|
161
|
+
sources. It is a required CI step, separate from the Core matrix; moving it does
|
|
162
|
+
not remove its coverage. To run it locally, activate Ruby 3.4 and install both
|
|
163
|
+
bundles (use an absolute path for the helper bundle):
|
|
164
|
+
|
|
165
|
+
```sh
|
|
166
|
+
export EMPEIRA_MODULE_BUNDLE_PATH="$(ruby -rtmpdir -e 'puts File.join(Dir.tmpdir, "empeira-module-gems")')"
|
|
167
|
+
BUNDLE_GEMFILE=resources/modules/Gemfile BUNDLE_PATH="$EMPEIRA_MODULE_BUNDLE_PATH" bundle install
|
|
168
|
+
bundle exec rspec spec/acceptance/modules.rb
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Empeira uses native `Data` records on every supported Ruby. The memberless network
|
|
172
|
+
policy freezes itself explicitly because Ruby 3.2 does not freeze empty `Data`
|
|
173
|
+
instances ([Ruby bug #21819](https://bugs.ruby-lang.org/issues/21819)). Both
|
|
131
174
|
locks contain registry SHA-256 checksums generated by Bundler, not hand-entered:
|
|
132
175
|
|
|
133
176
|
```sh
|
|
@@ -300,7 +343,7 @@ The real VM lifecycle regression verifies the default managed SSH login and expl
|
|
|
300
343
|
overrides, then exercises retained disk and console recovery. A second case injects
|
|
301
344
|
a permanent guest error at the final APT backup removal: the restored archive must
|
|
302
345
|
remain verifiable, Puppet must stay blocked, and SSH/console access must release the
|
|
303
|
-
|
|
346
|
+
inventory transaction and remain interruptible by a concurrent stop. The injected error
|
|
304
347
|
does not reproduce an unexplained historical SSH disconnect.
|
|
305
348
|
The lifecycle case also verifies a 32 GiB thin overlay, unchanged base checksum,
|
|
306
349
|
grown root partition/filesystem, package installation and `df -h /`. After changing
|
|
@@ -510,14 +553,25 @@ the authoritative archive of release artifacts.
|
|
|
510
553
|
|
|
511
554
|
## Dependency and image provenance
|
|
512
555
|
|
|
513
|
-
Thor
|
|
556
|
+
Thor and Ruby's Base64 library are application runtime gems. Base64 is declared
|
|
557
|
+
explicitly because it is no longer a default gem on newer Ruby versions; the CLI
|
|
558
|
+
must not obtain it accidentally through the module-helper test bundle.
|
|
559
|
+
Development tools and the isolated r10k
|
|
514
560
|
installer are separate dependency resolutions. Dependencies are not vendored into
|
|
515
561
|
the release gem. Check upstream licensing and advisories before upgrades:
|
|
516
562
|
|
|
563
|
+
- [Base64](https://github.com/ruby/base64): Ruby or BSD-2-Clause; maintained by the
|
|
564
|
+
Ruby project, compatible with Ruby 3.2 and the project license.
|
|
517
565
|
- [Thor](https://rubygems.org/gems/thor), [RSpec](https://rubygems.org/gems/rspec),
|
|
518
566
|
[RuboCop](https://rubygems.org/gems/rubocop), [Rake](https://rubygems.org/gems/rake)
|
|
519
567
|
and [Bundler](https://rubygems.org/gems/bundler): MIT.
|
|
520
568
|
- [bundler-audit](https://github.com/rubysec/bundler-audit): GPL-3.0-or-later development tool.
|
|
569
|
+
- [multi_json](https://rubygems.org/gems/multi_json/versions/1.21.2): MIT;
|
|
570
|
+
the helper's pinned 1.21.2 supports JSON 3 and retains r10k's legacy API.
|
|
571
|
+
Its Ruby >= 3.2 requirement is satisfied by the independent Ruby 3.4 helper.
|
|
572
|
+
- [fast_gettext](https://rubygems.org/gems/fast_gettext/versions/4.2.0): MIT/Ruby;
|
|
573
|
+
the helper's pinned 4.2.0 requires Ruby >= 3.3 and uses the already locked `racc`.
|
|
574
|
+
It runs only in the Ruby 3.4 helper bundle, so CLI hosts retain Ruby 3.2 support.
|
|
521
575
|
- [r10k](https://github.com/puppetlabs/r10k) and
|
|
522
576
|
[puppet_forge](https://github.com/puppetlabs/forge-ruby): Apache-2.0; reviewed versions
|
|
523
577
|
and checksums are in `resources/modules/Gemfile.lock`. Log4r's packaged
|