-
Notifications
You must be signed in to change notification settings - Fork 553
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
Multi-platform support #74
Conversation
Signed-off-by: Stefan Ladage <sladage@gmail.com>
Signed-off-by: Stefan Ladage <sladage@gmail.com>
Ah, I see you didn't indent it to be recursive ;). I think this But if we do land this approach, I'd suggest at least making the |
I had not thought about making it recursive, that could actually work. Or if we don't make it recursive, it could load all matching configs. (each platform section being more specific) As for the walking trough a config dir solution, although simple, it could get messy having to update all configs which mostly contain the same info anyway. (not very efficient either) But yeah, let's see if someone has a better idea. |
On Fri, Jul 24, 2015 at 02:28:27PM -0700, Stefan Ladage wrote:
Yeah, but Dockerfile has had reasonable success with the KISS |
True, the simple approach is generally the better approach,just less flexible in this case. Even if we don't need the flexibility at this moment, we might in the future. Having said that, I actually like the config dir idea. We just have to be careful that we don't, in an attempt to keep things simple, end up with a specification that is too inflexible. Not that I think it is an issue here, just something to keep in mind. |
On Fri, Jul 24, 2015 at 03:18:41PM -0700, Stefan Ladage wrote:
I'll write up a PR. |
To allow a single bundle to be cross-platform. I've tried to add enough context to motivate the additional complexity without adding so much that the context distracts from the spec changes. The tie-breaking version ranking (step (2) for picking the best config file) also make it possible to write backwards-compatible bundles that still take advantage of new features when possible. For example, placing v1.0, v1.6, and v2.0 configs in the same directory would let you run the same container on all v1.* and v2.* runtimes while still letting you take advantage of v1.6 and v2.0 features for compatible runtimes. After explaining the multi-platform advantages, the multi-version example seemed obvious enough to not be worth cluttering the bundle.md description, but commit-message space is cheap so I'm talking about it explicitly here ;). There was discussion about schemes for sharing content between config files (JSON Schema's $ref [1] and explicit child declarations [2]). However, neither approach makes it convenient to both make mass tweaks across a family of related configs and make targetted tweaks to a single leaf [3], so for now we'll follow the Dockerfile example and have simple, stand-alone configs [4]. Folks who find this tedious or redundant are free to automate it with external tooling, and if a given external tool gains enough mass we can roll it into the spec later. [1]: opencontainers#73 (comment) [2]: opencontainers#74 [3]: opencontainers#73 (comment) [4]: opencontainers#74 (comment)
To allow a single bundle to be cross-platform. I've tried to add enough context to motivate the additional complexity without adding so much that the context distracts from the spec changes. The tie-breaking version ranking (step (2) for picking the best config file) also make it possible to write backwards-compatible bundles that still take advantage of new features when possible. For example, placing v1.0, v1.6, and v2.0 configs in the same directory would let you run the same container on all v1.* and v2.* runtimes while still letting you take advantage of v1.6 and v2.0 features for compatible runtimes. After explaining the multi-platform advantages, the multi-version example seemed obvious enough to not be worth cluttering the bundle.md description, but commit-message space is cheap so I'm talking about it explicitly here ;). There was discussion about schemes for sharing content between config files (JSON Schema's $ref [1] and explicit child declarations [2]). However, neither approach makes it convenient to both make mass tweaks across a family of related configs and make targetted tweaks to a single leaf [3], so for now we'll follow the Dockerfile example and have simple, stand-alone configs [4]. Folks who find this tedious or redundant are free to automate it with external tooling, and if a given external tool gains enough mass we can roll it into the spec later. [1]: opencontainers#73 (comment) [2]: opencontainers#74 [3]: opencontainers#73 (comment) [4]: opencontainers#74 (comment)
Looks good, although, I'm not entirely sure where you were going with the version check. Also, the naming convention should be made more clear I think. Like:
Looking at both solutions I can't really say one is more simple than the other though. :) It just moves the problem from the config file spec to the directory layout spec. |
On Sun, Jul 26, 2015 at 04:23:22AM -0700, Stefan Ladage wrote:
In #76? I'm not sure if I can add much to clarify my commit-message
Again, I think you're talking about #76. With that approach, the
The approach in #76 makes it possible to support multiple, And as I tried to say in [3], I doubt we'll be able to leap |
On Mon, Jul 27, 2015 at 03:19:43PM -0700, W. Trevor King wrote:
Oops, should have been [1]. |
Can someone write-out a use case for this? What is an example use case for a bundle that supports multiple archs? Why is having two bundles too complicated? |
I am going to close this out and repeat my questions on #73 until we decide whether this is desirable or not. |
Allowing for a single container to contain multiple platform-specific configurations.