Skip to content

Commit 39c3618

Browse files
committed
*: Remove "bundle" and go straight to config.json
Some history behind bundle requirements: * 77d44b1 (Update runtime.md, 2015-06-16) lands the initial reference to a root filesystem, requiring a relative path. It also lands the "bundle" construct, which at this point includes content directories, signatures, and the configuration file. The content directories "at least" include the root filesystem. * 5d2eb18 (*: re-org the spec, 2015-06-24) shifts the bundle docs to bundle.md and demotes signatures to "other related content". * 91f5ad7 (bundle.md: various updates to latest spec, 2015-07-02, opencontainers#55) finishes the signature demotion and strengthens the root-inclusion requirement with another "must include". * 7232e4b (specs: introduce the concept of a runtime.json, 2015-07-30, opencontainers#88) split out runtime.json, required the root directory to exist at `rootfs`, and dropped most references to "content directories". * 106ec2d (Cleanup bundle.md, 2015-10-02, opencontainers#210) kept the requirement for a rootfs directory in the bundle root, but relaxed the name requirement to allow other single-component names (e.g. `my-rootfs`). Dropped the last reference to "content directories". * cb2da54 (config: Single, unified config file, 2015-12-28, opencontainers#284) rolled runtime.json back into config.json. * b2e9154 (Remove requirement for rootfs path to be relative, 2016-04-22, opencontainers#394) allowed absolute paths for root.path and removed some "same directory" language while leaving other "same directory" language. I think the root filesystem should be optional [1], but even folks who disagree on that point have come to the conclusion that it doesn't need to be in the bundle [2]. opencontainers#394 seems partially unfinished, but I think the intention was clear. Once you relax the "bundle must contain the root filesystem" requirement, the only thing that the bundle must contain is config.json. It doesn't seem to be worth the trouble to name a "bundle" construct if its only meaning is "the directory that holds config.json", so this commit removes all remaining references to the term "bundle". [1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/6ZKMNWujDhU Subject: Dropping the rootfs requirement and restoring arbitrary bundle content Date: Wed, 26 Aug 2015 12:54:47 -0700 Message-ID: <20150826195447.GX21585@odin.tremily.us> [2]: opencontainers#389 (comment) Signed-off-by: W. Trevor King <wking@tremily.us>
1 parent f8e8479 commit 39c3618

File tree

9 files changed

+19
-50
lines changed

9 files changed

+19
-50
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ DOC_FILES := \
1111
ROADMAP.md \
1212
implementations.md \
1313
project.md \
14-
bundle.md \
1514
runtime.md \
1615
runtime-linux.md \
1716
config.md \

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Table of Contents
1212
- [Roadmap](ROADMAP.md)
1313
- [Implementations](implementations.md)
1414
- [project](project.md)
15-
- [Filesystem Bundle](bundle.md)
1615
- Runtime and Lifecycle
1716
- [General Runtime and Lifecycle](runtime.md)
1817
- [Linux-specific Runtime and Lifecycle](runtime-linux.md)
@@ -31,11 +30,11 @@ An implementation that satisfies all the MUST or REQUIRED and all the SHOULD req
3130

3231
To provide context for users the following section gives example use cases for each part of the spec.
3332

34-
#### Application Bundle Builders
33+
#### Application Publishers
3534

36-
Application bundle builders can create a [bundle](bundle.md) directory that includes all of the files required for launching an application as a container.
37-
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).
38-
Because the configuration includes host-specific settings, application bundle directories copied between two hosts may require configuration adjustments.
35+
Application publishers distribute OCI [configuration files](config.md) and related resources (for example, [referenced filesystems](config.md#root-configuration) for launching an application as a [container](glossary.md#container).
36+
The publisher 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).
37+
Because the configuration includes host-specific settings, configurations copied between two hosts may require local adjustments.
3938

4039
#### Hook Developers
4140

@@ -44,7 +43,7 @@ Example use cases include sophisticated network configuration, volume garbage co
4443

4544
#### Runtime Developers
4645

47-
Runtime developers can build runtime implementations that run OCI-compliant bundles and container configuration, containing low-level OS and host specific details, on a particular platform.
46+
Runtime developers can build runtime implementations that perform [operations](runtime.md#operations) on [containers](glossary.md#container) on a particular platform.
4847

4948
# Releases
5049

bundle.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Below is a detailed description of each field defined in the configuration forma
1010

1111
## Specification version
1212

13-
* **`ociVersion`** (string, required) MUST be in [SemVer v2.0.0](http://semver.org/spec/v2.0.0.html) format and specifies the version of the OpenContainer specification with which the bundle complies.
13+
* **`ociVersion`** (string, required) MUST be in [SemVer v2.0.0](http://semver.org/spec/v2.0.0.html) format and specifies the version of the OpenContainer specification with which the configuration complies.
1414
The OpenContainer spec follows semantic versioning and retains forward and backward compatibility within major versions.
1515
For example, if an implementation is compliant with version 1.0.1 of the spec, it is compatible with the complete 1.x series.
1616
NOTE that there is no guarantee for forward or backward compatibility for version 0.x.
@@ -180,7 +180,7 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
180180

181181
## Hostname
182182

183-
* **`hostname`** (string, optional) as it is accessible to processes running inside. On Linux, you can only set this if your bundle creates a new [UTS namespace][uts-namespace].
183+
* **`hostname`** (string, optional) as it is accessible to processes running inside. On Linux, you can only set this if your configuration creates a new [UTS namespace][uts-namespace].
184184

185185
### Example
186186

glossary.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
# Glossary
22

3-
## Bundle
4-
5-
A [directory structure](bundle.md) that is written ahead of time, distributed, and used to seed the runtime for creating a [container](#container) and launching a process within it.
6-
73
## Configuration
84

9-
The [`config.json`](config.md) file in a [bundle](#bundle) which defines the intended [container](#container) and container process.
5+
The [`config.json`](config.md) file which defines the intended [container](#container) and container process.
106

117
## Container
128

@@ -24,7 +20,7 @@ All configuration [JSON][] MUST be encoded in [UTF-8][].
2420
## Runtime
2521

2622
An implementation of this specification.
27-
It reads the [configuration files](#configuration) from a [bundle](#bundle), uses that information to create a [container](#container), launches a process inside the container, and performs other [lifecycle actions](runtime.md).
23+
It performs [operations](runtime.md#operations) on [containers](#container).
2824

2925
## Runtime namespace
3026

implementations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ If you know of any associated projects that are not listed here, please file a p
1414
## Testing & Tools
1515

1616
* [kunalkushwaha/octool](https://github.com/kunalkushwaha/octool) - A config linter and validator.
17-
* [opencontainers/ocitools](https://github.com/opencontainers/ocitools) - A config generator and runtime/bundle testing framework.
17+
* [opencontainers/ocitools](https://github.com/opencontainers/ocitools) - A config generator and runtime/configuration testing framework.
1818
* [huawei-openlab/oct](https://github.com/huawei-openlab/oct) - Open Container Testing framework for OCI configuration and runtime

principles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ They are started in the same way whether they contain a postgres database, a php
2727
## 3. Infrastructure-agnostic
2828

2929
Standard Containers are INFRASTRUCTURE-AGNOSTIC: they can be run in any OCI supported infrastructure.
30-
For example, a standard container can be bundled on a laptop, uploaded to cloud storage, downloaded, run and snapshotted by a build server at a fiber hotel in Virginia, uploaded to 10 staging servers in a home-made private cloud cluster, then sent to 30 production instances across 3 public cloud regions.
30+
For example, a standard container can be packaged on a laptop, uploaded to cloud storage, downloaded, run and snapshotted by a build server at a fiber hotel in Virginia, uploaded to 10 staging servers in a home-made private cloud cluster, then sent to 30 production instances across 3 public cloud regions.
3131

3232
## 4. Designed for automation
3333

3434
Standard Containers are DESIGNED FOR AUTOMATION: because they offer the same standard operations regardless of content and infrastructure, Standard Containers, are extremely well-suited for automation.
3535
In fact, you could say automation is their secret weapon.
3636

3737
Many things that once required time-consuming and error-prone human effort can now be programmed.
38-
Before Standard Containers, by the time a software component ran in production, it had been individually built, configured, bundled, documented, patched, vendored, templated, tweaked and instrumented by 10 different people on 10 different computers.
38+
Before Standard Containers, by the time a software component ran in production, it had been individually built, configured, packaged, documented, patched, vendored, templated, tweaked and instrumented by 10 different people on 10 different computers.
3939
Builds failed, libraries conflicted, mirrors crashed, post-it notes were lost, logs were misplaced, cluster updates were half-broken.
4040
The process was slow, inefficient and cost a fortune - and was entirely different depending on the language and infrastructure provider.
4141

runtime.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There is no requirement that it be unique across hosts.
1616
The ID is provided in the state because hooks will be executed with the state as the payload.
1717
This allows the hooks to perform cleanup and teardown logic after the runtime destroys its own state.
1818
* **`pid`**: (int) is the ID of the main process within the container, as seen by the host.
19-
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
19+
* **`configPath`**: (string) is the absolute path to the container's [configuration](config.md).
2020
This is provided so that consumers can find the container's configuration and root filesystem on the host.
2121

2222
When serialized in JSON, the format MUST adhere to the following pattern:
@@ -26,7 +26,7 @@ When serialized in JSON, the format MUST adhere to the following pattern:
2626
"ociVersion": "0.2.0",
2727
"id": "oci-container1",
2828
"pid": 4422,
29-
"bundlePath": "/containers/redis"
29+
"configPath": "/containers/redis/config.json"
3030
}
3131
```
3232

@@ -35,7 +35,7 @@ See [Query State](#query-state) for information on retrieving the state of a con
3535
## Lifecycle
3636
The lifecycle describes the timeline of events that happen from when a container is created to when it ceases to exist.
3737

38-
1. OCI compliant runtime is invoked with a reference to the location of the bundle.
38+
1. OCI compliant runtime is invoked with a reference to the [configuration](config.md).
3939
How this reference is passed to the runtime is an implementation detail.
4040
2. The container's runtime environment MUST be created according to the configuration in [`config.json`](config.md).
4141
Any updates to `config.json` after container is running MUST not affect the container.
@@ -73,11 +73,10 @@ In particular, the state MUST be serialized as JSON.
7373

7474
### Start
7575

76-
`start <container-id> <path-to-bundle>`
76+
`start <container-id> <path-to-configuration>`
7777

78-
This operation MUST generate an error if it is not provided a path to the bundle and the container ID to associate with the container.
78+
This operation MUST generate an error if it is not provided a path to the [configuration](config.md) and the container ID to associate with the container.
7979
If the ID provided is not unique across all containers within the scope of the runtime, or is not valid in any other way, the implementation MUST generate an error.
80-
Using the data in `config.json`, that are in the bundle's directory, this operation MUST create a new container.
8180
This includes creating the relevant namespaces, resource limits, etc and configuring the appropriate capabilities for the container.
8281
A new process within the scope of the container MUST be created as specified by the `config.json` file otherwise an error MUST be generated.
8382

specs-go/state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ type State struct {
88
ID string `json:"id"`
99
// Pid is the process id for the container's main process.
1010
Pid int `json:"pid"`
11-
// BundlePath is the path to the container's bundle directory.
12-
BundlePath string `json:"bundlePath"`
11+
// ConfigPath is the path to the container's configuration.
12+
ConfigPath string `json:"configPath"`
1313
}

0 commit comments

Comments
 (0)