@fractal_cloud/sdk 1.1.0 → 1.3.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 CHANGED
@@ -42,7 +42,7 @@ A Live System is a running instance of a Fractal. It maps each abstract blueprin
42
42
  - Deployment of Live Systems to any Fractal Cloud Environment
43
43
  - Personal and organisation-owned accounts
44
44
  - **IaaS helpers** for AWS, Azure, GCP, OCI, and Hetzner
45
- - **PaaS helpers** for AWS ECS (cluster, task definition, service)
45
+ - **PaaS helpers** for AWS (ECS, EKS), Azure (AKS, Container Apps Environment, Container Instance, Container App), GCP (GKE, Cloud Run), and OCI (Container Instance)
46
46
 
47
47
  ## Installation
48
48
 
@@ -178,6 +178,39 @@ await getLiveSystem().deploy(credentials);
178
178
 
179
179
  The blueprint is registered with Fractal Cloud. The Automation Engine reconciles cloud resources to match the Live System definition.
180
180
 
181
+ ## Deployment modes
182
+
183
+ `liveSystem.deploy()` supports two modes via an optional `DeployOptions` argument.
184
+
185
+ ### Fire and forget (default)
186
+
187
+ Submits the live system to Fractal Cloud and returns immediately. Provisioning happens asynchronously. Errors are logged but not thrown. This is the default when no options are passed.
188
+
189
+ ```typescript
190
+ // Equivalent — both are fire-and-forget
191
+ await liveSystem.deploy(credentials);
192
+ await liveSystem.deploy(credentials, {mode: 'fire-and-forget'});
193
+ ```
194
+
195
+ Best for: **applications, CLIs, scripts** where infrastructure deployment is a background concern.
196
+
197
+ ### Wait for Active
198
+
199
+ Submits the live system, then polls until all components reach `Active` status. Throws if deployment fails (`FailedMutation`, `Error`) or if the timeout is exceeded.
200
+
201
+ ```typescript
202
+ await liveSystem.deploy(credentials, {
203
+ mode: 'wait',
204
+ pollIntervalMs: 10_000, // check every 10 s (default: 5 s)
205
+ timeoutMs: 900_000, // give up after 15 min (default: 10 min)
206
+ });
207
+ // reaches here only when the live system is fully Active
208
+ ```
209
+
210
+ Best for: **CI/CD pipelines** where the pipeline must not advance until infrastructure is fully provisioned.
211
+
212
+ ---
213
+
181
214
  ## Multi-provider support
182
215
 
183
216
  The same blueprint can be deployed on any supported provider. Live system files are short and only contain vendor-specific parameters — all structural decisions (dependencies, traffic rules, security rules) stay in the blueprint.
@@ -189,7 +222,12 @@ The same blueprint can be deployed on any supported provider. Live system files
189
222
  | `SecurityGroup` | `AwsSecurityGroup` | `AzureNsg` | `GcpFirewall` | `OciSecurityList` | `HetznerFirewall` |
190
223
  | `VirtualMachine` | `Ec2Instance` | `AzureVm` | `GcpVm` | `OciInstance` | `HetznerServer` |
191
224
 
192
- PaaS and CaaS helpers are also available for AWS ECS (cluster, task definition, service) and the agnostic `ContainerPlatform` / `Workload` blueprint types.
225
+ PaaS and CaaS helpers are also available for the agnostic `ContainerPlatform` / `Workload` blueprint types, with provider-specific satisfiers across AWS, Azure, GCP, and OCI:
226
+
227
+ | Blueprint component | AWS | Azure | GCP | OCI |
228
+ |---------------------|-----|-------|-----|-----|
229
+ | `ContainerPlatform` | `AwsEcsCluster` · `AwsEksCluster` | `AzureAksCluster` · `AzureContainerAppsEnvironment` | `GcpGkeCluster` | — |
230
+ | `Workload` | `AwsEcsTaskDefinition` + `AwsEcsService` | `AzureContainerInstance` · `AzureContainerApp` | `GcpCloudRunService` | `OciContainerInstance` |
193
231
 
194
232
  ## Samples
195
233
 
@@ -198,7 +236,7 @@ The [sample repository](https://github.com/Fractal-Cloud/fractal-ts-sdk-samples)
198
236
  | Sample | Description |
199
237
  |--------|-------------|
200
238
  | `basic_iaas` | VPC + Subnet + Security Group + two VMs — deploys on AWS, Azure, GCP, OCI, or Hetzner via `CLOUD_PROVIDER` env var |
201
- | `basic_container_platform` | ECS Fargate — VPC + Subnet + Security Group + ECS Cluster + two workloads |
239
+ | `basic_container_platform` | VPC + Subnet + Security Group + container platform + two workloads — deploys on AWS (ECS Fargate), Azure (Container Apps), or GCP (Cloud Run) via `CLOUD_PROVIDER` env var |
202
240
 
203
241
  ## Architecture
204
242
 
@@ -212,7 +250,7 @@ src/
212
250
  live_system/ # Provider-specific helpers
213
251
  component/
214
252
  network_and_compute/iaas/ # AWS, Azure, GCP, OCI, Hetzner components
215
- network_and_compute/paas/ # AwsEcsCluster, AwsEcsTaskDefinition, AwsEcsService
253
+ network_and_compute/paas/ # AWS (ECS, EKS), Azure (AKS, Container Apps, Container Instance), GCP (GKE, Cloud Run), OCI (Container Instance)
216
254
  ```
217
255
 
218
256
  ## Contributing and feedback