@alienplatform/core 3.3.30 → 3.3.32

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 ADDED
@@ -0,0 +1,60 @@
1
+ # Deployment-time container resources
2
+
3
+ Use fixed CPU and memory allocations when every deployment has the same workload.
4
+ Use ranges when an installer should choose resources without publishing another release:
5
+
6
+ ```ts
7
+ const api = new Container("api")
8
+ .cpu({ min: 0.5, max: 4, default: 1 })
9
+ .memory({ min: "512Mi", max: "8Gi", default: "2Gi" })
10
+ ```
11
+
12
+ Select allocations when creating or preparing a deployment:
13
+
14
+ ```ts
15
+ const settings = {
16
+ compute: {
17
+ containers: {
18
+ api: { cpu: 2, memory: "4Gi" },
19
+ },
20
+ pools: {
21
+ general: {
22
+ mode: "autoscale",
23
+ min: 1,
24
+ max: 5,
25
+ },
26
+ },
27
+ },
28
+ }
29
+ ```
30
+
31
+ CPU is in vCPUs; memory uses binary units (`Ki`, `Mi`, `Gi`, `Ti`). Omitted
32
+ selections use the release's defaults. Fixed `.cpu(1)` and `.memory("2Gi")`
33
+ declarations remain fixed. Unknown containers and allocations outside the declared
34
+ ranges are rejected before provisioning workloads.
35
+
36
+ Container allocations are portable across AWS, GCP, Azure, and Kubernetes.
37
+ Pool machine names are provider-specific: use an EC2 instance type, a GCE machine
38
+ type, or an Azure VM SKU. Compute planning uses the selected container allocations
39
+ to recommend suitable machines and validate fleet capacity.
40
+
41
+ Omit `machine` to let Alien choose it from the selected resources on setup and
42
+ later updates. Set `machine` to a provider machine name to override that choice;
43
+ remove the override to return to automatic sizing. A resource update can replace
44
+ the machine while keeping the pool's count policy and persistent volumes.
45
+ Single-replica stateful workloads may restart during replacement. An explicit
46
+ machine that cannot fit the allocation is rejected before cloud changes.
47
+
48
+ These are deployment choices, not vertical autoscaling. Each replica receives the
49
+ selected allocation. An autoscaling machine pool adds capacity when replicas need
50
+ it, within the pool's minimum and maximum. A fixed pool cannot add machines, and
51
+ adding machines cannot make a single replica fit on an undersized machine.
52
+
53
+ The same resource choices work for stateful containers. Choosing CPU and memory
54
+ does not change persistent disk size or enable horizontal autoscaling of stateful
55
+ replicas.
56
+
57
+ CloudFormation exposes declared choices as parameters such as `ContainerApiCpu`
58
+ and `ContainerApiMemory`. Terraform and API deployments carry selections in
59
+ deployment settings. The deployment portal exposes the declared ranges and
60
+ replans machine choices when allocations change.