Problem/Motivation

I have created a browser extension that replaces Gitpod with Drupal Forge. This launches an environment with all the parameters available as environment variables. For this to work, we need a repository with DevPanel deployment scripts.

Steps to reproduce

  1. Use the Drupal Forge browser extension to launch a cloud contribution environment.
  2. Attempt to visit the site. An error page appears.
  3. Open the cloud VS Code editor. Note that the /var/www/html directory is empty.

Proposed resolution

Drupal Forge will build containers based on files in .devpanel folder of the repository passed in the launch URL.

Remaining tasks

  1. Create DevPanel startup files.
  2. Test on DevPanel.
    1. Fork https://github.com/darrenoh/DrupalPod.
    2. Log in at https://staging.site.devpanel.com.
    3. Create a D11 project from your DrupalPod fork.
    4. Launch an app from the DrupalPod branch.
  3. Work with the DevPanel team to build the cloud contribution environment from the repository passed in the launch URL.

User interface changes

  1. Works with the Drupal Forge browser extension.
  2. Runs on Drupal Forge instead of Gitpod.

API changes

Drupal Forge does not have the resources to run Docker-in-Docker. Until we set up an alternative way to run DDEV, we cannot use DDEV to configure containers. As an alternative, we rely on new URL parameters to set up configuration.

  • DP_IMAGE: A Docker Hub image identifier. Use whatever image you want. Defaults to devpanel/php:8.3-base. You can use devpanel/php:8.2-base for PHP 8.2.
  • DP_REPO_BRANCH: URL of the repo and branch containing the startup scripts you want to use. Defaults to https://git.drupalcode.org/issue/drupalpod-3504317/-/tree/drupalforge.
  • DP_APP_ROOT: File path of directory to install the repo. Defaults to /var/www/html.
  • DP_WEB_ROOT: Web root directory file path. Defaults to /var/www/html/web.
  • DP_RUN_SCRIPT: The script in the $APP_ROOT/.devpanel directory to run when the container starts up. Defaults to init.sh

Data model changes

None.

Issue fork drupalpod-3504317

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • drupalforge Comparechanges, plain diff MR !12
  • test123 Comparecompare
  • gitpod-test Comparecompare
  • gitpod-test3 Comparecompare
  • gitpod-test2 Comparecompare
  • testing123 Comparecompare
  • testing-new-123 Comparecompare
  • main Comparecompare

Comments

darren oh created an issue. See original summary.

darren oh’s picture

Status: Active » Needs review
darren oh’s picture

Issue summary: View changes
darren oh’s picture

Issue summary: View changes
realityloop’s picture

@darren oh can you please explain in a bit more detail whats the blocker and whats required to get around the dind issue?

darren oh’s picture

The blocker for Docker-in-Docker is that it requires at least 8G of memory and we can only afford cheap hosting. To get around that we would need a version of DDEV that can manage other containers in a cluster. The version of DDEV we have now was originally called DDEV Local and has to run on the machine that hosts the containers. There was a companion product called DDEV Cloud acquired by Platform.sh that might serve our needs if Platform.sh allows us to use it.

darren oh’s picture

Issue summary: View changes
darren oh’s picture

Issue summary: View changes
rfay’s picture

Thanks for working on this important project!

I'm trying this out. Some nits in the presentation: The grammar and usage can be improved.

"This can take up a few minutes" -> "This can take a few minutes"

"Access to DevPanel to work more Powerful" -> (Rethink this to say what you want. It's not meaningful currently in normal English usage). Maybe "Use DevPanel to empower your work" or "DevPanel helps power your work" ?

* The build of this took a really, really long time and it didn't give any idea of how it was progressing or when it might complete. I gave up after waiting 15 minutes, but will leave the tab open to see if it ever completes. (https://dev.drupalforge.org/drupalpod/3dde90ea-f4e2-4e39-9b6d-7fa13f1d43bf)
* Since I haven't seen it yet... Is there a way to configure PHP version or related configuration?

darren oh’s picture

Hi Randy, thanks for checking it out. Your feedback is appreciated. The configuration is determined by URL parameters.

darren oh’s picture

Issue summary: View changes
rfay’s picture

The build completed after 20-25 minutes.

I see it's PHP 8.3, and `composer install` worked.

`composer require drush/drush` never seemed to return, no output given. I guess this is just amazingly slow.

I also tried `time composer require drupal/search_api_solr` to see what would happen and if it would be usable after that. It took 6 minutes.

I tried to log into the application, but was unable to, not knowing the username (or maybe the password?)

`composer require drush/drush` got me able to do a `drush uli`, but it took 5:40 to complete

Having two separate UIs (the application and the VS Code) is a little complex, but I would think people could learn how to navigate it.

Right now, it's the overall performance that makes this way too hard to use.

@darren I don't see any option in the extension UI to choose a PHP version, and since it can't be changed other ways, it's a bit complex. I would certainly think people would expect that capability.

The git version I checked out is not what I expect, I asked for 11.x, but I get drupalforge instead. It's really unclear what I should be doing to look at the MR I checked out.

rfay’s picture

Oh, I see drupal is installed in repos/drupal, as it was in Drupalpod. I always hoped that would get fixed and be more obvious, it's too bad that it has landed here :(

The suggestion in Drupalpod was that the drupal code might land in /workspace/drupal and the VS Code interface be opened there by default. Maybe you'll be able to do something like that.

darren oh’s picture

We found out the DevPanel developers were giving us under-powered containers. This has been fixed and it spun up in 4 minutes in my last test. I'm planning to build an optimized image to reduce launch time further. I appreciate the suggestions for improvement. I’m thinking to keep review for this issue manageable we should make the fewest possible changes to DrupalPod itself until after this is merged in.

rfay’s picture

Thanks, I'll give it another go when you say it's ready.

lostcarpark’s picture

I did some testing and found it worked well. It took about 6 minutes to spin up, which is pretty good going. I like the way it gives you a control panel that lets you launch the site and the VSCode environment separately. I found the tiny site window in the corner of the old DrupalPod less useful.

I haven't tried pushing to a repo yet. I'll try that and post when I do.

rfay’s picture

I tried again this morning. Waited 25 minutes for the build before moving on to something else. https://dev.drupalforge.org/drupalpod/bcec9fb8-ef6b-4dcc-984e-9c4d23d09662

Edit: The build completed after about 90 minutes, but of course by then I wasn't watching closely. I know it wasn't done after 60 minutes.

I think the goal should be <2-3 minutes to be useful.

rfay’s picture

When it completed, I got an untrusted URL for the VS Code interface at https://cs-dev-306b2ae7-80a772f5-aft17lcv.cms-devpanel.click/

The cert was issued to `localhost`, not to *devpanel.click.

Your connection is not private
Attackers might be trying to steal your information from cs-dev-306b2ae7-80a772f5-aft17lcv.cms-devpanel.click (for example, passwords, messages, or credit cards). Learn more about this warning
net::ERR_CERT_AUTHORITY_INVALID
Subject: localhost

Issuer: localhost

Expires on: Jan 18, 2038

Current date: Mar 10, 2025

PEM encoded chain:
-----BEGIN CERTIFICATE-----
MIICNzCCAd2gAwIBAgIRAOOlAFcVJt3VNDllSx6THDEwCgYIKoZIzj0EAwIwdTEL
MAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBG
cmFuY2lzY28xDTALBgNVBAoMBEtvbmcxFjAUBgNVBAsMDUlUIERlcGFydG1lbnQx
EjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0yNTAyMTgxMzMyMTFaFw0zODAxMTkwMzE0
MDhaMHUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQH
DA1TYW4gRnJhbmNpc2NvMQ0wCwYDVQQKDARLb25nMRYwFAYDVQQLDA1JVCBEZXBh
cnRtZW50MRIwEAYDVQQDDAlsb2NhbGhvc3QwWTATBgcqhkjOPQIBBggqhkjOPQMB
BwNCAAQiE6cjCQcKa68YCAfbPtQnm1mCaQZaY8+6Efom3/0zTkwzVrbu09BPQjn0
T4I/ehSkLZN7mpOeCZvk2ovlf/wXo04wTDAMBgNVHRMBAf8EAjAAMB0GA1UdJQQW
MBQGCCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUpDjlZngv5rZGPUElbikL
pKPQMTEwCgYIKoZIzj0EAwIDSAAwRQIhALNrzY6ooNfEkXIiEQNg1hus8i43YzRH
RZhSblU7kfGYAiAs6NzbzHvUM37ZRHlslOVja2pioONHMwTbVREAX/eGcA==
-----END CERTIFICATE-----
rfay’s picture

`time composer update --with-all-dependencies` (with no changes to the composer config) took 1m20s.

mradcliffe’s picture

By using this website, you warrant on behalf of yourself, your users, and other parties you represent that you will not:

Modify, copy, prepare derivative works of, decompile, or reverse engineer any materials and software contained on this website;

I am going to assume that merging DevPanel related functionality will not make DrupalPod a derivative work of DevPanel.

markie’s picture

Was going through the instructions at https://www.drupal.org/docs/develop/development-tools/drupalpod/drupalpo... and am curious why drupalforge uses https instead of ssh to checkout the forks? It would be much simpler with a single ssh key instead of having to enter the username and password... This is how drupalpod was set up and once you have your ssh keys set up in gitlab, it's a much smoother process.

markie’s picture

additionally, application keys expire.. wu tang is forever..

in this instance 'wu tang' === 'ssh keys'

adrianm6254’s picture

FYI,

In the dependent document, 'DrupalPod + Drupal Forge' (https://www.drupal.org/docs/develop/development-tools/drupalpod/drupalpo...) the instructions read:

3. Login to drupal.org and use this test issue: https://www.drupal.org/project/drupal/issues/3444906
4. From the test issue, open the Drupal Forge helper extension in your browser’s toolbar, and select:
1. Branch: junk_experiment_2
2. Drupal core version: 11.x
3. Install profile: Standard

When using Branch 'junk_experiment_2'or '3444906-alison' the Drupal Forge build fails.

The error message I get is 'Could not find your application. Contact us for more information'

adrianm6254’s picture

Issue tags: +Midcamp2025
mradcliffe’s picture

Status: Needs review » Reviewed & tested by the community

Sorry it took me so long to get to this. I ran through with the browser extension to test the deployment scripts and I think the deployment scripts are working fine in DrupalPod. +1.

  • mradcliffe committed 80224e0c on main authored by darren oh
    [#3504317] feat: Add deployment scripts for Drupal Forge
    
    By: darren oh...
mradcliffe’s picture

Status: Reviewed & tested by the community » Fixed

I went ahead and added Darren and myself to be able to merge so that I could merge.

I did not delete the Source branch to not break any existing browser extension configuration, but we should update to use the source repository now.

Thank you everyone.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.