Commit 15c9cef4 authored by baldoni's avatar baldoni
Browse files

Updated Eclipse fog05 VIM instructions

parent 78492903
Loading
Loading
Loading
Loading
+13 −44
Original line number Diff line number Diff line
@@ -383,49 +383,21 @@ Additional optional configuration:

- `flavors_pattern`: Regular expression to be used during flavor selection. This allows to select the desired virtual machine tier.

## Fog05
## Eclipse fog05

Eclipse fog05 (can be read as _fog-O-five_ or _fog-O-S_) is a different kind of VIM, designed to manage a fog/edge environment, thus it is completely distributed (no controller/master node) and pluggable, and available as FOSS from Eclipse: <https://github.com/eclipse/fog05>
Eclipse fog05 (can be read as _fog-O-five_ or _fog-O-S_) is a different kind of VIM, designed to manage a fog/edge environment, thus it is completely distributed (no controller/master node) and pluggable, and available as FOSS from Eclipse: <https://github.com/eclipse-fog05>

It stores information in a distributed key-value 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 python api to be installed in the node.

```bash
$ 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 configuration file under `/etc/fos/rest/service.json` following your fog05 installation.

```json
{
   "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.

```bash
$ 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:
Image registration can be done by using the python rest API. First generate the descriptor of your image:

```json
{
   "name": "<image name>",
   "uri": "",
   "name": "example-image",
   "uri": "lxd://alpine/edge",
   "checksum": "<sha256sum of image file",
   "format": "<image format eg. qcow2, iso, tar.gz>"
}
@@ -433,10 +405,8 @@ You can use the REST proxy also as image service, image upload can be done by us

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

```text
>>>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
```python
>>>api.image.add(img_descriptor)
```

### Adding Eclipse fog05 as VIM target of OSM
@@ -444,14 +414,13 @@ where the value of result is the uuid of the image
Alike the rest of VIM types, you should provide the appropiate paramenters in `--config` when creating the VIM target.

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

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.
- `hypervisor`: hypervisor supported by this VIM account, can be one of: LXD, KVM, BARE, DOCKER, ROS2, at least one node of the system as to be able to manage the selected hypervisor, default and supported is LXD.

#### VLAN configuration (optional)

@@ -468,7 +437,7 @@ If you want your fog05 installation to be able to use VLANs for virtual networks
 ],
 "description": "linux Bridge network plugin",
 "configuration": {
   "ylocator": "tcp/<your yaks ip>:7887",
   "ylocator": "tcp/<your zenoh ip>:7447",
   "nodeid": "<your node id>",
   "dataplane_interface": "<interface for overlay networks>",
   "use_vlan": true,
@@ -487,7 +456,7 @@ After that you have to restart the fog05 network and runtime plugins in the node

Here you can find and example of network service that can be instantiated to the Eclipse fog05 VIM using OSM. The network service is composed by a single VNF based on an Alpine Linux LXD image.

**`alpinevnfd.yaml`**:
**`alpine-vnfd.yaml`**:

```yaml
vnfd:vnfd-catalog:
@@ -511,7 +480,7 @@ vnfd:vnfd-catalog:
               vcpu-count: 1
               memory-mb: 256
               storage-gb: 1
           image: 2db8b83a-62ea-4543-83c7-1818f403f6f4
           image: alpine-lxd
           interface:
           -   name: eth0
               type: EXTERNAL
@@ -524,7 +493,7 @@ vnfd:vnfd-catalog:
           cp: eth0
```

**`alpinens.yaml`**:
**`alpine-ns.yaml`**:

```yaml
nsd:nsd-catalog: