- Joined
- May 26, 2011
- Messages
- 654
FreeNAS will handle the usual plugin installation for you automatically. You just need to do few clicks and system will handle downloading of the proper template, create a jail and import a plugin in it. Ugly thing is that the naming convention is fixed and somehow ugly (i want "transmission", not a "transmission_1" or whatever) and you simply cannot change it unless you want to mess with several things manually. So if you want a custom jail name you need to do it manually.
Catch is that lot of things changed in 9.3 and you can not do it like in previous versions. In 9.3. the only officially supported custom jail is the VirtualBox. The other "officially" supported jail are the "standard" and "pluginjail" FreeBSD jails which are used for PBI plugins, anyway there is a catch...
You may create a jail template as you wish and create new Jail from it but the problem is, that the "upload plugin" button [
] will be not available => You can not install PBI from GUI in it. Even if you will use the official 9.3 templates it will not allows you to do that. Looks like the system will allow it only if the template is named as "pluginjail" but you can not use that name because this template already exists in the system as a "system template", so you can not see it from GUI but you can check it from CLI. This "system" template is not even available under "Template" when "Add Jail" configuration is used - dead end.
So how the hell i should do that? Well ... the trick is to temporary remove the "system" flag from the "pluginjail" template in database so we could use that manually.
- First BACKUP (!!) your config file via the GUI "System->General->Save config"
- Login to CLI as root
- Issue
sqlite3 /data/freenas-v1.db
select * from jails_jailtemplate;
0|FreeBSD|x64|1|http://download.freenas.org/jails/9.2/x64/freenas-virtualbox-4.3.12.tgz||13|VirtualBox-4.3.12
1|FreeBSD|x86|0|http://download.freenas.org/jails/9...tandard-x86-9.3-RELEASE.mtree|14|standard-x86
1|FreeBSD|x86|0|http://download.freenas.org/jails/9...njail-x86-9.3-RELEASE.mtree|15|pluginjail-x86
1|FreeBSD|x64|0|http://download.freenas.org/jails/9...reenas-standard-9.3-RELEASE.mtree|16|standard
1|FreeBSD|x64|0|http://download.freenas.org/jails/9.../x64/freenas-pluginjail-9.3-RELEASE.mtree|17|pluginjail
- The latest one is the mentioned "pluginjail" and the number "1" is the "system jail" flag which needs to be changed.
update jails_jailtemplate set jt_system='0' where jt_name='pluginjail';
- and verify
select * from jails_jailtemplate where jt_name='pluginjail';
0|FreeBSD|x64|0|http://download.freenas.org/jails/9.../x64/freenas-pluginjail-9.3-RELEASE.mtree|17|pluginjail
- Ok so now keep the CLI open and jump back to the webgui and check the Jail templates. You should now see the "pluginjail" template in the list.
- Go to the "Jails" -> "Add Jail" , choose your desired name (like "transmission" or whatever plugin you are planning to install) and under Template choose "pluginjail" which is now available. Fill the rest fields as you need and hit "OK". If you haven't installed any 9.3 plugin yet, you will need to wait a bit since the template image needs to be downloaded first.
- In the meanwhile go to the plugins source and download your desired PBI package.
- Once the jail is created and started, just select it under "Jail list" and you should now see the desired "Upload plugin" crate icon [
] . Click on it and just select your downloaded PBI. Hit "Upload" and sit'n'wait.
- After the plugin is deployed restart the Jail just to be sure it works fine.
- You should now be able to see the plugin in the left menu of the GUI under "Plugins". Click on it and do the initial plugin configuration (if available).
- Once configured go to the "Plugins" from the top menu and select "Installed" tab. You should now see the plugin installed and you need to enable it.
- Plugin should be now operational while the jail has your desired name.
- The last thing is to change the plugin template back to the system to avoid some stupid mistakes. So go back to the CLI you kept open (or repeat the sqlite command) and issue:
update jails_jailtemplate set jt_system='1' where jt_name='pluginjail';
- and verify:
select * from jails_jailtemplate where jt_name='pluginjail';
1|FreeBSD|x64|0|http://download.freenas.org/jails/9.../x64/freenas-pluginjail-9.3-RELEASE.mtree|17|pluginjail
- DONE !
I am not sure if the whole thing of not having the button is just a "bug" or if it's a feature to avoid uploading pbi packages into potentially incompatible jails, but this is the way how to "fix" it by yourself.
HolyK
Catch is that lot of things changed in 9.3 and you can not do it like in previous versions. In 9.3. the only officially supported custom jail is the VirtualBox. The other "officially" supported jail are the "standard" and "pluginjail" FreeBSD jails which are used for PBI plugins, anyway there is a catch...
You may create a jail template as you wish and create new Jail from it but the problem is, that the "upload plugin" button [

Code:
[root@NAS] ~# warden template list Jail Templates: ------------------------------ pluginjail - FreeBSD 9.3 (amd64)
So how the hell i should do that? Well ... the trick is to temporary remove the "system" flag from the "pluginjail" template in database so we could use that manually.
- First BACKUP (!!) your config file via the GUI "System->General->Save config"
- Login to CLI as root
- Issue
sqlite3 /data/freenas-v1.db
select * from jails_jailtemplate;
0|FreeBSD|x64|1|http://download.freenas.org/jails/9.2/x64/freenas-virtualbox-4.3.12.tgz||13|VirtualBox-4.3.12
1|FreeBSD|x86|0|http://download.freenas.org/jails/9...tandard-x86-9.3-RELEASE.mtree|14|standard-x86
1|FreeBSD|x86|0|http://download.freenas.org/jails/9...njail-x86-9.3-RELEASE.mtree|15|pluginjail-x86
1|FreeBSD|x64|0|http://download.freenas.org/jails/9...reenas-standard-9.3-RELEASE.mtree|16|standard
1|FreeBSD|x64|0|http://download.freenas.org/jails/9.../x64/freenas-pluginjail-9.3-RELEASE.mtree|17|pluginjail
- The latest one is the mentioned "pluginjail" and the number "1" is the "system jail" flag which needs to be changed.
update jails_jailtemplate set jt_system='0' where jt_name='pluginjail';
- and verify
select * from jails_jailtemplate where jt_name='pluginjail';
0|FreeBSD|x64|0|http://download.freenas.org/jails/9.../x64/freenas-pluginjail-9.3-RELEASE.mtree|17|pluginjail
- Ok so now keep the CLI open and jump back to the webgui and check the Jail templates. You should now see the "pluginjail" template in the list.
- Go to the "Jails" -> "Add Jail" , choose your desired name (like "transmission" or whatever plugin you are planning to install) and under Template choose "pluginjail" which is now available. Fill the rest fields as you need and hit "OK". If you haven't installed any 9.3 plugin yet, you will need to wait a bit since the template image needs to be downloaded first.
- In the meanwhile go to the plugins source and download your desired PBI package.
- Once the jail is created and started, just select it under "Jail list" and you should now see the desired "Upload plugin" crate icon [

- After the plugin is deployed restart the Jail just to be sure it works fine.
- You should now be able to see the plugin in the left menu of the GUI under "Plugins". Click on it and do the initial plugin configuration (if available).
- Once configured go to the "Plugins" from the top menu and select "Installed" tab. You should now see the plugin installed and you need to enable it.
- Plugin should be now operational while the jail has your desired name.
- The last thing is to change the plugin template back to the system to avoid some stupid mistakes. So go back to the CLI you kept open (or repeat the sqlite command) and issue:
update jails_jailtemplate set jt_system='1' where jt_name='pluginjail';
- and verify:
select * from jails_jailtemplate where jt_name='pluginjail';
1|FreeBSD|x64|0|http://download.freenas.org/jails/9.../x64/freenas-pluginjail-9.3-RELEASE.mtree|17|pluginjail
- DONE !
I am not sure if the whole thing of not having the button is just a "bug" or if it's a feature to avoid uploading pbi packages into potentially incompatible jails, but this is the way how to "fix" it by yourself.
HolyK