**IO Authoring Setup**

1.&ensp;Install ioauthoring

	   sudo npm install -g --unsafe-perm authoring
	   or
	   sudo npm install -g --unsafe-perm @iofog/ioauthoring (developer's version)

2.&ensp;Start ioauthoring

	   sudo ioauthoring start


**Usage**

1.&ensp;To view help menu

        sudo ioauthoring help

2.&ensp;To view version and license

        sudo ioauthoring version
 
**Logs**
- Log files are located at './node_modules/ioauthoring-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.&ensp;To list configurations

        sudo ioauthoring config -list

2.&ensp;To add a configuration

        sudo ioauthoring config -add <key> <value>

Note: Configuration keys can be one of following
- port
- fog\_controller\_port
- fog\_controller\_ip\_address
- fog\_controller\_protocol


To setup fog-controller configurations, do following steps:

        sudo ioauthoring config -add fog_controller_port 54421
        sudo ioauthoring config -add fog_controller_ip_address 127.0.0.1
        sudo ioauthoring config -add fog_controller_protocol http 

To setup HTTPS for ioauthoring, do following steps:

        sudo ioauthoring config -add port 54521
        sudo ioauthoring config -add ssl_key 'path_to_your_sertificates/key.pem'
        sudo ioauthoring config -add intermediate_cert 'path_to_your_sertificates/gs_intermediate_ca.crt'
        sudo ioauthoring config -add ssl_cert 'path_to_your_sertificates/certificate.pem'
        
        sudo ioauthoring config -add fog_controller_port 54421
        sudo ioauthoring config -add fog_controller_ip_address 127.0.0.1
        sudo ioauthoring config -add fog_controller_protocol https
        sudo ioauthoring config -add self_signed_certs true (if provided certs are self signed, skip this step otherwise)

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

3.&ensp;To remove a configuration

        sudo ioauthoring config -remove <key>
        
&ensp;- ioauthoring update:

        sudo ioauthoring stop       
        sudo npm update -g --unsafe-perm authoring        
        sudo ioauthoring start 
        or
        sudo ioauthoring stop
        sudo npm update -g --unsafe-perm @iofog/ioauthoring (developer's version)
        sudo ioauthoring start
