A3 Primitives

Primitives are the software components of the CloudCIX IaaS platform that manage the hardware on which the infrastructure is built.

There are three critical properties of all primitives. These properties are required to ensure the platform produces reliable and consistent results.

  • 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 shapshot instance every time the primitive is called.

  • Non self interference

A primitive will not change that which has already been instanciated by another instance of the same primitive being called.

For example, if a primitive adds a new interface to a VM, it does not delete or modify an existing interface to that VM.

  • Non interference with other primitives

A primitive will not change that which was created 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 configuration applied by the other.

Currently CloudCIX supports 26 primitives:

  • PodNet Primitives
    1. firewall_main (build)

    2. net_main (build, quiesce, restart)

    3. vpns2s_main (build)

    4. bridge_main (build, head)

    5. firewall_ns (build, scrub)

    6. net_ns (build, update, scrub)

    7. dhcp_ns (build, scrub)

    8. nginx_ns (build, scrub)

    9. vpns2s_ns (build, scrub)

    10. vpndyn_ns (build, scrub)

  • Compute KVM Primitives
    1. kvm (build, quiesce, restart, scrub)

    2. bridge_kvm (build, scrub)

    3. storage_kvm (build, update, scrub)

    4. cpu_kvm (update)

    5. ram_kvm (update)

    6. backup_kvm (build, scrub)

    7. snapshot_kvm (build, update, scrub)

    8. gpu_kvm (build, scrub)

    9. rbd (build, update, scrub)

    10. rbd_kvm (build, update)

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

    2. storage_hyperv (build, update, scrub)

    3. cpu_hyperv (update)

    4. ram_hyperv (update)

    5. backup_hyperv (build, scrub)

    6. snapshot_hyperv (build, update, 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.

PodNet Networking Primitives

Primitive

Build

Update

Quiesce

Restart

Scrub

Head

PodNet Networking Primitives

firewall_main

Build

net_main

Build

Quiesce

Restart

bridge_main

Build

Head

vpns2s_main

Build

Project Networking Primitives

firewall_ns

Build

Scrub

net_ns

Build

Update

Scrub

dhcp_ns

Build

Scrub

nginx_ns

Build

Scrub

vpns2s_ns

Build

Scrub

vpndyn_ns

Build

Scrub

Compute KVM Primitives

kvm

Build

Quiesce

Restart

Scrub

bridge_kvm

Build

Scrub

Head

storage_kvm

Build

Update

Scrub

cpu_kvm

Update

ram_kvm

Update

snapshot_kvm

Build

Update

Scrub

backup_kvm

Build

Scrub

gpu_kvm

Quiesce

Restart

rbd

Build

Update

Scrub

rbd_kvm

Quiesce

Restart

Compute HyperV Primitives

hyperv

Build

Quiesce

Restart

Scrub

storage_hyperv

Build

Update

Scrub

cpu_hyperv

Update

ram_hyperv

Update

snapshot_hyperv

Build

Update

Scrub

backup_hyperv

Build

Scrub

Primitive

Contract

Config file

firewall_main.build

  • firewall_rules (list or rule object)
    • version (string: “4” or “6”)

    • source (list of strings)

    • destination (list of strings)

    • protocol (string)

    • port (string)

    • action (string: “accept” or “drop”)

    • log (true or false)

    • iiface (string or none)

    • oiface (string or none)

  • log_setup (dict object)
    • prefix (string)

    • level (int)

    • group (int)

  • config_filepath (optional string)

  • podnets

net_main.build

  • mac (string)

  • ifname (string)

  • ips (list of strings)

  • routes (list of objects)
    • to (string: eg “default”,”::/0”)

    • via (string)

  • vlan (int or none)

  • config_filepath (optional string)

  • podnets

vpns2s_main.build

  • vpn_identifier (string)

  • version (integer: 1 or 2)

  • aggressive (boolean)

  • stif_number (integer)

  • ike_pre_shared_key (string)

  • ike_encryption (string)

  • ike_authentication (string)

  • ike_dh_groups (string)

  • ike_lifetime (integer)

  • ike_local_gateway (string)

  • ike_remote_gateway (string)

  • ike_local_identifier (string)

  • ike_remote_identifier (string)

  • ipsec_rekey_time (integer)

  • ipsec_encryption (string)

  • ipsec_authentication (string)

  • ipsec_pfs_groups (string)

  • start_action (string: “start” or “trap”)

  • routes (list)
    • local (string)

    • remote (string)

  • config_filepath (optional string)

  • podnets

firewall_ns.build

  • namespace_identifier (string)

  • firewall_rules (list)
    • version (string: “4” or “6”)

    • source (list of strings)

    • destination (list of strings)

    • protocol (string)

    • port (string)

    • action (string: “accept” or “drop”)

    • log (boolean)

    • type (string: “inbound”, “outbound”, “inbound_forward” or “outbound_forward”)

  • config_filepath (optional string)

  • podnets

net_ns.build

  • namespace_identifier (string)

  • bridge_podnet_identifier (string)

  • bridge6_podnet_identifier (string)

  • ip (dictionary)
    • addresses (list of strings)

    • mask (integer)

    • gateway (string)

  • ip6 (dictionary)
    • addresses (list of strings)

    • mask (integer)

    • gateway (string)

  • namespace_networks (list)
    • vlan (string)

    • private_address_range (string)

    • ip6_address_range (string)

  • config_filepath (optional string)

  • podnets

net_ns.scrub

  • namespace_identifier (string)

  • config_filepath (optional string)

  • podnets

vpns2s_ns.bulld

  • namespace_identifier (string)

  • identifier (string)

  • version (integer: 1 or 2)

  • aggressive (boolean)

  • stif_number (integer)

  • ike_pre_shared_key (string)

  • ike_encryption (string)

  • ike_authentication (string)

  • ike_dh_groups (string)

  • ike_lifetime (integer)

  • ike_gateway_value (string)

  • ike_local_identifier (string)

  • ike_remote_identifier (string)

  • ipsec_rekey_time (integer)

  • ipsec_encryption (string)

  • ipsec_authentication (string)

  • ipsec_pfs_groups (string)

  • start_action (string: “start” or “trap”)

  • routes (list)
    • local (string)

    • remote (string)

  • config_filepath (optional string)

  • podnets

vpns2s_ns.scrub

  • namespace_identifier (string)

  • identifier (string)

  • stif_number (integer)

  • routes (list)
    • local (string)

    • remote (string)

  • config_filepath (optional string)

  • podnets

vpndyn_ns.bulld

vpndyn_ns.scrub

bridge_main.build

  • address_range (string)

  • identifier (string)

  • config_filepath (optional string)

  • config_filepath (optional string)

  • podnets

bridge_main.head

  • identifier (string)

  • config_filepath (optional string)

  • podnets

bridge_kvm.build

  • host_ip (string)

  • vlan (string)

  • config_filepath (optional string)

  • network_drive_path ?

bridge_kvm.scrub

  • host_ip (string)

  • vlan (string)

bridge_kvm.head

  • host_ip (string)

  • vlan (string)

hyperv.build

  • cpu (integer)

  • admin_password (string)

  • dns (string)

  • dns6 (string)

  • host_ip (string)

  • image (dictionary)
    • file (string)

    • answer_type (string)

  • language (string)

  • nics (list)
    • gateway (boolean)

    • ip (dictionary)
      • addresses (list of strings)

    • ip6 (dictionary)
      • addresses (list of strings)

    • vlan (integer)

    • ifname (string)

  • ram (integer)

  • hyperv_identifier (string)

  • storages (list)
    • identifier (string)

  • timezone (string)

  • config_filepath (optional string)

  • network_drive_path ?

  • vm_path ?

hyperv.quiesce

  • host_ip (string)

  • hyperv_identifier (string)

hyperv.restart

  • host_ip (string)

  • hyperv_identifier (string)

hyperv.scrub

  • host_ip (string)

  • hyperv_identifier (string)

  • config_filepath (optional string)

  • vm_path ?

kvm.build

  • cpu (integer)

  • admin_password (string)

  • dns (string)

  • dns6 (string)

  • host_ip (string)

  • image (dictionary)
    • file (string)

    • answer_type (string)

  • language (string)

  • nics (list)
    • gateway (boolean)

    • ip (dictionary)
      • addresses (list of strings)

    • ip6 (dictionary)
      • addresses (list of strings)

    • vlan (integer)

    • ifname (string)

  • ram (integer)

  • kvm_identifier (string)

  • storages (list)
    • identifier (string)

  • timezone (string)

  • config_filepath (optional string)

  • network_drive_path ?

  • vm_path ?

kvm.quiesce

  • host_ip (string)

  • kvm_identifier (string)

kvm.restart

  • host_ip (string)

  • kvm_identifier (string)

kvm.scrub

  • host_ip (string)

  • kvm_identifier (string)

  • config_filepath (optional string)

  • vm_path ?

storage_hyperv.build

  • host_ip (string)

  • identifier (string)

  • size (integer)

  • config_filepath (optional string)

  • network_drive_url ?

  • vm_path ?

storage_hyperv.update

  • host_ip (string)

  • identifier (string)

  • size (integer)

  • config_filepath (optional string)

  • vm_path ?

storage_hyperv.scrub

  • host_ip (string)

  • identifier (string)

  • config_filepath (optional string)

  • vm_path ?

storage_kvm.build

  • host_ip (string)

  • identifier (string)

  • size (integer)

  • config_filepath (optional string)

  • vm_path ?

storage_kvm.update

  • host_ip (string)

  • identifier (string)

  • delta_size (integer)

  • config_filepath (optional string)

  • vm_path ?

storage_kvm.scrub

  • host_ip (string)

  • identifier (string)

  • config_filepath (optional string)

  • vm_path ?

cpu_hyperv.update

  • cpu (integer)

  • host_ip (string)

  • hyperv_identifier (string)

cpu_kvm.update

  • cpu (integer)

  • host_ip (string)

  • kvm_identifier (string)

ram_hyperv.update

  • ram (integer)

  • host_ip (string)

  • hyperv_identifier (string)

ram_kvm.update

  • ram (integer)

  • host_ip (string)

  • kvm_identifier (string)

backup_hyperv.build

  • backup_identifier (string)

  • backup_repository (integer: 1, 2)

  • host_ip (string)

  • hyperv_identifier (string)

backup_hyperv,scrub

  • backup_identifier (string)

  • backup_repository (integer: 1, 2)

  • host_ip (string)

  • hyperv_identifier (string)

backup_kvm.build

  • backup_identifier (string)

  • backup_repository (integer: 1, 2)

  • host_ip (string)

  • kvm_identifier (string)

backup_kvm.scrub

  • backup_identifier (string)

  • backup_repository (integer: 1, 2)

  • host_ip (string)

  • kvm_identifier (string)

snapshot_hyperv.build

  • host_ip (string)

  • hyperv_identifier (string)

  • snapshot_identifier (string)

snapshot_hyperv.update

  • host_ip (string)

  • hyperv_identifier (string)

  • snapshot_identifier (string)

snapshot_hyperv.scrub

  • host_ip (string)

  • hyperv_identifier (string)

  • snapshot_identifier (string)

snapshot_kvm.build

  • host_ip (string)

  • kvm_identifier (string)

  • snapshot_identifier (string)

snapshot_kvm.update

  • host_ip (string)

  • kvm_identifier (string)

  • snapshot_identifier (string)

snapshot_kvm.scrub

  • host_ip (string)

  • kvm_identifier (string)

  • snapshot_identifier (string)

gpu_kvm.update_attach

  • host_ip (string)

  • kvm_identifier (string)

  • gpu_identifier (string)

gpu_kvm.update_detach

  • host_ip (string)

  • kvm_identifier (string)

  • gpu_identifier (string)

rbd.build

  • size (integer)

  • rbd_identifier (string)

  • pool_name (string)

rbd.update

rbd.scrub

  • rbd_identifier (string)

  • pool_name (string)

rbd_kvm.update_attach

  • host_ip (string)

  • kvm_identifier (string)

  • source_name (string)

  • target_name (string)

rbd_kvm.update_detach

  • host_ip (string)

  • kvm_identifier (string)

  • target_name (string)