compose-x / ecs_composex

Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definitions
https://docs.compose-x.io
Mozilla Public License 2.0
164 stars 17 forks source link

[DESIGN] Allow for external modules to have a mapping of resources and modules to load #611

Closed JohnPreston closed 1 year ago

JohnPreston commented 2 years ago

As a developer for an external ecs compose-x module, I might have multiple x-<resource> and models to load from the same repository. Currently I'd have to create one ecs-compose-x extension module per resource and define dependencies with each other.

It'd be much better potentially to have in the init.py an attribute that would indicate

for example

with a repository / package called ecs_composex_msk_cluster, which by default would manage x-msk_cluster, we could have in __init__.py something as follows

MODULES_MAPPINGS = {
  "x-msk_cluster": {"relpath": "./msk_cluster", "abspath": path.abspath("./msk_cluster")},
  "x-msk_configuration": {"rel_path": "./msk_config", "abspath": path.abspath("./msk_config")}
}

by extension, we could further expand the logic and add

and implement that in the core modules of compose-x.

JohnPreston commented 2 years ago

In progress - modules will maintain the inventory of resources, new or lookup. Settings maintains the list of modules. So the settings.compose_content does not need to have the resources updated anymore.

JohnPreston commented 1 year ago

Releasing with 0.23

JohnPreston commented 1 year ago

Released with v0.23.0 #650