npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fog-controller

v0.1.41

Published

Fog Controller project @ iotracks.com

Downloads

50

Readme

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 [email protected]
    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