Commit Graph

38 Commits

Author SHA1 Message Date
W. Trevor King cb2da5430a config: Single, unified config file
Reverting 7232e4b1 (specs: introduce the concept of a runtime.json,
2015-07-30, #88) after discussion on the mailing list [1].  The main
reason is that it's hard to draw a clear line around "inherently
runtime-specific" or "non-portable", so we shouldn't try to do that in
the spec.  Folks who want to flag settings as non-portable for their
own system are welcome to do so (e.g. "we will clobber 'hooks' in
bundles we run") are welcome to do so, but we don't have to have
to split the config into multiple files to do that.

There have been a number of additional changes since #88, so this
isn't a pure Git reversion.  Besides copy-pasting and the associated
link-target updates, I've:

* Restored path -> destination, now that the mount type contains both
  source and target paths again.  I'd prefer 'target' to 'destination'
  to match mount(2), but the pre-7232e4b1 phrasing was 'destination'
  (possibly due to Windows using 'target' for the source?).

* Restored the Windows mount example to its pre-7232e4b1 content.

* Removed required mounts from the config example (requirements landed
  in 3848a238, config-linux: specify the default devices/filesystems
  available, 2015-09-09, #164), because specifying those mounts in the
  config is now redundant.

* Used headers (vs. bold paragraphs) to set off mount examples so we
  get link anchors in the rendered Markdown.

* Replaced references to runtime.json with references to config.json.

[1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/0QbyJDM9fWY
     Subject: Single, unified config file (i.e. rolling back specs#88)
     Date: Wed, 4 Nov 2015 09:53:20 -0800
     Message-ID: <20151104175320.GC24652@odin.tremily.us>

Signed-off-by: W. Trevor King <wking@tremily.us>
2016-01-27 09:51:54 -08:00
Qiang Huang ec7ca919b7 Merge pull request #309 from vbatts/version_name
config: qualify the name of the version field
2016-01-18 12:07:51 +08:00
Vincent Batts 4e63ee0a1e config: qualify the name of the version field
https://github.com/opencontainers/specs/issues/110

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-01-15 10:51:53 -05:00
Doug Davis 5fb3203f6d Make cwd an abs path to avoid abiguity
Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-01-15 06:10:21 -08:00
Vincent Batts 353631ab5e Merge pull request #253 from hqhq/hq_version_compat
Clarify backwards compatibility for major version 0
2016-01-13 16:46:02 -05:00
Vincent Batts 25e6674a4c config: cwd is a required default
After thorough discussion, even though a reasonable default is "/", for
platform independence, leave this up to the bundle author.

Also, by this variable being present it makes things explicit for the
runtime.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-01-13 16:32:23 -05:00
Lai Jiangshan df3f12deab define the default value for the `cwd`
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2015-12-29 11:48:07 +08:00
Qiang Huang 0f25f18b9b Clarify backwards compatibility for major version 0
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-11-18 18:55:41 +08:00
W. Trevor King 66a0543e10 config: Require a new UTS namespace for config.json's hostname
The UTS namespace is for hostnames and NIS domain names [1].  Without
a new namespace, the hostname entry would clobber the host
environment's hostname.

Clobbering the host's hostname or a joined-namespace's hostname might
be acceptable for folks who trust their bundles, but it's not allowed
by the "error out if the config specifies anything else related to
that namespace" language that landed in 02b456e9 (Clarify behavior
around namespaces paths, 2015-09-08, #158).

[1]: http://man7.org/linux/man-pages/man7/namespaces.7.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-10-05 20:20:31 -07:00
Mrunal Patel f75f23fe4e Merge pull request #142 from wking/explicitly-define-mount-order
config: Require the runtime to mount Spec.Mounts in order
2015-10-05 12:02:41 -07:00
Lai Jiangshan 26d39ae967 convert **name** to **`name`**
we have both styles in the *.md, we should use only one of the styles.
**`name`** is much prettier than **name** in the result,
so we use **`name`**

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2015-09-29 22:19:26 +08:00
Vincent Batts 70372d3880 *.md: update TOC and links
Some of the docs were not even linked to, and did not have a logic
outline for their grouping.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-09-25 11:47:16 -04:00
W. Trevor King d282a32cd8 config: Require the runtime to mount Spec.Mounts in order
If we don't specify this, some bundle-authors or runtime-implementers
might expect the runtime to intelligently order mounts to get the
"right" order [1].  But that's not possible because:

  $ mkdir -p a/b/c d/e/f h
  # mount --bind a/b h
  # mount --bind d a/b
  $ tree --charset=ascii h
  h
  `-- c

But in the other order:

  # umount a/b
  # umount h
  # mount --bind d a/b
  # mount --bind a/b h
  $ tree --charset=ascii h
  h
  `-- e
      `-- f

So there's no "right" order.  Allowing the bundle-author to specify
their intended order is both easy to implement and unambiguous.

[1]: https://github.com/opencontainers/specs/pull/136#issuecomment-137275876

Suggested-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-09-10 20:56:31 -07:00
Vincent Batts 6cab2747d9 *.md: markdown formatting
Closes https://github.com/opencontainers/specs/issues/83

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-09-09 10:17:06 -04:00
Mrunal Patel bf52e72391 Merge pull request #139 from cloudfoundry-incubator/master
Fix links to go files in config.md
2015-09-03 15:04:48 -07:00
Will Pragnell d67689f0e2 config: fix links to go files 2015-09-03 10:18:35 +01:00
Alexander Morozov c18c283a17 Change layout of mountpoints and mounts
Added info about MountPoints to config.md.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-09-02 21:04:44 -07:00
Mrunal Patel e9cb5644fa Merge pull request #124 from wking/example-additional-gids
config: Add example additionalGids
2015-08-29 13:14:52 -07:00
W. Trevor King 10aa5f20c5 config: Add example cwd
The field is optional, but it's nice to have at least one example of
it in use.

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-08-28 22:19:26 -07:00
W. Trevor King 3f4125c3de config: Add example additionalGids
The field is optional, but it's nice to have at least one example of
it in use.  The GIDs I've chosen are currently "tty" and "disk" on
Gentoo (1 is "bin"), which may be remotely reasonable choices, but the
values we're using don't really matter without an example filesystem
to provide context.

Signed-off-by: W. Trevor King <wking@tremily.us>
2015-08-28 22:17:36 -07:00
Brandon Philips 7232e4b137 specs: introduce the concept of a runtime.json
Based on our discussion in-person yesterday it seems necessary to
separate the concept of runtime configuration from application
configuration. There are a few motivators:

- To support runtime updates of things like cgroups, rlimits, etc we
  should separate things that are inherently runtime specific from
  things that are static to the application running in the container.

- To support the goal of being able to move a bundle between hosts we
  should make it clear what parts of the spec are and are not portable
  between hosts so that upon landing on a new host the non-portable
  options may be rewritten or removed.

- In order to attach a cryptographic identity to a bundle we must not
  include details in the bundle that are host specific.
2015-08-26 09:44:09 -07:00
Jonathan Rudenberg 19cb6c7de9 Fix Windows path escaping in example mount JSON 2015-07-07 17:52:27 +00:00
Jonathan Boulle 625798536e config: minor cleanup
- link to official SemVer page
- link between config.md and config-linux.md and explain relationship
- fix typo (arch -> os)
- tweak formatting of some special characters
2015-07-06 17:37:01 -07:00
Jonathan Boulle 7f2ff75576 config.md: update links to spec schema code 2015-07-02 14:18:26 -07:00
Jonathan Boulle bd2fd1a8df config.md: various cleanup/consistency fixes
- standardise on "filesystem" instead of the previous mix of "file
  system" and "filesystem"
- change "Machine-specific" to the more accurate "Platform-specific"
- move towards zeroth article for all field specifications
- grammar tweaks
2015-07-01 11:43:43 -07:00
Jonathan Boulle 1937c009ea *: small spelling fixes 2015-07-01 10:20:43 -07:00
Jonathan Boulle 2f854b20dd config.md: minor clean up of process specification
- Standardise on singular rather than plural
- Small formatting fixes
2015-07-01 09:58:39 -07:00
Brandon Philips 7b43ad727c config.md: make the version field example a semver 2015-06-30 17:48:05 -07:00
Michael Crosby b3918a259f Add bind mount example
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-30 16:08:52 -07:00
Brandon Philips 9c90ccdb93 config.md: make the version a semver
As suggested in #15 make this a semver so we have some interpretation of
compatibility.
2015-06-30 16:02:52 -07:00
Michael Crosby 8af3eb64b2 Specific platform specific user struct for spec
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-30 15:58:47 -07:00
Brandon Philips 929123342e config.md: clarify destination for mounts
leave room for bind mounts by specifying how dest is interpretted.
2015-06-30 15:43:47 -07:00
Brandon Philips 7ac41c699c config.md: reformat into a standard style
Cleanup all of the properties into a consistent style for readability
and easier additions later.
2015-06-30 15:17:32 -07:00
Brandon Philips 106bc8ebb2 config: cleanup language on readonly parameter 2015-06-30 14:40:56 -07:00
Michael Crosby 8865d1cebc Fix root object keys
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-30 14:37:18 -07:00
Michael Crosby 9eb09f9593 Move linux specific options to linux spec
This moves some of the linux specific options like namespaces and
devices to the linux config document.  It also removes processes as an
array and replaces it with a single process.

It adds the "platform" struct for OS and Arch and updates many of the
examples to match the changes.  I also remove some of the redundant
windows examples on the portable spec document because they did not add
any extra value and many values were the same.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-29 14:15:33 -07:00
lizf-os ecb7590cc0 Fix typos in config.md
- Fix some typos
- Move the example of hostname above "Resource Constraints"

Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-06-29 10:41:24 +08:00
Brandon Philips 5d2eb180f6 *: re-org the spec
We had an in-person spec discussion, lets separate the spec into some
high-level sections to clarify future discussion.

Crosby agreed to let me merge to master :)
2015-06-24 17:15:48 -07:00