A3 Primitives

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:

  • PodNet Primitives
    1. firewall_main (build, read)

    2. net_main (build, read)

    3. vpns2s_main (build, read, scrub)

    4. bridge_main (build, read, scrub)

    5. default_firewall_ns (build, read, scrub)

    6. project_firewall_ns (build, read)

    7. nat_firewall_ns (build, read)

    8. geo_a_firewall_ns (build, read)

    9. geo_b_firewall_ns (build, read)

    10. prvt2prvt_firewall_ns (build, read)

    11. vpns2s_firewall_ns (build, read)

    12. vpndyn_firewall_ns (build, read)

    13. set_firewall_ns (build, update, read, scrub)

    14. ns (build, read, scrub)

    15. network_ns (build, read, scrub)

    16. bridgeif_ns (build, read, scrub)

    17. vlanif_ns (build, read, scrub)

    18. vpnif_ns (build, read, scrub)

    19. route_ns (build, read, scrub)

    20. vpns2s_ns (build, read, scrub)

    21. vpndyn_ns (build, read, scrub)

  • Compute LXD Primitives
    1. lxd (build, quiesce, restart, read, scrub)

    2. bridge_lxd (build, read, scrub)

    3. storage_lxd (build, update, read, scrub)

    4. cpu_lxd (update)

    5. ram_lxd (update)

    6. backup_lxd (build, read, scrub)

    7. snapshot_lxd (build, update, read, scrub)

    8. gpu_lxd (build, read, scrub)

    9. rbd (build, update, read, scrub)

    10. rbd_lxd (build, read, scrub)

  • Compute HyperV Primitives
    1. hyperv (build, quiesce, restart, read, scrub)

    2. storage_hyperv (build, update, read, scrub)

    3. cpu_hyperv (update)

    4. ram_hyperv (update)

    5. backup_hyperv (build, read, scrub)

    6. 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.

Drivers and Primitives

Driver

Primitvies

1 vrf

  • ns

  • bridgeif_ns

  • vlanif_ns

  • network_ns

  • route_ns

  • route_main

  • default_firewallns

  • set_firewall_ns

2 firewall

  • set_firewall_ns

  • project_firewall_ns

3 geofilter

  • set_firewall_ns

  • geo_a_firewall_ns

  • geo_b_firewall_ns

4 vpns2s

  • set_firewall_ns

  • vpnif_ns

  • vpns2s_firewall_ns

  • vpns2s_ns

5 vpndyn

  • set_firewall_ns

  • vpnif_ns

  • vpndyn_firewall_ns

  • vpndyn_ns

6 lxc

  • network_ns

  • nat_firewall_ns

  • bridge_lxd

  • lxd

  • cpu_lxd

  • ram_lxd

7 vm_hyperv

  • network_ns

  • nat_firewall_ns

  • hyperv

  • cpu_hyperv

  • ram_hyperv

8 storage_lxc

  • storage_lxd

9 storage_hyperv

  • storage_hyperv

10 snapshot_lxc

  • snapshot_lxd

11 snapshot_hyperv

  • snapshot_hyperv

12 backup_lxc

  • backup_lxd

13 backup_hyperv

  • backup_hyperv

14 ceph

  • rbd

  • rbd_lxd

15 gpu

  • gpu_lxd

16 vrf_phantom

17 vm_phantom