FreeNAS Storagenode plugin to support STORJ storagenode binary in FreeNAS Jailed environment
- This is an iocage plugin. That means that this plugin uses the iocage commands to automatically configure and install the required packages and start the plugin in the jail
- This plugin is developed for FreeNAS 11.x.
- This includes the identity creation feature.
- User won't be able to run multiple instance of this plugin as there will be issues with the port forwarding.
- An official or community Iocage plugin appears in the plugin list and cant be searched from there catalog and installed.
* This plugin uses VNET interface
* This also uses NATS
* Use of IPv6 is optional
* NATS is enabled and port forwarding is configured for two ports of the Jail Port: 80 & 14002
* Port 80 of JAIL has been forwarded to 8443 of NAS. If this is used by any other plugin then this port number can be changed in the JSON file to make is compatible.
* Port 14002 of jail has been forwarded to port 14002 of the NAS. This is for the storagenode dashboard.
-
Manual Install
- Open the console on you FreeNAS system using a suitable roor authority
- Run "curl -o /tmp/Storjstoragenode.json https://raw.githubusercontent.com/utropicmedia/storj-freenas/master/Storjstoragenode.json"
- Run "iocage fetch -P /tmp/Storjstoragenode.json"
- The above command will pull suitable version of FreeBSD as specified in Storjstoragenode.json
- This will also install the required packages after creating the Jail
- After that it will pull the artifacts for the plugin from https://github.com/utropicmedia/storj-freenas
- Open the console on you FreeNAS system using a suitable roor authority
-
Package installed in the Jail (This is also a part of the Storjstoragenode.json
- shells/bash
- devel/git
- www/nginx
- lang/php72
- ftp/php72-curl
- security/php72-filter
- devel/php72-json
- www/php72-session
- archivers/php72-zip
- Fetch Package list json file
-
Structure of the code base
- Storjstoragenode.json : This contains the plugin description and this shall be submitted to FreeNAS team which will host at their repo then it will appear in the official plugin list as well as in the NAS itself.
- ui.json : This contains the path of the UI for a particcular plugin
- post_install.sh : This defines all the actions after the installation like download of the storagenode binary, managing file permissions
- overlay/usr/local/etc: Contains files for the configuraion of the ngnix webserver and php
- overlay/usr/local/www/storagenode : Contains all the resources and the shell scripts required to the server the UI, and control the storagenode
- Install Path : /root//usr/local/www/storagenode
- The default user of the the plugin is 'storj' with usergorup 'storj'. uid=3000, gid= 3000. This user and user goup will require to be created on your NAS using GUI.
- The plugin ui can be access at "http://{IPADDRESS}:8443". At the first instance Wizard will appear to assist in passing necessary parameters.
- Once the plugin in installed the user need to mount the folder which they want to share and use to create the identity. This wll require you to stop the jail. Please ensure that the folder has required read and write permissions for 'storj' user. It is not advisable to use a path inside the jail to create identity as it will get destroyed if the plugin is removed.
- Please provide the absolute path with respect to the jail mount points to the fiels and this will require stopping the jail..
- You may copy the identity to the shared folder or create one if you have the authorization code from Storj.
- Identity can created on other machine as NAS may take time. Folllow the instruction on the link https://documentation.storj.io/dependencies/identity
- Copy the whole identity folder in the folde mentioned in the step 1.
- Set parameters by clicking the each of the Setup items.
- Similarly please put the path of the folder being shared.
- Email Provide your emai id. This parameter is optional
- Storage : The value be more than 500 GB (Dont fill the unit)
- Ethereum Wallet Address: Please put the correct address and verify as the error will only be known after you press the start storagenode button.
- Press " Start My Storagenode " Button to start the storagenode.
- The area below the buttons will show the messages and error logs. If they dont appear just press the "Config" link on the menu side bar.
* You can use console of the iocage jail to troubleshoot the installation.
* Type " iocage console <Name of the Jail>". The default name is Storjstoragenode
* Type " cat /var/log/STORJ" to see the log.
* The path of the storagenode binary at the path /usr/loca/www/storagenode/scripts
* The identity binary is at /tmp.
Reference: https//www.ixsystems.com/documentation/freenas/11.2/plugins.html