domain/architecture/system/deployment/type.bend

near-v-framework@0.3.0.0 · 29 lines · 0 definitions

1import Base
2import near-v-framework@0.3.0.0/domain/architecture/system/deployment/host/type.bend as H
3import near-v-framework@0.3.0.0/domain/architecture/system/deployment/nix_darwin/type.bend as ND
4import near-v-framework@0.3.0.0/domain/architecture/system/deployment/azure/type.bend as Az
5
6# A device is someone's own (a phone, a laptop); a server runs the system for others.
7type Role is Data:
8  Device{}
9  Server{}
10
11# What configures a node: nothing V manages, nix-darwin, or an Azure subscription.
12type Platform is Data:
13  Unmanaged{}
14  Darwin{config: ND.NixDarwin}
15  AzureCloud{config: Az.Azure}
16
17# Where containers run: a machine, a runtime inside it, nested as deep as it is. Instances are container keys.
18type Node is Data:
19  Node{key: String, name: String, technology: String, role: Role, host: H.Host, platform: Platform, children: List<&2, Node>, instances: List<&2, String>}
20
21# What a deploy breaks, compared with what was deployed before.
22type Break is Data:
23  AddressChanged{}
24  StoreRemoved{name: String}
25
26# Where the system runs: the address it is reached at, the data stores that must survive a deploy, the
27# breaks accepted for the next deploy, and the nodes.
28type Deployment is Data:
29  Deployment{address: String, stores: List<&2, String>, accepted: List<&2, Break>, nodes: List<&2, Node>}