Skip to content

Commit

Permalink
Preparing release 0.1.0 (#163)
Browse files Browse the repository at this point in the history
* Updated submodules and install.md

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>

* updated submodules and BUILD.md

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>

* added bogus travis file

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>

* updated Makefile to use Linux Plugin Makefile when installing the plugin, added to_uuid.sh to retrieve the node UUID

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>

* removed submodule to windows plugin

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>

* updated INSTALL.md to clarify the plugin installation procedure

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>

* updated BUILD.md and submodules

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
  • Loading branch information
gabrik committed Jan 21, 2020
1 parent 95a9a11 commit f26ad87
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 103 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "plugins/plugin-os-linux"]
path = plugins/plugin-os-linux
url = https://github.com/eclipse-fog05/plugin-os-linux
[submodule "plugins/plugin-os-windows"]
path = plugins/plugin-os-windows
url = https://github.com/eclipse-fog05/plugin-os-windows
[submodule "plugins/plugin-net-linuxbridge"]
path = plugins/plugin-net-linuxbridge
url = https://github.com/eclipse-fog05/plugin-net-linuxbridge
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: c
script:
- echo "Nothing to do"
7 changes: 3 additions & 4 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,17 @@ $ mkdir fos_build
$ cd fos_build
$ git clone https://github.com/atolab/apero-core
$ cd apero-core
$ git checkout c36dee5
$ git checkout 0.4.5
$ opam install . --working-dir -y
....
$ cd ..
$ git clone https://github.com/atolab/apero-net
$ cd apero-net
$ git checkout 824c954
$ git checkout 0.4.5
$ opam install . --working-dir -y
$ cd ..
$ git clone https://github.com/atolab/apero-time
$ cd apero-time
$ git checkout b0446b7
$ git checkout 0.4.5
$ opam install . --working-dir -y
$ cd ..
$ git clone https://github.com/atolab/zenoh
Expand Down
88 changes: 16 additions & 72 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,6 @@
# Eclipse fog05 FIM installation.


## Script Installation
---

In order to run install Eclipse fog05 as FIM (Fog Infrastrucutre Manager)
you have to execute the following commands


./fos_install.sh

Then you have to edit the agent and linux plugin configuration file


Agent configuration file: `/etc/fos/agent.json`

update the mgmt_interface parameter with the name of the interface used for managment
update the autoload parameter to false



Linux Plugin configuration file: `/etc/fos/plugins/linux/linux_plugin.json`

update the nodeid parameter with the content of `/etc/machine-id`
this is used to identify the node and to make the plugin connect the right agent.


If you want to run contanerized applications on the node, you have to install and configure LXD

sudo apt remove --purge lxd
sudo snap install lxd
sudo lxd init

add current user to lxd and verify that it is operational (eg. launch a container `lxc launch images:alpine/edge test` and remove it `lxc delete --force test`)
then execute the following commands:


cd fog05/fos-plugins/linuxbridge/
sudo make install


and then edit the Linux Bridge plugin configuration file: `/etc/fos/plugins/linuxbridge/linuxbridge_plugin.json`

update the nodeid parameter with the content of `/etc/machine-id`
this is used to identify the node and to make the plugin connect the right agent.
update the dataplane_interface parameter with the name of the interface used for dataplane (VxLANs will be created over that interface)


then you have to install the LXD plugin

cd fog05/fos-plugins/LXD
sudo make install


and then edit the LXD plugin configuration file: `/etc/fos/plugins/LXD/LXD_plugin.json`

update the nodeid parameter with the content of `/etc/machine-id`
this is used to identify the node and to make the plugin connect the right agent.


## Manual Installation


Expand All @@ -70,25 +12,27 @@ $ sudo make install
```


Copy all the plugins needed plugins in the /etc/fos/plugins directory
You need to copy all the files except for the configuration ones for each plugins
### Plugins

Update the configuration files of agent `/etc/fos/agent.json` and the one of the plugins `/etc/fos/plugins/<name>/<name>_plugin.json` by replacing the `uuid` with the UUID of the current node from `/etc/machine-id` converted to UUID4 and the IP address of the eventual yaks server in `ylocator`
Eclipse fog05 relies on plugins for the interaction with operating system, network provisioning and management of the FDUs (Fog Deployment Units).

The minimal installation requires:
- plugin-os-linux (installed at `make install`)
- plugin-net-linuxbridge (https://github.com/eclipse-fog05/plugin-net-linuxbridge)
- plugin-fdu-xxx

Update your descriptor following: https://github.com/eclipse-fog05/examples/blob/master/fim_api/descriptors/fdu_lxd_net.json
The FDU plugin can be one of:

## Verify the binaries
- plugin-fdu-native (https://github.com/eclipse-fog05/plugin-fdu-native) for binary applications
- plugin-fdu-lxd (https://github.com/eclipse-fog05/plugin-fdu-lxd) for LXD containers [recommended]
- plugin-fdu-kvm (https://github.com/eclipse-fog05/plugin-fdu-kvm) for KVM virtual machine
- plugin-fdu-containerd (https://github.com/eclipse-fog05/plugin-fdu-containerd) for docker (OCI) containers [experimental]

The installation script or the manual installation gets binaries from a cloud storage, it may happen that those binaries are not up to date,
you can verify if they are up to date by a checksum verification using `md5sum`

Checksums:
- /etc/fos/agent (x86_64) `3f627bb68cbea21c75e512e783231b29`
- /etc/fos/agent (armv7l) `4d83e0b115d0f8bad8bed79d70cab2a8`
- /etc/fos/agent (aarch64) `0d1e144d5acbad1518390781e6e1cc68`
Each plugin comes with his own make file, installation can be done following the plugin README file.
After the installation for each plugin you need to update the `nodeid` to match the one provided by the [to_uuid.sh](to_uuid.sh)


If your YAKS server is running on a separate machine, update `ylocator` in the configuration file of agent `/etc/fos/agent.json` and for the plugins `/etc/fos/plugins/<name>/<name>_plugin.json`.


# Start Eclipse fog05
Expand Down Expand Up @@ -160,7 +104,7 @@ Examples are available in the [examples repository](https://github.com/eclipse-f

REST API for FIM are under development...


<!--
## Basic CLI Interface
It is also possible to install a CLI interface, just execute
Expand All @@ -173,4 +117,4 @@ and verify the list of the nodes available
export FOS_YAKS_ENDPOINT="tcp/<address of yaks server>:7447"
fos fim node list

-->
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,10 @@ endif

echo "fos ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers > /dev/null
# sudo cp src/agent/_build/default/fos-agent/fos_agent.exe /etc/fos/agent
make -C plugins/plugin-os-linux install

ifeq "$(wildcard $(LINUX_PLUGIN_DIR))" ""
sudo cp -r plugins/plugin-os-linux /etc/fos/plugins/
else
sudo cp -r plugins/plugin-os-linux/scripts /etc/fos/plugins/plugin-os-linux/
sudo cp plugins/plugin-os-linux/__init__.py /etc/fos/plugins/plugin-os-linux/
sudo cp plugins/plugin-os-linux/linux_plugin /etc/fos/plugins/plugin-os-linux/
sudo cp plugins/plugin-os-linux/README.md /etc/fos/plugins/plugin-os-linux/
endif

sudo sh -c "echo $(UUID) | xargs -i jq '.configuration.nodeid = \"{}\"' /etc/fos/plugins/plugin-os-linux/linux_plugin.json > /tmp/linux_plugin.tmp && mv /tmp/linux_plugin.tmp /etc/fos/plugins/plugin-os-linux/linux_plugin.json"
sudo cp etc/yaks.service /lib/systemd/system/
sudo cp etc/yaks.target /lib/systemd/system/
sudo cp /etc/fos/plugins/plugin-os-linux/fos_linux.service /lib/systemd/system/
sudo ln -sf /etc/fos/yaksd /usr/bin/yaksd
sudo ln -sf /etc/fos/agent /usr/bin/fagent

Expand Down
2 changes: 1 addition & 1 deletion api/api-go
2 changes: 1 addition & 1 deletion api/api-ocaml
2 changes: 1 addition & 1 deletion api/api-python
2 changes: 1 addition & 1 deletion plugins/plugin-fdu-kvm
2 changes: 1 addition & 1 deletion plugins/plugin-fdu-lxd
2 changes: 1 addition & 1 deletion plugins/plugin-fdu-native
2 changes: 1 addition & 1 deletion plugins/plugin-net-linuxbridge
2 changes: 1 addition & 1 deletion plugins/plugin-os-linux
1 change: 0 additions & 1 deletion plugins/plugin-os-windows
Submodule plugin-os-windows deleted from fe3969
2 changes: 1 addition & 1 deletion sdk/sdk-go
2 changes: 1 addition & 1 deletion sdk/sdk-ocaml
2 changes: 1 addition & 1 deletion sdk/sdk-python
2 changes: 1 addition & 1 deletion src/agent
Submodule agent updated from e3f777 to 43430b
9 changes: 9 additions & 0 deletions to_uuid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

id=$(cat /etc/machine-id)
first=$(echo $id | cut -c -8)
second=$(echo $id | cut -c 9-12)
third=$(echo $id | cut -c 13-16)
fourth=$(echo $id | cut -c 17-20)
fifth=$(echo $id | cut -c 21-)
echo $first-$second-$third-$fourth-$fifth

0 comments on commit f26ad87

Please sign in to comment.