Installerless Drupal

Created on 5 May 2017, almost 8 years ago
Updated 21 July 2024, 9 months ago

Problem/Motivation

Mostly postponed on 🌱 [meta] Streamline the UI installer Active which would re-order installer steps, this would then be phase 2 after that to remove even more steps.

This has been discussed for several years, but usually deep in the weeds of installer refactoring issues.

The current installer relies heavily on the batch system and a wizard (database credentials, language, install profile, installing all the modules). This means you have to fill out several forms and watch a batch progress bar before you can do anything.

With linux distros, you often get a bootable disk that gives you a semi-working operating system without storage, which you can then install to disk. This allows for trying the distro without having to do as much initial work, it's a much more immediate experience, and it lets you browse the internet while the actual installer is running too.

I think we can get a lot closer to this with Drupal.

Proposed resolution

- ensure a new site can work without a database connection - will mean defaulting to file and memory-based implementations of some things, and adding the capability to read configuration from an export.

- the only choice at the start is to pick which install profile to run default configuration/content from and maybe language? Somehow the files directory needs to be optional too. This could be a single page form, with defaults so it's possible to simply click 'next'.

- We then give you a 'working' site immediately, with a reminder to configure the database to make it persistent - at which point you can either start from an install profile again or a config export of your current state. You then have to set up site name and other required things, but that could even be a tour + requirements warning rather than blocking? I try to use the UI installer at least sometimes so I can remember what it's like, and adding admin@example.com all the time (including when developing real sites until I know what that e-mail should be) gets annoying to be honest.

- @alexpott has suggested making the installer work like a config import instead of the one-off implementation we have today, that would be consistent with changing to this model.

Remaining tasks

Decide if this is something we want to do, and develop some actual requirements/wireframes of how it might look like.

User interface changes

API changes

Data model changes

🌱 Plan
Status

Postponed

Version

11.0 🔥

Component
Install 

Last updated about 5 hours ago

No maintainer
Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Needs product manager review

    It is used to alert the product manager core committer(s) that an issue represents a significant new feature, UI change, or change to the "user experience" of Drupal, and their signoff is needed. If an issue significantly affects the usability of Drupal, use Needs usability review instead (see the governance policy draft for more information).

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    I think now that

    … means that this issue is becoming relevant (and desirable) again. Imagine being able to try various complete recipes without having to set up DB/filesystem etc.

  • 🇬🇧United Kingdom catch

    For background reading on implementation, there are these two very old issues, however since the installer hasn't changed much in the meantime, a lot of the considerations are still relevant:

    #1226380: Generate minimal mocked or SQLite environment and use to install Drupal in full environment
    📌 [meta] Use a proper kernel for the installer Active

    I think the main focus of this issue should be - would it be desirable if the installer was a single form, ideally with as many defaults filled in as possible, which then takes you to a core recipe selection and/or project browser. If it is, then we can continue towards making it possible in the various issues that are trying to reduce the up-front installer work, but with getting to that point in mind a bit more.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    would it be desirable if the installer was a single form, ideally with as many defaults filled in as possible, which then takes you to a core recipe selection and/or project browser

    This sounds not just desirable, but AMAZING! 😄

    I'm not familiar with the two issues you linked. Is 📌 [meta] Use a proper kernel for the installer Active a blocker for this?

  • 🇬🇧United Kingdom catch

    I'm not familiar with the two issues you linked. Is #1530756: [meta] Use a proper kernel for the installer a blocker for this?

    Trying not to get into the depths of implementation too much here, but I guess we're only at #17 comments after seven years so maybe it won't hurt :P

    The biggest issue we still have, which I also brought up back in 2011 in #679112-13: Time for system.module and most of includes to commit seppuku is that the installer depends on system module.

    It does so less than it did in 2011, but we still rely on the batch API, which relies on the sessions table, which is defined in system_schema(), which is installed by install_begin_request().

    We would need a combination of 🌱 [meta] Replace hook_schema() implementations with ::ensureTableExists() Active and/or an apcu or file-based sessions storage implementation so that we can either have a session without a database, or have a session as soon as an initial form is submitted (which could be sqlite in the public file system by default).

    This might not be exclusive - if we still want to create user 1 and log the user in, we also need to do the {users_data} table which is user_install(), although that least is only currently a dependency of the end of the installer instead of the beginning of it currently. Either way the general principle is the same - we need the installer to function as an app, which doesn't have circular dependencies on arbitrary modules, so that it can install project browser before user and system module if possible.

    The other major part of this for me would be non-blocking batch UI, so that when you install a module from project browser or do other things in the installer, we can show an AJAX progress bar instead of an interstitial page that stops you looking at anything else.

  • 🇫🇷France andypost

    There was issue to ship minimal sqlite db for installer but I can't find the issue

  • 🇬🇧United Kingdom catch

    @andypost I think that was #1226380: Generate minimal mocked or SQLite environment and use to install Drupal in full environment .

    To add onto #15/#17 there is maybe a more high level view of this:

    1. Make the installer more minimal and self-contained - just requirements check and minimum configuration with defaults, selecting a language etc, but not site name, e-mails, user/1 etc. to enable Drupal to run in sandbox mode.

    2. We can then go to the actual sandboxed Drupal install, but with project browser as the first thing you see, allowing you to browse through recipes and modules (local and/or remote) and try them out.

    3. At some point we have to take the site from sandbox to a permanent site on a real database, but make that an optional process that you can do after experimenting.

    4. Keep drush and maybe UI support for skipping sandbox mode, this might be 'install from existing config'.

  • 🇫🇷France andypost

    Btw core already provides site-install (even from config) command and even #3089277: Provide core CLI commands for the most common features of drush

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    but I guess we're only at #17 comments after seven years so maybe it won't hurt :P

    hahhaha indeed 😆

    The high-level view in #19 paints a more complete picture of the UX that this issue is aiming for. And #17 dives into some (very much appreciated!) detail of what it'd take at a technical level to get there.

    It seems it all boils down to the Batch system and the infrastructure that needs. This makes me wonder … and I can't believe I'm about to write this but … do we truly need server-side sessions? Those are AFAICT necessary for A) determining how far a long-running operation got, B) security reasons, C) client closed connection and we want to continue the long running process.
    However, in this ephemeral demo-only context with no sensitive data and no traffic being served other than this one user, can't we get away with not using (server-side) session? And instead track the necessary metadata in https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage? That requires the server to trust the client, but in this context … that doesn't matter anyway? 🤔

    I probably am overlooking a crucial fact or five. Trying to think out of the box 🤓

  • Status changed to Postponed 9 months ago
  • 🇬🇧United Kingdom catch

    I've opened 🌱 [meta] Streamline the UI installer Active which is more about re-organising the order of the installer with project browser et al - installerless Drupal doesn't mean anything if you still have to choose an install profile in step 2. So I'm postponing this issue on that (and moving it to core since I can never find it when I'm looking for it).

Production build 0.71.5 2024