empeira 0.1.0.pre.alpha.6 → 0.1.0.pre.alpha.8
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 +3 -2
- data/bin/empeira +1 -1
- data/config/defaults.yaml +26 -1
- data/docs/architecture.md +18 -0
- data/docs/configuration.md +33 -10
- data/docs/development.md +23 -0
- data/docs/installation.md +17 -1
- data/docs/networking.md +18 -2
- data/docs/nodes.md +35 -8
- data/docs/proxy.md +55 -1
- data/docs/troubleshooting.md +4 -2
- data/lib/empeira/agent/target.rb +1 -1
- data/lib/empeira/build.json +3 -3
- data/lib/empeira/cli/main.rb +6 -3
- data/lib/empeira/cli/update.rb +3 -2
- data/lib/empeira/configuration/additional_services.rb +1 -1
- data/lib/empeira/configuration/node_images.rb +30 -2
- data/lib/empeira/configuration/schema.rb +5 -2
- data/lib/empeira/control_plane/controller.rb +55 -30
- data/lib/empeira/control_plane/dns_configuration.rb +154 -0
- data/lib/empeira/control_plane/files.rb +22 -11
- data/lib/empeira/control_plane/health.rb +11 -0
- data/lib/empeira/control_plane/plan.rb +55 -1
- data/lib/empeira/control_plane/startup_failure.rb +43 -0
- data/lib/empeira/infrastructure/cleanup.rb +7 -1
- data/lib/empeira/infrastructure/session_lock.rb +60 -0
- data/lib/empeira/infrastructure/store.rb +5 -1
- data/lib/empeira/network/gateway.rb +1 -1
- data/lib/empeira/network/proxy_policy.rb +1 -1
- data/lib/empeira/node/container.rb +2 -1
- data/lib/empeira/node/container_lifecycle.rb +45 -26
- data/lib/empeira/node/initial_puppet_runs.rb +47 -0
- data/lib/empeira/node/session_lock.rb +19 -0
- data/lib/empeira/node/vm.rb +1 -1
- data/lib/empeira/node/vm_preparation.rb +4 -3
- data/lib/empeira/runtime/service_inspection.rb +5 -1
- data/lib/empeira/runtime/services.rb +5 -0
- data/lib/empeira/updates/service.rb +72 -5
- data/lib/empeira/vm/cloud_init.rb +6 -1
- data/lib/empeira/vm/image_source.rb +5 -6
- data/lib/empeira/vm/session_lock.rb +2 -46
- data/lib/empeira.rb +5 -0
- data/resources/modules/Gemfile.lock +2 -2
- data/resources/nodes/management/guest_agent.py +4 -0
- metadata +6 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c591e897dd6bfa42a6aa67789efaecfa87be8df2f05c1fefd2328c52a262fefb
|
|
4
|
+
data.tar.gz: 2e35e9d3595d3a8b5dd228b42b11827938678b900496c08acd8161b278bf1c3a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1fd4fa8fc1eb99ee06c4499d300758cdbbd341927702cdc536dbf814d115020c0f714cd67d1825bdf97bdc48b0ebf895ad3cc095855b1408e6dde4af9f568d4c
|
|
7
|
+
data.tar.gz: f6705a2b8d7b43b732ed5f3ffaf68c051564567a14834bf28cca9dba4e93f6b1a1a8b951828ecdd9d25c2e59c1a166513521aaaa91e087af09a47324579fc92a
|
data/README.md
CHANGED
|
@@ -92,7 +92,7 @@ empeira node exec host1 -- id
|
|
|
92
92
|
empeira node shell host1
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
`node run` creates an Ubuntu
|
|
95
|
+
`node run` creates an Ubuntu 26.04 container, installs the default OpenVox Agent,
|
|
96
96
|
enrolls its certificate and applies the catalog. Inside the shell, inspect
|
|
97
97
|
`/tmp/empeira-example`; `exit` returns to the host. Select Docker with
|
|
98
98
|
`--container-engine docker` when Podman is not installed. Optional workstation
|
|
@@ -138,7 +138,8 @@ cooperative lab, and its internal PuppetDB API is unauthenticated.
|
|
|
138
138
|
Container process mode does not provide a full booted OS. Systemd requires Podman
|
|
139
139
|
and cgroup v2. VM and shared-network support require actual host capabilities;
|
|
140
140
|
macOS/HVF and arm64 runtime validation are manual gates. Native Windows, automatic
|
|
141
|
-
self-update
|
|
141
|
+
self-update and standalone platform binaries are unavailable. RubyGems installations
|
|
142
|
+
support explicit `self-update` and `update all` commands.
|
|
142
143
|
Distribution is through RubyGems.org and the matching GitHub Release gem asset.
|
|
143
144
|
|
|
144
145
|
## Community and license
|
data/bin/empeira
CHANGED
|
@@ -6,7 +6,7 @@ require_relative '../lib/empeira/cli/main'
|
|
|
6
6
|
|
|
7
7
|
begin
|
|
8
8
|
Empeira::CLI::Main.start(ARGV)
|
|
9
|
-
rescue Empeira::Addons::Error => e
|
|
9
|
+
rescue Empeira::Addons::Error, Empeira::Updates::CommandFailed => e
|
|
10
10
|
$stderr.write "#{e.message}\n"
|
|
11
11
|
exit e.exit_status
|
|
12
12
|
rescue Empeira::Error => e
|
data/config/defaults.yaml
CHANGED
|
@@ -55,6 +55,7 @@ network:
|
|
|
55
55
|
infrastructure: []
|
|
56
56
|
redirects: []
|
|
57
57
|
proxy:
|
|
58
|
+
memory: 512
|
|
58
59
|
nodes:
|
|
59
60
|
enabled: false
|
|
60
61
|
global: []
|
|
@@ -75,10 +76,11 @@ dns:
|
|
|
75
76
|
rewrites: []
|
|
76
77
|
node_defaults:
|
|
77
78
|
os: ubuntu
|
|
78
|
-
version: "
|
|
79
|
+
version: "26.04"
|
|
79
80
|
init: process
|
|
80
81
|
memory: 1024
|
|
81
82
|
cpus: 2
|
|
83
|
+
puppet_runs: 1
|
|
82
84
|
hiera:
|
|
83
85
|
mounts: []
|
|
84
86
|
eyaml:
|
|
@@ -120,11 +122,26 @@ images:
|
|
|
120
122
|
tag: "22.04"
|
|
121
123
|
build: nodes/debian/Containerfile
|
|
122
124
|
architectures: [amd64, arm64]
|
|
125
|
+
vm:
|
|
126
|
+
url: "https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-{architecture}.img"
|
|
127
|
+
checksum_url: "https://cloud-images.ubuntu.com/releases/jammy/release/SHA256SUMS"
|
|
123
128
|
"24.04":
|
|
124
129
|
repository: library/ubuntu
|
|
125
130
|
tag: "24.04"
|
|
126
131
|
build: nodes/debian/Containerfile
|
|
127
132
|
architectures: [amd64, arm64]
|
|
133
|
+
vm:
|
|
134
|
+
url: "https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-{architecture}.img"
|
|
135
|
+
checksum_url: "https://cloud-images.ubuntu.com/releases/noble/release/SHA256SUMS"
|
|
136
|
+
"26.04":
|
|
137
|
+
repository: library/ubuntu
|
|
138
|
+
tag: "26.04"
|
|
139
|
+
digest: "sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db"
|
|
140
|
+
build: nodes/debian/Containerfile
|
|
141
|
+
architectures: [amd64, arm64]
|
|
142
|
+
vm:
|
|
143
|
+
url: "https://cloud-images.ubuntu.com/releases/resolute/release/ubuntu-26.04-server-cloudimg-{architecture}.img"
|
|
144
|
+
checksum_url: "https://cloud-images.ubuntu.com/releases/resolute/release/SHA256SUMS"
|
|
128
145
|
rocky:
|
|
129
146
|
"8":
|
|
130
147
|
repository: rockylinux/rockylinux
|
|
@@ -171,6 +188,11 @@ agent:
|
|
|
171
188
|
destinations: [apt.voxpupuli.org]
|
|
172
189
|
sha256: "40b8052bcece23ed707e609504dd14b178dc662652455f2d30e9c8e614955a94"
|
|
173
190
|
suffix: "-1+ubuntu24.04"
|
|
191
|
+
ubuntu26.04:
|
|
192
|
+
url: "https://apt.voxpupuli.org/openvox8-release-ubuntu26.04.deb"
|
|
193
|
+
destinations: [apt.voxpupuli.org]
|
|
194
|
+
sha256: "aa9726d90965b6701a546713e3dfa583b121be544ef1ee021254c2410d51ae4e"
|
|
195
|
+
suffix: "-1+ubuntu26.04"
|
|
174
196
|
el8:
|
|
175
197
|
url: "https://yum.voxpupuli.org/openvox8-release-el-8.noarch.rpm"
|
|
176
198
|
destinations: [yum.voxpupuli.org]
|
|
@@ -204,6 +226,9 @@ bootstrap:
|
|
|
204
226
|
"24.04":
|
|
205
227
|
agent_preinstalled: false
|
|
206
228
|
destinations: [archive.ubuntu.com, security.ubuntu.com, ports.ubuntu.com]
|
|
229
|
+
"26.04":
|
|
230
|
+
agent_preinstalled: false
|
|
231
|
+
destinations: [archive.ubuntu.com, security.ubuntu.com, ports.ubuntu.com]
|
|
207
232
|
rocky:
|
|
208
233
|
"8":
|
|
209
234
|
agent_preinstalled: false
|
data/docs/architecture.md
CHANGED
|
@@ -93,6 +93,24 @@ system SSH. Guest commands use argument arrays and owned process groups; stdout
|
|
|
93
93
|
and stderr stream in bounded frames without truncation. Timeouts, interrupts and
|
|
94
94
|
host disconnects terminate those groups. Binary uploads are SHA-256 verified,
|
|
95
95
|
staged privately and atomically installed in the real guest filesystem.
|
|
96
|
+
The management supervisor and workers retain `umask 077`, private 0700 staging and
|
|
97
|
+
explicit upload modes. Only executed commands (including Puppet and its children)
|
|
98
|
+
and PTY shells start with `umask 022`. Previously the worker's private mask leaked
|
|
99
|
+
into these children, causing ordinary file/directory creation to yield 0600/0700;
|
|
100
|
+
APT could not read public keys created by commands that omitted an explicit mode.
|
|
101
|
+
Commands still run as numeric root, and explicit private modes remain private.
|
|
102
|
+
Empeira's native APT acquisition already copies its own signing key with mode 0644
|
|
103
|
+
under `/var/tmp`; it does not create project repository keys under
|
|
104
|
+
`/usr/share/keyrings` or `/etc/apt/keyrings`.
|
|
105
|
+
|
|
106
|
+
This correction applies to newly seeded VMs. Recreate disposable existing VMs to
|
|
107
|
+
receive the updated adapter; `up` does not replace seeded management code or repair
|
|
108
|
+
existing files. No directory-wide chmod or post-Puppet keyring rewrite is performed.
|
|
109
|
+
A catalog explicitly setting mode 0600, or a tool using private temporary files,
|
|
110
|
+
still needs correction at its owning resource. Project-managed public APT keys
|
|
111
|
+
should specify root:root and 0644, with searchable parent directories. The reported
|
|
112
|
+
Docker/Elastic/project key names are absent from Empeira's source; their exact
|
|
113
|
+
catalog resources require inspection in the affected project.
|
|
96
114
|
|
|
97
115
|
The QEMU monitor verifies workspace/node/instance identity before management.
|
|
98
116
|
A 0700 host directory and 0600 Unix socket restrict access; recorded device/inode
|
data/docs/configuration.md
CHANGED
|
@@ -118,7 +118,7 @@ proxy:
|
|
|
118
118
|
allow: []
|
|
119
119
|
node_defaults:
|
|
120
120
|
os: ubuntu
|
|
121
|
-
version: "
|
|
121
|
+
version: "26.04"
|
|
122
122
|
memory: 2048
|
|
123
123
|
cpus: 2
|
|
124
124
|
puppetdb:
|
|
@@ -159,6 +159,7 @@ release version. A partial project mapping may omit it and inherit the default.
|
|
|
159
159
|
| `network.egress.nodes` | Node-only direct TCP host/port grants, `[]`; arrays replace |
|
|
160
160
|
| `network.egress.infrastructure` | Infrastructure-only direct TCP host/port grants, `[]`; arrays replace |
|
|
161
161
|
| `network.redirects` | Exact IPv4/protocol/port endpoints redirected to enabled internal services, `[]` |
|
|
162
|
+
| `proxy.memory` | Positive integer MiB, `512` per Squid container; shared regular proxy and separate temporary bootstrap proxy each use this limit; does not enable either proxy |
|
|
162
163
|
| `proxy.nodes.enabled` | Boolean, `false`; enables normal node HTTP/HTTPS proxy access |
|
|
163
164
|
| `proxy.nodes.global` | DNS destination array, `[]` |
|
|
164
165
|
| `proxy.nodes.rules` | Additive node hostname-glob rules with `hosts` and `allow` arrays, `[]` |
|
|
@@ -172,10 +173,11 @@ release version. A partial project mapping may omit it and inherit the default.
|
|
|
172
173
|
| `dns.rewrites` | Exact external hostnames mapped to enabled `<service>.empeira.internal` targets; `[]` by default |
|
|
173
174
|
| `hiera.mounts` | Puppet-aware module/environment mounts, `[]`; each source is optional unless `required: true` |
|
|
174
175
|
| `node_defaults.os` | Configured node OS family, default `ubuntu` |
|
|
175
|
-
| `node_defaults.version` | OS version string, default `"
|
|
176
|
+
| `node_defaults.version` | OS version string, default `"26.04"` |
|
|
176
177
|
| `node_defaults.init` | `process` by default; `systemd` requires supported Podman/cgroup v2 |
|
|
177
178
|
| `node_defaults.memory` | Positive integer MiB, `1024` |
|
|
178
179
|
| `node_defaults.cpus` | Positive integer, `2` |
|
|
180
|
+
| `node_defaults.puppet_runs` | Integer from `1` to `10`, default `1`; initial `node run` only |
|
|
179
181
|
| `mocks.commands` | Named command stubs for test nodes, `{}`; each requires `path`, `mock_to` and `exit_code` |
|
|
180
182
|
| `puppetdb.enabled` | Boolean, `true` |
|
|
181
183
|
| `eyaml.enabled` | Boolean, `false`; requires both key paths when enabled |
|
|
@@ -478,8 +480,9 @@ Invalid expressions fail validation at `requirements.empeira`.
|
|
|
478
480
|
Before `up`, `down` or `destroy` takes a lock or mutates infrastructure/state, the central
|
|
479
481
|
build abstraction verifies this requirement. Incompatible releases fail with the
|
|
480
482
|
required and installed versions and the `empeira self-update` command. Self-update
|
|
481
|
-
|
|
482
|
-
|
|
483
|
+
updates regular RubyGems installations independently of the project configuration.
|
|
484
|
+
Git checkouts and Bundler must use their existing installation method.
|
|
485
|
+
Infrastructure operations never update Empeira automatically.
|
|
483
486
|
`--version`, `config show`, `config validate`, and `status` remain usable on mismatch.
|
|
484
487
|
If project or user configuration cannot be loaded, `destroy` uses built-in defaults
|
|
485
488
|
and the validated workspace inventory for recovery. An unreadable requirement cannot
|
|
@@ -550,10 +553,11 @@ no transport selector or additional management YAML configuration. See
|
|
|
550
553
|
|
|
551
554
|
## Images and bootstrap
|
|
552
555
|
|
|
553
|
-
`images.nodes` selects container recipes and base images.
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
556
|
+
`images.nodes` selects container recipes and base images. Ubuntu entries also contain
|
|
557
|
+
`vm.url` and `vm.checksum_url`, HTTPS URLs for the cloud image and its SHA-256 manifest.
|
|
558
|
+
The optional `{architecture}` placeholder expands to `amd64` or `arm64`; credentials,
|
|
559
|
+
query strings and URL fragments are rejected. Reviewed sources live in `config/defaults.yaml`.
|
|
560
|
+
Rocky sources retain their existing adapter. `bootstrap.guests` records whether an agent is preinstalled
|
|
557
561
|
and the reviewed destination domains that the temporary bootstrap proxy may reach.
|
|
558
562
|
Rocky metadata also supplies the stable `baseurl` needed to avoid arbitrary mirror
|
|
559
563
|
selection. Ubuntu and Debian package source URLs come exclusively from the base
|
|
@@ -594,7 +598,7 @@ Configure only the manager you use. A project `apt.default` or `dnf.default`
|
|
|
594
598
|
supersedes the built-in release sources for that family. OS-specific entries
|
|
595
599
|
merge over the generic default; existing complete source definitions and `suffix`
|
|
596
600
|
overrides remain supported. APT suites default to `jammy` for Ubuntu 22.04 and
|
|
597
|
-
`noble` for Ubuntu 24.04. RPM keys remain `el8`/`el9` for Rocky, AlmaLinux and
|
|
601
|
+
`noble` for Ubuntu 24.04, and `resolute` for Ubuntu 26.04. RPM keys remain `el8`/`el9` for Rocky, AlmaLinux and
|
|
598
602
|
Oracle Linux's existing supported releases. Architecture comes from the target
|
|
599
603
|
node: `amd64`/`arm64` for DEB and `x86_64`/`aarch64` for RPM. Only `$suite`,
|
|
600
604
|
`$releasever` and `$basearch` URL placeholders are expanded; arbitrary environment
|
|
@@ -970,7 +974,10 @@ The default control plane has six containers, or seven with the proxy, plus the
|
|
|
970
974
|
runtime's peer-network adapter. Requested limits
|
|
971
975
|
are 1536 MiB for the server (768 MiB JVM heap), 768 MiB for PuppetDB (256 MiB heap),
|
|
972
976
|
256 MiB for PostgreSQL, 64 MiB for DNS, 96 MiB for the database relay, 64 MiB
|
|
973
|
-
for the gateway and
|
|
977
|
+
for the gateway and 512 MiB for the regular Squid proxy (`proxy.memory`). A temporary
|
|
978
|
+
bootstrap Squid container has its own additional limit of the same size while
|
|
979
|
+
running. These are per-container limits, not reservations or measured peaks.
|
|
980
|
+
The control-plane memory ceiling is about
|
|
974
981
|
2.7 GiB without the proxy, excluding the peer adapter and nodes. The server gets two CPUs and each
|
|
975
982
|
other service one. Actual idle use is lower and varies by provider and platform.
|
|
976
983
|
`up` automatically pulls missing remote images and builds missing recipe images.
|
|
@@ -1230,3 +1237,19 @@ or `expose` schema. `images.network_adapter_builder` selects the reviewed Go bui
|
|
|
1230
1237
|
image used by the existing recipe-hash image cache; Go is not a host prerequisite.
|
|
1231
1238
|
Node IP/MAC leases survive stop/start and are released on destroy. See
|
|
1232
1239
|
[networking](networking.md) for address pools, isolation and platform validation.
|
|
1240
|
+
|
|
1241
|
+
### Initial Puppet runs
|
|
1242
|
+
|
|
1243
|
+
```yaml
|
|
1244
|
+
node_defaults:
|
|
1245
|
+
puppet_runs: 4
|
|
1246
|
+
```
|
|
1247
|
+
|
|
1248
|
+
`empeira node run` runs the agent sequentially this many times after bootstrap,
|
|
1249
|
+
network cleanup and enrollment. The default is one; accepted values are integers
|
|
1250
|
+
from one through ten. Every run streams its normal Puppet output and reports its
|
|
1251
|
+
position and detailed exit code. Completed failing catalogs do not stop the sequence:
|
|
1252
|
+
for example, `4, 6, 2, 0` succeeds. The final run decides success (`0` or `2`). A
|
|
1253
|
+
failing final catalog retains the provisioned node for diagnosis and a later retry.
|
|
1254
|
+
Transport failures, timeouts and processes that cannot start abort immediately.
|
|
1255
|
+
`empeira node puppet` still runs once; start and other lifecycle commands add no runs.
|
data/docs/development.md
CHANGED
|
@@ -378,6 +378,20 @@ and `dry_run` (default true). Dispatch it from `main`; a prerelease tag must mat
|
|
|
378
378
|
its channel, for example `v0.1.0-alpha.1`. Other branches and existing tags/releases
|
|
379
379
|
are rejected. Quality and real Docker/OpenVox gates must pass before the build.
|
|
380
380
|
|
|
381
|
+
For GitHub integrations that cannot dispatch Actions directly, create or update
|
|
382
|
+
`.github/release-request.json` in a PR with exactly these fields:
|
|
383
|
+
|
|
384
|
+
```json
|
|
385
|
+
{"tag":"v0.1.0-alpha.1","channel":"alpha","dry_run":true}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
Merging the request to `main` invokes the dedicated dispatcher, which validates
|
|
389
|
+
the tag/channel and calls the same manual release workflow. Keep `dry_run: true`
|
|
390
|
+
for the validation pass; only set `false` in a separate, explicitly approved
|
|
391
|
+
publish request. Both passes run the existing release gates. An ordinary source
|
|
392
|
+
change without a changed request file never triggers publishing. A release request
|
|
393
|
+
PR is not itself a release or proof that its downstream workflow succeeded.
|
|
394
|
+
|
|
381
395
|
The build uses the existing `rake build_info` task in a temporary source staging
|
|
382
396
|
directory, builds an installable gem, and checks its contents, license, normalized
|
|
383
397
|
Gem version and exact embedded metadata. RubyGems normalizes a tag such as
|
|
@@ -409,6 +423,15 @@ and the same tag/asset; missing assets, a retained draft or an API error fail th
|
|
|
409
423
|
Alpha/beta/rc are prereleases and do not become latest stable.
|
|
410
424
|
Dry-run performs all quality/build gates but skips the entire publishing job.
|
|
411
425
|
|
|
426
|
+
After the GitHub release is published and verified, the same release workflow
|
|
427
|
+
calls the existing `publish-rubygems.yml` workflow as a reusable job. The publisher
|
|
428
|
+
re-downloads and independently verifies the exact GitHub release gem and tag, then
|
|
429
|
+
publishes it to RubyGems.org using its existing OIDC trusted publisher. If the
|
|
430
|
+
GitHub release fails, the RubyGems job is skipped. A RubyGems failure leaves the
|
|
431
|
+
GitHub release intact for diagnosis; the standalone publisher remains available
|
|
432
|
+
to retry that exact release without rebuilding it. Ensure RubyGems trusted
|
|
433
|
+
publishing names `publish-rubygems.yml` as the authorized workflow.
|
|
434
|
+
|
|
412
435
|
### Release failure and recovery
|
|
413
436
|
|
|
414
437
|
Tag creation and GitHub release publication are separate operations. A failed run
|
data/docs/installation.md
CHANGED
|
@@ -241,7 +241,23 @@ The control repository must already be a Git repository. Project commands resolv
|
|
|
241
241
|
`.empeira.yaml` at that canonical root. An empty file uses defaults. Subdirectory
|
|
242
242
|
invocation and paths with spaces work. No Puppet-file heuristic or `--project`
|
|
243
243
|
selector exists. The source shell function preserves the current directory.
|
|
244
|
-
Version/help/self-update work outside Git
|
|
244
|
+
Version/help/self-update work outside Git. Regular RubyGems installations can update
|
|
245
|
+
to the latest stable Empeira version with:
|
|
246
|
+
|
|
247
|
+
```console
|
|
248
|
+
empeira self-update
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
The command uses the current Ruby interpreter and verifies the installed version
|
|
252
|
+
after RubyGems finishes. It never invokes sudo. Git checkouts, Bundler and unsupported
|
|
253
|
+
installations must use their original installation method. Permission and download
|
|
254
|
+
failures retain RubyGems diagnostics.
|
|
255
|
+
|
|
256
|
+
Inside a project, `empeira update all` first performs self-update, then starts
|
|
257
|
+
`empeira update images` and `empeira update modules` in fresh Ruby processes using
|
|
258
|
+
the verified installed version. The first failure stops the sequence and returns
|
|
259
|
+
that command's exit code. These commands update artifacts; existing nodes and
|
|
260
|
+
running infrastructure are not reconciled automatically.
|
|
245
261
|
|
|
246
262
|
## Install the GitHub Release gem (alternative)
|
|
247
263
|
|
data/docs/networking.md
CHANGED
|
@@ -290,8 +290,24 @@ dns:
|
|
|
290
290
|
|
|
291
291
|
The optional additional resolver is queried first for non-Empeira names; NXDOMAIN
|
|
292
292
|
or NODATA falls through to the existing upstream. It may be a DNS name or address
|
|
293
|
-
and need not be an Empeira service.
|
|
294
|
-
|
|
293
|
+
and need not be an Empeira service. For a managed service, use its service name
|
|
294
|
+
or `<service>.empeira.internal`. `up` requires that service to be enabled and
|
|
295
|
+
running, then binds its verified isolated IPv4 address into CoreDNS. Address changes
|
|
296
|
+
are reconciled on the next `up`; missing services and self references fail clearly.
|
|
297
|
+
External resolver names and IPv4 addresses retain their existing behavior.
|
|
298
|
+
|
|
299
|
+
Before publishing a changed Corefile, `up` starts a disposable CoreDNS validator
|
|
300
|
+
inside the isolated workspace network. It verifies the candidate with a private
|
|
301
|
+
TXT generation query, removes the validator, atomically publishes the file and
|
|
302
|
+
signals the existing DNS process. Completion requires the same generation answer
|
|
303
|
+
from that process. A failed activation restores the previous working Corefile and
|
|
304
|
+
reports any failure to verify restoration. Unchanged `up` does not restart or reload
|
|
305
|
+
CoreDNS. The validation helper never publishes host ports or attaches to an external
|
|
306
|
+
network. Internal names stay authoritative; successful additional-resolver answers
|
|
307
|
+
never fall through to the host upstream. `next NXDOMAIN` and `next_on_nodata` apply
|
|
308
|
+
only to negative or empty answers, respectively.
|
|
309
|
+
|
|
310
|
+
VPN/engine routing remains the host's responsibility; flat Linux resolver
|
|
295
311
|
files cannot represent every split-DNS route. AAAA queries return NODATA.
|
|
296
312
|
|
|
297
313
|
### Exact DNS rewrites
|
data/docs/nodes.md
CHANGED
|
@@ -5,7 +5,7 @@ Create nodes imperatively after `empeira up`; named nodes do not belong in
|
|
|
5
5
|
Existing-node commands use the provider recorded in workspace state.
|
|
6
6
|
|
|
7
7
|
```console
|
|
8
|
-
empeira node run host1 --provider container --os ubuntu --version
|
|
8
|
+
empeira node run host1 --provider container --os ubuntu --version 26.04
|
|
9
9
|
empeira node run vm1 --provider vm --memory 2048 --cpus 2
|
|
10
10
|
empeira node list
|
|
11
11
|
empeira node puppet host1
|
|
@@ -19,10 +19,31 @@ empeira node start host1
|
|
|
19
19
|
empeira node destroy host1
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
The default node is Ubuntu
|
|
22
|
+
The default node is Ubuntu 26.04, 1024 MiB, and two CPUs. External traffic requires
|
|
23
23
|
an explicit TCP egress rule or an allowlisted proxy policy. If the workspace proxy
|
|
24
24
|
is enabled, the node automatically gets
|
|
25
25
|
controlled HTTP/HTTPS access to destinations allowed by its proxy policy.
|
|
26
|
+
|
|
27
|
+
Ubuntu 26.04 LTS is available for both providers on AMD64 and ARM64:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
empeira node run container.example.test --provider container --os ubuntu --version 26.04
|
|
31
|
+
empeira node run vm.example.test --provider vm --os ubuntu --version 26.04
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The container uses the official Ubuntu index pin in `config/defaults.yaml`; VM
|
|
35
|
+
images use Ubuntu's Resolute release and its HTTPS SHA-256 manifest. The configured
|
|
36
|
+
OpenVox Agent is available for both architectures in the
|
|
37
|
+
[official Ubuntu 26.04 repository](https://apt.voxpupuli.org/dists/ubuntu26.04/).
|
|
38
|
+
The existing APT source preservation, DNS setup, privilege and cgroup rules apply.
|
|
39
|
+
New Ubuntu 26.04 VMs keep the kernel's interface name and match the peer NIC by its
|
|
40
|
+
fixed MAC address. This avoids the upstream cloud-init/udev rename race during
|
|
41
|
+
restart; the static address, DNS and gateway settings stay the same. Older releases
|
|
42
|
+
retain their existing `eth0` naming.
|
|
43
|
+
Containers still default to process init; systemd init retains the documented
|
|
44
|
+
Podman/cgroup requirements. Ubuntu 22.04/24.04 and existing VM base revisions are
|
|
45
|
+
preserved; new nodes default to Ubuntu 26.04 unless configured otherwise.
|
|
46
|
+
|
|
26
47
|
Hostname/certname is unique across both providers within a workspace. Names are
|
|
27
48
|
normalized to lowercase; service names are reserved. Another checkout may reuse
|
|
28
49
|
the same hostname. Before the first Puppet run, Empeira installs
|
|
@@ -107,7 +128,7 @@ on startup.
|
|
|
107
128
|
## Distribution package sources
|
|
108
129
|
|
|
109
130
|
The reviewed Ubuntu container recipes retain the upstream distribution sources.
|
|
110
|
-
Ubuntu 24.04
|
|
131
|
+
Ubuntu 24.04 and 26.04 use `/etc/apt/sources.list.d/ubuntu.sources` (deb822); older images may
|
|
111
132
|
use `/etc/apt/sources.list`. VM Cloud-Init leaves the base image's APT configuration
|
|
112
133
|
untouched. It does not generate archive, security, ports, or internal repository
|
|
113
134
|
entries.
|
|
@@ -296,12 +317,18 @@ Empeira uses the private privileged VirtIO channel internally to install the VM
|
|
|
296
317
|
enroll certificates and run Puppet. User-facing SSH opens an ordinary interactive
|
|
297
318
|
login without the internal provisioning command or automatic sudo.
|
|
298
319
|
|
|
299
|
-
VM exec, shell, SSH and serial sessions release the workspace
|
|
300
|
-
running-state checks. Parallel sessions and read-only status remain available. A
|
|
320
|
+
Container SSH and VM exec, shell, SSH and serial sessions release the workspace
|
|
321
|
+
mutation lock after ownership and running-state checks. Parallel sessions and read-only status remain available. A
|
|
301
322
|
shared instance guard prevents `node stop`, `node destroy` or restart from replacing
|
|
302
|
-
|
|
323
|
+
that node instance while a session is attached; detach first and retry the conflicting operation.
|
|
303
324
|
Other nodes and workspace commands can proceed. Instance lock files stay stable;
|
|
304
325
|
their open descriptors are released on detach, disconnect, errors and signals.
|
|
326
|
+
Container SSH preparation remains inside the workspace transaction and pins the
|
|
327
|
+
observed container ID before releasing that lock. Concurrent SSH sessions to the
|
|
328
|
+
same or different nodes are allowed. Container `exec` and `shell` retain their
|
|
329
|
+
existing workspace transaction. Mutations still use the exclusive workspace lock;
|
|
330
|
+
`down` continues to require node removal, and destroy retains attached instances
|
|
331
|
+
for a retry after sessions detach.
|
|
305
332
|
|
|
306
333
|
## Root diagnostic commands and interactive shell
|
|
307
334
|
|
|
@@ -418,7 +445,7 @@ VM. Capability detection selects KVM or HVF; software emulation is never automat
|
|
|
418
445
|
Preflight checks commands, acceleration, image metadata, scripts, package destinations
|
|
419
446
|
and control-plane readiness before downloads or node reservation.
|
|
420
447
|
|
|
421
|
-
Ubuntu 22.04/24.04 cloud images and Rocky 8/9 GenericCloud images come directly from
|
|
448
|
+
Ubuntu 22.04/24.04/26.04 cloud images and Rocky 8/9 GenericCloud images come directly from
|
|
422
449
|
[Ubuntu](https://cloud-images.ubuntu.com/releases/) and
|
|
423
450
|
[Rocky Linux](https://dl.rockylinux.org/pub/rocky/). Availability depends on architecture.
|
|
424
451
|
SHA-256 manifests are fetched over HTTPS and complete images verified before caching.
|
|
@@ -524,7 +551,7 @@ and checks the exact address and device type.
|
|
|
524
551
|
|
|
525
552
|
| OS catalog key | Versions | Build source |
|
|
526
553
|
| --- | --- | --- |
|
|
527
|
-
| `ubuntu` | `22.04`, `24.04` | Docker Official Ubuntu images |
|
|
554
|
+
| `ubuntu` | `22.04`, `24.04`, `26.04` | Docker Official Ubuntu images |
|
|
528
555
|
| `rocky` | `8`, `9` | Rocky Linux project images |
|
|
529
556
|
| `almalinux` | `8`, `9` | Docker Official AlmaLinux images |
|
|
530
557
|
| `oraclelinux` | `8` | Docker Official Oracle Linux image |
|
data/docs/proxy.md
CHANGED
|
@@ -6,6 +6,7 @@ the node scope makes its global and hostname rules available to nodes:
|
|
|
6
6
|
|
|
7
7
|
```yaml
|
|
8
8
|
proxy:
|
|
9
|
+
memory: 512 # MiB per regular or temporary bootstrap Squid container
|
|
9
10
|
nodes:
|
|
10
11
|
enabled: true
|
|
11
12
|
global:
|
|
@@ -48,6 +49,57 @@ The diagnostic resolves desired policy even for a hostname that does not exist.
|
|
|
48
49
|
It reports when the normal proxy is disabled and does not claim that live
|
|
49
50
|
infrastructure has already been reconciled.
|
|
50
51
|
|
|
52
|
+
## Memory budget and startup diagnostics
|
|
53
|
+
|
|
54
|
+
`proxy.memory` is a positive integer MiB limit per managed Squid container,
|
|
55
|
+
defaulting to 512. Node access and infrastructure access share one regular proxy;
|
|
56
|
+
the same limit applies when either or both scopes are enabled. The temporary,
|
|
57
|
+
authenticated bootstrap proxy inherits this value as its own container limit.
|
|
58
|
+
If both containers run simultaneously, each has a separate 512 MiB limit by
|
|
59
|
+
default (1024 MiB combined), not one shared 512 MiB budget. These limits are
|
|
60
|
+
neither memory reservations nor measured peak consumption.
|
|
61
|
+
|
|
62
|
+
Existing configurations inherit the default. Setting `proxy.memory` alone does
|
|
63
|
+
not enable a regular proxy or start a bootstrap proxy. Node and infrastructure
|
|
64
|
+
access keep independent activation switches and destination grants. Bootstrap
|
|
65
|
+
keeps its separate temporary activation, authentication and destination grants.
|
|
66
|
+
Docker and Podman use the same native
|
|
67
|
+
`--memory` argument, including rootless Podman. The engine host (or its Linux VM on
|
|
68
|
+
macOS) still needs enough available memory and working cgroup memory controls.
|
|
69
|
+
|
|
70
|
+
The former fixed 128 MiB limit was below the reported killed process's approximately
|
|
71
|
+
139 MiB resident footprint (anonymous plus file RSS), before accounting for other
|
|
72
|
+
cgroup charges. The 512 MiB default provides headroom for startup, concurrent
|
|
73
|
+
requests, DNS and allocator overhead. It is a conservative budget, not a measured
|
|
74
|
+
maximum or a guarantee for arbitrary workloads. Validate actual peak usage with
|
|
75
|
+
native container stats and host cgroup/OOM diagnostics in the affected environment.
|
|
76
|
+
|
|
77
|
+
Generated policy keeps `cache deny all`, sets `cache_mem 16 MB`, and explicitly uses
|
|
78
|
+
`workers 1` together with `-N` for one foreground main process. An explicit
|
|
79
|
+
`workers 0` causes Squid 7.7 to exit during startup with
|
|
80
|
+
`FATAL: check failed: theProcessCount > 0`; `-N` already selects foreground mode.
|
|
81
|
+
No disk cache is configured. Squid's [cache_mem documentation](https://www.squid-cache.org/Doc/config/cache_mem/)
|
|
82
|
+
describes an object-memory target, not a cap on process RSS; in-flight requests can
|
|
83
|
+
exceed it. The [workers setting](https://www.squid-cache.org/Doc/config/workers/)
|
|
84
|
+
avoids multiplying main-process memory. These settings preserve DNS, source-bound
|
|
85
|
+
client rules and the HTTP/HTTPS destination policy.
|
|
86
|
+
|
|
87
|
+
If the regular proxy exits during startup or its readiness check, diagnostics
|
|
88
|
+
include the native exit code, `OOMKilled` observation and actual inspected memory
|
|
89
|
+
limit in bytes/MiB when available. Only `OOMKilled=true` confirms an OOM kill. Exit 137 alone does not:
|
|
90
|
+
external SIGKILL can produce the same exit. Missing observations are explicitly
|
|
91
|
+
reported as unavailable, and a runtime-reported zero limit is shown as unlimited.
|
|
92
|
+
For confirmed proxy OOM, increase `proxy.memory`, check engine-host capacity, and
|
|
93
|
+
run `empeira up`. Native logs remain available via the displayed runtime command.
|
|
94
|
+
The temporary bootstrap proxy uses its own endpoint verification and readiness
|
|
95
|
+
probe; the new regular-proxy OOM diagnostics do not apply to that separate path.
|
|
96
|
+
|
|
97
|
+
A memory change replaces only the regular proxy on the next `up`; CA/database
|
|
98
|
+
storage, nodes and unrelated services retain their identities. Unchanged runs
|
|
99
|
+
reuse the proxy. Generated policy changes use the existing readiness/reload checkpoint.
|
|
100
|
+
Replacing or reloading the proxy may interrupt active proxy connections.
|
|
101
|
+
The next temporary bootstrap proxy receives the configured limit when created.
|
|
102
|
+
|
|
51
103
|
## Matching and destinations
|
|
52
104
|
|
|
53
105
|
Defaults are `proxy.nodes.global: []` and `proxy.nodes.rules: []`. Every node receives
|
|
@@ -176,4 +228,6 @@ disposable helper with normal container-runtime networking and supplied user pro
|
|
|
176
228
|
variables. Git uses the invoking user's host Git/SSH configuration and network
|
|
177
229
|
access, without copying private keys. No update starts Squid, CoreDNS or other
|
|
178
230
|
workspace services. See [update-plane architecture](architecture.md#runtime-and-update-planes).
|
|
179
|
-
|
|
231
|
+
RubyGems installations support `self-update`. The aggregate `update all` first
|
|
232
|
+
updates Empeira, then runs image and module updates in fresh processes using the
|
|
233
|
+
verified installed version. A failed step stops the sequence.
|
data/docs/troubleshooting.md
CHANGED
|
@@ -321,8 +321,10 @@ diagnostics identify the affected image. Successful tool logs remain hidden.
|
|
|
321
321
|
Update helpers are removed after completion where the engine is reachable. If an
|
|
322
322
|
engine stops responding during cleanup, restore access and inspect the reported
|
|
323
323
|
update-helper failure before removing anything; names alone do not establish
|
|
324
|
-
ownership. `self-update`
|
|
325
|
-
|
|
324
|
+
ownership. `self-update` supports regular RubyGems installations; Git checkouts and
|
|
325
|
+
Bundler must use their original installation method. `update all` runs self-update,
|
|
326
|
+
then images and modules in fresh processes, stopping on the first failure without
|
|
327
|
+
rolling back earlier updates. Image updates are not atomic across the full catalog;
|
|
326
328
|
earlier successful pulls/builds remain after a later failure.
|
|
327
329
|
|
|
328
330
|
## User preferences and registry authentication
|
data/lib/empeira/agent/target.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Empeira
|
|
4
4
|
module Agent
|
|
5
5
|
class Target < Data.define(:os, :release, :architecture)
|
|
6
|
-
SUITES = { '22.04' => 'jammy', '24.04' => 'noble' }.freeze
|
|
6
|
+
SUITES = { '22.04' => 'jammy', '24.04' => 'noble', '26.04' => 'resolute' }.freeze
|
|
7
7
|
ARCHITECTURES = { 'amd64' => 'x86_64', 'arm64' => 'aarch64' }.freeze
|
|
8
8
|
|
|
9
9
|
def family
|
data/lib/empeira/build.json
CHANGED
data/lib/empeira/cli/main.rb
CHANGED
|
@@ -95,12 +95,15 @@ module Empeira
|
|
|
95
95
|
say 'Workspace infrastructure and persistent data removed.'
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
-
desc 'self-update', 'Update
|
|
98
|
+
desc 'self-update', 'Update Empeira to the latest stable version via RubyGems'
|
|
99
99
|
def self_update
|
|
100
|
-
|
|
100
|
+
say 'Updating Empeira via RubyGems...'
|
|
101
|
+
previous, installed = Updates::Service.new.self_update
|
|
102
|
+
say(installed > previous.version ? 'Empeira updated successfully.' : 'Empeira is already up to date.')
|
|
103
|
+
say "Installed version: #{installed}"
|
|
101
104
|
end
|
|
102
105
|
|
|
103
|
-
desc 'update SUBCOMMAND', 'Update
|
|
106
|
+
desc 'update SUBCOMMAND', 'Update Empeira and managed artifacts'
|
|
104
107
|
subcommand 'update', Update
|
|
105
108
|
|
|
106
109
|
%w[images].each do |operation|
|
data/lib/empeira/cli/update.rb
CHANGED
|
@@ -7,12 +7,13 @@ module Empeira
|
|
|
7
7
|
class Update < Base
|
|
8
8
|
Updates::Service::TARGETS.each do |target|
|
|
9
9
|
desc target,
|
|
10
|
-
{ 'all' => 'Update
|
|
10
|
+
{ 'all' => 'Update Empeira, then images and modules using the updated installation',
|
|
11
11
|
'modules' => 'Synchronize Puppetfile module artifacts',
|
|
12
12
|
'images' => 'Refresh configured container image artifacts' }.fetch(target)
|
|
13
13
|
define_method(target) do
|
|
14
14
|
if target == 'all'
|
|
15
|
-
|
|
15
|
+
say 'Updating Empeira, images and modules...'
|
|
16
|
+
Updates::Service.new.update(target)
|
|
16
17
|
else
|
|
17
18
|
progressing("Updating #{target}...") { |app| app.updates.update(target) }
|
|
18
19
|
end
|
|
@@ -6,7 +6,7 @@ module Empeira
|
|
|
6
6
|
NAME = /\A[a-z][a-z0-9]*(?:-[a-z0-9]+)*\z/
|
|
7
7
|
RESERVED = %w[server puppetdb puppetdb-backend postgres dns coredns proxy gateway browser browser-ui vm-gateway
|
|
8
8
|
bootstrap-proxy module-installer ca ssl server-data postgres-data
|
|
9
|
-
puppetdb-data node localhost].freeze
|
|
9
|
+
puppetdb-data node localhost dns-validation].freeze
|
|
10
10
|
FIELDS = %w[name image environment command configuration].freeze
|
|
11
11
|
|
|
12
12
|
def self.validate!(entries, path)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'uri'
|
|
4
|
+
|
|
3
5
|
module Empeira
|
|
4
6
|
module Configuration
|
|
5
7
|
# Node image metadata and architecture validation.
|
|
@@ -35,8 +37,13 @@ module Empeira
|
|
|
35
37
|
|
|
36
38
|
def node_image!(image, path)
|
|
37
39
|
mapping!(image, path)
|
|
38
|
-
ImageSchema.validate!(image.except('architectures', 'build'), path)
|
|
40
|
+
ImageSchema.validate!(image.except('architectures', 'build', 'vm'), path)
|
|
41
|
+
vm_image!(image['vm'], "#{path}.vm") if image.key?('vm')
|
|
39
42
|
ImageSchema.validate!({ 'build' => image['build'] }, path) if image.key?('build')
|
|
43
|
+
architectures!(image, path)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def architectures!(image, path)
|
|
40
47
|
return unless image.key?('architectures')
|
|
41
48
|
|
|
42
49
|
architectures = image['architectures']
|
|
@@ -51,11 +58,32 @@ module Empeira
|
|
|
51
58
|
versions.each do |version, image|
|
|
52
59
|
path = "images.nodes.#{os}.#{version}"
|
|
53
60
|
required!(image, ['architectures'], path)
|
|
54
|
-
ImageSchema.validate!(image.except('architectures', 'build'), path, effective: true)
|
|
61
|
+
ImageSchema.validate!(image.except('architectures', 'build', 'vm'), path, effective: true)
|
|
62
|
+
required!(image.fetch('vm'), %w[url checksum_url], "#{path}.vm") if image.key?('vm')
|
|
55
63
|
end
|
|
56
64
|
end
|
|
57
65
|
end
|
|
58
66
|
|
|
67
|
+
def vm_image!(image, path)
|
|
68
|
+
mapping!(image, path)
|
|
69
|
+
image.each do |key, value|
|
|
70
|
+
next if %w[url checksum_url].include?(key) && vm_url?(value)
|
|
71
|
+
|
|
72
|
+
raise ConfigurationError, "#{path}.#{key} must be an HTTPS URL without credentials, " \
|
|
73
|
+
'query strings or fragments; ' \
|
|
74
|
+
'supported VM fields are url and checksum_url'
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def vm_url?(value)
|
|
79
|
+
return false unless value.is_a?(String)
|
|
80
|
+
|
|
81
|
+
uri = URI(value.gsub('{architecture}', 'amd64'))
|
|
82
|
+
uri.is_a?(URI::HTTPS) && uri.host && !uri.userinfo && !uri.query && !uri.fragment
|
|
83
|
+
rescue URI::InvalidURIError
|
|
84
|
+
false
|
|
85
|
+
end
|
|
86
|
+
|
|
59
87
|
def required!(data, keys, path)
|
|
60
88
|
keys.each { |key| raise ConfigurationError, "#{path}.#{key} is required" unless data.key?(key) }
|
|
61
89
|
end
|