diff --git a/spec/README.md b/spec/README.md index 19b8961..0bb7f36 100644 --- a/spec/README.md +++ b/spec/README.md @@ -2,7 +2,7 @@ **NOTE**: This is a work in progress effort that is expected to change quickly. Feel free to join the initiative! -#### Version 0.0.2 +#### Version 0.1.0 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt). @@ -14,12 +14,13 @@ The Container Application specification is a project to describe 'an Application ### Versioning -Within this specification we follow [the semantic versioning pattern](http://semver.org/spec/v2.0.0.html). +Within this specification we follow [the semantic versioning pattern](http://semver.org/spec/v2.0.0.html). A comparator ("version number A is bigger than version number B" or "version A is later than version B") is defined within the semantic versioning document. ## Revision History Version | Date | Notes --- | --- | --- +0.1.0 | 2016-03-17 | add path to persistent storage requirement, see [#193]https://github.com/projectatomic/nulecule/issues/193 0.0.2 | 2015-05-07 | close issue #35 the graph is now a list of named items 0.0.1-alpha | 2015-mm-dd | TBD v1-alpha | 2015-04-10 | reversioned to 0.0.1-alpha @@ -71,7 +72,7 @@ This is the root object for the specification. Field Name | Type | Description ---|:---:|--- id | `string` | **Required.** The machine readable id of the Container Application. -specversion | `string` | **Required.** The semantic version string of the Container Application Specification used to describe the app. The value MUST be `"0.0.2"`. +specversion | `string` | **Required.** The semantic version string of the Container Application Specification used to describe the app. The value MUST be at least `"0.0.2"`. metadata | [ [MetadataObject](#metadataObject) ] | **Optional** An object holding optional metadata related to the Container Application, this may include license information or human readable information. params | [ [ParamsObject](#paramsObject) ] | **Optional** A list of [ParamsObject](#paramsObject) that contain provider specific information. graph | [ [GraphObject](#graphObject) ] | **Required.** A list of depending containerapps. Strings may either match a local sub directory or another containerapp-spec compliant containerapp image that can be pulled via a provider. @@ -240,6 +241,7 @@ Field Name | Type | Description name | `string` | **Required.** A name associated with the storage requirement. accessModes | `string` | **Required.** May be `"ReadWrite"` or `"ReadOnly"`. size | `integer` | **Required.** Size of required the storage. +path | `string` | **Optional** Path inside the container at which the storage should be provisioned. ##### Storage Requirement Example: @@ -249,13 +251,15 @@ Field Name | Type | Description name: "var-lib-mongodb-data" accessMode: "ReadWrite" size: 4 # GB by default + path: "/var/lib/mongodb/data" ``` ```js { "persistentVolume": { "name": "var-lib-mongodb-data", "accessMode": "ReadWrite", - "size": 4 + "size": 4, + "path": "/var/lib/mongodb/data" } } ``` @@ -367,5 +371,5 @@ Each provider in the [ArtifactsObject](#artifactsObject) of the [GraphObject](#g The Dockerfile must carry a Label declaring the version of the specification that is used: ``` -LABEL io.projectatomic.nulecule.specversion 0.0.2 +LABEL io.projectatomic.nulecule.specversion 0.1.0 ``` diff --git a/spec/examples/template/Dockerfile b/spec/examples/template/Dockerfile index b0e9145..1bfe3b2 100644 --- a/spec/examples/template/Dockerfile +++ b/spec/examples/template/Dockerfile @@ -1,8 +1,8 @@ -FROM projectatomic/atomicapp:0.3.0 +FROM projectatomic/atomicapp:0.4.4 MAINTAINER Your Name -LABEL io.projectatomic.nulecule.specversion 0.0.2 +LABEL io.projectatomic.nulecule.specversion 0.1.0 LABEL io.projectatomic.nulecule.providers = "provider1,provider2" ADD /Nulecule /Dockerfile /application-entity/ diff --git a/spec/examples/template/Nulecule b/spec/examples/template/Nulecule index cbf6164..0c4c352 100644 --- a/spec/examples/template/Nulecule +++ b/spec/examples/template/Nulecule @@ -1,24 +1,24 @@ ---- -specversion: "0.0.2" +--- +specversion: "0.1.0" id: 191131-abcd -metadata: +metadata: name: "my app" appversion: v1.0.0 description: "some application" - license: + license: name: "License 2.0" url: www.example.com/license -graph: +graph: - name: somedb source: "docker://registry.example.com/some/database" - name: mycode - params: + params: - name: password description: passphrase - name: username - constraints: + constraints: - allowed_pattern: "[A-Z0-9]+" description: "Must consist of characters and numbers only." description: username @@ -31,8 +31,8 @@ graph: - "file:artifacts/provider2/" - inherit: - provider1 -requirements: - - persistentVolume: +requirements: + - persistentVolume: accessMode: ReadWrite name: var-lib-data size: 4 diff --git a/spec/requirements/persistentvolume.json b/spec/requirements/persistentvolume.json index 70b65a1..90d5c85 100644 --- a/spec/requirements/persistentvolume.json +++ b/spec/requirements/persistentvolume.json @@ -26,6 +26,10 @@ "description": "Size of the storage.", "type": "number", "minimum": 0 + }, + "path": { + "description": "Path inside the container at which the storage should be provisioned.", + "type": "string" } } } diff --git a/spec/schema.json b/spec/schema.json index e7e2d56..1f9777b 100644 --- a/spec/schema.json +++ b/spec/schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Schema", - "version": "0.0.2", + "version": "0.1.0", "description": "The Container Application specification defines a set of configuration files that describe a Container Application. A Container Application is composed of a set of container-based services and/or other Container Applications that together provide an application. These configuration files can be used by tools to deploy the application in an automated way or with customizations as specified by the deployer. Developers tools can generate most of the required files and utilities, such as testing tools, can take advantage of these files.", "required": [ "id", "specversion", "graph" ], "properties": { @@ -12,9 +12,9 @@ "default": "null" }, "specversion": { - "description": "The semantic version string of the Container Application Specification used to describe the app. The value SHOULD be '0.0.2'.", + "description": "The semantic version string of the Container Application Specification used to describe the app. The value SHOULD be at least '0.0.2'.", "type": "string", - "default": "0.0.2" + "default": "0.1.0" }, "metadata": { "$ref": "file:metadata.json"