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

Gitpod integration for website projects, for #3283 #3371

Merged
merged 54 commits into from Dec 7, 2021

Conversation

rfay
Copy link
Member

@rfay rfay commented Nov 16, 2021

The Problem/Issue/Bug:

DDEV has long had easy gitpod.io integration to test DDEV, but now it will have a way to

  1. Launch a gitpod instance for any project (on github or gitlab) with a special URL
  2. Add gitpod configuration to any project

How this PR Solves The Problem:

Allows starting any project in gitpod (without prior configuration) using a URL like https://gitpod.io/#DDEV_REPO=https%3A%2F%2Fgithub.com%2Fdrud%2Fd9simple,DDEV_BRANCH=main,DDEV_ARTIFACTS=https%3A%2F%2Fgithub.com%2Frfay%2Fjunk-demo-shaal-artifacts,/https://github.com/rfay/ddev/tree/20211101_gitpod_experiments

where

  • DDEV_REPO: git Repository with the code
  • DDEV_BRANCH: Branch of repository to check out
  • DDEV_ARTIFACTS: git repository with db.sql.gz and files.tgz available when you check it out on default branch

Both DDEV_REPO and DDEV_ARTIFACTS should be https URLs to projects that your gitpod instance has permissions on. They can be public or private. In the example above, the repositories are public.

TODO

  • Form builder that will generate the complex URL and let people click it.
  • It's just wrong that vscode opens ddev instead of the target project here. How can I get it to open the target project... I guess DrupalPod is doing that successfully
  • Docs
  • Review code carefully
  • Screencast demonstration
  • Solve problem when you restart a project and it configs the wrong place.

Manual Testing Instructions:

Automated Testing Overview:

I suspect this won't get automated testing.

Related Issue Link(s):

@rfay rfay force-pushed the 20211101_gitpod_experiments branch from 2ca487c to bbbbb87 Compare November 23, 2021 22:14
@rfay rfay changed the title Gitpod integration for website projects Gitpod integration for website projects, for #3283 Nov 24, 2021
@rfay rfay marked this pull request as ready for review November 24, 2021 22:12
@shaal
Copy link
Collaborator

shaal commented Dec 1, 2021

@rfay I think .gitpod.yml ports section should be updated to -

ports:
  # Ignore host https port
  - port: 8443
    onOpen: ignore
  # Direct-connect ddev-webserver port that is the main port
  - port: 8080
    onOpen: ignore
  # Currently un-notified and unsupported mailhog https port
  - port: 8027
    onOpen: ignore
  # Currently un-notified and unsupported phpmyadmin https port
  - port: 8037
    onOpen: ignore
  # xdebug port
  - port: 9000
    onOpen: ignore

@shaal
Copy link
Collaborator

shaal commented Dec 1, 2021

@rfay when running ddev st in Gitpod, I see

┌──────────────────────────────────────────────────────────────────────────────────────────────┐
│ Project: d9simple /workspace/d9simple https://8080-peach-kangaroo-nzkcbu8t.ws-us20.gitpod.io │
├─────────┬──────┬────────────────────────────────────────────────────────┬────────────────────┤
│ SERVICE │ STAT │ URL/PORT                                               │ INFO               │
├─────────┼──────┼────────────────────────────────────────────────────────┼────────────────────┤
│ web     │ OK   │ https://8080-peach-kangaroo-nzkcbu8t.ws-us20.gitpod.io │ drupal9 PHP7.4     │
│         │      │ InDocker: ddev-d9simple-web:443,80,8025                │ nginx-fpm          │
│         │      │ Host: localhost:8443,8080,8027                         │ docroot:'web'      │
├─────────┼──────┼────────────────────────────────────────────────────────┼────────────────────┤
│ db      │ OK   │ InDocker: ddev-d9simple-db:3306                        │ MariaDB 10.3       │
│         │      │ Host: localhost:49153                                  │ User/Pass: 'db/db' │
│         │      │                                                        │ or 'root/root'     │
├─────────┼──────┼────────────────────────────────────────────────────────┼────────────────────┤
│ Network │      │ bind-all-interfaces ENABLED                            │                    │
└─────────┴──────┴────────────────────────────────────────────────────────┴────────────────────┘

I don't think phpmyadmin is working in Gitpod due to the changes in this PR (MailHog is working, with updated port, which I mentioned in the previous comment)

@rfay
Copy link
Member Author

rfay commented Dec 1, 2021

Thanks for taking a look!

  • phpmyadmin is deliberately turned off
  • It's hard to tell from your comment in Gitpod integration for website projects, for #3283 #3371 (comment) what it is you want to change. Please give a hint what you're suggesting to change. Otherwise I have to open that file and compare line-by-line with what you've given. What is it you want to change and why? (Note that there's no problem having ignored ports that don't actually get used.)

@shaal
Copy link
Collaborator

shaal commented Dec 1, 2021

Sorry I didn't write a clear comment.
I wasn't sure if I should create a PR for the PR, I'll be happy to do that if it makes it easier.

Any port that appears in .gitpod.yml gets displayed in Remote Explorer panel in Gitpod. With ports that are not needed, I think it adds unnecessary noise.

I suggest deleting the ports section in the current .gitpod.yml, and replace it with the code I added in the comment.

Regarding PhpMyAdmin, I think it's nice to showcase it (just like it's nice having MailHog), and the user can decide turning it off.

@rfay
Copy link
Member Author

rfay commented Dec 1, 2021

  • The setup here is primarily for developing ddev. PHPMyAdmin really isn't needed IMO
  • For general web developer use, a PR to https://github.com/drud/ddev-gitpod-launcher would be very welcome if you think PHPMyAdmin is useful there.

@rfay rfay force-pushed the 20211101_gitpod_experiments branch 2 times, most recently from 1f13be5 to 6949991 Compare December 6, 2021 22:22
@rfay rfay force-pushed the 20211101_gitpod_experiments branch from 6949991 to 837211a Compare December 7, 2021 04:44
@rfay rfay merged commit d6108ae into ddev:master Dec 7, 2021
@rfay rfay deleted the 20211101_gitpod_experiments branch December 7, 2021 23:38
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.

None yet

2 participants