fog-controller
Fog Controller project @ iotracks.com
$ cnpm install fog-controller -g
SYNC missed versions from official npm registry.

Fog Controller Setup

1. Install fog-controller

   npm install -g --unsafe-perm fog-controller

2. Create user

   fog-controller user -add <email> <firstName> <lastName> <password>

3. Start fog-controller

   fog-controller start

4. Open your browser and hit following endpoints to setup IOFog, provision key and fog access token.

  • Create Fog

   http://localhost:3000/api/v2/instance/create/type/:type?t=:userAccessToken

   where ':type' is FogType which can be 1 for Standard Linux (x86) OR 2 for ARM Linux

   and ':userAccessToken' is obtained by creating user

  • Fog provisioning

   http://localhost:3000/api/v2/authoring/fabric/provisioningkey/instanceid/:instanceId

   where ':instanceId' is obtained by creating fog.

   The provision key generated by this endpoint will be used by ioFog for provisioning.

  • Create fog access token

   http://localhost:3000/api/v2/instance/provision/key/:provisionKey/fabrictype/:fabricType

   where ':provisionKey' is obtained by provisioning fog

   and ':fabricType' is a FogType

Usage

1. To view help menu

    fog-controller help

2. To view current status

    fog-controller status   

3. To view version and license

    fog-controller version

Logs

  • Log files are located at './node_modules/fog-controller-logs/'
  • Log files are rotated on daily basis
  • If number of log files exceeds 90, oldest log file will be swapped with the newest file

System Requirements (Recommended)

  • Processor: 64 bit Dual Core or better
  • RAM: 2 GB
  • Hard Disk: 10 GB

Platforms Supported

  • Ubuntu
  • macOS Sierra
  • Windows

Configuration Management

1. To list configurations

    fog-controller config -list

2. To add a configuration

    fog-controller config -add <key> <value>

Note: Configuration keys can be one of following

  • port
  • ssl_key
  • intermediate_cert
  • ssl_cert
  • email_address
  • email_password
  • email_service
  • ioauthoring_port
  • ioauthoring_ip_address
  • ioauthoring_protocol

To setup ioauthoring configurations, do following steps:

    fog-controller config -add ioauthoring_port 4000
    fog-controller config -add ioauthoring_ip_address 127.0.0.1
    fog-controller config -add ioauthoring_protocol http 

To setup HTTPS for fog controller, do following steps:

    fog-controller config -add port 4443
    fog-controller config -add ssl_key 'path_to_your_sertificates/key.pem'
    fog-controller config -add intermediate_cert 'path_to_your_sertificates/gs_intermediate_ca.crt'
    fog-controller config -add ssl_cert 'path_to_your_sertificates/certificate.pem'
fog-controller config -add ioauthoring_port 5443
    fog-controller config -add ioauthoring_ip_address 127.0.0.1
    fog-controller config -add ioauthoring_protocol https

Do not forget to update ioAuthoring configs and add certificates under /etc/iofog/ on the machine where fog agent is running!

To setup email sender, do following steps:

    fog-controller config -add email_address abc@xyz.com
    fog-controller config -add email_password abc123
    fog-controller config -add email_service xyz

3. To remove a configuration

    fog-controller config -remove <key>

User Managment

1. To list users

    fog-controller user -list

2. To add a user

    fog-controller user -add <email> <firstName> <lastName> <password>

3. To remove a user

    fog-controller user -remove <email>

4. To reset password

    fog-controller user -generateToken <email>

ComSat Managment

1. To list all ComSat(s)

    fog-controller comsat -list

2. To add a ComSat

    fog-controller comsat -add <name> <domain> <publicIP>

3. To remove a ComSat

    fog-controller comsat -remove <ID>

Execute Fog-Controller on startup

 For Windows, do following steps:

   - Open a new text document

   - Insert following line in it:

    fog-controller start

   - Save text document with extension as ‘.bat’

   - Put the .bat file in

    “C:\Users\username\AppData\Roaming\Microsoft\Windows\StartMenu\Programs\Startup\” 
    (replacing ‘username’ with the name of your user).

 For Ubuntu, do following steps:

   - Create a file as ‘fog-controller.conf’ in /etc/init/ directory with following command:

    sudo gedit /etc/init/fog-controller.conf

   - Save following text in the file:

    # fog-controller.conf
    description "Fog Controller project @ iotracks.com"
    start on startup
    stop on shutdown
    post-start script
            mkdir -p /usr/local/lib/node_modules/fog-controller
            cd /usr/local/lib/node_modules/fog-controller
            sudo fog-controller start
    end script
    respawn

Current Tags

  • 0.1.41                                ...           latest (2 years ago)

41 Versions

  • 0.1.41                                ...           2 years ago
  • 0.1.40                                ...           2 years ago
  • 0.1.39                                ...           2 years ago
  • 0.1.38                                ...           2 years ago
  • 0.1.37                                ...           2 years ago
  • 0.1.36                                ...           2 years ago
  • 0.1.35                                ...           2 years ago
  • 0.1.34                                ...           2 years ago
  • 0.1.32                                ...           2 years ago
  • 0.1.31                                ...           2 years ago
  • 0.1.30                                ...           2 years ago
  • 0.1.29                                ...           2 years ago
  • 0.1.28                                ...           3 years ago
  • 0.1.27                                ...           3 years ago
  • 0.1.26                                ...           3 years ago
  • 0.1.25                                ...           3 years ago
  • 0.1.24                                ...           3 years ago
  • 0.1.23                                ...           3 years ago
  • 0.1.22                                ...           3 years ago
  • 0.1.21                                ...           3 years ago
  • 0.1.20                                ...           3 years ago
  • 0.1.19                                ...           3 years ago
  • 0.1.18                                ...           3 years ago
  • 0.1.17                                ...           3 years ago
  • 0.1.16                                ...           3 years ago
  • 0.1.15                                ...           3 years ago
  • 0.1.14                                ...           3 years ago
  • 0.1.13                                ...           3 years ago
  • 0.1.12                                ...           3 years ago
  • 0.1.11                                ...           3 years ago
  • 0.1.10                                ...           3 years ago
  • 0.1.9                                ...           4 years ago
  • 0.1.8                                ...           4 years ago
  • 0.1.7                                ...           4 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (29)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |