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
- Use the Drupal Forge browser extension to launch a cloud contribution environment.
- Attempt to visit the site. An error page appears.
- 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
Create DevPanel startup files.Test on DevPanel.- Fork https://github.com/darrenoh/DrupalPod.
- Log in at https://staging.site.devpanel.com.
- Create a D11 project from your DrupalPod fork.
- Launch an app from the DrupalPod branch.
Work with the DevPanel team to build the cloud contribution environment from the repository passed in the launch URL.
User interface changes
- Works with the Drupal Forge browser extension.
- 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
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:
Comments
Comment #3
darren ohComment #4
darren ohComment #5
darren ohComment #6
realityloop commented@darren oh can you please explain in a bit more detail whats the blocker and whats required to get around the dind issue?
Comment #7
darren ohThe 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.
Comment #8
darren ohComment #9
darren ohComment #10
rfayThanks 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?
Comment #11
darren ohHi Randy, thanks for checking it out. Your feedback is appreciated. The configuration is determined by URL parameters.
Comment #12
darren ohComment #13
rfayThe 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.
Comment #14
rfayOh, 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.
Comment #15
darren ohWe 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.
Comment #16
rfayThanks, I'll give it another go when you say it's ready.
Comment #17
lostcarpark commentedI 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.
Comment #18
rfayI 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-9c4d23d09662Edit: 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.
Comment #19
rfayWhen 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.
Comment #20
rfay`time composer update --with-all-dependencies` (with no changes to the composer config) took 1m20s.
Comment #21
mradcliffeI am going to assume that merging DevPanel related functionality will not make DrupalPod a derivative work of DevPanel.
Comment #22
markie commentedWas 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.
Comment #23
markie commentedadditionally, application keys expire.. wu tang is forever..
in this instance 'wu tang' === 'ssh keys'
Comment #24
adrianm6254 commentedFYI,
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'
Comment #25
adrianm6254 commentedComment #26
mradcliffeSorry 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.
Comment #28
mradcliffeI 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.