Components update working on shared servers (without REDIS or service-runner)

A very useful feature that is not working for me as i’m on a shared server, so I’m trying to make the components update run without redis or service-runner.

Issues to solve:

1 - Use git directly from PHP when service runner is not available, or always?
2 - How is this file updated? Why not make this a universal github RAW url to the latest file?
  • /opt/openenergymonitor/EmonScripts/components_available.json
3 -Remove hardcoded absolute paths:

Are they used in any place ?

4 - Where are the source for this files?
  • /opt/openenergymonitor/EmonScripts/update/update_component.sh
  • /opt/openenergymonitor/EmonScripts/update/update_all_components.sh

@TrystanLea please comment on the topics above.

Hello @nchaveiro is there any reason that you cant run on VM environment like a DigitalOcean droplet? and so can install the full system according to the EmonScripts specification?

E.g https://www.digitalocean.com/pricing $5/month for a basic droplet, 1GB memory, 25GB SSD, SSH, Ubuntu. You can then install using the EmonScripts install script and get the full stack following a common build structure that is easier to support.

Or even https://www.ionos.co.uk/ £1/month! for a linux VPS…

That is a nice idea and the ionos offer seem very cheap. Will take a look at that later.
The main drawback for not changing to a VPS until now is that i have a growing 30GB mysql database that i think would be more expensive and also having to administer the VM, upgrading it, security patches, etc, that on a shared server are given.
The current traditional hosting i use charges me $7 month with a free yearly domain renew and unlimited of everything (Disk, Database and network).

Anyway, are you suggesting that emoncms might drop support for shared installations without Redis ?
Please advice also where is the git repo for that EmonScripts/update/ files as i could not find it :frowning:

Update: Dreamhost now has a limit of 3GB per database… time to change.

Interesting, seems like you have a good deal there!

Yes that is what I would like to do. We havent really actively supported it in terms of providing an up to date guide or developing with it in mind for years. With limited resources I think its best to focus on a target platform and just get things working as well as possible on that.

The emonscripts repo can be found here:

GitHub - openenergymonitor/EmonScripts: Emoncms Stack Installation and Update scripts

and this is the script that updates particular components
EmonScripts/update/update_component.sh at master · openenergymonitor/EmonScripts · GitHub

do you have SSH on your shared hosting, can you use git?

Thanks for the links.
The hosting is dreamhost have ssh, git just can’t run local daemons.

1 Like

That is indeed one hell of a deal!
I thought I had a pretty sweet deal at 16.55 USD per year for 4 TB of bandwidth per month on a VPS,
but yours is unlimited and they give you a free domain too. NICE!

They are doing $2.95 month promo for new accounts. Start the New Year with savings. - DreamHost

Can you see any way: EmonScripts/update_component.sh at master · openenergymonitor/EmonScripts · GitHub could run on a shared server @nchaveiro?

Or would it all need to move away from using git?

I think it will run, the only problem are the hardcoded absolute paths, optimally the scripts should reference to a local user folder.
Will take a look further on adding the support by calling from php directly.

Also, what is currently the usage for the /admin/components-available.json API, is there an UI that goes with it?

Update on this topic, added the new features to the components page to install/uninstall modules working with php at Revamp Admin Module by chaveiro · Pull Request #1732 · emoncms/emoncms · GitHub :