Skip to content
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

Preparing all environments during prebuild #46

Merged
merged 76 commits into from
Nov 20, 2021
Merged

Preparing all environments during prebuild #46

merged 76 commits into from
Nov 20, 2021

Conversation

shaal
Copy link
Owner

@shaal shaal commented Oct 1, 2021

The Problem/Issue/Bug

Fixes #44

How this PR Solves The Problem

Create ready-made environments for all Drupal supported versions, in 3 site-installs (minimal, standard, demo_umami)

Extension should allow choosing between:

  • QuickStart (fast)
  • Full re-install (slow)

When QuickStart is selected, the ready-made environment (/ready-made-envs) should be copied to the main directory
Afterwards, patches can be applied and other modules can be downloaded.

Additional details

I think I figured a trick to reduce the prebuild time, from 25 minutes to under 2 minutes:
The goal is to minimize DrupalPod's downtime when a prebuild has to run.

The idea is that before merging a PR into DrupalPod, I'll enter the workspace of that PR, and run the script that prepare the environments.
Running that script takes about 25 minutes, because it runs 3 profile installations (minimal, standard, umami) for each of the 5 Drupal supported versions.
~8.9
8.9.x-dev
~9.2'
9.2.x-dev
9.3.x-dev
At the end of the script, it creates tar.gz file from all the directories and files generated, including the ddev snapshot backups. (2.8GB -> 190MB)
Then I run npx serve and configure the port it's using (5000) public.
I will merge PR to main and add a commit of the URL where all the directories can be fetched.

The result - instead of waiting for a script to run in prebuild for 25 minutes, the prebuild only needs to download tar.gz file and extract it, this is done across 2 gitpod workspaces and takes less than 1 minute.
🏆

Manual Testing Instructions

Related Issue Link(s)

Release/Deployment notes

@shaal shaal marked this pull request as draft October 1, 2021 20:37
@shaal shaal marked this pull request as ready for review November 16, 2021 16:45
@Decipher
Copy link
Contributor

@shaal

The first test I did, 9.2, no profile:

  1. Failed the first time, but pretty certain it was a random failure.
  2. Finished the second time, but had installed the Umami profile, I considered maybe this was a user error thing,
  3. Finished again, definitely set 9.2 no profile, it still had a Umami profile install

@shaal shaal merged commit abc0c44 into main Nov 20, 2021
@shaal shaal deleted the ready-made-envs branch November 21, 2021 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a working DrupalPod workspace much faster
2 participants