unofficial-unifi / unifi-pfsense

A script that installs the UniFi Controller software on pfSense and other FreeBSD systems
BSD 2-Clause "Simplified" License
748 stars 241 forks source link

This project needs a dev repository #12

Open gozoinks opened 9 years ago

gozoinks commented 9 years ago

We need a development package repository so that we can start actually making the pfsense package.

Docs: https://doc.pfsense.org/index.php/Creating_a_Custom_Package_Repository https://doc.pfsense.org/index.php/Developing_Packages

jmcphail commented 7 years ago

I have started something here: https://github.com/jmcphail/unifi-pfsense/commit/bf78cf08e19d415cc9ebc15f54d2ed267079f943

gozoinks commented 7 years ago

Great. Coincidentally, I was just thinking again about this.

Trying to piece together the workflow (having never done a pfsense package or a freebsd port before) it looks like we need to be working from a fork of the fork of FreeBSD-ports maintained by pfsense. This seems a little awkward, because it means moving all the work done here so far over to a new repository, but if I'm understanding correctly how this is supposed to work, I think we have no choice. At least it's clearer how to proceed than under 2.2 and prior; ports makes more sense.

If all this is the case, then we're facing a rebirth of this effort in a new home and a sunsetting of this particular project, no?

jmcphail commented 7 years ago

I have just started to investigate the port setup as well, and do not know enough to answer your question. Over the short term I will be looking in more detail. I just want to ensure we are not duplicating effort.

gozoinks commented 7 years ago

I appreciate you taking the initiative and your contributions as a whole.

jmcphail commented 7 years ago

I made some progress last night with manually building a package. These are my thoughts so far... Long term you are right, we would be better off to fork the pfsense FreeBSD-ports and contrib accordingly. But that seems like a bit of a leap, and likely would involve a lot of extra work to bring things up to snuff for the pfSense crew to accept this. Short term, maybe we can build the package manually, and have it available for download and install? That seems like a big improvement from what we have now, for example:

pkg add https://github.com/gozoinks/unifi-pfSense/pfSense-pkg-UniFi-0.0.1.txz

Some thoughts...

Do you have a sense of how many people have used this script? It looks like the FreeNAS community has used this as well.

Does the pfSense team even want to see UniFi controller as an official package? The UniFi software and hardware product line are rapidly becoming a replacement for many core functions of pfSense. I wonder, does this effort even make sense anymore?!

Is pfSense and/or FreeBSD dying?

Anyways, I think it would be great, at the very least, to provide a link to UniFi from the pfSense menu, to be able to stop,start,restart the service and uninstall.

This looks interesting! https://github.com/malle-pietje/UniFi-API-browser

gozoinks commented 7 years ago

I think UniFi on pfSense still has value. pfSense remains more capable than the UniFi Security Gateway and offers a greater degree of hardware flexibility. And I gather many installations take good advantage of the light hardware footprint of running pfSense and UniFi on the same device.

If it's popular for similar reasons with FreeNAS, then maybe the thing to do is to back up and make this more general… Build a solid, plain FreeBSD package, then offer separate companion packages for pfSense and FreeNAS with the relevant integrations and UI. Even if there is some reason the main uniFi package would be unacceptable to either project, the companion packages should be no problem, and the main package could be side loaded as you say.

That kinda sounds good to me, just spitballing.

On Thu, Feb 23, 2017 at 9:22 PM James McPhail notifications@github.com wrote:

I made some progress last night with manually building a package https://github.com/gozoinks/unifi-pfsense/wiki/Setting-up-a-pfSense-package-build-environment. These are my thoughts so far... Long term you are right, we would be better off to fork the pfsense FreeBSD-ports and contrib accordingly. But that seems like a bit of a leap, and likely would involve a lot of extra work to bring things up to snuff for the pfSense crew to accept this. Short term, maybe we can build the package manually, and have it available for download and install? That seems like a big improvement from what we have now, for example:

pkg add https://github.com/gozoinks/unifi-pfSense/pfSense-pkg-UniFi-0.0.1.txz

Some thoughts...

Do you have a sense of how many people have used this script? It looks like the FreeNAS community has used this as well.

Does the pfSense team even want to see UniFi controller as package? The UniFi software and hardware product line are rapidly becoming a replacement for many core functions of pfSense. I wonder, does this effort even make sense anymore?!

Is pfSense https://opnsense.org/about/about-opnsense/ and/or FreeBSD dying https://www.google.ca/search?q=freebsd+dying?

Anyways, I think it would be great, at the very least, to provide a link to UniFi from the pfSense menu, to be able to stop,start,restart the service and uninstall.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gozoinks/unifi-pfsense/issues/12#issuecomment-282193480, or mute the thread https://github.com/notifications/unsubscribe-auth/ABn_sPffJ2u0k0shVBGjJiZAMpsMi5R5ks5rfkzvgaJpZM4D4Eya .

--

j

kklouzal commented 7 years ago

This project needs it's own official repository. You have strong user-base and push updates quite frequently. The time is long overdue and this needs to be an immediate goal.

Any word on progress?

gozoinks commented 7 years ago

Things have changed, and this issue as written is now less relevant. In the early days, you had to do some work to set up a development package repository and modify your pfSense config to point to that, then when you were finished, submit a PR to the pfsense team to have them bring your package into their repo.

Since then, it looks like what we need to do is fork the package repo and build the package within that.

That means this project, as it stands, would end. A new project would begin, as a fork of the pfsense package repo, where a new package would be created and from which PRs would be submitted to the pfsense package repo maintainers. The work done so far here would have to be migrated into that project, and work going forward would proceed on that project. No progress on that.

I figure, if we are looking at going to all that trouble, and if there is interest in this sort of package on non-pfsense FreeBSD systems, then (as I muse above) there is probably a need for a plain FreeBSD plugin that provides a UniFi controller, plus a pfSense package based on that.

So, the current vision is this:

  1. Respawn this project as a FreeBSD package project, forked from the FreeBSD package repo
  2. Develop a separate pfSense package that incorporates the FreeBSD package, adding in pfSense goodies
  3. Support development of packages for other FreeBSD-based systems, like FreeNAS.
gozoinks commented 7 years ago

@jmcphail In response to your questions about the prognosis for pfSense, I don't think it's dying. At the same time, one of the principal pfSense developers has been recruited at Ubiquiti. What does that mean for the future of either platform? I dunno. I see many possibilities, most of which may obviate this particular project, either by something official coming from either camp or by one product being absorbed into the other. This project might be relegated to a niche that serves developers and admins interested in an adaptable open source alternative to whatever pfSense/NetGate/Ubiquiti might offer, all of which increments my motivation to generalize.