Closed pelger closed 7 years ago
@pelger being a devil's advocate here ... but what does following the compose syntax very closely really get us ?
I ask this, because in my past life building aegir, one of the most useful tools at my disposal was the old unix warhorse of having a 'something.d' folder.
In this case having a services.d
folder with each of the configs would help us add, remove and configure services without affecting the others, while being able to pick up the specific ones that changed.
But docker-compose doesn't support that, and if they keep on changing the format on us .. why bother using them as the native format?
It should be really straight forward to have a tool that generates the docker-compose file from however we configure things. We could also use a format heavily inspired by docker-compose.
what are your thoughts on this @mcollina ?
required for us to complete deployment story. assigning to myself.
:+1: for supporting the docker-compose format and avoid any supporting json. I would keep the internal data structure available (currently the one from nscale), just because of oast and deployment scripts. No problem in changing that, I will update oast in case, just let me know when the new format is rolled out.
Are you planning to update xeno as well?
will probably have to, but the changes should be minor. maybe even 1-liners.
The old compose format still exists, it's just nested in a top level 'services' key.
just re-read this thread, and i thought i should clarify. this issue is just about supporting docker-compose v2 syntax, not about splitting up the files into a services.d as I was suggesting.
this is going to be a much more painful change than I imagined at first. I just ran across this in the docker-compose docs on environment variables
Note: Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, the name of the linked service) as the hostname to connect to. See the docker-compose.yml documentation for details. Environment variables will only be populated if you’re using the legacy version 1 Compose file format.
So all the stuff we do with environment variables needs to go away, which means that all the services currently built in fuge will need to be changed once they go to the v2 compose format (provided they are using those env vars).
We also don't support container linking at the moment in fuge, and this would require us to have named containers, which has all kind of weirdness that would probably require us to rewrite a chunk of fuge-runner.
Then there's the question of supporting the old format in the same codebase, which is a lot of complexity / extra work.
Closing as latest version supports compose V2 & V3
Need to support V1 and V2 compose syntax https://blog.docker.com/2016/02/compose-1-6/