-
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 container #73
Comments
On Thu, Jul 23, 2015 at 10:12:43AM -0700, Stefan Ladage wrote:
I was recently confused about this too, but I think the current spec However, this still requires the launcher to figure out which of To keep the config DRY, it would be nice if there was also a way to { or embedding (e.g. with JSON Schema's $ref 3: { Since inheritance and embedding are potentially complicated, I'm fine Of course, keeping the option to manually specify a config file when { that's identical to the app config but just launches a shell. For the |
Why not change the platform section into something like this:
The main config file serves as a base and the platform specific configs may override properties from the base config or add platform specific sections. |
On Fri, Jul 24, 2015 at 04:27:55AM -0700, Stefan Ladage wrote:
That saves a directory walk vs 1, and it shifts the platform Do you expect it to be recursive? For example, could linux.json have "platforms":[ I'm not sure which way (this or 1) would be easier to use. Say you { (os no need for N⋅M⋅… configs), but I'm not sure how you'd tweak the With my explicit parent approach 1, you need an override config for { but it would still be tedious. One approach would be to add if/then logic and such to the config, but I think the best choice at the moment is:
And then just punting on fancy inheritance ("$ref", "config", |
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)
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 don't think this is wise. A config + rootfs probably cannot be amd64 and win64 at the same time. You will have to have two different configs. |
This single multi platform container idea adds complexity. I can't think of how it would have an advantage over multiple single platform containers. Is there a real need? |
On Tue, Jul 28, 2015 at 12:30:16PM -0700, Geoff Levand wrote:
Somebody is going to have to decide which of a family of $X is the |
Having multi-platform containers allow you to deploy the same containers on multiple machines with different platforms, greatly simplifying the deployment process. Isn't the whole idea of using containers that you don't have to worry about what your deployment target looks like? As for the added complexity, the complexity of having to deal with multiple platforms is there whether we deal with it here, in this spec, or make it someone else's problem. At least if we add it to this spec, we have standardized way of deploying to multiple platforms. Personally, I can see a lot of benefits using a single container with shared resources which I can move between linux, osx and windows. |
While this is a real use case, for the current level of runc, this is out of scope. We can imagine a distribution system that accomplishes this task, coordinating the cross-platform creation of bundles. This is not part of the near term goals. |
On Thu, Jul 30, 2015 at 11:11:29AM -0700, Stephen Day wrote:
That's a reasonable approach. Does anyone know of a spec for that |
@wking I'll check with some folks, regarding CNCF. |
On Thu, Jul 30, 2015 at 11:31:19AM -0700, Vincent Batts wrote:
Any word from the CNCF folks? |
Hey hey. That is still getting underway and while cncf is a direction this
|
On Wed, Aug 12, 2015 at 04:34:39PM -0700, Vincent Batts wrote:
Yeah, it's not a hurry. But asking how things are going didn't seem
The spec is in [1](atomicapp is the reference implementation), but |
@wking Hi there, I am happy to volunteer @aweiteka and myself to be your contacts for Nulecule Specification and Atomic App. By now we most of the communication is done via IRC #nulecule (On Freenode), pls see all communication channels at http://www.projectatomic.io/docs/nulecule/ |
@wking there a likely folks from those projects that can pipe in, but there will likely be some boundaries. And definitely some definition of requirements from a project like a service-level/mutli-platform spec, and the OCI |
@wking I'm pretty deep into nulecule. We're trying to keep it simple. We don't want to duplicate any platform functionality but rather provide a lean template that can be an abstraction to the various platforms. |
Why not adopt linux's device tree model for cross-platform support? TL;DR -
|
On Mon, Sep 28, 2015 at 10:49:19AM -0700, Jojy George Varghese wrote:
Can you spell this out in more detail? Skimming over [1,2] didn't { For example: { That still doesn't cover:
Maybe there you're imagining JSON Schema's $ref 3? |
I am suggesting a structure where the top directory would have the base ./
The "configs" directory is where "overlay"/"override" configuration will be The ".inc" files could have common information for a platform for example. -jojy On Mon, Sep 28, 2015 at 11:20 AM, W. Trevor King notifications@github.com
Jojy G Varghese |
On Mon, Sep 28, 2015 at 12:27:16PM -0700, Jojy George Varghese wrote:
Ok, so like the JSON I sketched out in 1, but with directories
How would you reference these inclusions? With something like JSON This approach seems to support both inheritance (the overlays inherit |
Yes you captured the idea right. This model has been tested by linux device On Mon, Sep 28, 2015 at 2:17 PM, W. Trevor King notifications@github.com
Jojy G Varghese |
Maybe have the proposed layout 1 in a PR? I didnt see anything along those lines. |
On Wed, Sep 30, 2015 at 08:59:21AM -0700, Jojy George Varghese wrote:
Yeah, I don't know of any PRs pushing for that format. But I'd |
we're going to be looking at multi-arch/os archive formats (see #302) so that will probably cover this request. |
like @duglin said, the consensus is that the on disk bundle is specific to the runtime that is going to run it, which is completely platform (os/arch) specific. |
From what I understood from the specs is that a container targets a single platform? If so, wouldn't it be better to allow for different configurations depending on the platform, all packaged into one container?
The text was updated successfully, but these errors were encountered: