mdenet / educationplatform

Eclipse Public License 2.0
2 stars 3 forks source link

Launch profiles dev/prod #143

Open arturboronat opened 8 months ago

arturboronat commented 8 months ago

I usually debug an activity configuration locally in a docker image before uploading it to a public git repository for production use. This practice involves adjusting the configuration of tool URLs within the activity multiple times, depending on whether the activity is intended for development or production use.

It would greatly enhance the development workflow if a launch flag, such as --dev, could be incorporated when initiating the platform. This flag would enable the system to retrieve tool URLs from the tools-dev section rather than the standard tools section in the configuration, offering a more streamlined approach to managing these URLs.

Here is a representation of the YAML configuration illustrating the scenario:

    tools-dev:
      - http://127.0.0.1:8073/emf-tool.yml
      - http://127.0.0.1:8500/yamtl-m2m.yml
    tools:
      - https://yamtl.github.io/playground-interfaces/static.emf/emf-tool.yml
      - https://yamtl.github.io/playground-interfaces/static.yamtlgroovy/yamtl-m2m.yml
agarciadom commented 8 months ago

Wouldn't it make more sense to just load a different activity file during development? That's what I do for my own activity (I have a -hosted.json version):

https://github.com/agarciadom/mdenet-mde-ci-tutorial/

It may make more sense to allow for some level of modularity (e.g. some type of "import" functionality), rather than supporting specific -dev versions. Otherwise, people could in principle just ask for -dev versions of every single option.

arturboronat commented 8 months ago

In principle yes, at the expense of adding duplication and some manual work on the developer side.

agarciadom commented 8 months ago

Yes, but in principle you can do most of the development with one version, and then copy + tweak. But generally, I think the idea of supporting some modularity in activity descriptions (as in imports) would be a longer-term solution for this.

arturboronat commented 8 months ago

As long as we find a solution where the activity file does not need to change for debug/deployment, I'm happy with it.