@forgezero/agent 0.1.88 → 0.1.89
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 +23 -9
- package/dist/agent-heartbeat.js +1 -1
- package/dist/bootstrap.d.ts +8 -1
- package/dist/bootstrap.js +228 -54
- package/dist/capacity-calibration.d.ts +35 -5
- package/dist/capacity-calibration.js +66 -22
- package/dist/cli/agent-install.d.ts +3 -0
- package/dist/community-rehearsal-host.js +7 -2
- package/dist/control.d.ts +3 -1
- package/dist/definition.js +83 -28
- package/dist/deploy-file.js +83 -28
- package/dist/deployment.d.ts +5 -0
- package/dist/egress-policy.d.ts +4 -0
- package/dist/fz-agent.js +416 -150
- package/dist/fz.js +413 -129
- package/dist/host-maintenance.js +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/metal-bootstrap.js +1 -1
- package/dist/metal-helper-socket.js +7 -2
- package/dist/metal-provision.js +7 -2
- package/dist/operator-bootstrap.d.ts +12 -0
- package/dist/operator-bootstrap.js +372 -64
- package/dist/platform-bootstrap-runtime.d.ts +1 -0
- package/dist/platform-bootstrap-runtime.js +47 -8
- package/dist/platform-fleet-verification.js +262 -87
- package/dist/platform-genesis.js +7 -2
- package/dist/provision.d.ts +5 -1
- package/dist/provision.js +185 -71
- package/dist/recovery-host.js +1 -1
- package/dist/software-helper.js +144 -48
- package/dist/software.js +7 -2
- package/dist/ubuntu.js +7 -2
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/schema/deploy-v3.json +5 -2
package/dist/host-maintenance.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// src/host-maintenance.ts
|
|
3
3
|
import { lstatSync, readFileSync } from "fs";
|
|
4
4
|
var ROOT = "/opt/forgezero";
|
|
5
|
-
var SLOT_FILE = `${ROOT}/.
|
|
5
|
+
var SLOT_FILE = `${ROOT}/slots/.active`;
|
|
6
6
|
var SHARED_ENV = `${ROOT}/shared/.env`;
|
|
7
7
|
var JWT = "/etc/forgezero/creds/arangodb-jwt.cred";
|
|
8
8
|
var FZ = "/usr/local/bin/fz";
|
package/dist/index.d.ts
CHANGED
|
@@ -170,6 +170,13 @@ export type InitialVaultReplicaStatus = {
|
|
|
170
170
|
* is available again.
|
|
171
171
|
*/
|
|
172
172
|
export declare function initializeVaultReplica(cache: Pick<SecretCache, 'load'>): Promise<InitialVaultReplicaStatus>;
|
|
173
|
+
/** Keep the local signed/control plane alive while remote attestation retries. */
|
|
174
|
+
export declare function attemptInitialAttestation<T>(attempt: () => Promise<T>, onDeferred: (cause: unknown) => void): Promise<{
|
|
175
|
+
verified: true;
|
|
176
|
+
result: T;
|
|
177
|
+
} | {
|
|
178
|
+
verified: false;
|
|
179
|
+
}>;
|
|
173
180
|
/**
|
|
174
181
|
* Bring the agent up.
|
|
175
182
|
*
|
package/dist/metal-bootstrap.js
CHANGED
|
@@ -366,7 +366,7 @@ function systemdAgentEgressDirectives(loopbackTcpPorts = []) {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// src/version.ts
|
|
369
|
-
var VERSION = "0.1.
|
|
369
|
+
var VERSION = "0.1.89";
|
|
370
370
|
|
|
371
371
|
// src/otel-collector.ts
|
|
372
372
|
var FORGEZERO_OTEL_COLLECTOR_UNIT = "forgezero-otel-collector.service";
|
|
@@ -495,7 +495,12 @@ async function executeSoftwareOperation(operation) {
|
|
|
495
495
|
}
|
|
496
496
|
if (software === "nginx") {
|
|
497
497
|
const binary = await run(["/usr/sbin/nginx", "-v"]);
|
|
498
|
-
|
|
498
|
+
if (binary.exitCode !== 0)
|
|
499
|
+
return binary;
|
|
500
|
+
if (!existsSync("/usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so")) {
|
|
501
|
+
return { exitCode: 1, output: "Nginx response-header suppression module is unavailable" };
|
|
502
|
+
}
|
|
503
|
+
return run(["/usr/bin/systemctl", "is-active", "--quiet", "nginx.service"]);
|
|
499
504
|
}
|
|
500
505
|
if (software === "arangodb") {
|
|
501
506
|
const binary = await run(["/usr/sbin/arangod", "--version"]);
|
|
@@ -527,7 +532,7 @@ async function executeSoftwareOperation(operation) {
|
|
|
527
532
|
}
|
|
528
533
|
if (software === "docker" || software === "nginx" || software === "ufw" || software === "openssh-client" || software === "git") {
|
|
529
534
|
const packageName = software === "openssh-client" ? "openssh-client" : software === "docker" ? "docker.io" : software;
|
|
530
|
-
const installed = await aptInstall(packageName);
|
|
535
|
+
const installed = software === "nginx" ? await aptInstallMany(["nginx", "libnginx-mod-http-headers-more-filter"]) : await aptInstall(packageName);
|
|
531
536
|
if (installed.exitCode !== 0 || software !== "nginx" && software !== "docker")
|
|
532
537
|
return installed;
|
|
533
538
|
if (software === "docker") {
|
package/dist/metal-provision.js
CHANGED
|
@@ -495,7 +495,12 @@ async function executeSoftwareOperation(operation) {
|
|
|
495
495
|
}
|
|
496
496
|
if (software === "nginx") {
|
|
497
497
|
const binary = await run(["/usr/sbin/nginx", "-v"]);
|
|
498
|
-
|
|
498
|
+
if (binary.exitCode !== 0)
|
|
499
|
+
return binary;
|
|
500
|
+
if (!existsSync("/usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so")) {
|
|
501
|
+
return { exitCode: 1, output: "Nginx response-header suppression module is unavailable" };
|
|
502
|
+
}
|
|
503
|
+
return run(["/usr/bin/systemctl", "is-active", "--quiet", "nginx.service"]);
|
|
499
504
|
}
|
|
500
505
|
if (software === "arangodb") {
|
|
501
506
|
const binary = await run(["/usr/sbin/arangod", "--version"]);
|
|
@@ -527,7 +532,7 @@ async function executeSoftwareOperation(operation) {
|
|
|
527
532
|
}
|
|
528
533
|
if (software === "docker" || software === "nginx" || software === "ufw" || software === "openssh-client" || software === "git") {
|
|
529
534
|
const packageName = software === "openssh-client" ? "openssh-client" : software === "docker" ? "docker.io" : software;
|
|
530
|
-
const installed = await aptInstall(packageName);
|
|
535
|
+
const installed = software === "nginx" ? await aptInstallMany(["nginx", "libnginx-mod-http-headers-more-filter"]) : await aptInstall(packageName);
|
|
531
536
|
if (installed.exitCode !== 0 || software !== "nginx" && software !== "docker")
|
|
532
537
|
return installed;
|
|
533
538
|
if (software === "docker") {
|
|
@@ -117,6 +117,9 @@ export type OperatorCommand = (argv: readonly string[], options?: {
|
|
|
117
117
|
secret?: boolean;
|
|
118
118
|
safeStdout?: boolean;
|
|
119
119
|
}) => Promise<OperatorCommandResult>;
|
|
120
|
+
export declare const operatorPackagedFzCliPath: () => string;
|
|
121
|
+
export declare const operatorPackagedAgentPath: () => string;
|
|
122
|
+
export declare const operatorPackagedGitSshPath: () => string;
|
|
120
123
|
export interface OperatorPlatformBootstrapOptions {
|
|
121
124
|
exec?: OperatorCommand;
|
|
122
125
|
fetch?: typeof fetch;
|
|
@@ -143,6 +146,15 @@ export declare function planOperatorPlatformBootstrap(request: OperatorPlatformB
|
|
|
143
146
|
/** Exact non-secret coordinates derived from the same reviewed files bootstrap applies. */
|
|
144
147
|
export declare function operatorPlatformFleetCoordinates(fleet: OperatorPlatformBootstrapFleetRequest): OperatorPlatformFleetCoordinates;
|
|
145
148
|
export declare function planOperatorPlatformFleetBootstrap(fleet: OperatorPlatformBootstrapFleetRequest, mode: OperatorPlatformBootstrapMode): OperatorPlatformBootstrapFleetPlan;
|
|
149
|
+
/** Keep typed failure text while proving no attended value can be returned. */
|
|
150
|
+
export declare function redactOperatorSecretDiagnostic(stderr: string, stdin?: string): string;
|
|
151
|
+
/**
|
|
152
|
+
* Create or reopen the one shared genesis credential on the reviewed Metal
|
|
153
|
+
* host. The operator laptop is transport only: the value exists in local RAM
|
|
154
|
+
* long enough to cross the already pinned SSH sessions, while the only durable
|
|
155
|
+
* copy is encrypted by Metal's systemd host key.
|
|
156
|
+
*/
|
|
157
|
+
export declare function operatorMetalClusterBootstrapCode(requestInput: OperatorMetalBootstrapRequest, options?: OperatorPlatformBootstrapOptions): Promise<string>;
|
|
146
158
|
export declare function collectOperatorGuestHostKeys(request: OperatorMetalBootstrapRequest, options?: OperatorPlatformBootstrapOptions, includeRehearsal?: boolean): Promise<OperatorGuestHostKeyEvidence>;
|
|
147
159
|
export interface OperatorGuestTransport {
|
|
148
160
|
run(nodeName: string, argv: readonly string[], options?: {
|