Community
OpenEnergyMonitor

Community

Emoncms update with service runner on non emonpi installations

(Trystan Lea) #1

Noting the discussion here:
https://community.openenergymonitor.org/t/did-manual-update-to-9-9-9-beta-emoncms-no-database-update-like-earlier/10680/22

I have amended the master branch to show the update section by default:
https://github.com/emoncms/emoncms/commit/f8e1fe1a6b4b4206b68edd4bb23e266a20383a2c

and added an entry in default.settings.php which can be set to false to disable if needed:
https://github.com/emoncms/emoncms/commit/0159b1e96b1a3af1136dd45a8e23d5a90c8ab9f0

Service runner does work on non emonpi installs. The setting $homedir in settings.php needs to be set to the parent directory of the ‘emonpi’ repository: https://github.com/emoncms/emoncms/blob/master/default.settings.php#L75

e.g

$homedir = "/opt/emon";

the service runner paths will then use this instead of the previously hardcoded /home/pi/emonpi directory.
Ensure that the user setting is set in the service-runner service see service-runner installation guide.

A lot of work has been done throughout the emoncms system otherwise to improve support for non emonpi installations / flexible path settings. Documentation for this is ongoing and will be updated as part of the release of V1 of the install script.

0 Likes

(Brian Orpin) #2

Why do you need the emonpi repository when the service-runner service is now core?

It also seems to contradict the service-runner documentation.

As per the documentation which also gives the correct method to do this in case the service file is updated.

Yes and looking good.

Does the update script take into account non emonpi installs? i.e. the need to update all modules and update the installations of the services.

[edit] I have just realised the update scripts are in the emonpi rpository. I don’t think that is a good idea. I think they should be moved to core so a non emonpi/emonsd user does not need to clone the emonpi repo.

0 Likes

(Trystan Lea) #3

Thanks @borpin

I have made a start on a documentation page for the new update process in the emoncms repository here:
https://github.com/emoncms/emoncms/blob/master/docs/Update.md

The update scripts are all in the emonpi repository at the moment. As I mentioned before this location and name is intended to be temporary, I know we’ve discussed other names e.g EmonScripts.

I will change my post above to reflect recommended method of changing user name in service-runner

Yes, tested and working well on Ubuntu 16.04 LTS :slight_smile:, targeting debian systems more generally

1 Like

(Brian Orpin) #4

As you will see in my edit, I have just realised that :smile:.

1 Like

(Arunesh Dutta) #5

thanks all settled

2 Likes