Primitives are the software components of the CloudCIX IaaS platform that manage the hardware on which the infrastructure is built. You can think of primitives as a kind of API to the Pod hardware.
Primitives are engineered to have three critical properties. These properties are required to ensure the platform produces reliable and consistent results.
1 Primitives are (usually) Idempotent
There is (usually) no difference in outcome between calling a primitive once and calling it multiple times.
For example, if a VM has 4GB of RAM and a primitive call is to increase that to 8GB. If you call the primitive twice, then the resulting RAM should remain at 8GB. Thus, a primitive to increase RAM by an amount does not exist but a primitive to change RAM to a certain amount exists.
Some primitives, such as snapshot_kvm build, create a new snapshot instance every time the primitive is called. These primitives are not idempotent.
2 Non self interference
A primitive will not modify/delete that which has already been instanciated by another instance of the same primitive being called.
For example, if a primitive adds a new VPN tunnel to a Project, it must not intefere with any existing VPN instance.
3 Non interference with other primitives
A primitive will not modify/delete that which was instanciated by another primitive.
If different primitives use the same underlying technology then there must be a mechanism to separate their domains. For example if two different primitives use nftables (perhaps one creating a firewall and the other a VPN tunnel) then each should not interfere with the configuration applied by the other. In this case firewall rules are kept in different nftable chains from vpn nftable chains.
Currently CloudCIX supports 37 primitives:
firewall_main (build, read)
net_main (build, read)
vpns2s_main (build, read, scrub)
bridge_main (build, read, scrub)
default_firewall_ns (build, read, scrub)
project_firewall_ns (build, read)
nat_firewall_ns (build, read)
geo_a_firewall_ns (build, read)
geo_b_firewall_ns (build, read)
prvt2prvt_firewall_ns (build, read)
vpns2s_firewall_ns (build, read)
vpndyn_firewall_ns (build, read)
set_firewall_ns (build, update, read, scrub)
ns (build, read, scrub)
network_ns (build, read, scrub)
bridgeif_ns (build, read, scrub)
vlanif_ns (build, read, scrub)
vpnif_ns (build, read, scrub)
route_ns (build, read, scrub)
vpns2s_ns (build, read, scrub)
vpndyn_ns (build, read, scrub)
lxd (build, quiesce, restart, read, scrub)
bridge_lxd (build, read, scrub)
storage_lxd (build, update, read, scrub)
cpu_lxd (update)
ram_lxd (update)
backup_lxd (build, read, scrub)
snapshot_lxd (build, update, read, scrub)
gpu_lxd (build, read, scrub)
rbd (build, update, read, scrub)
rbd_lxd (build, read, scrub)
hyperv (build, quiesce, restart, read, scrub)
storage_hyperv (build, update, read, scrub)
cpu_hyperv (update)
ram_hyperv (update)
backup_hyperv (build, read, scrub)
snapshot_hyperv (build, update, read, scrub)
The config_filepath is an optional parameter, if it is not provided it will
default to the current path where the primitives
project is installed.
Driver |
Primitvies |
---|---|
1 vrf |
|
2 firewall |
|
3 geofilter |
|
4 vpns2s |
|
5 vpndyn |
|
6 lxc |
|
7 vm_hyperv |
|
8 storage_lxc |
|
9 storage_hyperv |
|
10 snapshot_lxc |
|
11 snapshot_hyperv |
|
12 backup_lxc |
|
13 backup_hyperv |
|
14 ceph |
|
15 gpu |
|
16 vrf_phantom |
|
17 vm_phantom |