REQUEST: Guide: HowTo build a FreeNAS Plugin

Status
Not open for further replies.

cyris212

Dabbler
Joined
Jul 29, 2014
Messages
10
Hi there,

I've been using FreeNAS for quite some time now and would love to contribute back to the project.
Because of time and knowledge reasons, I'm probably not able to this in form of actual code.
What I would like to, is contribute and maintain a couple of FreeNAS plugins.

I'm having a hard time to figure out how the plugin system works.
I've had a look at a couple of sources:

http://wiki.pcbsd.org/index.php/PBI_Manager/9.2
http://wiki.pcbsd.org/index.php/Create_PBIs/9.2
http://www.freenas.org/whats-new/2013/04/freenas-plugins-everything-you-ever-wanted-to-know.html
https://github.com/jordanhubbard/freenas-plugins

Is there any chance that someone, who has experience in building plugins, writes a small guide about how to build a simple plugin?

I'm sure that a lot of people would appreciate something like this...
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I would take a look around the forum because there've been some suggestions that a new format for ... plugins? jails? I can't recall ... is coming soon, maybe in FreeNAS 10. Point being, be aware that things may be changing.

Sorry I can't tell you more than that. We've no use for plugins here, so I mostly don't pay attention.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I would take a look around the forum because there've been some suggestions that a new format for ... plugins? jails? I can't recall ... is coming soon, maybe in FreeNAS 10. Point being, be aware that things may be changing.

Sorry I can't tell you more than that. We've no use for plugins here, so I mostly don't pay attention.
jgreco: You're thinking of "bhyve" right?

Also, the resident expert on plugins etc is Joshua Ruehlig. Or however you spell his name. He's all over the FreeNAS forum. Just search for him.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
No, I'm thinking that I heard that there was some new strategy for packages that was supposed to be coming soon. Bhyve is an actual virtualization subsystem, while the packages/plugins/etc are a fancy version of phk's jails.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
well if I understood Jordan correctly, he envisions a universe which is full of unicorns, rainbows, and bhyve, and not jails.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Oh. Well, I suppose that could be. Personally, I mostly like virtualization, and being able to stick a type-2 hypervisor on top of the NAS will eventually make a strong argument for that. Until it can correctly run general workloads (*cough* Windows *cough*), though, ... :-(

a universe which is full of unicorns, rainbows, and bhyve,

unicorn.jpg

The real problem is that jails are the perfect construct for a lot of the things people want to do with the NAS, but the iX implementation is rather more complex than the typical deployment, and I say that as someone who's been using jails since the early days, with things like automatic announcement of started jails into the OSPF environment, which is basically voodoo on both the systems and networking end.

Forcing people to work at the hypervisor level means involving protocols such as NFS, or making block level access for virtual disks a requirement, so it is likely to be a performance tax compared to something where you could just run it as a jail. I imagine this especially applies to things like Plex, which keeps a database AND has to access the content.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
J

jkh

Guest
Jails are more like the jetpack unicorn:
Unknown.jpeg

E.g. with enough thrust, even a brick will fly.

However, I have neither ponies nor unicorns in mind for the future of FreeNAS plugins. There will, unless we hit any show-stoppers, be support for bhyve VMs but there will also be support for jails, this time with some actual life-cycle management built in and a few extra bells and whistles that prevent people from damaging their feet to the current degree they are wont to damage them. Plugins will still install into jails, as they do now, but the way plugins are packaged up and, most importantly, managed will be shared with PC-BSD, which is currently redoing its own plugin infrastructure such that every plugin has a standardized web UI built-in and an SDK for creating new plugins. In other words, rather than just some plugins like Plex and Owncloud having their own web UIs with FreeNAS's own plugin management interface doing little more than trampolining you to that UI, all plugins will as a matter of course and FreeNAS will be able to leverage this to much better advantage in creating a more consistent, less fragile, and certainly easier to author plugin experience.

I need to touch base with the PC-BSD folks about how this is coming along, but last time I checked, it was a much better architecture than what we have today, and it is more than happy to use jails. Jails basically just need a few more seat-belts to be truly usable - they need to validate their network configuration better, they need to do storage management better, they need to have some concept of package management such that their contents can be upgraded via "pkg upgrade" (with a suitable wrapper) for all of their components, etc. etc.

In short, less Unicorn and more:
Unknown-1.jpeg


- Jordan
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Damn, I used to sit across from a guy who was awesome with the Photoshop.... missed opportunities...
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I for one am glad to hear the news on jails. I seem to be one of the minority that really like them and what is capable with them. I'm not against learning something new with bhyve but I've come to like the utility and flexibility that the jails offer.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Good information in this thread.
 
Status
Not open for further replies.
Top