In this Quick Start guide we'll download a simple ioFog setup containing a Controller, Connector, and an Agent. This gives you a quick way to establish a mininal Edge Compute Network (ECN) on our local machine and start playing with ioFog. This setup can also be used as a minimal local development environment on any machine that can run Docker.
ioFog requires a Linux environment, however this Tutorial has everything already setup inside a Linux Docker container that can run on Mac or Windows as well.
We can install the latest version of Docker with following command:
curl -sSf https://get.docker.com/ | sh
Next we need to install Docker Compose. For the latest instructions, see the Docker Compose Install Guide. This tutorial requires docker-compose version
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
Docker for Mac can be installed from the Docker Store
To install Docker Compose on Mac, follow the instructions at Docker Compose Install Guide. This tutorial requires docker-compose version
Docker for Windows can be installed from the Docker Store:
To install Docker Compose on Windows, follow the instructions atDocker Compose Install Guide. This tutorial requires docker-compose version
While we fully support using Raspberry Pi's as workers on the edge environment, they are not meant to be used as the Controller and Connector infrastructure. The normal quick-starts above will bring up an entire containerized edge environment for usage, while this section will specify using the Raspberry Pi as an agent in our edge infrastructure.
We have a general guide for Agent Setup Here.
On Unix based systems, download our tar.gz package.
cd where/we/want/iofog-demo curl -L -o demo.tar.gz https://github.com/eclipse-iofog/demo/archive/v1.0.0.tar.gz tar -zxvf demo.tar.gz --strip-components=1
On windows, download tutorial .zip package. Then unzip the contents into a preferred working directory.
Start by spinning up the ioFog stack (Agent, Controller, and Connector) on our local machine. This creates a fully configured Edge Compute Network (ECN) without any microservices.
We can optionally verify the ioFog stack is provisioned correctly. The automated tests run a smoke test suite on the ioFog stack, testing basic operations.
When we are finished, we can tear down the ioFog stack and all services deployed on it.
Your newly setup development environment has three containers: iofog-agent, iofog-controller, and iofog-connector. As their names imply, they contain a running Agent, Controller, and Connector respectively.
You can think of each of these containers as if they were separate devices; the Controller is controlling the Agent the same way it would if the devices were hundreds of miles away, and the Connector can broker communication between any microservices you run.
To create a shell (bash) environment into one of your containers you can use the
docker exec -ti command.
docker exec -ti iofog-controller bash
Now we're inside the iofog-controller container and can issue commands to our Controller. Try this one:
iofog-controller iofog list
This should give you a JSON response containing a list of edge nodes already registered with the Controller. In our case, a single node
"name": "ioFog Node". That "node" is actually the environment running inside the iofog-agent container.