ddev / ddev

Docker-based local PHP+Node.js web development environments
https://ddev.com
Apache License 2.0
2.65k stars 592 forks source link

Support `ddev pull` for Platform.sh white-label partners #6534

Open nicogommen opened 1 week ago

nicogommen commented 1 week ago

Is there an existing issue for this?

Is your feature request related to a problem?

For users of a Platform.sh white-label partner, such as Ibexa Cloud, ddev/ddev-platformsh and ddev pull platform are currently not working. This is because ddev pull platform is using by default the platform CLI, whereas white-label partners have their own CLI. For instance for Ibexa Cloud, the CLI is ibexa_cloud, and can be installed via https://cli.ibexa.cloud/

Describe your solution

The proposed solution would be to have a dedicated ddev pull command for each Platform.sh white-label partner using ddev. For instance ddev pull ibexa_cloud for Ibexa Cloud. It would do exactly the same as ddev pull platform, but using Ibexa Cloud CLI (ibexa_cloud) instead of platform CLI.

Describe alternatives

No response

Additional context

This test project can be used for Ibexa Cloud => https://console.ibexa.cloud/ibexa-cloud-internal-testing/4dz4gstt4twgo

Slack discussion leading to this issue: https://platformsh.slack.com/archives/CGABWJW4B/p1724850686789249

rfay commented 1 week ago

You say that ddev/ddev-platformsh is not working... I thought it was working fine, the problem was ddev pull platform ?

rfay commented 1 week ago

IMO the best way to start an implementation here is to create an add-on (ddev-ibexa-cloud ?) that

rfay commented 1 week ago

Some one, I think you, said that it would be possible to make the platform cli behave exactly the same as ibexa_cloud. Could you reiterate that technique, and is it a reasonable and sustainable thing to do?

nicogommen commented 1 week ago

You say that ddev/ddev-platformsh is not working... I thought it was working fine, the problem was ddev pull platform ?

Right, installing ddev/ddev-platformsh is working, it's ddev pull platform that is not (+ maybe any other command brought by ddev/ddev-platformsh that is using the CLI).

rfay commented 1 week ago

ddev/ddev-platformsh doesn't use the CLI at all. But if you have a concern about it, I'm all ears.

pjcdawkins commented 1 week ago

@rfay

Some one, I think you, said that it would be possible to make the platform cli behave exactly the same as ibexa_cloud. Could you reiterate that technique, and is it a reasonable and sustainable thing to do?

Reiterating:

# Get the Ibexa config YAML somehow, for example from an installed CLI:
ibexa_cloud self:config > /tmp/ibexa-cli-config.yaml

# Run the platform CLI substituting the config:
CLI_CONFIG_FILE=/tmp/ibexa-cli-config.yaml platform # ...

It's reasonable. Whether it's sustainable depends on that first step I suppose. The config is maintained in an internal GitLab file, and it can be exposed through the CLI's self:config file. Maybe we should host it online, like somewhere under https://cli.ibexa.co ?

The parts of the config that make the most (non-cosmetic difference) are the URLs and the vendor_filter under api - example.

rfay commented 6 days ago

There's a conversation in play in Platform.sh slack about the possibility of using one go binary (the platform CLI) for each of the white-label partners. Letting that play out a bit, as it would be great for all involved, not just for this issue.