In this guide we will:
Docker v26.0+: Open platform for developing, shipping, and running applications. (installation instructions)Mac users can use Homebrew:
brew tap eclipse-iofog/iofogctl
brew install iofogctlThe Windows binary can be downloaded from Eclipse ioFog Packages.
In order to use iofogctl to deploy an ECN locally on Windows we will need to configure Docker to run Linux containers:
The Debian package can be installed like so:
wget -qO- https://iofog.datasance.com/iofog.gpg | sudo tee /etc/apt/trusted.gpg.d/iofog.gpg >/dev/null
echo "deb [arch=all signed-by=/etc/apt/trusted.gpg.d/iofog.gpg] https://iofog.datasance.com/deb stable main" | sudo tee /etc/apt/sources.list.d/iofog.list >/dev/null
sudo apt update
sudo apt install iofogctl -y
And similarly, the RPM package can be installed like so:
cd /etc/yum.repos.d ; curl https://iofog.datasance.com/iofog.repo -LO
sudo yum update
sudo yum install iofogctlRun iofogctl version to verify we have successfully installed the CLI.
We can use iofogctl deploy to install and provision ECN components. Here we will deploy a containerized ECN locally.
Go ahead and paste the following commands into the terminal:
echo "---
apiVersion: iofog.org/v3
kind: LocalControlPlane
metadata:
name: ecn
spec:
iofogUser:
name: Quick
surname: Start
email: user@domain.com
password: q1u45ic9kst563art
auth:
url: https://example.com/
realm: realm-name
realmKey: realm-key
ssl: exter
controllerClient: pot-controller
controllerSecret:
viewerClient: ecn-viewer
nats:
enabled: false
controller:
container:
image: ghcr.io/eclipse-iofog/controller:3.7.3
---
apiVersion: iofog.org/v3
kind: LocalAgent
metadata:
name: local-agent
spec:
container:
image: ghcr.io/eclipse-iofog/agent:3.7.0
" > /tmp/quick-start.yaml
iofogctl deploy -f /tmp/quick-start.yamlAfter the deployment has successfully completed, we can verify the resources we specified in the YAML file are running on our local machine.
iofogctl get allWhich should output something similar to:
NAMESPACE
default
CONTROLLER STATUS AGE UPTIME ADDR PORT
local online 22m29s 22m35s 0.0.0.0 51121
AGENT STATUS AGE UPTIME ADDR VERSION
local-agent RUNNING 22m7s 22m7s 150.179.102.91 3.7.0
APPLICATION STATUS MICROSERVICES
MICROSERVICE STATUS AGENT ROUTES VOLUMES PORTS
VOLUME SOURCE DESTINATION PERMISSIONS AGENTS
ROUTE SOURCE MSVC DEST MSVC
NB: The Agent status might say UNKNOWN for up to 30s. It is the time for the agent to report back its liveness to the controller.
The Controller acts as a control plane, it will be our main point of access and communication with our ECN. If we want to find out more about Controller, please read this.
The Agent is the component that is meant to run on our edge devices. Once it has registered itself with a Controller, the Agent will be in charge of actually pulling the microservices images and starting / stopping the microservices on our edge device. If we want to find out more about Agent, please read this.
Those components are all currently running as separate Docker containers on our local machine. We can list the active containers by running:
docker psWhich should output something similar to:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
71927882293f ghcr.io/eclipse-iofog/router:3.7.0 "/qpid-dispatch/laun…" 15 minutes ago Up 15 minutes 0.0.0.0:5672->5672/tcp, 0.0.0.0:56721-56722->56721-56722/tcp iofog_PJFbk3ZHjX3RkNWxwcRqzDXnKV6mLHmq
8454ca70755b ghcr.io/eclipse-iofog/agent:3.7.0 "sh /start.sh" 15 minutes ago Up 15 minutes iofog-agent
dc7568ad1708 ghcr.io/eclipse-iofog/controller:3.7.3 "node /usr/local/lib…" 16 minutes ago Up 16 minutes 0.0.0.0:51121->51121/tcp, 0.0.0.0:8008->80/tcp iofog-controllerTo remove our ECN and any microservices deployed on it, we can run the following command:
iofogctl delete allNow that you have seen what ioFog is about, you can create a real ECN with remote hosts. Instructions are found here.
We can also try deploying other Microservices on the local ECN. We can find instructions on writing our own Microservice here and a step-by-step tutorial.