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

Implement PLATFORM_RELATIONSHIPS, fixes #9 #48

Merged
merged 12 commits into from
Nov 7, 2022

Conversation

rfay
Copy link
Member

@rfay rfay commented Oct 29, 2022

This implements PLATFORM_RELATIONSHIPS with local DDEV-based values.

  • mariadb/mysql/postgres
  • elasticsearch
  • redis
  • memcached

This can be tested with

ddev get https://github.com/rfay/ddev-platformsh/tarball/20221024_platform_relationships

TODO:

  • The scripts to generate relationships should go into a gitignored directory.

@rfay
Copy link
Member Author

rfay commented Oct 29, 2022

"scheme": "${dbscheme}",
"service": "${dbservice}",
"fragment": null,
"ip": "169.254.118.116",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an fixed IP in DDEV or just dummy? (same question for the other services below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dummy. I'm hoping nothing uses it. It would be better as an obvious dummy, like 255.255.255.255. If it's actually used, we would have to figure it out at ddev start time instead of here, which may be what we want anyway. So worth considering moving all this generation to ddev start time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also would be reasonable to put hostname here, but not sure if that would break something. Changed this to use 255.255.255.255 for now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. We can't use a hostname here, since we have a dedicated hostname property.
We'll probably need to indeed figure it out at ddev start, but this may be a follow-up task.
WDYT @gilzow ?

Copy link
Collaborator

@lolautruche lolautruche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the services (DB, elasticsearch, memcached, redis) change e.g. the port they expose?

generate_redis_relationship.sh Outdated Show resolved Hide resolved
generate_db_relationship.sh Outdated Show resolved Hide resolved
generate_elasticsearch_relationship.sh Outdated Show resolved Hide resolved
generate_memcached_relationship.sh Outdated Show resolved Hide resolved
generate_redis_relationship.sh Outdated Show resolved Hide resolved
@rfay rfay force-pushed the 20221024_platform_relationships branch from 5964328 to 78f15a5 Compare November 7, 2022 17:37
@rfay rfay mentioned this pull request Nov 7, 2022
@rfay rfay merged commit 65493c9 into ddev:main Nov 7, 2022
@rfay rfay deleted the 20221024_platform_relationships branch November 7, 2022 17:52
@lolautruche
Copy link
Collaborator

This is great!
However, I wonder why you removed the platform.yaml provider.

@rfay
Copy link
Member Author

rfay commented Nov 8, 2022

DDEV automatically provides platform.yaml (and has for several months). It's the version that was originally developed for the add-on. And ddev start overwrites it anyway with DDEV's own version.

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