New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparing River5 for a distribution #57

Open
scripting opened this Issue Jan 4, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@scripting
Owner

scripting commented Jan 4, 2018

Johannes Ernst a longtime friend is working on a new release of the UBOS distribution of Linux.

I suggested including River5, he seemed agreeable.

I think of all the server apps I have, and there are many, River5 is the first realistic candidate.

I expect to learn a bunch from the experience, and make River5 better in the process.

@jernst

This comment has been minimized.

Show comment
Hide comment
@jernst

jernst Jan 4, 2018

... and I just created a repo just for River on UBOS: https://github.com/uboslinux/ubos-river . I called it River, rather than River5, because I'd hope that if there is ever a River6, users could upgrade without paying too much attention ...

jernst commented Jan 4, 2018

... and I just created a repo just for River on UBOS: https://github.com/uboslinux/ubos-river . I called it River, rather than River5, because I'd hope that if there is ever a River6, users could upgrade without paying too much attention ...

@scripting

This comment has been minimized.

Show comment
Hide comment
@scripting

scripting Jan 4, 2018

Owner

Hmmm. That sounds like a fork -- why?

FWIW, this project has been ongoing from 1999. So time should move a little slow, and not impulsive. We also have lots of scripting power, so it's possible to have something other than a fork and still accomplish what you want.

Let's get to know each other a bit before deciding to have a baby, I guess. ;-)

Owner

scripting commented Jan 4, 2018

Hmmm. That sounds like a fork -- why?

FWIW, this project has been ongoing from 1999. So time should move a little slow, and not impulsive. We also have lots of scripting power, so it's possible to have something other than a fork and still accomplish what you want.

Let's get to know each other a bit before deciding to have a baby, I guess. ;-)

@jernst

This comment has been minimized.

Show comment
Hide comment
@jernst

jernst Jan 4, 2018

It's not a fork. It's just the scripts that take your code from where it is on Github (see the line inside PKGBUILD) and package it. None of your code gets replicated or forked or touched in any way.

The build process for the UBOS package is, roughly:

  • git clone https://github.com/uboslinux/ubos-river/river
  • makepkg
    • which does a git clone https://github.com/scripting/river5
    • and puts what it finds there, plus a few other things we need (like a systemd.service file and additional metadata) into a .tar.xz file

That package can then be installed on UBOS with pacman.

jernst commented Jan 4, 2018

It's not a fork. It's just the scripts that take your code from where it is on Github (see the line inside PKGBUILD) and package it. None of your code gets replicated or forked or touched in any way.

The build process for the UBOS package is, roughly:

  • git clone https://github.com/uboslinux/ubos-river/river
  • makepkg
    • which does a git clone https://github.com/scripting/river5
    • and puts what it finds there, plus a few other things we need (like a systemd.service file and additional metadata) into a .tar.xz file

That package can then be installed on UBOS with pacman.

@scripting

This comment has been minimized.

Show comment
Hide comment
@scripting

scripting Jan 4, 2018

Owner

River5 is here.

https://github.com/scripting/river5

What next?? ;-)

Dave

Owner

scripting commented Jan 4, 2018

River5 is here.

https://github.com/scripting/river5

What next?? ;-)

Dave

@jernst

This comment has been minimized.

Show comment
Hide comment
@jernst

jernst Jan 4, 2018

My suggestion: I drive the packaging, and you help me along with the questions that arise, like uboslinux/ubos-river#1

jernst commented Jan 4, 2018

My suggestion: I drive the packaging, and you help me along with the questions that arise, like uboslinux/ubos-river#1

@jernst

This comment has been minimized.

Show comment
Hide comment
@jernst

jernst Jan 7, 2018

Seems to be working. Actual screenshot at the bottom.

Process:

  1. git clone https://github.com/uboslinux/ubos-river (get build scripts)
  2. cd ubos-river/river; makepkg (build package)
  3. Transfer the package file to the target device running UBOS e.g. using scp
  4. pacman -U river-...pkg.tar.gz (install package)
  5. ubos-admin createsite, entered test1 for hostname and river for the app

Steps 1-4 will not be needed once I have added River to the UBOS build process: then it will be built automatically for all UBOS Platforms (x86_64 and various ARM) and staged to the UBOS software depot. (Probably a couple weeks from now)

=> River5 will install on UBOS with a single command.

Some points about implementation:

  • UBOS runs Apache as a reverse proxy in front of the River5 Node process. That way, we get nice port numbers and we can run other apps at the same port 80 as well, such as at different virtual hosts.
  • Node runs as a systemd.service so it automatically gets restarted if it fails, or upon reboot
  • Currently, only the lists directory is backed up when running ubos-admin backup. That means upon ubos-admin restore, River will need to repopulate from scratch; old feed content is discarded.
  • Multiple River instances can simultaneously run on the same machine; no editing of config files required. UBOS will automatically provision a different port number for the websocket for each instance

Possible improvements:

  • When deploying to a TLS-secured site (ubos-admin createsite --tls), the main HTTP connection is secured, but the websocket port is not.
  • The generated config.json file contains the panels defined in the River5 distribution. There is currently no practical way of editing them (if the user edits config.json, the next system upgrade will overwrite as UBOS generates the config.json file -- it needs to, because it's only known at deployment time what the websocket port is going to be for a particular instance). Best way to improve this might be to split config.json into two.
  • Editing the content of the feeds directory to show different feeds requires remote login into the device running the website, and remembering where in the filesystem that directory is. It would be nice if that was easier.

river5-on-ubos

jernst commented Jan 7, 2018

Seems to be working. Actual screenshot at the bottom.

Process:

  1. git clone https://github.com/uboslinux/ubos-river (get build scripts)
  2. cd ubos-river/river; makepkg (build package)
  3. Transfer the package file to the target device running UBOS e.g. using scp
  4. pacman -U river-...pkg.tar.gz (install package)
  5. ubos-admin createsite, entered test1 for hostname and river for the app

Steps 1-4 will not be needed once I have added River to the UBOS build process: then it will be built automatically for all UBOS Platforms (x86_64 and various ARM) and staged to the UBOS software depot. (Probably a couple weeks from now)

=> River5 will install on UBOS with a single command.

Some points about implementation:

  • UBOS runs Apache as a reverse proxy in front of the River5 Node process. That way, we get nice port numbers and we can run other apps at the same port 80 as well, such as at different virtual hosts.
  • Node runs as a systemd.service so it automatically gets restarted if it fails, or upon reboot
  • Currently, only the lists directory is backed up when running ubos-admin backup. That means upon ubos-admin restore, River will need to repopulate from scratch; old feed content is discarded.
  • Multiple River instances can simultaneously run on the same machine; no editing of config files required. UBOS will automatically provision a different port number for the websocket for each instance

Possible improvements:

  • When deploying to a TLS-secured site (ubos-admin createsite --tls), the main HTTP connection is secured, but the websocket port is not.
  • The generated config.json file contains the panels defined in the River5 distribution. There is currently no practical way of editing them (if the user edits config.json, the next system upgrade will overwrite as UBOS generates the config.json file -- it needs to, because it's only known at deployment time what the websocket port is going to be for a particular instance). Best way to improve this might be to split config.json into two.
  • Editing the content of the feeds directory to show different feeds requires remote login into the device running the website, and remembering where in the filesystem that directory is. It would be nice if that was easier.

river5-on-ubos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment