I was thinking of packaging a few services for UBOS that run their own web server in their own process, rather than being a web app built for Apache/Nginx or even Tomcat. For instance, an IRC web client such as KiwiIRC. I would want to reverse proxy it so that it would still run through Apache and fit the UBOS paradigm.
I've played around with this a bit, and have the very basics of UBOS packaging figured out. However this seems like a slightly unusual scenario for UBOS, so I'm wondering if I could get some help here.
The first hurdle is that a few of these have no Arch packages, or exist only in the AUR. How do we go about setting such a dependency? (For instance https://aur.archlinux.org/packages/kiwiirc/).
The second hurdle is that, taking Tomcat as an example, it looks like each application that I wrap in this manner needs to be created as a role. And for that matter, I think that in the case of IRC, both the client and the server should be configured as roles. (Since UBOS is about independence, I imagine people wanting to run their own IRC servers.) Is it feasible for a newcomer like me to set up an IRC client and server as roles?
One interesting thing I noticed, btw, is that Tomcat is listening on a hardcoded port. What if you install two Tomcat applications on one UBOS system? I'd think you'd want to be able to generate a unique port number per app. Or is there only ever one Tomcat instance?
I'll likely have some smaller questions, but these are the big ones that can get me started on understanding.
Thanks a lot!
Dan
--
You received this message because you are subscribed to the Google Groups "UBOS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ubos-dev+u...@googlegroups.com.
To post to this group, send email to ubos...@googlegroups.com.
Visit this group at http://groups.google.com/group/ubos-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/ubos-dev/c6768401-7f1e-4df8-b03a-44a4b40118ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
That’s the way to do it. For an example in case you hadn’t found it yet, look at the Java version of gladiwashere: https://github.com/uboslinux/ubos-toyapps/tree/master/gladiwashere-java which runs the app in Tomcat behind Apache as a reverse proxy.
On Aug 1, 2015, at 18:50, Dan Krol <orbl...@gmail.com> wrote:
As far as packaging the application, I think there may be a misunderstanding possibly based on a bad assumption I'm making, which I should probably lay out. My understanding is that the application package, and the "UBOS package", would be two different different things. For instance, the UBOS package for Wordpress does not contain the entire source code for Wordpress, but merely a reference to it.
Though, interestingly enough, what it references doesn't seem to be a separate Arch or UBOS package either; rather it's a URL to download straight from the Wordpress project's website, plus an md5sum.
What if the referenced package had binaries, would you do the same?
Wouldn't really work for Raspberry Pi, unless the project also supplied ARM binaries. So, assuming it required a build, don't most OS repositories host the built binaries? It would seem you'd want something it to be in the Arch or UBOS package repo. (I've never packaged for an OS before so please forgive any ignorance here).
So following this pattern, if I were to make a UBOS package for the IRC client/server ("ubos-irc"), I wouldn't want to include the binaries or the source as part of ubos-irc, right? Only a reference to it. But then, if the server is a binary that requires building, I would want to make a package for it. Would that package go in the UBOS repo, or maybe the Arch AUR?
And as far as why I thought it should be a role: Most of the packages on UBOS say, "Here are some files. Put them over there. Configure Apache and maybe Tomcat thusly." and it works. However in my case, I have a whole new executable (or two) to run. How do I specify that the system should run the program?
How do I tell it to monitor that program (supervisord, etc)? One interesting thing is that in some cases, I may want one instance of the application running for the whole system, such as the IRC server. On the other hand I may want one program per "UBOS app", such as the IRC client. (maybe a user wants multiple IRC clients pointing at the same server, who knows.)
BTW any reason you use md5 and not sha256?
Thanks again,- Dan
--
You received this message because you are subscribed to the Google Groups "UBOS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ubos-dev+u...@googlegroups.com.
To post to this group, send email to ubos...@googlegroups.com.
Visit this group at http://groups.google.com/group/ubos-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/ubos-dev/CAAWRcS9SAjrE7arwaE2PWNjseAbqomSKn810EY%3DW7QR3Akc9rg%40mail.gmail.com.
What exactly do you need to run and how? Is it a daemon? If so, you should run it as a systemd .service.
On Aug 22, 2015, at 18:50, Dan Krol <orbl...@gmail.com> wrote:Hello,
> Yes, the makepkg script (which reads PKGBUILD) needs to compile whatever needs compiling. The PKGBUILD specifies which architectures are allowed.Oh, okay, I think it just clicked for me. What goes into the various UBOS package git repos are not packages as such, but rather code that is used to build packages (same as would be for any Arch packages). It is either up to the (savvy) UBOS user to git clone, build, and pacman-install the packages before installing them with ubos-admin, or up to the UBOS repository maintainer to git clone, build, and commit the packages for the (not necessarily as savvy) UBOS user to pacman-install them before using ubos-admin. So, that's how binaries would be made available from a repo. Not sure why this didn't occur to me before. I think this was part of the source of my confusion. So, it sounds like if UBOS were to accept such a package as I've described, your build system would have to be running makepkg twice, and sticking the result into your repo, if x86 and Raspberry Pi would be supported. Do I get the right idea now?
What exactly do you need to run and how? Is it a daemon? If so, you should run it as a systemd .service.Yes, it is a daemon. Cool, I will look into that. However, I don't see an example in the UBOS documentation. Is there one you could point me to?
Thanks,Dan
--
You received this message because you are subscribed to the Google Groups "UBOS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ubos-dev+u...@googlegroups.com.
To post to this group, send email to ubos...@googlegroups.com.
Visit this group at http://groups.google.com/group/ubos-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/ubos-dev/CAAWRcS_o3j%2Bo9dJsBUBnu5z01svVrQsmVSQFVBiNajVdgBv06w%40mail.gmail.com.
On Aug 22, 2015, at 19:00, Dan Krol <orbl...@gmail.com> wrote:Ah, found one in mediagoblin. Interesting that it's under apache in the manifest.
--
You received this message because you are subscribed to the Google Groups "UBOS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ubos-dev+u...@googlegroups.com.
To post to this group, send email to ubos...@googlegroups.com.
Visit this group at http://groups.google.com/group/ubos-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/ubos-dev/CAAWRcS_T8XjDohe8qekWgV4r2k7%2BeAL777cDXFujH5p_iYXK4w%40mail.gmail.com.
On Aug 22, 2015, at 20:21, Dan Krol <orbl...@gmail.com> wrote:Cool, got the systemd part to work!
--
You received this message because you are subscribed to the Google Groups "UBOS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ubos-dev+u...@googlegroups.com.
To post to this group, send email to ubos...@googlegroups.com.
Visit this group at http://groups.google.com/group/ubos-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/ubos-dev/CAAWRcS-VyPiSvkDH%3DEJxqLc%2BvHLzvFNw0HiCZ%3DzHBtXojwN0wQ%40mail.gmail.com.