@fractal_cloud/sdk 1.3.0 → 1.4.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/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
3
 
4
4
  Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
5
  Everyone is permitted to copy and distribute verbatim copies
@@ -7,17 +7,15 @@
7
7
 
8
8
  Preamble
9
9
 
10
- The GNU General Public License is a free, copyleft license for
11
- software and other kinds of works.
10
+ The GNU Affero General Public License is a free, copyleft license for
11
+ software and other kinds of works, specifically designed to ensure
12
+ cooperation with the community in the case of network server software.
12
13
 
13
14
  The licenses for most software and other practical works are designed
14
15
  to take away your freedom to share and change the works. By contrast,
15
- the GNU General Public License is intended to guarantee your freedom to
16
+ our General Public Licenses are intended to guarantee your freedom to
16
17
  share and change all versions of a program--to make sure it remains free
17
- software for all its users. We, the Free Software Foundation, use the
18
- GNU General Public License for most of our software; it applies also to
19
- any other work released this way by its authors. You can apply it to
20
- your programs, too.
18
+ software for all its users.
21
19
 
22
20
  When we speak of free software, we are referring to freedom, not
23
21
  price. Our General Public Licenses are designed to make sure that you
@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
26
24
  want it, that you can change the software or use pieces of it in new
27
25
  free programs, and that you know you can do these things.
28
26
 
29
- To protect your rights, we need to prevent others from denying you
30
- these rights or asking you to surrender the rights. Therefore, you have
31
- certain responsibilities if you distribute copies of the software, or if
32
- you modify it: responsibilities to respect the freedom of others.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must pass on to the recipients the same
36
- freedoms that you received. You must make sure that they, too, receive
37
- or can get the source code. And you must show them these terms so they
38
- know their rights.
39
-
40
- Developers that use the GNU GPL protect your rights with two steps:
41
- (1) assert copyright on the software, and (2) offer you this License
42
- giving you legal permission to copy, distribute and/or modify it.
43
-
44
- For the developers' and authors' protection, the GPL clearly explains
45
- that there is no warranty for this free software. For both users' and
46
- authors' sake, the GPL requires that modified versions be marked as
47
- changed, so that their problems will not be attributed erroneously to
48
- authors of previous versions.
49
-
50
- Some devices are designed to deny users access to install or run
51
- modified versions of the software inside them, although the manufacturer
52
- can do so. This is fundamentally incompatible with the aim of
53
- protecting users' freedom to change the software. The systematic
54
- pattern of such abuse occurs in the area of products for individuals to
55
- use, which is precisely where it is most unacceptable. Therefore, we
56
- have designed this version of the GPL to prohibit the practice for those
57
- products. If such problems arise substantially in other domains, we
58
- stand ready to extend this provision to those domains in future versions
59
- of the GPL, as needed to protect the freedom of users.
60
-
61
- Finally, every program is threatened constantly by software patents.
62
- States should not allow patents to restrict development and use of
63
- software on general-purpose computers, but in those that do, we wish to
64
- avoid the special danger that patents applied to a free program could
65
- make it effectively proprietary. To prevent this, the GPL assures that
66
- patents cannot be used to render the program non-free.
27
+ Developers that use our General Public Licenses protect your rights
28
+ with two steps: (1) assert copyright on the software, and (2) offer
29
+ you this License which gives you legal permission to copy, distribute
30
+ and/or modify the software.
31
+
32
+ A secondary benefit of defending all users' freedom is that
33
+ improvements made in alternate versions of the program, if they
34
+ receive widespread use, become available for other developers to
35
+ incorporate. Many developers of free software are heartened and
36
+ encouraged by the resulting cooperation. However, in the case of
37
+ software used on network servers, this result may fail to come about.
38
+ The GNU General Public License permits making a modified version and
39
+ letting the public access it on a server without ever releasing its
40
+ source code to the public.
41
+
42
+ The GNU Affero General Public License is designed specifically to
43
+ ensure that, in such cases, the modified source code becomes available
44
+ to the community. It requires the operator of a network server to
45
+ provide the source code of the modified version running there to the
46
+ users of that server. Therefore, public use of a modified version, on
47
+ a publicly accessible server, gives the public access to the source
48
+ code of the modified version.
49
+
50
+ An older license, called the Affero General Public License and
51
+ published by Affero, was designed to accomplish similar goals. This is
52
+ a different license, not a version of the Affero GPL, but Affero has
53
+ released a new version of the Affero GPL which permits relicensing under
54
+ this license.
67
55
 
68
56
  The precise terms and conditions for copying, distribution and
69
57
  modification follow.
@@ -72,7 +60,7 @@ modification follow.
72
60
 
73
61
  0. Definitions.
74
62
 
75
- "This License" refers to version 3 of the GNU General Public License.
63
+ "This License" refers to version 3 of the GNU Affero General Public License.
76
64
 
77
65
  "Copyright" also means copyright-like laws that apply to other kinds of
78
66
  works, such as semiconductor masks.
@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
549
537
  the Program, the only way you could satisfy both those terms and this
550
538
  License would be to refrain entirely from conveying the Program.
551
539
 
552
- 13. Use with the GNU Affero General Public License.
540
+ 13. Remote Network Interaction; Use with the GNU General Public License.
541
+
542
+ Notwithstanding any other provision of this License, if you modify the
543
+ Program, your modified version must prominently offer all users
544
+ interacting with it remotely through a computer network (if your version
545
+ supports such interaction) an opportunity to receive the Corresponding
546
+ Source of your version by providing access to the Corresponding Source
547
+ from a network server at no charge, through some standard or customary
548
+ means of facilitating copying of software. This Corresponding Source
549
+ shall include the Corresponding Source for any work covered by version 3
550
+ of the GNU General Public License that is incorporated pursuant to the
551
+ following paragraph.
553
552
 
554
553
  Notwithstanding any other provision of this License, you have
555
554
  permission to link or combine any covered work with a work licensed
556
- under version 3 of the GNU Affero General Public License into a single
555
+ under version 3 of the GNU General Public License into a single
557
556
  combined work, and to convey the resulting work. The terms of this
558
557
  License will continue to apply to the part which is the covered work,
559
- but the special requirements of the GNU Affero General Public License,
560
- section 13, concerning interaction through a network will apply to the
561
- combination as such.
558
+ but the work with which it is combined will remain governed by version
559
+ 3 of the GNU General Public License.
562
560
 
563
561
  14. Revised Versions of this License.
564
562
 
565
563
  The Free Software Foundation may publish revised and/or new versions of
566
- the GNU General Public License from time to time. Such new versions will
567
- be similar in spirit to the present version, but may differ in detail to
564
+ the GNU Affero General Public License from time to time. Such new versions
565
+ will be similar in spirit to the present version, but may differ in detail to
568
566
  address new problems or concerns.
569
567
 
570
568
  Each version is given a distinguishing version number. If the
571
- Program specifies that a certain numbered version of the GNU General
569
+ Program specifies that a certain numbered version of the GNU Affero General
572
570
  Public License "or any later version" applies to it, you have the
573
571
  option of following the terms and conditions either of that numbered
574
572
  version or of any later version published by the Free Software
575
573
  Foundation. If the Program does not specify a version number of the
576
- GNU General Public License, you may choose any version ever published
574
+ GNU Affero General Public License, you may choose any version ever published
577
575
  by the Free Software Foundation.
578
576
 
579
577
  If the Program specifies that a proxy can decide which future
580
- versions of the GNU General Public License can be used, that proxy's
578
+ versions of the GNU Affero General Public License can be used, that proxy's
581
579
  public statement of acceptance of a version permanently authorizes you
582
580
  to choose that version for the Program.
583
581
 
@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
635
633
  Copyright (C) <year> <name of author>
636
634
 
637
635
  This program is free software: you can redistribute it and/or modify
638
- it under the terms of the GNU General Public License as published by
636
+ it under the terms of the GNU Affero General Public License as published by
639
637
  the Free Software Foundation, either version 3 of the License, or
640
638
  (at your option) any later version.
641
639
 
642
640
  This program is distributed in the hope that it will be useful,
643
641
  but WITHOUT ANY WARRANTY; without even the implied warranty of
644
642
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
- GNU General Public License for more details.
643
+ GNU Affero General Public License for more details.
646
644
 
647
- You should have received a copy of the GNU General Public License
645
+ You should have received a copy of the GNU Affero General Public License
648
646
  along with this program. If not, see <https://www.gnu.org/licenses/>.
649
647
 
650
648
  Also add information on how to contact you by electronic and paper mail.
651
649
 
652
- If the program does terminal interaction, make it output a short
653
- notice like this when it starts in an interactive mode:
654
-
655
- <program> Copyright (C) <year> <name of author>
656
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
- This is free software, and you are welcome to redistribute it
658
- under certain conditions; type `show c' for details.
659
-
660
- The hypothetical commands `show w' and `show c' should show the appropriate
661
- parts of the General Public License. Of course, your program's commands
662
- might be different; for a GUI interface, you would use an "about box".
650
+ If your software can interact with users remotely through a computer
651
+ network, you should also make sure that it provides a way for users to
652
+ get its source. For example, if your program is a web application, its
653
+ interface could display a "Source" link that leads users to an archive
654
+ of the code. There are many ways you could offer source, and different
655
+ solutions will be better for different programs; see section 13 for the
656
+ specific requirements.
663
657
 
664
658
  You should also get your employer (if you work as a programmer) or school,
665
659
  if any, to sign a "copyright disclaimer" for the program, if necessary.
666
- For more information on this, and how to apply and follow the GNU GPL, see
660
+ For more information on this, and how to apply and follow the GNU AGPL, see
667
661
  <https://www.gnu.org/licenses/>.
668
-
669
- The GNU General Public License does not permit incorporating your program
670
- into proprietary programs. If your program is a subroutine library, you
671
- may consider it more useful to permit linking proprietary applications with
672
- the library. If this is what you want to do, use the GNU Lesser General
673
- Public License instead of this License. But first, please read
674
- <https://www.gnu.org/licenses/why-not-lgpl.html>.
package/README.md CHANGED
@@ -41,8 +41,22 @@ A Live System is a running instance of a Fractal. It maps each abstract blueprin
41
41
  - Definition of Live Systems with typed, provider-specific helpers
42
42
  - Deployment of Live Systems to any Fractal Cloud Environment
43
43
  - Personal and organisation-owned accounts
44
- - **IaaS helpers** for AWS, Azure, GCP, OCI, and Hetzner
45
- - **PaaS helpers** for AWS (ECS, EKS), Azure (AKS, Container Apps Environment, Container Instance, Container App), GCP (GKE, Cloud Run), and OCI (Container Instance)
44
+
45
+ ### Infrastructure domains
46
+
47
+ | Domain | Blueprint types | Live system offers | Providers |
48
+ |--------|----------------|-------------------|-----------|
49
+ | **NetworkAndCompute** | VirtualNetwork, Subnet, SecurityGroup, VirtualMachine, ContainerPlatform | 31 offers | AWS, Azure, GCP, OCI, Hetzner, VMware, OpenShift |
50
+ | **CustomWorkloads** | Workload | Satisfied by PaaS/CaaS offers (ECS, Container Apps, Cloud Run, OpenShift, etc.) | AWS, Azure, GCP, OCI, OpenShift |
51
+ | **Storage** | FilesAndBlobs, RelationalDbms, RelationalDatabase, DocumentDbms, DocumentDatabase, ColumnOrientedDbms, ColumnOrientedEntity, KeyValueDbms, KeyValueEntity, GraphDbms, GraphDatabase, Search, SearchEntity, Unmanaged | 23 offers | AWS, Azure, GCP, CaaS, SaaS |
52
+ | **Messaging** | Broker, Entity (PaaS + CaaS), Unmanaged | 12 offers | Azure, GCP, CaaS |
53
+ | **BigData** | DistributedDataProcessing, ComputeCluster, DataProcessingJob, MlExperiment, Datalake, Unmanaged | 16 offers | AWS, Azure, GCP |
54
+ | **APIManagement** | PaaS ApiGateway, CaaS ApiGateway, Unmanaged | 6 offers | AWS, Azure, GCP, CaaS |
55
+ | **Observability** | Monitoring, Tracing, Logging, Unmanaged | 4 offers | CaaS |
56
+ | **Security** | ServiceMesh, Unmanaged | 2 offers | CaaS |
57
+ | **Custom** | Any (via `Custom.blueprint()`) | Any (via `Custom.offer()`) | Any |
58
+
59
+ > Custom aria agents can register additional domains, services, and offers beyond this built-in set. See [Custom Aria Components](#custom-aria-components) below.
46
60
 
47
61
  ## Installation
48
62
 
@@ -215,42 +229,291 @@ Best for: **CI/CD pipelines** where the pipeline must not advance until infrastr
215
229
 
216
230
  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.
217
231
 
218
- | Blueprint component | AWS | Azure | GCP | OCI | Hetzner |
219
- |---------------------|-----|-------|-----|-----|---------|
220
- | `VirtualNetwork` | `AwsVpc` | `AzureVnet` | `GcpVpc` | `OciVcn` | `HetznerNetwork` |
221
- | `Subnet` | `AwsSubnet` | `AzureSubnet` | `GcpSubnet` | `OciSubnet` | `HetznerSubnet` |
222
- | `SecurityGroup` | `AwsSecurityGroup` | `AzureNsg` | `GcpFirewall` | `OciSecurityList` | `HetznerFirewall` |
223
- | `VirtualMachine` | `Ec2Instance` | `AzureVm` | `GcpVm` | `OciInstance` | `HetznerServer` |
232
+ ### IaaS
233
+
234
+ | Blueprint component | AWS | Azure | GCP | OCI | Hetzner | VMware | OpenShift |
235
+ |---------------------|-----|-------|-----|-----|---------|--------|-----------|
236
+ | `VirtualNetwork` | `AwsVpc` | `AzureVnet` | `GcpVpc` | `OciVcn` | `HetznerNetwork` | `VspherePortGroup` | — |
237
+ | `Subnet` | `AwsSubnet` | `AzureSubnet` | `GcpSubnet` | `OciSubnet` | `HetznerSubnet` | `VsphereVlan` | — |
238
+ | `SecurityGroup` | `AwsSecurityGroup` | `AzureNsg` | `GcpFirewall` | `OciSecurityList` | `HetznerFirewall` | — | `OpenshiftSecurityGroup` |
239
+ | `VirtualMachine` | `Ec2Instance` | `AzureVm` | `GcpVm` | `OciInstance` | `HetznerServer` | `VsphereVm` | `OpenshiftVm` |
240
+
241
+ ### PaaS / CaaS
242
+
243
+ | Blueprint component | AWS | Azure | GCP | OCI | OpenShift |
244
+ |---------------------|-----|-------|-----|-----|-----------|
245
+ | `ContainerPlatform` | `AwsEcsCluster` · `AwsEksCluster` | `AzureAksCluster` · `AzureContainerAppsEnvironment` | `GcpGkeCluster` | — | — |
246
+ | `Workload` | `AwsEcsTaskDefinition` + `AwsEcsService` | `AzureContainerInstance` · `AzureContainerApp` | `GcpCloudRunService` | `OciContainerInstance` | `OpenshiftWorkload` |
247
+
248
+ ### OpenShift-specific offers
249
+
250
+ | Offer | Type string | Blueprint equivalent |
251
+ |-------|-------------|---------------------|
252
+ | `OpenshiftService` | `NetworkAndCompute.CaaS.OpenshiftService` | Kubernetes Service + Route (standalone) |
253
+ | `OpenshiftPersistentVolume` | `Storage.CaaS.OpenshiftPersistentVolume` | Persistent Volume Claim (standalone) |
254
+
255
+ ### Storage
256
+
257
+ | Blueprint component | AWS | Azure | GCP | CaaS |
258
+ |---------------------|-----|-------|-----|------|
259
+ | `FilesAndBlobs` | `AwsS3` | `AzureStorageAccount` · `AzureBlobContainer` · `AzureFileStorage` | `GcpCloudStorage` | — |
260
+ | `RelationalDbms` | — | `AzurePostgreSqlDbms` · `AzureCosmosDbAccount` | `GcpPostgreSqlDbms` | — |
261
+ | `RelationalDatabase` | — | `AzurePostgreSqlDatabase` · `AzureCosmosDbPostgreSqlDatabase` | `GcpPostgreSqlDatabase` | — |
262
+ | `DocumentDbms` | — | `AzureCosmosDbAccount` | `GcpFirestore` | — |
263
+ | `ColumnOrientedDbms` | — | `AzureCosmosDbCassandra` | `GcpBigTable` | — |
264
+ | `Search` | — | — | — | `Elastic` |
265
+
266
+ ### BigData
267
+
268
+ | Blueprint component | AWS | Azure | GCP |
269
+ |---------------------|-----|-------|-----|
270
+ | `DistributedDataProcessing` | `AwsDatabricks` | `AzureDatabricks` | `GcpDatabricks` |
271
+ | `ComputeCluster` | `AwsDatabricksCluster` | `AzureDatabricksCluster` | `GcpDatabricksCluster` |
272
+ | `DataProcessingJob` | `AwsDatabricksJob` | `AzureDatabricksJob` | `GcpDatabricksJob` |
273
+ | `MlExperiment` | `AwsDatabricksMlflow` | `AzureDatabricksMlflow` | `GcpDatabricksMlflow` |
274
+ | `Datalake` | `AwsS3Datalake` | `AzureDatalake` | `GcpDatalake` |
275
+
276
+ ## Custom Aria Components
277
+
278
+ Enterprise customers running custom aria agents can extend the SDK with their own infrastructure domains, service delivery models, and component types — no fork required.
279
+
280
+ ### Defining custom component types
281
+
282
+ Use `Custom.blueprint()` and `Custom.offer()` to create reusable factories. Each factory stamps out components of a specific type, just like the built-in helpers (`VirtualNetwork`, `AwsVpc`, etc.).
283
+
284
+ ```typescript
285
+ import {
286
+ Custom, Fractal, LiveSystem, ServiceDeliveryModel,
287
+ } from '@fractal_cloud/sdk';
288
+
289
+ // ── 1. Define factories (once per type, reusable) ─────────────────────────
290
+
291
+ const TimeSeriesStore = Custom.blueprint({
292
+ domain: 'Analytics', // any string — not limited to built-in domains
293
+ serviceDeliveryModel: ServiceDeliveryModel.PaaS,
294
+ name: 'TimeSeriesStore', // must be PascalCase
295
+ });
296
+
297
+ const InfluxDb = Custom.offer({
298
+ domain: 'Analytics',
299
+ serviceDeliveryModel: ServiceDeliveryModel.PaaS,
300
+ name: 'InfluxDb',
301
+ provider: 'CustomProvider', // any string — not limited to built-in providers
302
+ });
303
+ ```
304
+
305
+ ### Creating blueprint components (cloud-agnostic)
306
+
307
+ ```typescript
308
+ // ── 2. Blueprint — what the architecture needs ────────────────────────────
309
+
310
+ const metricsDb = TimeSeriesStore.create({
311
+ id: 'metrics-db',
312
+ version: { major: 1, minor: 0, patch: 0 },
313
+ displayName: 'Metrics Database',
314
+ parameters: { retentionDays: '90', replicationFactor: '3' },
315
+ });
316
+ ```
317
+
318
+ ### Satisfying with a custom offer (vendor-specific)
319
+
320
+ The `satisfy()` method works exactly like built-in offers: it locks the blueprint's id, version, displayName, description, dependencies, links, and parameters, then exposes only vendor-specific parameter setters.
321
+
322
+ ```typescript
323
+ // ── 3. Live system — how the architecture is provisioned ──────────────────
224
324
 
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:
325
+ const influx = InfluxDb.satisfy(metricsDb)
326
+ .withParameter('bucket', 'metrics')
327
+ .withParameter('orgId', 'my-org')
328
+ .build();
329
+ ```
330
+
331
+ ### Standalone creation (without a blueprint)
332
+
333
+ If you don't need the blueprint-satisfy flow, create live system components directly:
334
+
335
+ ```typescript
336
+ const influx = InfluxDb.create({
337
+ id: 'metrics-db',
338
+ version: { major: 1, minor: 0, patch: 0 },
339
+ displayName: 'Metrics Database',
340
+ parameters: { bucket: 'metrics', orgId: 'my-org' },
341
+ });
342
+ ```
343
+
344
+ ### Using the fluent builder
226
345
 
227
- | Blueprint component | AWS | Azure | GCP | OCI |
228
- |---------------------|-----|-------|-----|-----|
229
- | `ContainerPlatform` | `AwsEcsCluster` · `AwsEksCluster` | `AzureAksCluster` · `AzureContainerAppsEnvironment` | `GcpGkeCluster` | — |
230
- | `Workload` | `AwsEcsTaskDefinition` + `AwsEcsService` | `AzureContainerInstance` · `AzureContainerApp` | `GcpCloudRunService` | `OciContainerInstance` |
346
+ For advanced scenarios (dependencies, links, conditional params), use the builder API:
347
+
348
+ ```typescript
349
+ const metricsDb = TimeSeriesStore.getBuilder()
350
+ .withId('metrics-db')
351
+ .withVersion(1, 0, 0)
352
+ .withDisplayName('Metrics Database')
353
+ .withParameter('retentionDays', '90')
354
+ .withDependencies([{ id: someOtherComponent.id }])
355
+ .withLinks([{ id: anotherComponent.id, parameters: linkParams }])
356
+ .build();
357
+ ```
358
+
359
+ ### Deploying custom components
360
+
361
+ Custom components integrate seamlessly with the standard deploy flow:
362
+
363
+ ```typescript
364
+ // ── 4. Deploy as usual ────────────────────────────────────────────────────
365
+
366
+ const fractal = Fractal.getBuilder()
367
+ .withId(fractalId)
368
+ .withComponents([metricsDb])
369
+ .build();
370
+
371
+ const liveSystem = LiveSystem.getBuilder()
372
+ .withId(liveSystemId)
373
+ .withFractalId(fractal.id)
374
+ .withGenericProvider('CustomProvider')
375
+ .withEnvironment(environment)
376
+ .withComponent(influx)
377
+ .build();
378
+
379
+ await fractal.deploy(credentials);
380
+ await liveSystem.deploy(credentials, { mode: 'wait' });
381
+ ```
382
+
383
+ ### Mixing custom and built-in components
384
+
385
+ Custom components can coexist with built-in ones in the same Fractal:
386
+
387
+ ```typescript
388
+ import { VirtualNetwork, Subnet, Custom, ServiceDeliveryModel } from '@fractal_cloud/sdk';
389
+
390
+ const MyCache = Custom.blueprint({
391
+ domain: 'Performance',
392
+ serviceDeliveryModel: ServiceDeliveryModel.PaaS,
393
+ name: 'DistributedCache',
394
+ });
395
+
396
+ const network = VirtualNetwork.create({ /* ... */ })
397
+ .withSubnets([
398
+ Subnet.create({ /* ... */ }),
399
+ ]);
400
+
401
+ const cache = MyCache.create({
402
+ id: 'app-cache',
403
+ version: { major: 1, minor: 0, patch: 0 },
404
+ displayName: 'Application Cache',
405
+ parameters: { maxMemoryMb: '4096', evictionPolicy: 'lru' },
406
+ dependencies: [{ id: network.vpc.id }], // depend on built-in components
407
+ });
408
+
409
+ const fractal = Fractal.getBuilder()
410
+ .withId(fractalId)
411
+ .withComponents([...network.components, cache])
412
+ .build();
413
+ ```
414
+
415
+ ### API reference
416
+
417
+ | Function | Returns | Description |
418
+ |----------|---------|-------------|
419
+ | `Custom.blueprint(config)` | `CustomBlueprintFactory` | Define a reusable blueprint component type |
420
+ | `Custom.offer(config)` | `CustomOfferFactory` | Define a reusable live system offer type |
421
+
422
+ **`CustomBlueprintFactory`**
423
+
424
+ | Method | Returns | Description |
425
+ |--------|---------|-------------|
426
+ | `.create(config)` | `BlueprintComponent` | Create a component with id, version, displayName, parameters, dependencies, links |
427
+ | `.getBuilder()` | `CustomBlueprintBuilder` | Fluent builder with `withParameter(key, value)`, `withDependencies()`, `withLinks()` |
428
+ | `.typeString` | `string` | The full type string (e.g. `"Analytics.PaaS.TimeSeriesStore"`) |
429
+
430
+ **`CustomOfferFactory`**
431
+
432
+ | Method | Returns | Description |
433
+ |--------|---------|-------------|
434
+ | `.create(config)` | `LiveSystemComponent` | Create a live system component directly |
435
+ | `.getBuilder()` | `CustomOfferBuilder` | Fluent builder with full access to all fields |
436
+ | `.satisfy(blueprint)` | `CustomSatisfiedBuilder` | Lock structural fields from blueprint; only `withParameter()`/`withParameters()` exposed |
437
+ | `.typeString` | `string` | The full type string (e.g. `"Analytics.PaaS.InfluxDb"`) |
438
+
439
+ **`CustomSatisfiedBuilder`** (returned by `satisfy()`)
440
+
441
+ | Method | Returns | Description |
442
+ |--------|---------|-------------|
443
+ | `.withParameter(key, value)` | `CustomSatisfiedBuilder` | Add a single vendor-specific parameter |
444
+ | `.withParameters(record)` | `CustomSatisfiedBuilder` | Add multiple vendor-specific parameters at once |
445
+ | `.build()` | `LiveSystemComponent` | Build the final component |
446
+
447
+ ### Validation
448
+
449
+ - **Component name** must be PascalCase (e.g. `TimeSeriesStore`, `InfluxDb`). Validated eagerly when the factory is created — a `SyntaxError` is thrown immediately for invalid names.
450
+ - **Component id** must be kebab-case (e.g. `metrics-db`). Each segment must start with a letter.
451
+ - **Domain and provider** accept any string. Built-in values (`InfrastructureDomain.Storage`, `'AWS'`, etc.) provide autocomplete but are not enforced.
452
+ - Custom domains and providers must be registered with the Fractal Cloud platform for deployment to succeed.
453
+
454
+ ---
231
455
 
232
456
  ## Samples
233
457
 
234
458
  The [sample repository](https://github.com/Fractal-Cloud/fractal-ts-sdk-samples) contains ready-to-run examples:
235
459
 
236
- | Sample | Description |
237
- |--------|-------------|
238
- | `basic_iaas` | VPC + Subnet + Security Group + two VMs deploys on AWS, Azure, GCP, OCI, or Hetzner via `CLOUD_PROVIDER` env var |
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 |
460
+ | Sample | Providers | Description |
461
+ |--------|-----------|-------------|
462
+ | `basic_iaas` | AWS · Azure · GCP · OCI · Hetzner | VPC + Subnet + Security Group + two VMs |
463
+ | `basic_container_platform` | AWS · Azure · GCP | VPC + Subnet + SG + container platform + two workloads |
464
+ | `basic_cicd` | AWS | CI/CD pipeline deployment with wait mode |
465
+ | `basic_storage` | AWS · Azure · GCP | PostgreSQL DBMS + Database + object storage |
466
+ | `basic_messaging` | Azure · GCP | Message broker + two topics |
467
+ | `basic_big_data` | AWS · Azure · GCP | Databricks workspace + cluster + job + MLflow |
468
+ | `basic_api_management` | AWS · Azure · GCP | API Gateway |
469
+ | `basic_observability` | CaaS | Monitoring + tracing + logging (Prometheus, Jaeger, Elastic) |
470
+ | `basic_security` | CaaS | Service mesh (Ocelot) |
240
471
 
241
472
  ## Architecture
242
473
 
243
474
  ```
244
475
  src/
476
+ custom/ # Custom aria component factories (Custom.blueprint, Custom.offer)
245
477
  fractal/ # Cloud-agnostic blueprint helpers
246
478
  component/
247
- network_and_compute/iaas/ # VirtualNetwork, Subnet, SecurityGroup, VirtualMachine
248
- network_and_compute/paas/ # ContainerPlatform
249
- custom_workloads/caas/ # Workload
479
+ network_and_compute/ # VirtualNetwork, Subnet, SecurityGroup, VirtualMachine, ContainerPlatform
480
+ custom_workloads/ # Workload
481
+ storage/ # FilesAndBlobs, RelationalDbms, DocumentDbms, Search, etc.
482
+ messaging/ # Broker, Entity
483
+ big_data/ # DistributedDataProcessing, ComputeCluster, DataProcessingJob, etc.
484
+ api_management/ # ApiGateway
485
+ observability/ # Monitoring, Tracing, Logging
486
+ security/ # ServiceMesh
250
487
  live_system/ # Provider-specific helpers
251
488
  component/
252
- network_and_compute/iaas/ # AWS, Azure, GCP, OCI, Hetzner components
253
- network_and_compute/paas/ # AWS (ECS, EKS), Azure (AKS, Container Apps, Container Instance), GCP (GKE, Cloud Run), OCI (Container Instance)
489
+ network_and_compute/ # AWS, Azure, GCP, OCI, Hetzner, VMware (IaaS) + OpenShift (CaaS) + AWS/Azure/GCP (PaaS)
490
+ custom_workloads/ # OpenShift (CaaS)
491
+ storage/ # AWS S3, Azure Storage/CosmosDB/PostgreSQL, GCP Storage/Firestore/BigTable, OpenShift PV
492
+ messaging/ # Azure ServiceBus/EventHub, GCP PubSub, CaaS Kafka
493
+ big_data/ # AWS/Azure/GCP Databricks + Datalake
494
+ api_management/ # AWS CloudFront, Azure API Management, GCP API Gateway, CaaS Ambassador/Traefik
495
+ observability/ # CaaS Prometheus, Jaeger, Elastic
496
+ security/ # CaaS Ocelot
497
+ ```
498
+
499
+ ## Debug logging
500
+
501
+ Set `FRACTAL_DEBUG=true` to log every outbound HTTP request and every inbound response to stdout. This covers all API calls made by `fractal.deploy()`, `liveSystem.deploy()`, `fractal.destroy()`, and `liveSystem.destroy()`.
502
+
503
+ ```
504
+ [2026-03-11T14:23:00Z] DEBUG → GET https://api.fractal.cloud/livesystems/my-ls
505
+ [2026-03-11T14:23:00Z] DEBUG ← 404 GET https://api.fractal.cloud/livesystems/my-ls body=null
506
+ [2026-03-11T14:23:00Z] DEBUG → POST https://api.fractal.cloud/livesystems body={"liveSystemId":"..."}
507
+ [2026-03-11T14:23:00Z] DEBUG ← 201 POST https://api.fractal.cloud/livesystems body=null
508
+ ```
509
+
510
+ - Authentication headers (`X-ClientID`, `X-ClientSecret`) are never logged.
511
+ - Request and response bodies are truncated to 2 000 characters.
512
+ - Both success and error responses are logged.
513
+ - Works in all deploy modes (`fire-and-forget` and `wait`).
514
+
515
+ ```bash
516
+ FRACTAL_DEBUG=true node build/src/index.js
254
517
  ```
255
518
 
256
519
  ## Contributing and feedback
@@ -261,7 +524,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines. Use GitHub I
261
524
 
262
525
  ## License
263
526
 
264
- Licensed under GPLv3. See the [LICENSE](LICENSE) file for details.
527
+ Licensed under AGPLv3. See the [LICENSE](LICENSE) file for details.
265
528
 
266
529
  Made with ❤️ by the Fractal Cloud team.
267
530