Introduction

In this tutorial, we'll cover how to create, deploy, and manage your first microservices using ioFog.

Minimum Requirements

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.

  • Linux v3.10+ (Ubuntu, CentOS, Raspbian, etc), macOS 10.12+, or Windows 7+
  • Docker 1.10+

Setup

Linux


Install Docker

You can install the latest version of Docker with following command:

curl -sSf https://get.docker.com/ | sh

or

Download Docker for Ubuntu, Debian, Fedora, or CentOS.

Next we need to install Docker Compose. For the latest instructions see the Docker Compose Install Guide, however it should be similar to this:

# This has version 1.22.0 hardcoded, you probably
# should change it to what ever the latest version is!

sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Download Tutorial Project

Finally we need to download the Tutorial project, which will use Docker to run Linux containers for an ioFog Agent, Controller, and Connector that are already setup for you.

cd where/you/want/tutorial-project
curl -L -o tutorial.tar.gz https://github.com/ioFog/demo/archive/demo-environment.tar.gz
tar -zxvf tutorial.tar.gz --strip-components=1

Once you're done, you can skip straight to the next section

macOS


Install Docker

Docker for Mac can be installed from the Docker Store

Download Docker from Docker Store

Download Tutorial Project

Next we need to download the Tutorial project, which will use Docker to run Linux containers for an ioFog Agent, Controller, and Connector that are already setup for you.

cd where/you/want/tutorial-project
curl -L -o tutorial.tar.gz https://github.com/ioFog/demo/archive/demo-environment.tar.gz
tar -zxvf tutorial.tar.gz --strip-components=1

or alternatively you can manually download it:

Download Tutorial project

Once you're done, you can skip straight to the next section

Windows


Install Docker

Docker for Windows can be installed from the Docker Store:

Download Docker from Docker Store

Download Tutorial Project

Next we need to download the Tutorial project, which will use Docker to run Linux containers for an ioFog Agent, Controller, and Connector that are already setup for you.

Download Tutorial project

Unzip the contents into your preferred working directory.

Bootstrap the Project

Using a command prompt (or PowerShell console) navigate to the project directory we just downloaded and run:

docker-compose up --detach

The first time this is run it will download and build several Docker images for our ioFog setup. This may take a few minutes.

When you want to stop everything, you can use the stop command:

docker-compose stop
# or to stop as well as remove the container/networking:
docker-compose down

Get To Know ioFog

With a working ioFog environment set up, we're now ready to get to know ioFog.

Continue To Next Step.

Looking for an enterprise solution?

Run software at the edge with Edgeworx.

Learn More