-
Notifications
You must be signed in to change notification settings - Fork 550
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
bundle: Add platform-matching config directories #76
Conversation
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)
Thinking this over some more, the config-choosing functionality doesn't have to get rolled into the runtime. It could happen in a separate step. So it might be better to split this off into a separate spec layer (opencontainers/multi-platform-spec?). Then bundle-authors who want to use this functionality can skip
That approach also makes it easy for folks to plug in alternative or additional layers (e.g.
For (2), what do we think about a “Related tools” section in the opencontainers/specs README that has a list of per-tool specs, a brief description of the idea, and then known implementations of the spec? For example:
Then (1) can be a shell script in the root of the container ( How does this sound? Is it crazy? If so, what are our alternatives for orchestrating multi-spec/component runtimes without building a single monolithic tool? |
I think we are a ways off from this being a concern. My preference is that we build something simple enough that we only add new fields and remain backwards compatible at the config level forever. This may take a few releases but I think we know enough about the problem space to do it. Put another way we need to treat the spec JSON like a protobuf and only add new fields, and deprecate old fields. We should never repurpose a field based on the version number. |
Closing until we get further along. |
On Tue, Jul 28, 2015 at 12:31:12PM -0700, Brandon Philips wrote:
Even without breaking strict backwards compatibility, I think we'll |
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
and explicit childdeclarations). 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, so for now we'll follow the
Dockerfile example and have simple, stand-alone configs. 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.
See also: #73 and #74.