-
Notifications
You must be signed in to change notification settings - Fork 512
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
Chaveiro component manager #1765
base: master
Are you sure you want to change the base?
Conversation
- log level on original place - component location readded on object
Fix follow: - Make use of json result codes for all errors across admin views (components, log, firmware and update) - Deal with lack of redis - Fix state machine of update log when neede only to see last messages - Minor ui fixs - Uniform code across te modules - Remove absolute paths from script files (use config base path instead) - Preparation for future components update without redis
Undeclared variables gives warnings
Fixes: - More absolute path fix - Use model class the right way: remove static and global 'nightmare' - User list view return link - Move service-runner run responsability to the model class
- Added support for running services from PHP when redis not available
- show all services states - added machine brand model bios description - added cpu info
forgotten css fix
- Added php native support for components update
Add components available list Add component install Add component uninstall
- add support for available updates check - rename firmware_view to serialmonitor_view
Make the menu-l2-controls stick to the bottom left when menu scrollbars appear due to small screen size.
Move views to ./Views/ folder
- Check symbolic link - Added current user info to main admin page
Hello @chaveiro I'm holding off on merging this for now as I would really prefer to only maintain one way of installing, updating, uninstalling modules rather than having both the script calls and the php implementation to maintain. Your php approach is a good suggestion and I will definitely consider it carefully when I bring my focus back to this side of emoncms development. I have merged everything else and given you a pull request here to fix the conflicts that were created https://github.com/chaveiro/emoncms/pull/3. A couple of questions I have that I'm still thinking about are:
Id say that my general feeling on this, even though I do quite like your php implementation, is that the EmonScripts install scripts approach is there already to give users a consistent way of installing the full emoncms stack, reusing that code from within emoncms for installing and updating components is an advantage as it avoids code duplication and maintaining multiple versions of the same thing. To add this additional code to support environments without the ability to run the EmonScripts is Im not sure worth it. Likewise with things like the option to use emoncms without redis. There are cheap VPS services out there now that can provide all the requirements that emoncms needs, Emoncms is free and development time is limited , I would really prefer to target a specific environment and have it work well in that environment, rather than try to maintain in perpetuity support for a lot of different environments. |
Hi Trystan,
The approuch is to have a 'emoncms' user owning the files and running httpd so not to be www-data that may be running other websites that in case of a security compromise all is restricted to that user only.
Some may require and some don't, usualy the ones that require are not related to the Web interface but are the core backend services, not possible to install on shared servers anyway. Even for those, php can run sh scripts with the right permissions. Maybe just need to warn the user when it can't be done due to permitions restrictions.
Wouldn't be better to think on an unique solution that targets the many environments in decrement of a solution that targets only one? If we look at current trends, shared hosting is not popular anymore (but still the cheapest) future is aligned with automation and having docker images as virtualization. See https://hub.docker.com/_/wordpress for inspiration. So you update core docker image and then install / update plugins via the admin interface. |
As a side note, do you have statistics of how many users are using raspberrypi, shared hosting, emoncms.org or vps currently? |
Thanks @chaveiro Yes I think docker would be the other environment that would be good to target. My understanding from chatting to others is that the application should not really be able to modify the components installed in a docker image, it should be modified from the docker file itself.. it would mean of course restricting all component install, update, uninstall actions on the docker image.. Im not convinced that we have to adhere to this principle, if it is a principle at all? Are you familiar with how wordpress handles plugins within it's docker container? I guess it must allow modification of the installation? |
I don't unfortunately have stats as to how many users use emoncms in different environments, all I can say is that we havent actively tried to support shared, wamp, mamp beyond those initial install guide written maybe 6-7 years ago, and when users ask about support for issues on custom installs we generally suggest installing using EmonScripts as there's always a so many different variables that can affect an installation otherwise. My guess would be:
|
Handling these background services is more complicated on docker as well, from my understanding, in principle each service should have it's own container, but it does all get quite complicated fast when you need a service for emoncms_mqtt, feedwriter, demandshaper, service-runner etc ... and then the web frontend is designed to work with services running as systemd which is not usually an option in a docker container.. or at least in the containers we've developed so far. Is there a better way (or at least more practical way) to run these background scripts and services within a docker environment and then manage them from the frontend I wonder? |
I probably need to get some time to look at the docker side of things again... |
Not familiar but a google search helped with this: https://stackoverflow.com/questions/50119409/how-to-update-wordpress-on-docker
Two option for docker interconnection: network (mysql, redis, apis) or shared files on the host (volumes) |
Thanks @chaveiro ok I think the next step for me is to spend some more time looking into the emoncms docker image and to think how best to handle things in things in that environment. Then with the result of that research come back to this pull request. |
See original pull request: #1732 by @chaveiro
This pull request fixes the conflicts that arose from my original partial merge.
Review still in progress