Skip to content

Commit 7610129

Browse files
committed
config: Single, unified config file
Reverting 7232e4b (specs: introduce the concept of a runtime.json, 2015-07-30, opencontainers#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 opencontainers#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 3848a23, config-linux: specify the default devices/filesystems available, 2015-09-09, opencontainers#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>
1 parent a7b5092 commit 7610129

15 files changed

+989
-1078
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ DOC_FILES := \
1212
runtime-linux.md \
1313
config.md \
1414
config-linux.md \
15-
runtime-config.md \
16-
runtime-config-linux.md \
1715
glossary.md
1816
EPOCH_TEST_COMMIT := 041eb73d2e0391463894c04c8ac938036143eba3
1917

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ Table of Contents
99
- [Specification Style](style.md)
1010
- [Filesystem Bundle](bundle.md)
1111
- Configuration
12-
- [Container Configuration](config.md)
13-
- [Container Configuration (Linux-specific)](config-linux.md)
14-
- [Runtime Configuration](runtime-config.md)
15-
- [Runtime Configuration (Linux-specific)](runtime-config-linux.md)
12+
- [General](config.md)
13+
- [Linux-specific](config-linux.md)
1614
- [Runtime and Lifecycle](runtime.md)
1715
- [Linux Specific Runtime](runtime-linux.md)
1816
- [Implementations](implementations.md)
@@ -27,12 +25,12 @@ To provide context for users the following section gives example use cases for e
2725
#### Application Bundle Builders
2826

2927
Application bundle builders can create a [bundle](bundle.md) directory that includes all of the files required for launching an application as a container.
30-
The bundle contains OCI [configuration files](config.md) where the builder can specify host-independent details such as [which executable to launch](config.md#process-configuration) and host-specific settings such as [mount](runtime-config.md#mount-configuration) locations, [hook](runtime-config.md#hooks) paths, Linux [namespaces](runtime-config-linux.md#namespaces) and [cgroups](runtime-config-linux.md#control-groups).
28+
The bundle contains an OCI [configuration file](config.md) where the builder can specify host-independent details such as [which executable to launch](config.md#process-configuration) and host-specific settings such as [mount](config.md#mounts) locations, [hook](config.md#hooks) paths, Linux [namespaces](config-linux.md#namespaces) and [cgroups](config-linux.md#control-groups).
3129
Because the configuration includes host-specific settings, application bundle directories copied between two hosts may require configuration adjustments.
3230

3331
#### Hook Developers
3432

35-
[Hook](runtime-config.md#hooks) developers can extend the functionality of an OCI-compliant runtime by hooking into a container's lifecycle with an external application.
33+
[Hook](config.md#hooks) developers can extend the functionality of an OCI-compliant runtime by hooking into a container's lifecycle with an external application.
3634
Example use cases include sophisticated network configuration, volume garbage collection, etc.
3735

3836
#### Runtime Developers

ROADMAP.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ Although OCI doesn't define a transport method we should have a cryptographic di
1717

1818
*Owner:* philips
1919

20-
### Review the need for runtime.json (Target release: v0.3.0)
21-
22-
There are some discussions about having `runtime.json` being optional for containers and specifying defaults.
23-
Runtimes would use this standard set of defaults for containers and `runtime.json` would provide overrides for fine tuning of these extra host or platform specific settings.
24-
25-
*Owner:* mrunalp
26-
2720
### Define Container Lifecycle
2821

2922
Containers have a lifecycle and being able to identify and document the lifecycle of a container is very helpful for implementations of the spec.

bundle.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,17 @@ See also [OS X application bundles](http://en.wikipedia.org/wiki/Bundle_%28OS_X%
88
The definition of a bundle is only concerned with how a container, and its configuration data, are stored on a local file system so that it can be consumed by a compliant runtime.
99

1010
A Standard Container bundle contains all the information needed to load and run a container.
11-
This includes the following three artifacts which MUST all reside in the same directory on the local filesystem:
11+
This includes the following artifacts which MUST all reside in the same directory on the local filesystem:
1212

13-
1. `config.json` : contains host-independent configuration data.
14-
This REQUIRED file, which MUST be named `config.json`, contains settings that are host-independent and application-specific such as security permissions, environment variables and arguments.
13+
1. `config.json` : contains configuration data.
14+
This REQUIRED file, which MUST be named `config.json`.
1515
When the bundle is packaged up for distribution, this file MUST be included.
1616
See [`config.json`](config.md) for more details.
1717

18-
2. `runtime.json` : contains host-specific configuration data.
19-
This REQUIRED file, which MUST be named `runtime.json`, contains settings that are host-specific such as mount sources and hooks.
20-
The goal is that the bundle can be moved as a unit to another runtime and run the same application once a host-specific `runtime.json` is defined.
21-
When the bundle is packaged up for distribution, this file MUST NOT be included.
22-
See [`runtime.json`](runtime-config.md) for more details.
23-
24-
3. A directory representing the root filesystem of the container.
18+
2. A directory representing the root filesystem of the container.
2519
While the name of this REQUIRED directory may be arbitrary, users should consider using a conventional name, such as `rootfs`.
2620
When the bundle is packaged up for distribution, this directory MUST be included.
2721
This directory MUST be referenced from within the `config.json` file.
2822

29-
While these three artifacts MUST all be present in a single directory on the local filesystem, that directory itself is not part of the bundle.
23+
While these artifacts MUST all be present in a single directory on the local filesystem, that directory itself is not part of the bundle.
3024
In other words, a tar archive of a *bundle* will have these artifacts at the root of the archive, not nested within a top-level directory.

0 commit comments

Comments
 (0)