discourse_ynh
discourse_ynh copied to clipboard
Please handle the swap requirement as part of the installation / removal
Describe the feature
The installation has a requirement that swap with a minimal size be present, but the same requirement exists for GitLab and they handle it by creating / removing the needed swap as part of the app life-cycle.
Existing references in the GitLab app: https://github.com/YunoHost-Apps/gitlab_ynh/search?q=swap
I can confirm that the swap gave me trouble on install. Yunohost installer errors out with "You must have a swap partition in order to install and use this application", and I am now searching how best to create it and how large it should be.
Update: Swap instructions mentioned in https://github.com/YunoHost-Apps/discourse_ynh/issues/20#issuecomment-537192389 and documented on Discourse forum in this topic.
Note that the Discourse instruction recommend a swappiness of 10 ("Set the swappiness to 10 so its only uses as an emergency buffer"), but the Yunohost install script errors with "Your swappiness must be higher than 50; please see https://en.wikipedia.org/wiki/Swappiness". Setting a value of 60 worked, but AFAIU this can make Discourse slower.
I second that. I've had trouble installing Discourse Ynh without swap and had to provision it after I came across this issue. It would be great to reference that in the docs.
thanks
My issue isn't about documenting the need of swap, which has been fixed, but rather about having the install / remove process handle it, just like the GitLab app does
I also encountered these issues.
Thirding @uda's request - it would be much simpler if this was handled by the install script (and cleaned up afterwards)
Feel free to do a PR to implement the swap stuff ...
There is an experimental helper https://github.com/YunoHost-Apps/Experimental_helpers/blob/master/ynh_add_swap/ynh_add_swap used in gitlab
Note that the Discourse instruction recommend a swappiness of 10 ("Set the swappiness to 10 so its only uses as an emergency buffer"), but the Yunohost install script errors with "Your swappiness must be higher than 50; please see https://en.wikipedia.org/wiki/Swappiness".
Wouldn't this deserve an issue in its own right?