rightsize 0.4.0 → 0.6.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/README.md +16 -3
- package/dist/backend-msb/agent-endpoint.d.ts +25 -0
- package/dist/backend-msb/agent-endpoint.d.ts.map +1 -0
- package/dist/backend-msb/agent-endpoint.js +27 -0
- package/dist/backend-msb/agent-endpoint.js.map +1 -0
- package/dist/backend-msb/backend.d.ts +10 -0
- package/dist/backend-msb/backend.d.ts.map +1 -1
- package/dist/backend-msb/backend.js +26 -1
- package/dist/backend-msb/backend.js.map +1 -1
- package/dist/core/docker-image-name.d.ts +58 -0
- package/dist/core/docker-image-name.d.ts.map +1 -0
- package/dist/core/docker-image-name.js +127 -0
- package/dist/core/docker-image-name.js.map +1 -0
- package/dist/core/errors.d.ts +21 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +26 -0
- package/dist/core/errors.js.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/modules/arango.d.ts +11 -3
- package/dist/modules/arango.d.ts.map +1 -1
- package/dist/modules/arango.js +14 -4
- package/dist/modules/arango.js.map +1 -1
- package/dist/modules/cassandra.d.ts +57 -0
- package/dist/modules/cassandra.d.ts.map +1 -0
- package/dist/modules/cassandra.js +79 -0
- package/dist/modules/cassandra.js.map +1 -0
- package/dist/modules/clickhouse.d.ts +8 -2
- package/dist/modules/clickhouse.d.ts.map +1 -1
- package/dist/modules/clickhouse.js +11 -3
- package/dist/modules/clickhouse.js.map +1 -1
- package/dist/modules/elasticsearch.d.ts +49 -0
- package/dist/modules/elasticsearch.d.ts.map +1 -0
- package/dist/modules/elasticsearch.js +66 -0
- package/dist/modules/elasticsearch.js.map +1 -0
- package/dist/modules/flink.d.ts +8 -2
- package/dist/modules/flink.d.ts.map +1 -1
- package/dist/modules/flink.js +13 -4
- package/dist/modules/flink.js.map +1 -1
- package/dist/modules/floci.d.ts +30 -6
- package/dist/modules/floci.d.ts.map +1 -1
- package/dist/modules/floci.js +39 -9
- package/dist/modules/floci.js.map +1 -1
- package/dist/modules/index.d.ts +6 -1
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +6 -1
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/kafka.d.ts +10 -3
- package/dist/modules/kafka.d.ts.map +1 -1
- package/dist/modules/kafka.js +13 -4
- package/dist/modules/kafka.js.map +1 -1
- package/dist/modules/keycloak.d.ts +10 -2
- package/dist/modules/keycloak.d.ts.map +1 -1
- package/dist/modules/keycloak.js +13 -3
- package/dist/modules/keycloak.js.map +1 -1
- package/dist/modules/mariadb.d.ts +8 -2
- package/dist/modules/mariadb.d.ts.map +1 -1
- package/dist/modules/mariadb.js +11 -3
- package/dist/modules/mariadb.js.map +1 -1
- package/dist/modules/memcached.d.ts +12 -3
- package/dist/modules/memcached.d.ts.map +1 -1
- package/dist/modules/memcached.js +15 -4
- package/dist/modules/memcached.js.map +1 -1
- package/dist/modules/minio.d.ts +40 -0
- package/dist/modules/minio.d.ts.map +1 -0
- package/dist/modules/minio.js +71 -0
- package/dist/modules/minio.js.map +1 -0
- package/dist/modules/mongodb.d.ts +7 -2
- package/dist/modules/mongodb.d.ts.map +1 -1
- package/dist/modules/mongodb.js +16 -4
- package/dist/modules/mongodb.js.map +1 -1
- package/dist/modules/mysql.d.ts +8 -2
- package/dist/modules/mysql.d.ts.map +1 -1
- package/dist/modules/mysql.js +11 -3
- package/dist/modules/mysql.js.map +1 -1
- package/dist/modules/neo4j.d.ts +7 -2
- package/dist/modules/neo4j.d.ts.map +1 -1
- package/dist/modules/neo4j.js +10 -3
- package/dist/modules/neo4j.js.map +1 -1
- package/dist/modules/pinot.d.ts +7 -2
- package/dist/modules/pinot.d.ts.map +1 -1
- package/dist/modules/pinot.js +10 -3
- package/dist/modules/pinot.js.map +1 -1
- package/dist/modules/postgres.d.ts +11 -2
- package/dist/modules/postgres.d.ts.map +1 -1
- package/dist/modules/postgres.js +14 -3
- package/dist/modules/postgres.js.map +1 -1
- package/dist/modules/qdrant.d.ts +26 -0
- package/dist/modules/qdrant.d.ts.map +1 -0
- package/dist/modules/qdrant.js +38 -0
- package/dist/modules/qdrant.js.map +1 -0
- package/dist/modules/rabbitmq.d.ts +11 -2
- package/dist/modules/rabbitmq.d.ts.map +1 -1
- package/dist/modules/rabbitmq.js +14 -3
- package/dist/modules/rabbitmq.js.map +1 -1
- package/dist/modules/redis.d.ts +8 -2
- package/dist/modules/redis.d.ts.map +1 -1
- package/dist/modules/redis.js +11 -3
- package/dist/modules/redis.js.map +1 -1
- package/dist/modules/redpanda.d.ts +15 -6
- package/dist/modules/redpanda.d.ts.map +1 -1
- package/dist/modules/redpanda.js +18 -7
- package/dist/modules/redpanda.js.map +1 -1
- package/dist/modules/spring-cloud-config.d.ts +7 -2
- package/dist/modules/spring-cloud-config.d.ts.map +1 -1
- package/dist/modules/spring-cloud-config.js +10 -3
- package/dist/modules/spring-cloud-config.js.map +1 -1
- package/dist/modules/valkey.d.ts +28 -0
- package/dist/modules/valkey.d.ts.map +1 -0
- package/dist/modules/valkey.js +41 -0
- package/dist/modules/valkey.js.map +1 -0
- package/dist/modules/wiremock.d.ts +7 -2
- package/dist/modules/wiremock.d.ts.map +1 -1
- package/dist/modules/wiremock.js +10 -3
- package/dist/modules/wiremock.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,8BAA8B,EAC9B,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrG,YAAY,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACzE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,14 +5,17 @@
|
|
|
5
5
|
* (the builder + async-dispose lifecycle guard), `Network`, the `Wait`
|
|
6
6
|
* strategies, `FreePorts`, `RunId`, `Checkpoints` (rediscovering named
|
|
7
7
|
* checkpoints across processes), the `SandboxBackend`/`BackendProvider`
|
|
8
|
-
* contracts plus the `registerBackend` registry,
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* contracts plus the `registerBackend` registry, `DockerImageName` (image-
|
|
9
|
+
* reference parsing plus the Testcontainers-style compatibility check), and
|
|
10
|
+
* the typed error classes. This module depends on no backend — import
|
|
11
|
+
* `rightsize/backend-msb` and/or `rightsize/backend-docker` to register one,
|
|
12
|
+
* or `rightsize/modules` for the twenty-three preconfigured containers built
|
|
13
|
+
* on top of this surface.
|
|
12
14
|
*
|
|
13
15
|
* @packageDocumentation
|
|
14
16
|
*/
|
|
15
|
-
export { UnsupportedByBackendError, PortBindConflictError, ContainerLaunchError, BackendError, ProvisionError, ReuseWithNetworkError, IsolationRequiredError, CheckpointUnsupportedError, CheckpointBackendMismatchError, ReuseFromCheckpointError, RelativeContainerPathError, InvalidCheckpointNameError, CheckpointArtifactMissingError, MalformedCheckpointArchiveError, } from "./core/errors.js";
|
|
17
|
+
export { UnsupportedByBackendError, PortBindConflictError, ContainerLaunchError, BackendError, ProvisionError, ReuseWithNetworkError, IsolationRequiredError, CheckpointUnsupportedError, CheckpointBackendMismatchError, ReuseFromCheckpointError, RelativeContainerPathError, InvalidCheckpointNameError, CheckpointArtifactMissingError, MalformedCheckpointArchiveError, IncompatibleImageError, } from "./core/errors.js";
|
|
18
|
+
export { DockerImageName } from "./core/docker-image-name.js";
|
|
16
19
|
export { registerBackend, Backends } from "./core/backends.js";
|
|
17
20
|
export { FreePorts } from "./core/free-ports.js";
|
|
18
21
|
export { Wait, HttpWaitStrategy } from "./core/wait.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,8BAA8B,EAC9B,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAW9D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/modules/arango.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { GenericContainer } from "../core/generic-container.js";
|
|
2
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
2
3
|
import type { ContainerSpec } from "../core/model.js";
|
|
3
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* A single-node ArangoDB container. Auth is disabled by default; see
|
|
6
|
+
* `withRootPassword` to enable it.
|
|
7
|
+
*
|
|
8
|
+
* No-arg construction floats to `arangodb:latest`, so the version tracks
|
|
9
|
+
* upstream rather than this library's release cycle (verified against
|
|
10
|
+
* `arangodb:3.11`).
|
|
11
|
+
*/
|
|
4
12
|
export declare class ArangoContainer extends GenericContainer {
|
|
5
13
|
private rootPassword;
|
|
6
|
-
constructor(image?: string);
|
|
7
|
-
static start(image?: string): Promise<ArangoContainer>;
|
|
14
|
+
constructor(image?: string | DockerImageName);
|
|
15
|
+
static start(image?: string | DockerImageName): Promise<ArangoContainer>;
|
|
8
16
|
/** Enables auth with the given root password, instead of the default no-auth setup. */
|
|
9
17
|
withRootPassword(password: string): this;
|
|
10
18
|
protected customizeSpec(spec: ContainerSpec, _mapped: (guest: number) => number): ContainerSpec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arango.d.ts","sourceRoot":"","sources":["../../src/modules/arango.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"arango.d.ts","sourceRoot":"","sources":["../../src/modules/arango.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD;;;;;;;GAOG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB;IACnD,OAAO,CAAC,YAAY,CAAqB;gBAE7B,KAAK,GAAE,MAAM,GAAG,eAA+B;WAOrC,KAAK,CAAC,KAAK,GAAE,MAAM,GAAG,eAA+B,GAAG,OAAO,CAAC,eAAe,CAAC;IAItG,uFAAuF;IACvF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;cAUrB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,aAAa;IAOxG,uDAAuD;IACvD,IAAI,QAAQ,IAAI,MAAM,CAErB;CACF"}
|
package/dist/modules/arango.js
CHANGED
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { GenericContainer } from "../core/generic-container.js";
|
|
2
2
|
import { Wait } from "../core/wait.js";
|
|
3
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
3
4
|
const GUEST_PORT = 8529;
|
|
4
|
-
|
|
5
|
+
const EXPECTED_REPOSITORY = "arangodb";
|
|
6
|
+
const DEFAULT_IMAGE = "arangodb:latest";
|
|
7
|
+
/**
|
|
8
|
+
* A single-node ArangoDB container. Auth is disabled by default; see
|
|
9
|
+
* `withRootPassword` to enable it.
|
|
10
|
+
*
|
|
11
|
+
* No-arg construction floats to `arangodb:latest`, so the version tracks
|
|
12
|
+
* upstream rather than this library's release cycle (verified against
|
|
13
|
+
* `arangodb:3.11`).
|
|
14
|
+
*/
|
|
5
15
|
export class ArangoContainer extends GenericContainer {
|
|
6
16
|
rootPassword;
|
|
7
|
-
constructor(image =
|
|
8
|
-
super(image);
|
|
17
|
+
constructor(image = DEFAULT_IMAGE) {
|
|
18
|
+
super(DockerImageName.requireCompatible(image, EXPECTED_REPOSITORY));
|
|
9
19
|
this.withExposedPorts(GUEST_PORT)
|
|
10
20
|
.withEnv("ARANGO_NO_AUTH", "1")
|
|
11
21
|
.waitingFor(Wait.forHttp("/_api/version").forPort(GUEST_PORT).forStatusCode(200));
|
|
12
22
|
}
|
|
13
|
-
static async start(image =
|
|
23
|
+
static async start(image = DEFAULT_IMAGE) {
|
|
14
24
|
return (await new ArangoContainer(image).start());
|
|
15
25
|
}
|
|
16
26
|
/** Enables auth with the given root password, instead of the default no-auth setup. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arango.js","sourceRoot":"","sources":["../../src/modules/arango.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"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OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,gBAAgB,CAAC,EAAE,CAAC;IAChF,CAAC;IAED,uDAAuD;IACvD,IAAI,QAAQ;QACV,OAAO,UAAU,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;IACjE,CAAC;CACF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { GenericContainer } from "../core/generic-container.js";
|
|
2
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
3
|
+
/**
|
|
4
|
+
* A single-node Cassandra container.
|
|
5
|
+
*
|
|
6
|
+
* No-arg construction floats to `cassandra:latest`, so the version tracks
|
|
7
|
+
* upstream rather than this library's release cycle (verified against
|
|
8
|
+
* `cassandra:5.0.8`, including every fact below — the `GPG_KEYS` override
|
|
9
|
+
* stays unconditional regardless of which version ends up running, since
|
|
10
|
+
* it's a no-op against a build that never baked the problem tab and required
|
|
11
|
+
* against one that does).
|
|
12
|
+
*
|
|
13
|
+
* ### `GPG_KEYS` must be overridden — this is the difference between booting and aborting
|
|
14
|
+
*
|
|
15
|
+
* `cassandra:5.0.8`'s baked-in `GPG_KEYS` build arg contains a literal TAB
|
|
16
|
+
* character, and msb 0.6.6 panics on any image whose baked env contains one
|
|
17
|
+
* — before the guest even boots:
|
|
18
|
+
*
|
|
19
|
+
* ```
|
|
20
|
+
* sandbox process exited (signal: 6 (SIGABRT)) before agent relay became available
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* with `msb logs --source system` showing:
|
|
24
|
+
*
|
|
25
|
+
* ```
|
|
26
|
+
* panicked at msb_krun_vmm-0.1.25/src/builder.rs:1154: ... Err value: InvalidAscii
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* `GPG_KEYS` is consumed only at image-build time (verifying the signing
|
|
30
|
+
* keys baked into that layer) — it has no effect on the running container,
|
|
31
|
+
* so overriding it to an empty, tab-free string here is safe and required.
|
|
32
|
+
* Without this override, `start()` never gets far enough to run its own
|
|
33
|
+
* wait strategy at all.
|
|
34
|
+
*
|
|
35
|
+
* ### Heap sized down, memory ceiling measured
|
|
36
|
+
*
|
|
37
|
+
* `MAX_HEAP_SIZE=512M`/`HEAP_NEWSIZE=128M` keep the JVM small; `2560` MB is
|
|
38
|
+
* the verified memory ceiling at that heap size.
|
|
39
|
+
*
|
|
40
|
+
* ### Readiness
|
|
41
|
+
*
|
|
42
|
+
* Anchored on the CQL native-transport log line (`Starting listening for
|
|
43
|
+
* CQL clients`), observed at 58s on a quiet local machine. 300s absorbs a
|
|
44
|
+
* loaded-host boot without masking a real hang — Cassandra is heavier than
|
|
45
|
+
* either Keycloak or MySQL, both of which carry 180s in this library.
|
|
46
|
+
*/
|
|
47
|
+
export declare class CassandraContainer extends GenericContainer {
|
|
48
|
+
constructor(image?: string | DockerImageName);
|
|
49
|
+
static start(image?: string | DockerImageName): Promise<CassandraContainer>;
|
|
50
|
+
/** `<host>:<port>` for the running container — the shape most CQL drivers want for a contact point. */
|
|
51
|
+
get contactPoint(): string;
|
|
52
|
+
/** The mapped CQL native-transport port. */
|
|
53
|
+
get cqlPort(): number;
|
|
54
|
+
/** This single node's local datacenter name — required by drivers (e.g. the DataStax Node driver) that insist on an explicit value at connect time. */
|
|
55
|
+
get localDatacenter(): string;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=cassandra.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cassandra.d.ts","sourceRoot":"","sources":["../../src/modules/cassandra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,qBAAa,kBAAmB,SAAQ,gBAAgB;gBAC1C,KAAK,GAAE,MAAM,GAAG,eAA+B;WAarC,KAAK,CAAC,KAAK,GAAE,MAAM,GAAG,eAA+B,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAIzG,uGAAuG;IACvG,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,4CAA4C;IAC5C,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,uJAAuJ;IACvJ,IAAI,eAAe,IAAI,MAAM,CAE5B;CACF"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { GenericContainer } from "../core/generic-container.js";
|
|
2
|
+
import { Wait } from "../core/wait.js";
|
|
3
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
4
|
+
const CQL_PORT = 9042;
|
|
5
|
+
const STARTUP_TIMEOUT_MS = 300_000;
|
|
6
|
+
const EXPECTED_REPOSITORY = "cassandra";
|
|
7
|
+
const DEFAULT_IMAGE = "cassandra:latest";
|
|
8
|
+
/**
|
|
9
|
+
* A single-node Cassandra container.
|
|
10
|
+
*
|
|
11
|
+
* No-arg construction floats to `cassandra:latest`, so the version tracks
|
|
12
|
+
* upstream rather than this library's release cycle (verified against
|
|
13
|
+
* `cassandra:5.0.8`, including every fact below — the `GPG_KEYS` override
|
|
14
|
+
* stays unconditional regardless of which version ends up running, since
|
|
15
|
+
* it's a no-op against a build that never baked the problem tab and required
|
|
16
|
+
* against one that does).
|
|
17
|
+
*
|
|
18
|
+
* ### `GPG_KEYS` must be overridden — this is the difference between booting and aborting
|
|
19
|
+
*
|
|
20
|
+
* `cassandra:5.0.8`'s baked-in `GPG_KEYS` build arg contains a literal TAB
|
|
21
|
+
* character, and msb 0.6.6 panics on any image whose baked env contains one
|
|
22
|
+
* — before the guest even boots:
|
|
23
|
+
*
|
|
24
|
+
* ```
|
|
25
|
+
* sandbox process exited (signal: 6 (SIGABRT)) before agent relay became available
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* with `msb logs --source system` showing:
|
|
29
|
+
*
|
|
30
|
+
* ```
|
|
31
|
+
* panicked at msb_krun_vmm-0.1.25/src/builder.rs:1154: ... Err value: InvalidAscii
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* `GPG_KEYS` is consumed only at image-build time (verifying the signing
|
|
35
|
+
* keys baked into that layer) — it has no effect on the running container,
|
|
36
|
+
* so overriding it to an empty, tab-free string here is safe and required.
|
|
37
|
+
* Without this override, `start()` never gets far enough to run its own
|
|
38
|
+
* wait strategy at all.
|
|
39
|
+
*
|
|
40
|
+
* ### Heap sized down, memory ceiling measured
|
|
41
|
+
*
|
|
42
|
+
* `MAX_HEAP_SIZE=512M`/`HEAP_NEWSIZE=128M` keep the JVM small; `2560` MB is
|
|
43
|
+
* the verified memory ceiling at that heap size.
|
|
44
|
+
*
|
|
45
|
+
* ### Readiness
|
|
46
|
+
*
|
|
47
|
+
* Anchored on the CQL native-transport log line (`Starting listening for
|
|
48
|
+
* CQL clients`), observed at 58s on a quiet local machine. 300s absorbs a
|
|
49
|
+
* loaded-host boot without masking a real hang — Cassandra is heavier than
|
|
50
|
+
* either Keycloak or MySQL, both of which carry 180s in this library.
|
|
51
|
+
*/
|
|
52
|
+
export class CassandraContainer extends GenericContainer {
|
|
53
|
+
constructor(image = DEFAULT_IMAGE) {
|
|
54
|
+
super(DockerImageName.requireCompatible(image, EXPECTED_REPOSITORY));
|
|
55
|
+
this.withExposedPorts(CQL_PORT)
|
|
56
|
+
// Required — see the class doc for the exact panic this avoids.
|
|
57
|
+
.withEnv("GPG_KEYS", "")
|
|
58
|
+
.withEnv("MAX_HEAP_SIZE", "512M")
|
|
59
|
+
.withEnv("HEAP_NEWSIZE", "128M")
|
|
60
|
+
.withMemoryLimit(2560)
|
|
61
|
+
.waitingFor(Wait.forLogMessage(".*Starting listening for CQL clients.*", 1).withStartupTimeout(STARTUP_TIMEOUT_MS));
|
|
62
|
+
}
|
|
63
|
+
static async start(image = DEFAULT_IMAGE) {
|
|
64
|
+
return (await new CassandraContainer(image).start());
|
|
65
|
+
}
|
|
66
|
+
/** `<host>:<port>` for the running container — the shape most CQL drivers want for a contact point. */
|
|
67
|
+
get contactPoint() {
|
|
68
|
+
return `${this.host}:${this.getMappedPort(CQL_PORT)}`;
|
|
69
|
+
}
|
|
70
|
+
/** The mapped CQL native-transport port. */
|
|
71
|
+
get cqlPort() {
|
|
72
|
+
return this.getMappedPort(CQL_PORT);
|
|
73
|
+
}
|
|
74
|
+
/** This single node's local datacenter name — required by drivers (e.g. the DataStax Node driver) that insist on an explicit value at connect time. */
|
|
75
|
+
get localDatacenter() {
|
|
76
|
+
return "datacenter1";
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=cassandra.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cassandra.js","sourceRoot":"","sources":["../../src/modules/cassandra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,MAAM,kBAAkB,GAAG,OAAO,CAAC;AACnC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AACxC,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,OAAO,kBAAmB,SAAQ,gBAAgB;IACtD,YAAY,QAAkC,aAAa;QACzD,KAAK,CAAC,eAAe,CAAC,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;YAC7B,gEAAgE;aAC/D,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;aACvB,OAAO,CAAC,eAAe,EAAE,MAAM,CAAC;aAChC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;aAC/B,eAAe,CAAC,IAAI,CAAC;aACrB,UAAU,CACT,IAAI,CAAC,aAAa,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CACvG,CAAC;IACN,CAAC;IAED,MAAM,CAAU,KAAK,CAAC,KAAK,CAAC,QAAkC,aAAa;QACzE,OAAO,CAAC,MAAM,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAuB,CAAC;IAC7E,CAAC;IAED,uGAAuG;IACvG,IAAI,YAAY;QACd,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;IACxD,CAAC;IAED,4CAA4C;IAC5C,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,uJAAuJ;IACvJ,IAAI,eAAe;QACjB,OAAO,aAAa,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GenericContainer } from "../core/generic-container.js";
|
|
2
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
2
3
|
/**
|
|
3
4
|
* A single-node ClickHouse container, ready-checked via `/ping` (returns
|
|
4
5
|
* the literal body `Ok.` on 200 — `Wait.forHttp`'s status-code check is all
|
|
@@ -12,13 +13,18 @@ import { GenericContainer } from "../core/generic-container.js";
|
|
|
12
13
|
* entirely — once set, the unauthenticated `default` user's usual
|
|
13
14
|
* passwordless access is gone, and every query needs the configured
|
|
14
15
|
* credentials.
|
|
16
|
+
*
|
|
17
|
+
* No-arg construction floats to `clickhouse/clickhouse-server:latest`, so
|
|
18
|
+
* the version tracks upstream rather than this library's release cycle
|
|
19
|
+
* (verified against `clickhouse/clickhouse-server:25.8`, including the
|
|
20
|
+
* memory and startup-timeout facts below).
|
|
15
21
|
*/
|
|
16
22
|
export declare class ClickHouseContainer extends GenericContainer {
|
|
17
23
|
private usernameState;
|
|
18
24
|
private passwordState;
|
|
19
25
|
private databaseState;
|
|
20
|
-
constructor(image?: string);
|
|
21
|
-
static start(image?: string): Promise<ClickHouseContainer>;
|
|
26
|
+
constructor(image?: string | DockerImageName);
|
|
27
|
+
static start(image?: string | DockerImageName): Promise<ClickHouseContainer>;
|
|
22
28
|
/** Overrides `CLICKHOUSE_USER` (default `test`). */
|
|
23
29
|
withUsername(username: string): this;
|
|
24
30
|
/** Overrides `CLICKHOUSE_PASSWORD` (default `test`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clickhouse.d.ts","sourceRoot":"","sources":["../../src/modules/clickhouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"clickhouse.d.ts","sourceRoot":"","sources":["../../src/modules/clickhouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,mBAAoB,SAAQ,gBAAgB;IACvD,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,aAAa,CAAU;gBAEnB,KAAK,GAAE,MAAM,GAAG,eAA+B;WAerC,KAAK,CAAC,KAAK,GAAE,MAAM,GAAG,eAA+B,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI1G,oDAAoD;IACpD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKpC,wDAAwD;IACxD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKpC,kDAAkD;IAClD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKpC,4CAA4C;IAC5C,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,gDAAgD;IAChD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,qDAAqD;IACrD,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,+DAA+D;IAC/D,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { GenericContainer } from "../core/generic-container.js";
|
|
2
2
|
import { Wait } from "../core/wait.js";
|
|
3
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
3
4
|
const HTTP_PORT = 8123;
|
|
4
5
|
const NATIVE_PORT = 9000;
|
|
6
|
+
const EXPECTED_REPOSITORY = "clickhouse/clickhouse-server";
|
|
7
|
+
const DEFAULT_IMAGE = "clickhouse/clickhouse-server:latest";
|
|
5
8
|
/**
|
|
6
9
|
* A single-node ClickHouse container, ready-checked via `/ping` (returns
|
|
7
10
|
* the literal body `Ok.` on 200 — `Wait.forHttp`'s status-code check is all
|
|
@@ -15,13 +18,18 @@ const NATIVE_PORT = 9000;
|
|
|
15
18
|
* entirely — once set, the unauthenticated `default` user's usual
|
|
16
19
|
* passwordless access is gone, and every query needs the configured
|
|
17
20
|
* credentials.
|
|
21
|
+
*
|
|
22
|
+
* No-arg construction floats to `clickhouse/clickhouse-server:latest`, so
|
|
23
|
+
* the version tracks upstream rather than this library's release cycle
|
|
24
|
+
* (verified against `clickhouse/clickhouse-server:25.8`, including the
|
|
25
|
+
* memory and startup-timeout facts below).
|
|
18
26
|
*/
|
|
19
27
|
export class ClickHouseContainer extends GenericContainer {
|
|
20
28
|
usernameState = "test";
|
|
21
29
|
passwordState = "test";
|
|
22
30
|
databaseState = "test";
|
|
23
|
-
constructor(image =
|
|
24
|
-
super(image);
|
|
31
|
+
constructor(image = DEFAULT_IMAGE) {
|
|
32
|
+
super(DockerImageName.requireCompatible(image, EXPECTED_REPOSITORY));
|
|
25
33
|
this.withExposedPorts(HTTP_PORT, NATIVE_PORT)
|
|
26
34
|
.withEnv("CLICKHOUSE_USER", this.usernameState)
|
|
27
35
|
.withEnv("CLICKHOUSE_PASSWORD", this.passwordState)
|
|
@@ -34,7 +42,7 @@ export class ClickHouseContainer extends GenericContainer {
|
|
|
34
42
|
// under msb's default ~450MB-and-up microVM sizing headroom in
|
|
35
43
|
// practice (verified booting and answering /ping on msb's default).
|
|
36
44
|
}
|
|
37
|
-
static async start(image =
|
|
45
|
+
static async start(image = DEFAULT_IMAGE) {
|
|
38
46
|
return (await new ClickHouseContainer(image).start());
|
|
39
47
|
}
|
|
40
48
|
/** Overrides `CLICKHOUSE_USER` (default `test`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clickhouse.js","sourceRoot":"","sources":["../../src/modules/clickhouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"clickhouse.js","sourceRoot":"","sources":["../../src/modules/clickhouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAC3D,MAAM,aAAa,GAAG,qCAAqC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,mBAAoB,SAAQ,gBAAgB;IAC/C,aAAa,GAAG,MAAM,CAAC;IACvB,aAAa,GAAG,MAAM,CAAC;IACvB,aAAa,GAAG,MAAM,CAAC;IAE/B,YAAY,QAAkC,aAAa;QACz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IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,gDAAgD;IAChD,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,qDAAqD;IACrD,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,+DAA+D;IAC/D,IAAI,OAAO;QACT,OAAO,UAAU,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC;IAChE,CAAC;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { GenericContainer } from "../core/generic-container.js";
|
|
2
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
3
|
+
/**
|
|
4
|
+
* A single-node Elasticsearch container.
|
|
5
|
+
*
|
|
6
|
+
* ### No no-arg constructor — Elastic publishes no floating tag
|
|
7
|
+
*
|
|
8
|
+
* Every other module in this library floats to the image's own `:latest`
|
|
9
|
+
* (or an equivalent) when no image is given, so the version tracks upstream
|
|
10
|
+
* rather than this library's release cycle. Elasticsearch has no such tag to
|
|
11
|
+
* float to: `elasticsearch:latest`, `elasticsearch:9`, and `elasticsearch:8`
|
|
12
|
+
* are all 404 on Docker Hub — Elastic publishes only full version tags
|
|
13
|
+
* (verified against `elasticsearch:9.4.4`, arm64). An explicit image is
|
|
14
|
+
* therefore required on both the constructor and `start()`; there is no
|
|
15
|
+
* default to fall back to.
|
|
16
|
+
*
|
|
17
|
+
* ### Single-node config
|
|
18
|
+
*
|
|
19
|
+
* `discovery.type=single-node` skips the cluster-formation bootstrap
|
|
20
|
+
* checks a multi-node deployment would otherwise wait on;
|
|
21
|
+
* `xpack.security.enabled=false` disables TLS/auth so the REST API answers
|
|
22
|
+
* plain HTTP with no client-side certificate or credential setup;
|
|
23
|
+
* `ES_JAVA_OPTS=-Xms512m -Xmx512m` sizes the JVM heap down for a test boot.
|
|
24
|
+
*
|
|
25
|
+
* Exposes both the REST API (9200, what `restUrl` wraps) and the transport
|
|
26
|
+
* port (9300, published but not wrapped by any helper here).
|
|
27
|
+
*
|
|
28
|
+
* ### Memory and readiness
|
|
29
|
+
*
|
|
30
|
+
* `withMemoryLimit(2560)` — measured ~1.1 GB resident in a 2.48 GB guest at
|
|
31
|
+
* rest. Readiness is a plain HTTP 200 on `/`, reached in 27s on a quiet
|
|
32
|
+
* local machine; 300s absorbs a loaded CI runner without masking a real
|
|
33
|
+
* hang.
|
|
34
|
+
*
|
|
35
|
+
* **Cluster health never reaches `green` on a single node** — replica
|
|
36
|
+
* shards (Elasticsearch's own default is one replica per index) have
|
|
37
|
+
* nowhere to be assigned, so `/_cluster/health` reports `yellow`
|
|
38
|
+
* indefinitely. A readiness check that waited for `green` would hang until
|
|
39
|
+
* its own timeout; this module deliberately waits on the plain HTTP probe
|
|
40
|
+
* above instead.
|
|
41
|
+
*/
|
|
42
|
+
export declare class ElasticsearchContainer extends GenericContainer {
|
|
43
|
+
constructor(image: string | DockerImageName);
|
|
44
|
+
/** No default image — see the class doc for why Elasticsearch has no floating tag to fall back to. */
|
|
45
|
+
static start(image: string | DockerImageName): Promise<ElasticsearchContainer>;
|
|
46
|
+
/** The REST API's base URL for the running container. */
|
|
47
|
+
get restUrl(): string;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=elasticsearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elasticsearch.d.ts","sourceRoot":"","sources":["../../src/modules/elasticsearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAAa,sBAAuB,SAAQ,gBAAgB;gBAC9C,KAAK,EAAE,MAAM,GAAG,eAAe;IAU3C,sGAAsG;WAChF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAI7F,yDAAyD;IACzD,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { GenericContainer } from "../core/generic-container.js";
|
|
2
|
+
import { Wait } from "../core/wait.js";
|
|
3
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
4
|
+
const REST_PORT = 9200;
|
|
5
|
+
const TRANSPORT_PORT = 9300;
|
|
6
|
+
const STARTUP_TIMEOUT_MS = 300_000;
|
|
7
|
+
const EXPECTED_REPOSITORY = "elasticsearch";
|
|
8
|
+
/**
|
|
9
|
+
* A single-node Elasticsearch container.
|
|
10
|
+
*
|
|
11
|
+
* ### No no-arg constructor — Elastic publishes no floating tag
|
|
12
|
+
*
|
|
13
|
+
* Every other module in this library floats to the image's own `:latest`
|
|
14
|
+
* (or an equivalent) when no image is given, so the version tracks upstream
|
|
15
|
+
* rather than this library's release cycle. Elasticsearch has no such tag to
|
|
16
|
+
* float to: `elasticsearch:latest`, `elasticsearch:9`, and `elasticsearch:8`
|
|
17
|
+
* are all 404 on Docker Hub — Elastic publishes only full version tags
|
|
18
|
+
* (verified against `elasticsearch:9.4.4`, arm64). An explicit image is
|
|
19
|
+
* therefore required on both the constructor and `start()`; there is no
|
|
20
|
+
* default to fall back to.
|
|
21
|
+
*
|
|
22
|
+
* ### Single-node config
|
|
23
|
+
*
|
|
24
|
+
* `discovery.type=single-node` skips the cluster-formation bootstrap
|
|
25
|
+
* checks a multi-node deployment would otherwise wait on;
|
|
26
|
+
* `xpack.security.enabled=false` disables TLS/auth so the REST API answers
|
|
27
|
+
* plain HTTP with no client-side certificate or credential setup;
|
|
28
|
+
* `ES_JAVA_OPTS=-Xms512m -Xmx512m` sizes the JVM heap down for a test boot.
|
|
29
|
+
*
|
|
30
|
+
* Exposes both the REST API (9200, what `restUrl` wraps) and the transport
|
|
31
|
+
* port (9300, published but not wrapped by any helper here).
|
|
32
|
+
*
|
|
33
|
+
* ### Memory and readiness
|
|
34
|
+
*
|
|
35
|
+
* `withMemoryLimit(2560)` — measured ~1.1 GB resident in a 2.48 GB guest at
|
|
36
|
+
* rest. Readiness is a plain HTTP 200 on `/`, reached in 27s on a quiet
|
|
37
|
+
* local machine; 300s absorbs a loaded CI runner without masking a real
|
|
38
|
+
* hang.
|
|
39
|
+
*
|
|
40
|
+
* **Cluster health never reaches `green` on a single node** — replica
|
|
41
|
+
* shards (Elasticsearch's own default is one replica per index) have
|
|
42
|
+
* nowhere to be assigned, so `/_cluster/health` reports `yellow`
|
|
43
|
+
* indefinitely. A readiness check that waited for `green` would hang until
|
|
44
|
+
* its own timeout; this module deliberately waits on the plain HTTP probe
|
|
45
|
+
* above instead.
|
|
46
|
+
*/
|
|
47
|
+
export class ElasticsearchContainer extends GenericContainer {
|
|
48
|
+
constructor(image) {
|
|
49
|
+
super(DockerImageName.requireCompatible(image, EXPECTED_REPOSITORY));
|
|
50
|
+
this.withExposedPorts(REST_PORT, TRANSPORT_PORT)
|
|
51
|
+
.withEnv("discovery.type", "single-node")
|
|
52
|
+
.withEnv("xpack.security.enabled", "false")
|
|
53
|
+
.withEnv("ES_JAVA_OPTS", "-Xms512m -Xmx512m")
|
|
54
|
+
.withMemoryLimit(2560)
|
|
55
|
+
.waitingFor(Wait.forHttp("/").forPort(REST_PORT).withStartupTimeout(STARTUP_TIMEOUT_MS));
|
|
56
|
+
}
|
|
57
|
+
/** No default image — see the class doc for why Elasticsearch has no floating tag to fall back to. */
|
|
58
|
+
static async start(image) {
|
|
59
|
+
return (await new ElasticsearchContainer(image).start());
|
|
60
|
+
}
|
|
61
|
+
/** The REST API's base URL for the running container. */
|
|
62
|
+
get restUrl() {
|
|
63
|
+
return `http://${this.host}:${this.getMappedPort(REST_PORT)}`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=elasticsearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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E,CAAC;CACF"}
|
package/dist/modules/flink.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { GenericContainer } from "../core/generic-container.js";
|
|
2
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
2
3
|
import type { SandboxBackend } from "../core/backend.js";
|
|
3
4
|
/**
|
|
4
5
|
* A Flink JobManager container (REST 8081, RPC 6123), with an optional
|
|
5
6
|
* companion TaskManager on Docker only — see `withTaskManager()`.
|
|
6
7
|
*
|
|
8
|
+
* No-arg construction floats to `flink:latest`, so the version tracks
|
|
9
|
+
* upstream rather than this library's release cycle (verified against
|
|
10
|
+
* `flink:1.20.5`, including the `nc`/busybox absence this class doc relies
|
|
11
|
+
* on below).
|
|
12
|
+
*
|
|
7
13
|
* `FLINK_PROPERTIES` must set `jobmanager.rpc.address` on the JobManager
|
|
8
14
|
* itself (not just the TaskManager): the JobManager's own Pekko/Akka actor
|
|
9
15
|
* system binds its external address from this property too, and the image's
|
|
@@ -38,8 +44,8 @@ export declare class FlinkContainer extends GenericContainer {
|
|
|
38
44
|
private taskManagerContainer;
|
|
39
45
|
private taskManagerNetwork;
|
|
40
46
|
private ownedNetwork;
|
|
41
|
-
constructor(image?: string);
|
|
42
|
-
static start(image?: string): Promise<FlinkContainer>;
|
|
47
|
+
constructor(image?: string | DockerImageName);
|
|
48
|
+
static start(image?: string | DockerImageName): Promise<FlinkContainer>;
|
|
43
49
|
/**
|
|
44
50
|
* Requests a companion TaskManager, started on a shared `Network` once
|
|
45
51
|
* the JobManager is ready. Docker only — see the class doc for why msb
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flink.d.ts","sourceRoot":"","sources":["../../src/modules/flink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAIhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"flink.d.ts","sourceRoot":"","sources":["../../src/modules/flink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAIhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAUzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,qBAAa,cAAe,SAAQ,gBAAgB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,oBAAoB,CAA+B;IAC3D,OAAO,CAAC,kBAAkB,CAAsB;IAChD,OAAO,CAAC,YAAY,CAAsB;gBAE9B,KAAK,GAAE,MAAM,GAAG,eAA+B;WAYrC,KAAK,CAAC,KAAK,GAAE,MAAM,GAAG,eAA+B,GAAG,OAAO,CAAC,cAAc,CAAC;IAIrG;;;;;;OAMG;IACH,eAAe,IAAI,IAAI;IASvB;;;;;;;OAOG;cACsB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;cAU3D,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAqB7C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAYpC,oDAAoD;IACpD,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF"}
|
package/dist/modules/flink.js
CHANGED
|
@@ -2,15 +2,23 @@ import { GenericContainer } from "../core/generic-container.js";
|
|
|
2
2
|
import { Network } from "../core/network.js";
|
|
3
3
|
import { Wait } from "../core/wait.js";
|
|
4
4
|
import { UnsupportedByBackendError } from "../core/errors.js";
|
|
5
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
5
6
|
const RPC_PORT = 6123;
|
|
6
7
|
const REST_PORT = 8081;
|
|
7
8
|
const JOBMANAGER_MEMORY_MB = 1024;
|
|
8
9
|
const TASKMANAGER_MEMORY_MB = 1024;
|
|
9
10
|
const JOBMANAGER_ALIAS = "flink-jobmanager";
|
|
11
|
+
const EXPECTED_REPOSITORY = "flink";
|
|
12
|
+
const DEFAULT_IMAGE = "flink:latest";
|
|
10
13
|
/**
|
|
11
14
|
* A Flink JobManager container (REST 8081, RPC 6123), with an optional
|
|
12
15
|
* companion TaskManager on Docker only — see `withTaskManager()`.
|
|
13
16
|
*
|
|
17
|
+
* No-arg construction floats to `flink:latest`, so the version tracks
|
|
18
|
+
* upstream rather than this library's release cycle (verified against
|
|
19
|
+
* `flink:1.20.5`, including the `nc`/busybox absence this class doc relies
|
|
20
|
+
* on below).
|
|
21
|
+
*
|
|
14
22
|
* `FLINK_PROPERTIES` must set `jobmanager.rpc.address` on the JobManager
|
|
15
23
|
* itself (not just the TaskManager): the JobManager's own Pekko/Akka actor
|
|
16
24
|
* system binds its external address from this property too, and the image's
|
|
@@ -45,9 +53,10 @@ export class FlinkContainer extends GenericContainer {
|
|
|
45
53
|
taskManagerContainer;
|
|
46
54
|
taskManagerNetwork;
|
|
47
55
|
ownedNetwork;
|
|
48
|
-
constructor(image =
|
|
49
|
-
|
|
50
|
-
|
|
56
|
+
constructor(image = DEFAULT_IMAGE) {
|
|
57
|
+
const resolvedImage = DockerImageName.requireCompatible(image, EXPECTED_REPOSITORY);
|
|
58
|
+
super(resolvedImage);
|
|
59
|
+
this.imageTag = resolvedImage;
|
|
51
60
|
this.withExposedPorts(RPC_PORT, REST_PORT)
|
|
52
61
|
.withEnv("FLINK_PROPERTIES", `jobmanager.rpc.address: ${JOBMANAGER_ALIAS}`)
|
|
53
62
|
.withCommand("jobmanager")
|
|
@@ -55,7 +64,7 @@ export class FlinkContainer extends GenericContainer {
|
|
|
55
64
|
.withNetworkAliases(JOBMANAGER_ALIAS)
|
|
56
65
|
.waitingFor(Wait.forHttp("/overview").forPort(REST_PORT).withStartupTimeout(120_000));
|
|
57
66
|
}
|
|
58
|
-
static async start(image =
|
|
67
|
+
static async start(image = DEFAULT_IMAGE) {
|
|
59
68
|
return (await new FlinkContainer(image).start());
|
|
60
69
|
}
|
|
61
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flink.js","sourceRoot":"","sources":["../../src/modules/flink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"flink.js","sourceRoot":"","sources":["../../src/modules/flink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAG/D,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAC5C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AACpC,MAAM,aAAa,GAAG,cAAc,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IACjC,QAAQ,CAAS;IAC1B,oBAAoB,GAAG,KAAK,CAAC;IAC7B,oBAAoB,CAA+B;IACnD,kBAAkB,CAAsB;IACxC,YAAY,CAAsB;IAE1C,YAAY,QAAkC,aAAa;QACzD,MAAM,aAAa,GAAG,eAAe,C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HANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GenericContainer } from "../core/generic-container.js";
|
|
2
|
+
import { DockerImageName } from "../core/docker-image-name.js";
|
|
2
3
|
/**
|
|
3
4
|
* A [floci.io](https://floci.io) cloud emulator — one native Quarkus image
|
|
4
5
|
* per cloud provider, each speaking that provider's REST APIs against an
|
|
@@ -17,6 +18,17 @@ import { GenericContainer } from "../core/generic-container.js";
|
|
|
17
18
|
* `floci/floci-az:0.8.0`, and `floci/floci-gcp:0.4.0`) — pinned as the one
|
|
18
19
|
* wait path that works across all three; no log-wait fallback was needed.
|
|
19
20
|
*
|
|
21
|
+
* ### No-arg factories float, each to its own repository's `latest`
|
|
22
|
+
*
|
|
23
|
+
* `aws()`, `azure()`, and `gcp()` each default to that provider's
|
|
24
|
+
* `floci/floci*:latest`, so the version tracks upstream rather than this
|
|
25
|
+
* library's release cycle — verified against `floci/floci:1.5.30`,
|
|
26
|
+
* `floci/floci-az:0.8.0`, and `floci/floci-gcp:0.4.0` respectively, the same
|
|
27
|
+
* boots every other fact on this page cites. Each factory checks its own
|
|
28
|
+
* repository (`floci/floci`, `floci/floci-az`, `floci/floci-gcp`) — an image
|
|
29
|
+
* meant for one variant is rejected by another's factory with
|
|
30
|
+
* `IncompatibleImageError` before any backend call.
|
|
31
|
+
*
|
|
20
32
|
* ### No signing needed — verified against the AWS variant's S3 surface
|
|
21
33
|
*
|
|
22
34
|
* The AWS variant's S3-shaped REST endpoints accept unsigned requests with
|
|
@@ -34,12 +46,24 @@ import { GenericContainer } from "../core/generic-container.js";
|
|
|
34
46
|
export declare class FlociContainer extends GenericContainer {
|
|
35
47
|
private readonly guestPort;
|
|
36
48
|
private constructor();
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
static
|
|
49
|
+
/**
|
|
50
|
+
* The AWS emulator, guest port 4566 — S3, DynamoDB, SQS, etc. Floats to
|
|
51
|
+
* `floci/floci:latest` (verified against `floci/floci:1.5.30`); only
|
|
52
|
+
* accepts images whose repository is `floci/floci`.
|
|
53
|
+
*/
|
|
54
|
+
static aws(image?: string | DockerImageName): FlociContainer;
|
|
55
|
+
/**
|
|
56
|
+
* The Azure emulator, guest port 4577. Floats to
|
|
57
|
+
* `floci/floci-az:latest` (verified against `floci/floci-az:0.8.0`); only
|
|
58
|
+
* accepts images whose repository is `floci/floci-az`.
|
|
59
|
+
*/
|
|
60
|
+
static azure(image?: string | DockerImageName): FlociContainer;
|
|
61
|
+
/**
|
|
62
|
+
* The GCP emulator, guest port 4588. Floats to
|
|
63
|
+
* `floci/floci-gcp:latest` (verified against `floci/floci-gcp:0.4.0`);
|
|
64
|
+
* only accepts images whose repository is `floci/floci-gcp`.
|
|
65
|
+
*/
|
|
66
|
+
static gcp(image?: string | DockerImageName): FlociContainer;
|
|
43
67
|
/** This variant's REST endpoint — the base URL for every emulated API call. */
|
|
44
68
|
get endpointUrl(): string;
|
|
45
69
|
}
|