Register for the iXsystems Community to get an ad-free experience

iocage plugins & jails for Home-Assistant, Mosquitto, TasmoAdmin and Amazon-Dash

Status
Not open for further replies.

tprelog

Contributor
Joined
Mar 2, 2016
Messages
170
These plugins are for FreeNAS 11.2

Updated
plugins for FreeNAS 11.3 can be found here

Given the option of both, I still can't decide which I prefer and I'm certainly not going to decide for others. At first I had two separate scripts, one for installing a standard-jail and also the post_install.sh used by the plugin-jail. Then one late night, in an experiment gone horribly awry, the two have somehow mutated into one!

Really I made some hybrid plugins for iocage. I say hybrid because by default they will, with two commands, install said application in a plugin type jail. I have also provided a regular pkg-list.jsonthat can be used to install the required packages while creating a standard-jail. You can then download (clone) my plugin repo and manually run post_install.sh standard to finish the install.

OK, I said I wasn't going to decide for you but I do recommend a standard-jail for Home Assistant because it allows more control. I do not find this need for TasmoAdmin, Mosquitto or AmazonDash.

Amazon Dash
Code:
wget -O /tmp/amazon-dash.json https://raw.githubusercontent.com/tprelog/iocage-amazon-dash/master/amazon-dash.json
sudo iocage fetch -P dhcp=on vnet=on bpf=yes -n /tmp/amazon-dash.json --branch 'master'


Mosquitto MQTT Broker
Code:
wget -O /tmp/mosquitto.json https://raw.githubusercontent.com/tprelog/iocage-mosquitto/11.2-RELEASE/mosquitto.json
sudo iocage fetch -P dhcp=on vnet=on bpf=yes -n /tmp/mosquitto.json


TasmoAdmin
Code:
wget -O /tmp/tasmoadmin.json https://raw.githubusercontent.com/tprelog/iocage-tasmoadmin/11.2-RELEASE/tasmoadmin.json
sudo iocage fetch -P dhcp=on vnet=on bpf=yes -n /tmp/tasmoadmin.json


Home Assistant
- Run by user/group `hass` with UID/GUID of `8123` matching the default Home Assistant port.
- Includes option to install App-Daemon/HA-Dashboard and(or) Hass-Configurator
- Option to use my pre-configured example files*
- Includes simple menu to execute updates!

Download pkg-list and create a jail using it to install requirements
Code:
wget -O /tmp/pkglist.json https://raw.githubusercontent.com/tprelog/iocage-homeassistant/11.2-RELEASE/pkg-list.json
sudo iocage create -r 11.2-RELEASE boot=on dhcp=on bpf=yes vnet=on -p /tmp/pkglist.json -n homeassistant


Optional: mount a dataset inside the jail
Code:
sudo iocage fstab -a homeassistant "/mnt/tank/user/hass /home/hass nullfs rw 0 0"


Git script and begin install
Code:
sudo iocage exec homeassistant git clone -b 11.2-RELEASE https://github.com/tprelog/iocage-homeassistant.git /root/.iocage-homeassistant
sudo iocage exec homeassistant bash /root/.iocage-homeassistant/post_install.sh standard


Answer questions will choose what gets installed
Code:
   Install Home-Assistant?  [Y/n]:
   Install Hass-Configurator?  [Y/n]:
   App-Daemon & HA-Dashboard?  [Y/n]:
   Use the pre-configured examples?  [Y/n]:


Profit!
--------
Keeping things updated
Code:
   sudo iocage exec homeassistant bash update

   1) Home Assistant  3) Configurator    5) Status
   2) App Daemon      4) FreeBSD         6) Exit
   Enter Number to Upgrade:

---
_profit-01.png _profit-02.png _profit-03.png
_profit-04.png _final-01.png _10-updateMenu.png
_profit-05.png _profit-06.png _profit-07.png

Please checkout my (almost) complete quick start to installing Home Assistant on FreeNAS 11.2 that also includes an updated manual installation guide for Home Assistant!

*My pre-config examples are optional but without them, you will need to provide your own configs before AppDaemon or Hass-Configurator will start
Install as standard-jails see my GitHub repos Mosquitto and TasmoAdmin and Amazon Dash
Install as plugin (Home Assistant Only) see Home Assistant


If at a later time any plugin should need to become a standard-jail, I have discovered that iocage export followed by iocage destroy and finally iocage import will do such a trick.
 
Last edited:

tprelog

Contributor
Joined
Mar 2, 2016
Messages
170
Status
Not open for further replies.
Top