Open DarrenSchwartz opened 5 years ago
@noGitForYou Thanks for your suggestion.
However I think it is fine as it is, for the following reason:
CertBot
itself does not depend on a webserver. It even brings it's own internal standalone webserver that can be used to get a certificate. E.g. you have a Java
or Node.js
application with web interface, so do not need a dedicated webserver, but certificates.DietPi-LetsEncrypt
is another topic. it uses CertBot
to retrieve SSL certificates and installs them to an installed webserver, so it depends on CertBot as well as on a webserver to do something, that's true.dietpi-software
directly from dietpi-letsencrypt
, so users don't need to manually do that. But it is not 100% perfect, since currently Minio S3
is also detected as webserver by DietPi-LetsEncrypt, even that it is isn't one, just a standalone web interface application 🤔.What I have in mind for the future of DietPi-LetsEncrypt is the following:
What is actually true and not ideal from my point of view is, that one cannot select a webserver independently currently. You can select a whole webserver stack instead (e.g. LAMP), that includes PHP and a database. In most cases you anyway want/need a whole webserver stack, but there might be cases where the webserver along would be sufficient. But to allow that, we also need to review the install script. since it currently expects at least PHP the be installed, AFAIK.
@MichaIng Thanks for your detailed reply. I think your plan for the future makes good sense. Your last comment highlights where my real concern lies. First I got the error from dietpi-letsencrypt about not having a web server installed, and I would have happily installed Lighttpd manually from dietpi-software, but didn't want the whole stack. Especially since installing a whole stack gives a somewhat cryptic warning message that makes you worry about screwing up your config.
It seems that if you view the software list using the command line with dietpi-software list
instead of dietpi-software, there is an option to just install Lighttpd and PHP together (software ID 84), but it is not visible as an option in dietpi-software. Also no entry for just installing the server without PHP. I guess its not the end of the world to install a whole stack, I'm just a minimalist by nature and I don't need the database or PHP.
@noGitForYou To address your initial suggestion a bid, I added some more info to the DietPi-Software error prompt, if no webserver was found: https://github.com/Fourdee/DietPi/commit/550c5495c559b64bb03b7db00c69cfdcb54834a6
I hope things are a bid clearer by this.
The initial intention was to clean up the menu and make it easier for users to fast find and select the stack they require. If we show the webservers and databases as well in the menu, the whole webserver category will look somehow messy, also due to the chosen install IDs (which we do not want to rearrange, every time out software offer changes). So I think either the stacks or only the individual webservers, databases and PHP (no stacks then) should show up.
What you can always do to install only a single software ID: dietpi-software install 84
But currently, webservers will always install PHP as hard coded dependency.
dietpi-software
will add it automatically anyway.@Fourdee What do you think?
@MichaIng I think your change to the dietpi-letsencrypt error handling is a simple and sufficient solution for the letsencrypt installation issue.
As for the web server dependency issue, I guess it's important not to over complicate the config, so if PHP comes along for the ride, I could get over it. Will leave it to you guys to decide whether the benefit outweighs the extra work.
Some of my discomfort comes from this error message when selecting a stack for installation:
DietPi will automatically install a webserver stack (based on your webserver Preference) when any software that requires a webserver is selected for installation (eg: ownCloud, Pi-hole etc). It is highly recommended that you allow DietPi to do this for you, ensuring compatibility and stability across DietPi installed programs. Please only select a webserver stack if you specifically require it, and, no other webserver stack is installed. TLDR: You do NOT need to select a webserver stack for installation with DietPi. Its all automatic.
So I had to select a stack because dietpi-letsencrypt did not automatically install the required web server (and the web server is not available individually for install in dietpi-software). Then this error message makes me worry that I'm screwing up my config by installing a stack manually. Maybe it's just a confusion with the wording of the error message?
Food for thought: maybe instead of selecting a stack in the "software optimized" list, the user could specify a database preference on the preceeding dietpi-software menu (the main dietpi-software menu where you specify web server preference). Then instead of a stack, dietpi-software could just install the required components when needed based on the user's preference (I think this is along the lines of what you mention above by removing the stacks and giving individual software choices).
@MichaIng
So I had to select a stack because dietpi-letsencrypt did not automatically install the required web server (and the web server is not available individually for install in dietpi-software).
Webserver stack should be a pre-req for Certbot, to be consistent with what users expect from our install system.
, I think we can switch/revert from webserver stack to individual webserver, database and PHP selection.
I believe this will open a can of worms and increase our support level. I'd personally prefer to only allow users to install a web-server stack that we pre-define.
Hmm, these should not install PHP/SQL unless they are specified.
aSOFTWARE_REQUIRES_WEBSERVER[$software_id]=1
aSOFTWARE_REQUIRES_PHP[$software_id]=1
aSOFTWARE_REQUIRES_SQLITE[$software_id]=1
EDIT: If I remember correctly, we enabled for all, need to go through them and check if we can remove any?
@Fourdee
Jep, databases can already be skipped, PHP currently not, if webserver selected. The auto pre-req selection will select PHP with any webserver automatically, doubled, since all webservers have aSOFTWARE_REQUIRES_PHP[$software_id]=1
as well.
Webserver stack should be a pre-req for Certbot, to be consistent with what users expect from our install system.
At least currently Minio S3 object server is handled separately without any webserver. So DietPi-LetsEncrypt will not show any error, if this is installed.
However, issue should be solved with: https://github.com/Fourdee/DietPi/issues/2363#issuecomment-449649984
I believe this will open a can of worms and increase our support level.
Not sure. I mean most users do not only install a webserver for their own manually built website, where they might need/expect PHP. Usually one installs a forum, wordpress, cloud or such a thing, which then installs everything according the dependency arrays anyway. However, currently the webserver installers expect PHP, so some coding required to separate this, more a midterm project, if any.
Another idea is moving all the webserver stuff to the other Linux software menu, making it more consistently one which contains software, that one usually doesn't want/need to install as standalone applications. With webserver choice system, database/PHP dependency arrays, everything is then correctly selected anyway 🤔.
Creating a bug report/issue:
Required Information:
cat /DietPi/dietpi/.version
G_DIETPI_VERSION_CORE=6 G_DIETPI_VERSION_SUB=19 G_DIETPI_VERSION_RC=7 G_GITBRANCH=master G_GITOWNER=Fourdee
Distro version |
echo $G_DISTRO_NAME
orcat /etc/debian_version
9.6Kernel version |
uname -a
Linux rpi3 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/LinuxSBC device |
echo $G_HW_MODEL_DESCRIPTION
or (EG: RPi3) RPi 3 Model B (armv7l)Power supply used | (EG: 5V 1A RAVpower) 5V 3.5 A USB power station
SDcard used | (EG: SanDisk ultra) Sandisk Ultra 16 GB
Additional Information (if applicable):
Software title | (EG: Nextcloud) Certbot
Was the software title installed freshly or updated/migrated? Yes, the Dietpi image was freshly installed. Certbot and a few other optimized software titles were installed from dietpi-software.
Can this issue be replicated on a fresh installation of DietPi? Yes.
dietpi-bugreport
IDSteps to reproduce:
Expected behaviour:
Actual behaviour:
Extra details: