Skip to content

Commit

Permalink
* add path to storage requirment, see projectatomic#193
Browse files Browse the repository at this point in the history
* bounced to version 0.1.0, lets start using semantic versioning!
  • Loading branch information
goern committed Mar 17, 2016
1 parent c22c699 commit b6d0dba
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 19 deletions.
14 changes: 9 additions & 5 deletions spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand All @@ -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
Expand Down Expand Up @@ -71,7 +72,7 @@ This is the root object for the specification.
Field Name | Type | Description
---|:---:|---
<a name="containerAppId"></a>id | `string` | **Required.** The machine readable id of the Container Application.
<a name="containerAppSpecVersion"></a>specversion | `string` | **Required.** The semantic version string of the Container Application Specification used to describe the app. The value MUST be `"0.0.2"`.
<a name="containerAppSpecVersion"></a>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"`.
<a name="containerAppMetadata"></a>metadata | [ [MetadataObject](#metadataObject) ] | **Optional** An object holding optional metadata related to the Container Application, this may include license information or human readable information.
<a name="dependingContainerAppParams"></a>params | [ [ParamsObject](#paramsObject) ] | **Optional** A list of [ParamsObject](#paramsObject) that contain provider specific information.
<a name="containerAppGraph"></a>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.
Expand Down Expand Up @@ -240,6 +241,7 @@ Field Name | Type | Description
<a name="containerAppRequirementsName"></a>name | `string` | **Required.** A name associated with the storage requirement.
<a name="containerAppRequirementsAccessMode"></a>accessModes | `string` | **Required.** May be `"ReadWrite"` or `"ReadOnly"`.
<a name="containerAppRequirementsSize"></a>size | `integer` | **Required.** Size of required the storage.
<a name="containerAppRequirementsPath"></a>path | `string` | **Optional** Path inside the container at which the storage should be provisioned.

##### Storage Requirement Example:

Expand All @@ -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"
}
}
```
Expand Down Expand Up @@ -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
```
4 changes: 2 additions & 2 deletions spec/examples/template/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM projectatomic/atomicapp:0.3.0
FROM projectatomic/atomicapp:0.4.4

MAINTAINER Your Name <[email protected]>

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/
Expand Down
18 changes: 9 additions & 9 deletions spec/examples/template/Nulecule
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -31,8 +31,8 @@ graph:
- "file:artifacts/provider2/"
- inherit:
- provider1
requirements:
- persistentVolume:
requirements:
- persistentVolume:
accessMode: ReadWrite
name: var-lib-data
size: 4
4 changes: 4 additions & 0 deletions spec/requirements/persistentvolume.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions spec/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
Expand Down

0 comments on commit b6d0dba

Please sign in to comment.