kbaxx / fogframe

Open Source Fog Computing Framework
Apache License 2.0
9 stars 4 forks source link

Cloud Integration #4

Open Daipu opened 5 years ago

Daipu commented 5 years ago

I am trying to use the AWS cloud into this version of fogframe using the files provided in fogframe 2.0. I am facing an issue while integrating the cloud. The steps I am trying are given below:

But the fogcontrolnode is not able to connect to the cloud-fog-middleware. If I deploy the cloud-fog-middleware in my local system. fogcontrolnode connects to it, but on the cloud it does not connect. Am I trying something wrong, if so please help.

softls commented 5 years ago

Hi. It is hard to say without any logs. Have you changed the properties of the fog node src/main/resources/main.properties, there you have to specify ip and port of the cloud fog middleware When you started cloud fog middleware, did you also start databases with cloud-fogmiddleware/startDB.sh

Daipu commented 5 years ago

Thanks for the quick reply. I have sorted the connection part. Now whenever I send a cloud task, it says that dockerhost is not available (connection refused). What might be the reason for that?

Thanks

softls commented 5 years ago

In order to send cloud tasks, it is needed to manually deploy another CoreOs instance (separate from cloud-fog-middleware) and assign a floating IP to it. After connecting to the VM via SSH, a Redis database needs to be started. An example command to easily start a Redis database without further downloads docker run -d -p 6385:6379 --name redisCloud redis:latest

To make the service and cloud database accessible from outside the VM, add the ports 6385 and 8200 to the used security group of the just started VM. This VM embodies the cloud database used for the cloud tasks, i.e., a cloud task is just writing values into database. You have to deploy there cloud-service docker image https://github.com/keyban/cloudservice, make sure the image utilizes the correct floating IP of the created cloud database in the properties file https://github.com/keyban/cloudservice/blob/master/src/main/resources/application.properties. I hope that will help.

Personally, i ran cloud-fog middleware on personal computer, and had only one instance CoreOS for cloud tasks. In your case, you have one instance for cloudfog-middleware, one instance for Cloud tasks. When fog frame needed to deploy other services, then it automatically also instantiated other VMs.

vipin-singh1 commented 5 years ago

I have also tried it but the problem is the cloud-init file does not start in the instance and gives an error because etcd2 has been deprecated. Is there any roundabout to that problem? Thanks

softls commented 5 years ago

The framework was developed in 2016 and in cloud-init it was working with etcd. Then for FogFrame2.0 etcd became deprecated, and i adapted cloud-init for etcd2. Now that etcd2 is deprecated, it is needed to look into how to change cloud-config file https://coreos.com/os/docs/latest/migrating-to-clcs.html there is even a validator avaibale on that page, so you can try it out

softls commented 5 years ago

from fast googling, the units part can be changed, of course etcd2 part goes away. units: