Controller CLI Usage

iofog-controller <command> <action> <options>

Commands

start Start iofog-controller service.
stop Stop iofog-controller service.
controller Display iofog-controller service information.
help Display usage information.
user User operations.
config Set/Display iofog-controller service config.
connector Connector operations.
tunnel Tunnel operations.
iofog ioFog node operations.
catalog Microservices catalog operations.
flow Application flow operations.
microservice Microservice instance operations.
registry Registries instance operations.
diagnostics Diagnostic instance operations.

start

Start the iofog-controller daemon

iofog-controller start

stop

Stop the iofog-controller daemon

iofog-controller stop

controller

Display iofog-controller service information.

iofog-controller controller <action> <options>

Actions

status Display iofog-controller service status.
email-activation Is email activation.
fog-types List all Fog-types.
version Display iofog-controller service version.

help

Display the help document

iofog-controller help

user

User operations.

iofog-controller user <action> <options>

Actions

add Add a new user.
update Update existing user.
remove Delete a user.
list List all users.
generate-token Generate token for a user.
activate Activate a user.
suspend Suspend a user.

Options

add
-f, --first-name string User's first name
-l, --last-name string User's last name
-e, --email string User's email address
-p, --password string User's password
iofog-controller user add \
  --first-name test1 \
  --last-name test2 \
  --email test@example.com \
  --password password1
update
-f, --first-name string User's first name
-l, --last-name string User's last name
-e, --email string User's email address
-p, --password string User's password
remove
-e, --email string User's email address
generate-token
-e, --email string User's email address
activate
-e, --email string User's email address
suspend
-e, --email string User's email address

config

Set/Display iofog-controller service config.

iofog-controller config <options>

Actions

add Change current configuration.
list List current configuration.
dev-mode Enable/disable developer mode.
email-activation Enable/disable email activation.

Options

add
-p, --port number Port
-c, --ssl-cert string Path to SSL certificate file
-k, --ssl-key string Path to SSL key file
-i, --intermediate-cert string Path to SSL intermediate certificate file
-h, --home-url string Home page url for email activation links
-a, --email-address string Email address to send activations from
-w, --email-password string Email password to send activations from
-s, --email-service string Email service to send activations
-d, --log-dir string Log files directory, default: /var/log/iofog-controller
-z, --log-size number Log files size (MB
dev-mode
-o, --on Enable dev mode
-f, --off Disable dev mode
email-activation
-o, --on Enable
-f, --off Disable

connector

Connector operations.

iofog-controller connector <action> <options>

Actions

add Add a new Connector.
update Update an existing Connector.
remote Delete a Connector.
list List all Connectors.

Options

add
-n, --name string Connector name
-d, --domain string Connector domain name
-i, --public-ip string Connector public IP address
-c, --cert string Certificate
-S, --self-signed-on Switch on self-signed enabled
-s, --self-signed-off Switch off self-signed disabled
-H, --dev-mode-on Switch on dev mode
-h, --dev-mode-off Switch off dev mode
update
-n, --name string Connector name
-d, --domain string Connector domain name
-i, --public-ip string Connector public IP address
-c, --cert string Certificate
-S, --self-signed-on Switch on self-signed enabled
-s, --self-signed-off Switch off self-signed disabled
-H, --dev-mode-on Switch on dev mode
-h, --dev-mode-off Switch off dev mode
remove
-i, --public-ip string Connector public IP address

Config Locations

Config files are located in project. There are 3 config files:

default.json (general data that is used for default values)

{
  "App": {
    "Name": "iofog-controller"
  },
  "Server": {
    "Port": 54421,
    "DevMode": false
  },
  "Email": {
    "ActivationEnabled": false,
    "HomeUrl": "https://google.com"
  },
  "Service": {
    "LogsDirectory": "/var/log/iofog-controller",
    "LogsFileSize": 1048576
  },
  "Settings": {
    "UserTokenExpirationIntervalSeconds": 3600,
    "FogTokenExpirationIntervalSeconds": 3600
  },
  "Diagnostics": {
    "DiagnosticDir": "diagnostic"
  }
}

development.json (data for dev environment)

{
  "App": {
    "Name": "iofog-controller-dev"
  },
  "Server": {
    "Port": 51121,
    "DevMode": true
  },
  "Email": {
    "ActivationEnabled": false,
    "HomeUrl": "https://google.com"
  },
  "Service": {
    "LogsDirectory": "/var/log/iofog-controller",
    "LogsFileSize": 1048576
  },
  "Settings": {
    "UserTokenExpirationIntervalSeconds": 360000,
    "FogTokenExpirationIntervalSeconds": 3600000
  },
  "Tunnel": {
    "Username": "username",
    "Password": "password",
    "Host": "23.253.111.231",
    "RsaKey": "rsa",
    "Lport": 22,
    "PortRange": "2000-10000"
  },
  "Diagnostics": {
    "DiagnosticDir": "diagnostic"
  }
}

production.json (production data)

{
  "App": {
    "Name": "iofog-controller"
  },
  "Server": {
    "Port": 54421,
    "DevMode": true
  },
  "Email": {
    "ActivationEnabled": false
  },
  "Settings": {
    "UserTokenExpirationIntervalSeconds": 3600,
    "FogTokenExpirationIntervalSeconds": 3600
  }
}

tunnel

Tunnel operations.

iofog-controller tunnel <action> <options>

Actions

update Update existing tunnel or create a new one.
list List all tunnels.

Options

update
-a, --action string Action: can be either 'open' or 'close'
-u, --username string Tunnel username
-p, --password string Tunnel password
-s, --host string Tunnel host address
-k, --rsa-key string Path to RSA key file
-o, --port number Tunnel port
-f, --iofogUuid string Fog UUID
iofog-controller tunnel update \
  --action close \
  --username dmitry \
  --password dpass \
  --host 127.12.14.52 \
  --rsa-key /home/dmitrys/documents/rsa.txt \
  --port 22 \
  --iofogUuid NH44VjVFnr8946Yr8HPRrJdFZgLN8k7j

iofog

ioFog node operations.

iofog-controller iofog <action> <options>

Actions

add Add a new ioFog node.
update Update existing ioFog node.
remove Delete an ioFog node.
list List all ioFog nodes.
info Get ioFog node settings.
provisioning-key Get provisioning key for an ioFog node.
reboot Reboot ioFog node.
version Change agent version of ioFog node.
hal-hw Get HAL Hardware ioFog node data.
hal-usb Get HAL USB ioFog node data.

Options

add
-u, --user-id number User's id
-f, --file string ioFog settings JSON file
-n, --name string ioFog node name
-l, --location string ioFog node location
-t, --latitude number ioFog node latitude
-g, --longitude number ioFog node longitude
-d, --description string ioFog node description
-D, --docker-url string ioFog node docker url
-M, --disk-limit number ioFog node disk usage limit (MB
-T, --disk-directory string ioFog node disk directory
-m, --memory-limit number ioFog node memory usage limit (MB
-c, --cpu-limit number ioFog node CPU usage limit (%
-G, --log-limit number ioFog node log size limit (MB
-Y, --log-directory string ioFog node log files directory
-C, --log-file-count number ioFog node log files count
-s, --status-frequency number ioFog node status check frequency (seconds
-F, --change-frequency number ioFog node configuration change check frequency (seconds
-Q, --device-frequency number ioFog node device scan frequency (seconds
-B, --bluetooth-enable Enable bluetooth on ioFog node
-b, --bluetooth-disable Disable bluetooth on ioFog node
-W, --watchdog-enable Enable watchdog on ioFog node
-w, --watchdog-disable Disable watchdog on ioFog node
-a, --abs-hw-disable Disable hardware abstraction on ioFog node
-A, --abs-hw-enable Enable hardware abstraction on ioFog node
-o, --reboot Reboot ioFog node
-y, --fog-type number ioFog node architecture type
update
-i, --node-id string ioFog node ID
-f, --file string ioFog settings JSON file
-n, --name string ioFog node name
-l, --location string ioFog node location
-t, --latitude number ioFog node latitude
-g, --longitude number ioFog node longitude
-d, --description string ioFog node description
-D, --docker-url string ioFog node docker url
-M, --disk-limit number ioFog node disk usage limit (MB
-T, --disk-directory string ioFog node disk directory
-m, --memory-limit number ioFog node memory usage limit (MB
-c, --cpu-limit number ioFog node CPU usage limit (%
-G, --log-limit number ioFog node log size limit (MB
-Y, --log-directory string ioFog node log files directory
-C, --log-file-count number ioFog node log files count
-s, --status-frequency number ioFog node status check frequency (seconds
-F, --change-frequency number ioFog node configuration change check frequency (seconds
-Q, --device-frequency number ioFog node device scan frequency (seconds
-B, --bluetooth-enable Enable bluetooth on ioFog node
-b, --bluetooth-disable Disable bluetooth on ioFog node
-W, --watchdog-enable Enable watchdog on ioFog node
-w, --watchdog-disable Disable watchdog on ioFog node
-a, --abs-hw-disable Disable hardware abstraction on ioFog node
-A, --abs-hw-enable Enable hardware abstraction on ioFog node
-o, --reboot Reboot ioFog node
-y, --fog-type number ioFog node architecture type
remove
-i, --node-id string ioFog node ID
info
-i, --node-id string ioFog node ID
provisioning-key
-i, --node-id string ioFog node ID
reboot
-i, --node-id string ioFog node ID
version
-i, --node-id string ioFog node ID
-v, --version-command string ioFog version command <upgrade/rollback>
hal-hw
-i, --node-id string ioFog node ID
hal-usb
-i, --node-id string ioFog node ID

catalog

Microservices catalog operations for your configured registries.

iofog-controller catalog <action> <options>

Actions

add Add a new catalog item.
update Update existing catalog item.
remove Delete a catalog item.
list List all catalog items.
info Get catalog item settings.

Options

add
-u, --user-id number User's id
-f, --file string Catalog item settings JSON file
-n, --name string Catalog item name
-d, --description string Catalog item description
-c, --category string Catalog item category
-x, --x86-image string x86 docker image name
-a, --arm-image string ARM docker image name
-p, --publisher string Catalog item publisher name
-s, --disk-required number Amount of disk required to run the microservice (MB
-r, --ram-required number Amount of RAM required to run the microservice (MB
-t, --picture string Catalog item picture
-P, --public Public catalog item
-V, --private Private catalog item
-g, --registry-id number Catalog item docker registry ID
-I, --input-type string Catalog item input type
-F, --input-format string Catalog item input format
-O, --output-type string Catalog item output type
-T, --output-format string Catalog item output format
-X, --config-example string Catalog item config example
update
-i, --item-id string Catalog item ID
-f, --file string Catalog item settings JSON file
-n, --name string Catalog item name
-d, --description string Catalog item description
-c, --category string Catalog item category
-x, --x86-image string x86 docker image name
-a, --arm-image string ARM docker image name
-p, --publisher string Catalog item publisher name
-s, --disk-required number Amount of disk required to run the microservice (MB
-r, --ram-required number Amount of RAM required to run the microservice (MB
-t, --picture string Catalog item picture
-P, --public Public catalog item
-V, --private Private catalog item
-g, --registry-id number Catalog item docker registry ID
-I, --input-type string Catalog item input type
-F, --input-format string Catalog item input format
-O, --output-type string Catalog item output type
-T, --output-format string Catalog item output format
-X, --config-example string Catalog item config example
remove
-i, --item-id string Catalog item ID
info
-i, --item-id string Catalog item ID

flow

Application flow operations.

iofog-controller flow <action> <options>

Actions

add Add a new flow.
update Update existing flow.
remove Delete a flow.
list List all flows.
info Get flow settings.

Options

add
-u, --user-id number User's id
-f, --file string Application flow settings JSON file
-n, --name string Application flow name
-d, --description string Application flow description
-a, --activate Activate application flow
-D, --deactivate Deactivate application flow
update
-i, --flow-id string Application flow ID
-f, --file string Application flow settings JSON file
-n, --name string Application flow name
-d, --description string Application flow description
-a, --activate Activate application flow
-D, --deactivate Deactivate application flow
remove
-i, --flow-id string Application flow ID
info
-i, --flow-id string Application flow ID

microservice

Microservice instance operations.

iofog-controller microservice <action> <options>

Actions

add Add a new microservice.
update Update existing microservice.
remove Delete a microservice.
list List all microservices.
info Get microservice settings.
route-create Create microservice route.
route-remove Remove microservice route.
port-mapping-create Create microservice port mapping.
port-mapping-remove Remove microservice port mapping.
port-mapping-list List microservice port mapping.
volume-mapping-create Create microservice volume mapping.
volume-mapping-remove Remove microservice volume mapping.
volume-mapping-list List microservice volume mapping.

Options

add
-u, --user-id number User's id
-f, --file string Microservice settings JSON file
-n, --name string Microservice name
-c, --catalog-id number Catalog item ID
-F, --flow-id number Application flow ID
-I, --iofog-id string ioFog node ID
-g, --config string Microservice config
-v, --volumes string[] Microservice volume mapping(s
-l, --log-size number Log file size limit (MB
-r, --root-enable Enable root access
-R, --root-disable Disable root access
-p, --ports string[] Container ports
-t, --routes string[] Microservice route(s) (receiving microservices
# Single mapping
iofog-controller microservice add \
  --volumes /host_src:/container_src:rw \
  [other required options]

# Multiple mappings
iofog-controller microservice add \
  --volumes /host_src:/container_src:rw /host_bin:/container_bin:r \
  [other required options]

# Port mapping (80:8080:false - internal port : external port : public mode)
iofog-controller microservice add \
  --ports 80:8080:false 443:5443:false \
  [other required options]

# Add routes (ABC:DEF - source microservice id : dest microservice id)
iofog-controller microservice add \
  --routes ABC:DEF RFG:HJK \
  [other required options]
update
-i, --microservice-id string Microservice ID
-f, --file string Microservice settings JSON file
-n, --name string Microservice name
-F, --flow-id string Application flow ID
-I, --iofog-id string ioFog node ID
-g, --config string Microservice config
-v, --volumes string[] Microservice volume mapping(s)
-l, --log-size number Log file size limit (MB)
-r, --root-enable Enable root access
-R, --root-disable Disable root access
-w, --rebuild Rebuild microservice image on fog agent
iofog-controller update \
  --microservice-id <microservice-id> \
  --volumes {'hostDestination':'/var1/dest','containerDestination':'/var/dest','accessMode':'w'} \
  --name testcli
remove
-i, --microservice-id string Microservice ID
-z, --cleanUp Delete microservice with cleanup
info
-i, --microservice-id string Microservice ID
route-create
-T, --route string Microservice route (receiving microservices)
# Add route (ABC:DEF - source microservice id : dest microservice id)
iofog-controller microservice route-create \
  --route ABC:DEF
route-remove
-T, --route string Microservice route (receiving microservices)
# Delete route (ABC:DEF - source microservice id : dest microservice id)
iofog-controller microservice route-remove \
  --route ABC:DEF
port-mapping-create
-i, --microservice-id string Microservice ID
-P, --mapping string Container port mapping
# Create port mapping (80:8080:false - internal port : external port : public mode, ABC - microservice)
iofog-controller microservice port-mapping-create \
  --mapping 80:8080:false \
  --microservice-id ABC
port-mapping-remove
-i, --microservice-id string Microservice ID
-b, --internal-port string Internal port
# Delete port mapping (80 - internal port, ABC - microservice id)
iofog-controller microservice port-mapping-remove \
  --internal-port 80 \
  --microservice-id ABC
port-mapping-list
-i, --microservice-id string Microservice ID
volume-mapping-create
-i, --microservice-id string Microservice ID
-P, --mapping string Container port mapping
# Create volume mapping
iofog-controller microservice volume-mapping-create \
  --mapping /host_src:/container_src:rw \
  --microservice-id ABC
volume-mapping-remove
-i, --microservice-id string Microservice ID
-a, --mapping-id number Volume mapping id
# Delete volume mapping
iofog-controller microservice volume-mapping-remove \
  --microservice-id ABC \
  --mapping-id 1
volume-mapping-list
-i, --microservice-id string Microservice ID

registry

Registries instance operations.

iofog-controller registry <action> <options>

Actions

add Add a new Registry.
update Update a Registry.
remove Delete a Registry.
list List all Registries.

Options

add
-u, --uri string Registry URI
-b, --public Set registry as public
-r, --private Set registry as private
-l, --username string Registry's user name
-p, --password string Password
-c, --requires-certificate Requires certificate
-C, --certificate string Certificate
-e, --email string Email address
update
-u, --uri string Registry URI
-b, --public Set registry as public
-r, --private Set registry as private
-l, --username string Registry's user name
-p, --password string Password
-c, --requires-certificate Requires certificate
-C, --certificate string Certificate
-e, --email string Email address
remove
-d, --item-id number Item's id

diagnostics

Diagnostic instance operations.

iofog-controller diagnostics <action> <options>

Actions

strace-update Change microservice strace status to enabled or disabled.
strace-info Get microservice strace data.
strace-ftp-post Post microservice strace data to ftp.
image-snapshot-create Create microservice image snapshot.
image-snapshot-get Get microservice image snapshot.

Options

strace-update
-i, --microservice-uuid string Microservice UUID
-e, --enable Enable microservice strace
-o, --disable Disable microservice strace
strace-info
-i, --microservice-uuid string Microservice UUID
-f, --format string Format of strace data to receive
strace-ftp-post
-i, --microservice-uuid string Microservice UUID
--h, --ftpHost string FTP host
--p, --ftpPort number FTP port
--u, --ftpUser string FTP user
--s, --ftpPass string FTP user password
--d, --ftpDestDir string FTP destination directory
image-snapshot-create
-i, --microservice-uuid string Microservice UUID
image-snapshot-get
-i, --microservice-uuid string Microservice UUID
Looking for an enterprise solution?

Run software at the edge with Edgeworx.

Learn More