Legacy Controller CLI Usage
Please see iofogctl for current CLI usage: iofogctl
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.
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
stop
Stop the iofog-controller daemon
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
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
-F, --force boolean
User's force delete
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 integer
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
Path to log files directory
-z, --log-size integer
Log files size (MB)
dev-mode
-o, --on
Enable dev mode
-f, --off
Disable dev mode
email-activation
-o, --on
Enable
-f, --off
Disable
Config Locations
Config files are located in project src/config/<file>.json
. When installed using iofogctl resolves to /opt/iofog/controller/lib/node_modules/iofogcontroller/src/config/
. There are 3 config files:
default.json (general data that is used for default values)
{
"App" : {
"Name" : "iofog-controller"
} ,
"Viewer" : {
"Port" : 80
} ,
"Kubelet" : {
"Uri" : "http://localhost:1234"
} ,
"Server" : {
"Port" : 51121 ,
"DevMode" : false
} ,
"Email" : {
"ActivationEnabled" : false ,
"HomeUrl" : "https://google.com"
} ,
"Service" : {
"LogsDirectory" : "/var/log/iofog-controller" ,
"LogsFileSize" : 10485760 ,
"LogsFileCount" : 10
} ,
"Settings" : {
"DefaultJobIntervalSeconds" : 120 ,
"UserTokenExpirationIntervalSeconds" : 3600 ,
"FogTokenExpirationIntervalSeconds" : 3600 ,
"FogStatusUpdateIntervalSeconds" : 120 ,
"FogStatusFrequencySeconds" : 60
} ,
"Diagnostics" : {
"DiagnosticDir" : "diagnostic"
}
}
development.json (data for dev environment)
{
"App" : {
"Name" : "iofog-controller-dev"
} ,
"Viewer" : {
"Port" : 80
} ,
"Kubelet" : {
"Uri" : "http://localhost:1234"
} ,
"Server" : {
"Port" : 51121 ,
"DevMode" : true
} ,
"Email" : {
"ActivationEnabled" : false ,
"HomeUrl" : "https://google.com"
} ,
"Service" : {
"LogsDirectory" : "/var/log/iofog-controller" ,
"LogsFileSize" : 10485760 ,
"LogsFileCount" : 10
} ,
"Settings" : {
"UserTokenExpirationIntervalSeconds" : 360000 ,
"FogTokenExpirationIntervalSeconds" : 3600000 ,
"FogStatusUpdateIntervalSeconds" : 120 ,
"FogStatusFrequencySeconds" : 60
} ,
"Tunnel" : {
"Username" : "username" ,
"Password" : "password" ,
"Host" : "23.253.111.231" ,
"RsaKey" : "rsa" ,
"Lport" : 22 ,
"PortRange" : "2000-10000"
} ,
"Diagnostics" : {
"DiagnosticDir" : "diagnostic"
} ,
"Database" : {
"Provider" : "sqlite" ,
"Config" : {
"databaseName" : "dev_database.sqlite" ,
"logging" : false ,
"transactionType" : "IMMEDIATE" ,
"pool" : {
"maxactive" : 1 ,
"max" : 1 ,
"min" : 0 ,
"idle" : 20000
}
}
}
}
production.json (production data)
{
"App" : {
"Name" : "iofog-controller"
} ,
"Viewer" : {
"Port" : 80
} ,
"Server" : {
"Port" : 51121 ,
"DevMode" : true
} ,
"Email" : {
"ActivationEnabled" : false
} ,
"Service" : {
"LogsDirectory" : "/var/log/iofog-controller" ,
"LogsFileSize" : 10485760 ,
"LogsFileCount" : 10
} ,
"Settings" : {
"UserTokenExpirationIntervalSeconds" : 3600 ,
"FogTokenExpirationIntervalSeconds" : 3600 ,
"FogStatusUpdateIntervalSeconds" : 120 ,
"FogStatusFrequencySeconds" : 60
} ,
"Database" : {
"Provider" : "sqlite" ,
"Config" : {
"databaseName" : "prod_database.sqlite" ,
"logging" : false ,
"transactionType" : "IMMEDIATE" ,
"pool" : {
"maxactive" : 1 ,
"max" : 1 ,
"min" : 0 ,
"idle" : 20000
}
}
}
}
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
Type of action: can be '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 integer
Tunnel port
-i, --iofog-uuid string
ioFog node 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 \
--iofog-uuid 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.
prune
Prune 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 integer
User's id
-f, --file string
Path to ioFog settings JSON file
-n, --name string
ioFog node name
-l, --location string
ioFog node location
-t, --latitude float
ioFog node latitude
-g, --longitude float
ioFog node longitude
-d, --description string
ioFog node description
-D, --docker-url string
ioFog node docker url
-M, --disk-limit float
ioFog node disk usage limit (MB)
-T, --disk-directory string
ioFog node disk directory
-m, --memory-limit float
ioFog node memory usage limit (MB)
-c, --cpu-limit float
ioFog node CPU usage limit (%)
-G, --log-limit float
ioFog node log size limit (MB)
-Y, --log-directory string
ioFog node log files directory
-C, --log-file-count integer
ioFog node log files count
-s, --status-frequency integer
ioFog node status check frequency (seconds)
-F, --change-frequency integer
ioFog node configuration change check frequency (seconds)
-Q, --device-frequency integer
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 integer
ioFog node architecture type
-L, --log-level string
ioFog node log level
-p, --docker-pruning-frequency integer
ioFog node docker pruning frequency (hours)
-k, --disk-threshold integer
ioFog node disk threshold (%)
-e, --prune
Prune ioFog node
update
-u, --user-id integer
User's id
-f, --file string
Path to ioFog settings JSON file
-n, --name string
ioFog node name
-l, --location string
ioFog node location
-t, --latitude float
ioFog node latitude
-g, --longitude float
ioFog node longitude
-d, --description string
ioFog node description
-D, --docker-url string
ioFog node docker url
-M, --disk-limit float
ioFog node disk usage limit (MB)
-T, --disk-directory string
ioFog node disk directory
-m, --memory-limit float
ioFog node memory usage limit (MB)
-c, --cpu-limit float
ioFog node CPU usage limit (%)
-G, --log-limit float
ioFog node log size limit (MB)
-Y, --log-directory string
ioFog node log files directory
-C, --log-file-count integer
ioFog node log files count
-s, --status-frequency integer
ioFog node status check frequency (seconds)
-F, --change-frequency integer
ioFog node configuration change check frequency (seconds)
-Q, --device-frequency integer
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 integer
ioFog node architecture type
-L, --log-level string
ioFog node log level
-p, --docker-pruning-frequency integer
ioFog node docker pruning frequency (hours)
-k, --disk-threshold integer
ioFog node disk threshold (%)
-e, --prune
Prune ioFog node
remove
-i, --iofog-uuid string
ioFog node UUID
-u, --user-id integer
User's id
info
-i, --iofog-uuid string
ioFog node UUID
provisioning-key
-i, --iofog-uuid string
ioFog node UUID
reboot
-i, --iofog-uuid string
ioFog node UUID
prune
-i, --iofog-uuid string
ioFog node UUID
version
-i, --iofog-uuid string
ioFog node UUID
-v, --version-command string
ioFog version command <upgrade/rollback>
hal-hw
-i, --iofog-uuid string
ioFog node UUID
hal-usb
-i, --iofog-uuid string
ioFog node UUID
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 integer
User's id
-f, --file string
Path to 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 integer
Amount of disk required to run the microservice (MB)
-r, --ram-required integer
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 integer
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 integer
Catalog item ID
-f, --file string
Path to 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 integer
Amount of disk required to run the microservice (MB
-r, --ram-required integer
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 integer
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 integer
Catalog item ID
info
-i, --item-id integer
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 integer
User's id
-f, --file string
Path to 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 integer
Application flow ID
-f, --file string
Path to 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 integer
Application flow ID
info
-i, --flow-id integer
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 integer
User's id
-f, --file string
Path to microservice settings JSON file
-n, --name string
Microservice name
-c, --catalog-id integer
Catalog item ID
-F, --flow-id integer
Application flow ID
-I, --iofog-uuid string
ioFog node UUID
-g, --config string
Microservice config
-v, --volumes string[]
Microservice volume mapping(s)
-l, --log-size integer
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)
-e, --env string[]
Microservice environemnt variable(s)
-C, --cmd string[]
Microservice container command and argument(s)
-x, --x86-image string
x86 docker image name
-a, --arm-image string
ARM docker image name
# Single mapping
iofog-controller microservice add \
--volumes /host_src:/container_src:rw \
--env KEY=value --cmd bash \
[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 UUID : dest microservice UUID)
iofog-controller microservice add \
--routes ABC:DEF RFG:HJK \
[other required options]
update
-i, --microservice-uuid string
Microservice UUID
-f, --file string
Path to microservice settings JSON file
-n, --name string
Microservice name
-F, --flow-id string
Application flow ID
-I, --iofog-uuid string
ioFog node UUID
-g, --config string
Microservice config
-v, --volumes string[]
Microservice volume mapping(s)
-l, --log-size integer
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
-e, --env string[]
Microservice environemnt variable(s)
-C, --cmd string[]
Microservice container command and argument(s)
-x, --x86-image string
x86 docker image name
-a, --arm-image string
ARM docker image name
iofog-controller update \
--microservice-uuid <microservice-uuid> \
--volumes {'hostDestination':'/var1/dest','containerDestination':'/var/dest','accessMode':'w','type':'bind'} \
--name testcli
remove
-i, --microservice-uuid string
Microservice UUID
-z, --cleanUp
Delete microservice with cleanup
info
-i, --microservice-uuid string
Microservice UUID
route-create
-T, --route string
Microservice route (receiving microservices)
# Add route (ABC:DEF - source microservice uuid : dest microservice uuid)
iofog-controller microservice route-create \
--route ABC:DEF
route-remove
-T, --route string
Microservice route (receiving microservices)
# Delete route (ABC:DEF - source microservice uuid : dest microservice uuid)
iofog-controller microservice route-remove \
--route ABC:DEF
port-mapping-create
-i, --microservice-uuid string
Microservice UUID
-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-uuid ABC
port-mapping-remove
-i, --microservice-uuid string
Microservice UUID
-b, --internal-port integer
Internal port
# Delete port mapping (80 - internal port, ABC - microservice uuid)
iofog-controller microservice port-mapping-remove \
--internal-port 80 \
--microservice-uuid ABC
port-mapping-list
-i, --microservice-uuid string
Microservice UUID
volume-mapping-create
-i, --microservice-uuid string
Microservice UUID
-P, --mapping string
Container port mapping
# Create volume mapping
iofog-controller microservice volume-mapping-create \
--mapping /host_src:/container_src:rw \
--microservice-uuid ABC
volume-mapping-remove
-i, --microservice-uuid string
Microservice UUID
-a, --mapping-id integer
Volume mapping id
# Delete volume mapping
iofog-controller microservice volume-mapping-remove \
--microservice-uuid ABC \
--mapping-id 1
volume-mapping-list
-i, --microservice-uuid string
Microservice UUID
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
-u, --user-id integer
User's id
update
-i, --item-id integer
Registry id
-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
-i, --item-id integer
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 integer
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