Resources description

Distem resources description

Instructions

In this file [r/w], specify if a resource is readable and/or writable when accessing it throught the Network API (REST).

Hashes are described with ruby structure.

If a resource name is specified between [] that mean that its a table of this resource type. Sample: [cores].

Physical Node

Type: Hash

Structure overview:

Sample:

{
  "address"=>"172.16.65.80",
  "memory"=>{"capacity"=>"16086 Mo", "swap"=>"3820 Mo"},
  "id"=>"0",
  "algorithms"=>{"cpu"=>"hogs"},
  "cpu"=>
   {"cores"=>
     [{"physicalid"=>"5",
       "frequencies"=>["2000 MHz", "2500 MHz"],
       "coreid"=>"6",
       "frequency"=>"2500 MHz",
       "cache_links"=>["7"]},
      {"physicalid"=>"0",
       "frequencies"=>["2000 MHz", "2500 MHz"],
       "coreid"=>"0",
       "frequency"=>"2500 MHz",
       "cache_links"=>["2"]},
      {"physicalid"=>"6",
       "frequencies"=>["2000 MHz", "2500 MHz"],
       "coreid"=>"3",
       "frequency"=>"2500 MHz",
       "cache_links"=>["4"]},
      ...
    ],
    "cores_alloc"=>
     [{"vnode"=>"node2", "core"=>"5"},
      {"vnode"=>"node2", "core"=>"0"},
      {"vnode"=>"node2", "core"=>"6"}],
    "id"=>"69972201354320",
    "critical_cache_links"=>[["0", "2"], ["4", "6"], ["1", "3"], ["5", "7"]]},
  "status"=>"RUNNING"
}

Status

Availability: Read / Write

Type: String

Values:


Algoritms

Type: Hash

Structure overview:

Sample:

{
  "cpu"=>"hogs"
}

Memory

Type: Hash

Structure overview:

Sample:

{
  "capacity"=>"16086 Mo",
  "swap"=>"3820 Mo"
}

CPU

Type: Hash

Structure overview:

Sample:

{
  "id"=>"69972201354320",
  "cores"=>[
    {
      "physicalid"=>"5",
      "frequencies"=>["2000 MHz", "2500 MHz"],
      "coreid"=>"6",
      "frequency"=>"2500 MHz",
      "cache_links"=>["7"]
    },
    {
      "physicalid"=>"0",
      "frequencies"=>["2000 MHz", "2500 MHz"],
      "coreid"=>"0",
      "frequency"=>"2500 MHz",
      "cache_links"=>["2"]
    },
    {
      "physicalid"=>"6",
      "frequencies"=>["2000 MHz", "2500 MHz"],
      "coreid"=>"3",
      "frequency"=>"2500 MHz",
      "cache_links"=>["4"]
    },
    ...
  ],
  "cores_alloc"=>[
    {"vnode"=>"node2", "core"=>"5"},
    {"vnode"=>"node2", "core"=>"0"},
    {"vnode"=>"node2", "core"=>"6"}
  ],
  "critical_cache_links"=>[
    ["0", "2"],
    ["4", "6"],
    ["1", "3"],
    ["5", "7"]
  ]
}

Core

Type: Hash

Structure overview:

Sample:

{
  "physicalid"=>"5",
  "frequencies"=>["2000 MHz", "2500 MHz"],
  "coreid"=>"6",
  "frequency"=>"2500 MHz",
  "cache_links"=>["7"]
}

Virtual Node

Type: Hash

Structure overview:

Sample:

{
  "name"=>"node1",
  "status"=>"RUNNING",
  "gateway"=>false,
  "host"=>"192.168.0.1",
  "vfilesystem"=>{
    "sharedpath"=>nil,
    "shared"=>false,
    "path"=>"/tmp/distem/rootfs-unique/node1",
    "image"=>"file:///home/lsarzyniec/rootfs.tar.gz"
  },
  "ssh_key"=>{"public"=>"ssh-rsa AAAs4f5G...sD3gFf", "private"=>"M1HdH32F...sOA4s"},
  "vifaces"=>[
    {
      "name"=>"if0",
      "address"=>"10.144.2.1/24",
      "vnetwork"=>"network1",
      "output"=>{
        "bandwidth"=>{"rate" => "100mbps"},
        "latency"=>{"delay" => "2ms"}
      },
      "input"=>{
        "bandwidth"=>{"rate" => "20mbps"},
        "latency"=>{"delay" => "5ms"}
      }
    }
  ],
  "vcpu"=>{
    "vcores"=>[
      {"id"=>"0", "pcore"=>"5", "frequency"=>"1000 MHz"},
      {"id"=>"1", "pcore"=>"0", "frequency"=>"1000 MHz"},
      {"id"=>"2", "pcore"=>"6", "frequency"=>"1000 MHz"},
      {"id"=>"3", "pcore"=>"1", "frequency"=>"1000 MHz"}
    ],
    "pcpu"=>"69972201094900"
  }
}

Status

Availability: Read / Write

Type: String

Values:

When starting a virtual node (going from state READY to RUNNING), a physical node (that have enought physical resources (CPU,...)) will be automatically allocated if there is none set as host at the moment. A filesystem image must have been set. The filesystem will be copied on the host physical node.

When stopping a virtual node (going from state RUNNING to READY), deleting its data from the hosting physical node. The host association for this virtual node will be cancelled, if you start the virtual node directcly after stopping it, the hosting physical node will be chosen randomly (to set it manually, see host field in VNode description).


SSH Key Pair

Availability: Read / Write

Type: Hash

Description: SSH key pair to be copied on the virtual node (also adding the public key to .ssh/authorized_keys). Note that every SSH keys located on the physical node which hosts this virtual node are also copied in .ssh/ directory of the node (copied key have a specific filename prefix). The key are copied in .ssh/ directory of SSH user (see Distem::Daemon::Admin::SSH_USER and Distem::Node::Container::SSH_KEY_FILENAME). Both of public and private parameters are optional

Structure overview:

Sample: { "public"=>"ssh-rsa AAAs4f5G...sD3gFf", "private"=>"M1HdH32F...sOA4s" }


CPU

Type: Hash

Structure overview:

This parameters are also taken in account:

Sample: { "vcores"=>[ "pcore"=>"5", "frequency"=>"1000 MHz", "pcore"=>"0", "frequency"=>"1000 MHz", "pcore"=>"6", "frequency"=>"1000 MHz", "pcore"=>"1", "frequency"=>"1000 MHz" ], "pcpu"=>"69972201094900" }


Core

Type: Hash

Structure overview:

Sample: { "pcore"=>"1", "frequency"=>"1000 MHz" }


File System

Type: Hash

Structure overview:

Sample:

{
  "sharedpath"=>"/tmp/distem/rootfs-shared/rootfs.tar.gz-1315906532-...",
  "shared"=>true,
  "path"=>"/tmp/distem/rootfs-unique/nodegw",
  "image"=>"file:///home/lsarzyniec/rootfs.tar.gz"
}

Network interface

Type: Hash

Structure overview:

Sample: { "name"=>"if0", "address"=>"10.144.2.1/24", "vnetwork"=>"network1", "output"=>{ "bandwidth"=>=> "100mbps", "latency"=>=> "2ms" }, "input"=>{ "bandwidth"=>=> "20mbps", "latency"=>=> "5ms" } }


Traffic

Type: Hash

Structure overview:

Sample: { "bandwidth"=>=> "20mbps", "latency"=>=> "5ms" }