Eclipse fog05

From OSM Public Wiki
Revision as of 12:33, 17 May 2019 by Baldoni (talk | contribs)
Jump to: navigation, search

Eclipse fog05 (can be read as fog-O-five or fog-O-S) is a different kind of VIM, it is designed to manage a fog/edge environment, thus it is completely distributed (no controller/master node) and pluggable.

Available as FOSS from Eclipse: https://github.com/eclipse/fog05

It stores information in a distributed K,V store that then is able to provide location transparency to the user, and all the state information are stored in it.

Configure fog05 for OSM

In order to make OSM able to contact fog05, you need to configure the REST proxy on one node that has access to the whole fog05 deployment, this node will act as a proxy and thus allow OSM to interact with fog05. This requires python3-flask, fog05 pyhton api to be installed in the node.


$ cd fog05/src/utils/python/rest_proxy
$ sudo make install

The installation will install also a systemd service, then you have to configure this service by editing the JSON configuaration file under /etc/fos/rest/service.json following your fog05 installation.

{
   "host": "<ip address you node where you want the service to listen>",
   "port": 8080,
   "debug": false,
   "yaks": "<ip address of one of the yaks server in the fog05 system>",
   "sysid": "0",
   "tenantid": "0",
   "image_path": "imgs"
}

Then you can simply start the service using systemd

$ sudo systemd start fosrest

Upload Images

You can use the REST proxy also as image service, image upload can be done by using the python rest API. First generate the descriptor of your image:

{
   "name": "<image name>",
   "uri": "",
   "checksum": "<sha256sum of image file",
   "format": "<image format eg. qcow2, iso, tar.gz>"
}

the using the python api the upload of the image can be done:

>>>api.image.add(img_descriptor, img_file_path)
{'result': '92274e2e-129f-40a3-be7e-a35ea596d439'}
where the value of result is the uuid of the image


Add Eclipse fog05 to OSM

There is a parameter called --config used to supply general configuration options. This paremeter can be used when creating the datacenter using the OSM client or when adding the datacenter directly to the RO (both at datacenter creation and datacenter attachment to openmano tenant -the latter prevails-).

The following configuration can be added:

  • arch: cpu architecture used when creating the VDUs for this VIM account eg. x86_64, aarch64, default is x86_64.
  • hypervisor: hypervisor supported by this VIM account, can be one of: LXD, KVM, BARE, DOCKER, XEN, at least one node of the system as to be able to manage the selected hypervisor, default is LXD.
  • nodes: if you want this VIM account to be able to manage only a subset of the nodes in the system you can pass a list of node uuids, by default is an empty list that means all nodes.

Adding vimaccount using OSM client

osm vim-create --name fos --auth_url <rest proxy ip>:8080 --account_type fos --tenant osm --user dummy --password dummy --config '{hypervisor: LXD}'

VLAN configuration (optional)

If you want your fog05 installation to be able to use VLANs for virtual networks instead of overlay VxLANs you need to change the configuration on all nodes. You need to update the configuration file /etc/fos/plugins/linuxbridge/linuxbridge_plugin.json

{
 "name": "linuxbridge",
 "version": 1,
 "uuid": "d42b4163-af35-423a-acb4-a228290cf0be",
 "type": "network",
 "requirements": [
   "jinja2"
 ],
 "description": "linux Bridge network plugin",
 "configuration": {
   "ylocator": "tcp/<your yaks ip>:7887",
   "nodeid": "<your node id>",
   "dataplane_interface": "<interface for overlay networks>",
   "use_vlan": true,
   "vlan_interface": "<interface for vlans>",
   "vlan_range": [
     <start vlan id>,
     <end vlan id>
   ]
 }
}

After that you have to restart the fog05 network and runtime plugins in the nodes.