softls / FogFrame-2.0

FogFrame framework (with extensions)
Apache License 2.0
4 stars 0 forks source link

Fogcell not executable #1

Open BlackRose01 opened 6 years ago

BlackRose01 commented 6 years ago

Hello,

as part of my project seminar at the university we try to use your FogFrame System. Currently we cannot run the Fogcell module because we always get the error message that the Bean propertyService cannot autowire because of missing dependencies.

The error log is attached.

Thank you.

Paul fogcell.error.log

softls commented 6 years ago

Dear Paul, it is hard to say what the problem is by such a description. Please read about the dependencies and overall installation approach in the http://www.infosys.tuwien.ac.at/staff/sschulte/paper/Bachmann_Master.pdf that pdf describes in details the previous version of the framework https://github.com/keyban/fogframe (the difference is that this one establishes one fog colony). Maybe you can use this previous version, because it is described in details.

In general, the whole folder has to be built first on your computer. The dependencies (i.e., fogdata) have to be installed in local maven repository. Then files that indicated in Dockerfile have to be copied to according raspberies together with the Dockerfile itself, and started inside Raspberry with run.sh or remote, like in https://github.com/softls/FogFrame-2.0/blob/master/run_scripts/start-all-raspberries.sh. Databases with startdb.sh have to started before fog cells and fog node. Fog controller has to be started first (you can do that locally). Fog node has to be started second, then fog cell.

Small hint. To start a fog cell/fog node/fog controller locally not in docker, try set in fogcell/src/main/resources/application.properties fog.docker = false, and change the according ip addresses.

BlackRose01 commented 6 years ago

Thank you for your answer.

Currently I want to test everything on 1 RPI. But I can tell you how I modify and execute the project. I do everything on the RPI directly.

  1. edit all application.properties and main.properties and change the IP-addresses
  2. edit POM file in fognode and added repos for net.sf.javailp and cplex.cplex
  3. download openjdk-8-jre-headless_8u40~b04-2_armhf.deb and save it in all run_scripts/fog* folders
  4. build project with mvn clean install
  5. copy every jar in run_scripts/fog*
  6. start startDbs.sh
  7. start fogcontrolnode
  8. start fogcell (error)

Thank you.

Paul

vipin-singh1 commented 5 years ago

Thank you for your answer.

Currently I want to test everything on 1 RPI. But I can tell you how I modify and execute the project. I do everything on the RPI directly.

  1. edit all application.properties and main.properties and change the IP-addresses
  2. edit POM file in fognode and added repos for net.sf.javailp and cplex.cplex
  3. download openjdk-8-jre-headless_8u40~b04-2_armhf.deb and save it in all run_scripts/fog* folders
  4. build project with mvn clean install
  5. copy every jar in run_scripts/fog*
  6. start startDbs.sh
  7. start fogcontrolnode
  8. start fogcell (error)

Thank you.

Paul

In your step 2, how did you edit the POM file in fognode and added repos for net.sf.javailp and cplex.cplex? I am having difficulty building the fognode module.

softls commented 5 years ago

Dear colleagues,

The project has to be built in the root directory. So you have to run mvn install command inside the FogFrame folder. Then it builds all the components and according jars are located in target folders in each component. It is necessary because the component fogdata is included in each component, so it has to be installed in the local mvn repository.

If you compile only single component, make sure you run mvn install fogdata beforehand.

Neither cplex nor net.sf.ilp will run on the rpi processor architecture, unfortunately. I abandoned that idea. When I tried that in my time, it appeared that those libraries are not compiled for the ARM processor architecture, the was a post about that https://www.ibm.com/developerworks/community/forums/html/topic?id=6e43017f-39c4-40b6-9b69-695f89a13624 libraries are built for Intel x86-64.

You might consider to develop resource provisioning functionality as a service, maybe, inside a fog controller. So that when a fog node needs to run an algorithm using cplex, it sends inputs to the fog controller by REST request, and fog controller calculates service placement plan and sends back the assignments. That would require reworking the architecture in general.

vipin-singh1 commented 5 years ago

Dear colleagues,

The project has to be built in the root directory. So you have to run mvn install command inside the FogFrame folder. Then it builds all the components and according jars are located in target folders in each component. It is necessary because the component fogdata is included in each component, so it has to be installed in the local mvn repository.

If you compile only single component, make sure you run mvn install fogdata beforehand.

Neither cplex nor net.sf.ilp will run on the rpi processor architecture, unfortunately. I abandoned that idea. When I tried that in my time, it appeared that those libraries are not compiled for the ARM processor architecture, the was a post about that https://www.ibm.com/developerworks/community/forums/html/topic?id=6e43017f-39c4-40b6-9b69-695f89a13624 libraries are built for Intel x86-64.

You might consider to develop resource provisioning functionality as a service, maybe, inside a fog controller. So that when a fog node needs to run an algorithm using cplex, it sends inputs to the fog controller by REST request, and fog controller calculates service placement plan and sends back the assignments. That would require reworking the architecture in general.

I am building the project from the root itself. Just when the fognode module is building, I get an error saying ilog:cplex:jar:1270 is missing. What am I doing wrong?

softls commented 5 years ago

You have to add your cplex jar in local maven repository, and add in pom file in fog controller and the project. Then you can try building.

Assuming that all above works, you also will have at some point to edit the Dockerfile of fog controller itself to add cplex jar file. And that jar has to be copied to the same folder from where you plan to start docker container.

Note: if you want to start fog controller it on Raspberry Pi, cplex functionality will not work any way.