Giter VIP home page Giter VIP logo

demo's Introduction

ioFog Demo

This repository demonstrates the capabilities of ioFog. It spins up the ioFog stack (Agent, Controller, and Connector) on a local machine in a Docker Compose environment. This basic ioFog stack setup constitutes a small, but fully configured Edge Compute Network (ECN).

Optionally, this demo also creates a sample application (microservices deployed on the ioFog stack).

This demo repository is used as supplementary materials for ioFog quickstart and ioFog tutorial guides.

Prerequisites

The ioFog demo requires one of the following systems and tools to be installed. The scripts in this demo do not install any of these tools, but they check for sufficient versions.

Supported operating systems:

  • Linux (kernel v3.10+)
  • macOS 10.12+

Requires tools:

Try ioFog - Simple Edge Compute Network

The main interaction with this demo repository is encapsulated into a set of simple scripts: start.sh, test.sh and stop.sh. Interactions with the ioFog components can be done using a command line interface available in all the services of the stack, or using a REST API.

Spin Up The ioFog Stack

Spin up the blank ioFog stack (Agent, Controller, and Connector) on the local machine.

./start.sh

Verify the iofog stack is provisioned correctly. The automated tests run a smoke test suite on the blank ioFog stack, testing basic operations.

./test.sh

You can also verify manually that the ioFog stack containers are correctly started.

docker ps --filter "name=iofog"

When you are finished, tear down the ioFog stack and all services deployed on it.

./stop.sh

Build from local images

If you have a local image version of the Agent, Controller and Connector, you can chose to build the containers using those local images. To do so, you will need a docker image for the Agent, the Connector and the Controller. You can provide start.sh with an option for each local package you want to use.

Example

Command:

./start.sh -a gcr.io/focal-freedom-236620/agent:latest -cn gcr.io/focal-freedom-236620/connector:latest -ct gcr.io/focal-freedom-236620/controller:latest

ECN Status

./status.sh # Will show you all iofog-related containers currently running.

Interacting With The ioFog Stack - CLI

The simplest way to interact with Agent, Controller, and Connector deployed on a machine you have access to is to use the command line interface iofogctl.

iofogctl help

For the purpose of this demo, all ioFog components are spun up in separate Docker containers. The Controller's container is called iofog-controller.

Names for all the containers created in the demo are iofog-agent, iofog-controller and iofog-connector.

The initialization scripts used to setup the ioFog stack / ECN are using the CLI interface. Feel free to refer to these for more inspiration.

Full reference of the CLI is available at the iofogctl github repository:

Interacting With The ioFog Stack - REST API

Full reference of the REST API for all ioFog stack components is available at the ioFog website:

You can try using the REST API directly on your machine with the ioFog stack running.

curl --url 'http://0.0.0.0:51121/api/v3/status' 

Try ioFog - Tutorial Application Deployed On ioFog

Apart from creating just the ioFog stack, we can also deploy an ioFog application on the stack. Here we demonstrate it on the tutorial application from the ioFog website.

First, create all services for a tutorial ioFog application. You don't have to start the iofog stack manually, it will be created if necessary.

./start.sh tutorial

When you are done with the tutorial, you can tear down the sample application together with the ioFog stack.

./stop.sh

if you only wish to delete the tutorial application:

iofogctl delete application tutorial

Structure Of This Repository

* services                  # Service Dockerfiles and customization files
    - iofog
        + iofog-agent       # Agent service files - part of the iofog stack
        + iofog-connector   # Connector service files - part of the iofog stack
        + iofog-controller  # Controller service files - part of the iofog stack
* init
    - iofog                 # plain ioFog stack initialization yaml file        
    - tutorial              # tutorial initialization yaml file
* test
    + conf                  # generated test configuration files 
* azure-pipelines.yml
* docker-compose-iofog.yml
* docker-compose-tutorial.yml
* docker-compose-test.yml
* start.sh
* stop.sh
* test.sh
* utils.sh

demo's People

Contributors

pixcell avatar lkrcal avatar xaoc000 avatar drluckyspin avatar railag avatar baghbidi avatar mchepelev avatar sergerad avatar dbusel avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.