Skip to content

Commit 8c23d7a

Browse files
Change structure of storage (#96)
**What this PR does / why we need it**: **Which issue(s) this PR fixes**: Fixes # **Special notes for your reviewer**: **Release note**: <!-- Write your release note: 1. Enter your release note in the below block. 2. If no release note is required, just write "NONE" within the block. Format of block header: <category> <target_group> Possible values: - category: breaking|feature|bugfix|doc|other - target_group: user|operator|developer|dependency --> ```feature user ``` --------- Co-authored-by: Uwe Krueger <uwe.krueger@sap.com>
1 parent d42788a commit 8c23d7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2264
-980
lines changed

README.md

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Its focus is to describe versioned sets of artifacts and to assign globally uniq
88

99
OCM provides a common language usable by tools to talk about software artifacts, regardless of the technologies and the processes working on them. Tool specific metadata, like deployment descriptions, are handled as own, typed artifacts. This enables the provisioning of content-agnostic tools: for example, transporting software between environments, signing and verification, providing compliance data, etc.
1010

11-
![OCM Overview](doc/OCM.png)
11+
![OCM Overview](doc/OCM-Ecosystem.png)
1212

1313
The following chapters provide a formal description of the format to describe software artifacts and a storage layer to persist those and make them available from remote.
1414

1515
# Specification
1616

1717
## Core Parts
1818

19-
* 1.[Model](doc01-model/README.md)
19+
* 1.[Model](doc/01-model/README.md)
2020
* 1.1.[OCM Model](doc/01-model/01-model.md#ocm-model)
2121
* 1.1.1.[Introduction](doc/01-model/01-model.md#introduction)
2222
* 1.1.2.[Components and Component Versions](doc/01-model/01-model.md#components-and-component-versions)
@@ -28,7 +28,8 @@ The following chapters provide a formal description of the format to describe so
2828
* 1.2.3.[Sources](doc/01-model/02-elements-toplevel.md#sources)
2929
* 1.2.4.[Resources](doc/01-model/02-elements-toplevel.md#resources)
3030
* 1.2.5.[References](doc/01-model/02-elements-toplevel.md#references)
31-
* 1.3.[Model Summary](doc/01-model/02-elements-toplevel.md#model-summary)
31+
* 1.2.6.[Summary](doc/01-model/02-elements-toplevel.md#summary)
32+
* 1.3.[Model Elements - Fundamentals](doc/01-model/03-elements-sub.md)
3233
* 1.3.1.[Identifiers](doc/01-model/03-elements-sub.md#identifiers)
3334
* 1.3.2.[Access Specification](doc/01-model/03-elements-sub.md#access-specification)
3435
* 1.3.3.[Access Types](doc/01-model/03-elements-sub.md#access-types)
@@ -44,7 +45,7 @@ The following chapters provide a formal description of the format to describe so
4445
* 1.6.[Extending the Open Component Model](doc/01-model/07-extensions.md#extending-the-open-component-model)
4546
* 1.6.1.[Functional extensions](doc/01-model/07-extensions.md#functional-extensions)
4647
* 1.6.2.[Semantic extensions](doc/01-model/07-extensions.md#semantic-extensions)
47-
* 2.[Processing](doc02-processing/README.md)
48+
* 2.[Processing](doc/02-processing/README.md)
4849
* 2.1.[Referencing](doc/02-processing/01-references.md#referencing)
4950
* 2.1.1.[Example](doc/02-processing/01-references.md#example)
5051
* 2.2.[Signing](doc/02-processing/03-signing.md#signing)
@@ -65,7 +66,7 @@ The following chapters provide a formal description of the format to describe so
6566
* 2.6.[Artifact Normalization](doc/02-processing/04-digest.md#artifact-normalization)
6667
* 2.6.1.[Blob Representation Format for Resource Types](doc/02-processing/04-digest.md#blob-representation-format-for-resource-types)
6768
* 2.6.2.[Interaction of Local Blobs, Access Methods, Uploaders and Media Types](doc/02-processing/04-digest.md#interaction-of-local-blobs-access-methods-uploaders-and-media-types)
68-
* 3.[Persistence](doc03-persistence/README.md)
69+
* 3.[Persistence](doc/03-persistence/README.md)
6970
* 3.1.[Model Operations](doc/03-persistence/01-operations.md#model-operations)
7071
* 3.2.[Abstract Operations defined by the Open Component Model](doc/03-persistence/01-operations.md#abstract-operations-defined-by-the-open-component-model)
7172
* 3.2.1.[Repository Operations](doc/03-persistence/01-operations.md#repository-operations)
@@ -75,42 +76,40 @@ The following chapters provide a formal description of the format to describe so
7576

7677
## Extensible Parts
7778

78-
* 4.[Extensions](doc/04-extensions/README.md)
79-
* 4.1.[Extensible Field Values](doc/04-extensions/01-extensions.md#extensible-field-values)
80-
* 4.1.1.[Resource Types](doc/04-extensions/01-extensions.md#resource-types)
81-
* 4.1.2.[Source Types](doc/04-extensions/01-extensions.md#source-types)
82-
* 4.1.3.[Access Types](doc/04-extensions/01-extensions.md#access-types)
83-
* 4.2.[Normalization Algorithms](doc/04-extensions/01-extensions.md#normalization-algorithms)
84-
* 4.2.1.[jsonNormalisationV1](doc/04-extensions/01-extensions.md#jsonnormalisationv1)
85-
* 4.3.[Digest Algorithms](doc/04-extensions/01-extensions.md#digest-algorithms)
86-
* 4.3.1.[Digesting Content](doc/04-extensions/01-extensions.md#digesting-content)
87-
* 4.4.[Signature Algorithms](doc/04-extensions/01-extensions.md#signature-algorithms)
88-
* 4.4.1.[RSA](doc/04-extensions/01-extensions.md#rsa)
89-
* 4.5.[Storage Backend: OCI Registries](doc/04-extensions/02-oci.md#storage-backend-oci-registries)
90-
* 4.5.1.[Specification Format](doc/04-extensions/02-oci.md#specification-format)
91-
* 4.5.2.[Element Mapping](doc/04-extensions/02-oci.md#element-mapping)
92-
* 4.5.3.[Version Mapping](doc/04-extensions/02-oci.md#version-mapping)
93-
* 4.5.4.[Blob Mappings](doc/04-extensions/02-oci.md#blob-mappings)
94-
* 4.5.5.[Example](doc/04-extensions/02-oci.md#example)
95-
* 4.6.[Storage Backend (file-based): Common Transport Format (CTF)](doc/04-extensions/03-files.md#storage-backend-file-based-common-transport-format-ctf)
96-
* 4.6.1.[Specification Format](doc/04-extensions/03-files.md#specification-format)
97-
* 4.6.2.[Element Mapping](doc/04-extensions/03-files.md#element-mapping)
98-
* 4.6.3.[Blob Mappings](doc/04-extensions/03-files.md#blob-mappings)
99-
* 4.6.4.[Examples](doc/04-extensions/03-files.md#examples)
100-
* 4.7.[Storage Backend: Component Archive Format](doc/04-extensions/03-files.md#component-archive-format)
101-
* 4.7.1.[Specification Format](doc/04-extensions/03-files.md#specification-format)
102-
* 4.7.2.[Element Mapping](doc/04-extensions/03-files.md#element-mapping)
103-
* 4.7.3.[Blob Mappings](doc/04-extensions/03-files.md#blob-mappings)
104-
* 4.7.4.[Examples](doc/04-extensions/03-files.md#examples)
105-
* 4.8.[Storage Backend: AWS S3](doc/04-extensions/05-s3.md#storage-backend-aws-s3)
106-
* 4.8.1.[Specification Format](doc/04-extensions/05-s3.md#specification-format)
107-
* 4.8.2.[Element Mapping](doc/04-extensions/05-s3.md#element-mapping)
108-
* 4.8.3.[Blob Mapping](doc/04-extensions/05-s3.md#blob-mapping)
109-
*
79+
* 4 [Extensions](doc/04-extensions/README.md)
80+
* 4.1 [Artifact Types](doc/04-extensions/01-artifact-types/README.md)
81+
* 4.1.1 [blob](doc/04-extensions/01-artifact-types/blob.md)
82+
* 4.1.2 [directoryTree, fileSystem](doc/04-extensions/01-artifact-types/file-system.md)
83+
* 4.1.3 [gitOpsTemplate](doc/04-extensions/01-artifact-types/gitops.md)
84+
* 4.1.4 [helmChart](doc/04-extensions/01-artifact-types/helmchart.md)
85+
* 4.1.5 [npmPackage](doc/04-extensions/01-artifact-types/npm.md)
86+
* 4.1.6 [ociArtifact](doc/04-extensions/01-artifact-types/oci-artifact.md)
87+
* 4.1.7 [ociImage](doc/04-extensions/01-artifact-types/oci-image.md)
88+
* 4.1.8 [executable](doc/04-extensions/01-artifact-types/executable.md)
89+
* 4.1.9 [sbom](doc/04-extensions/01-artifact-types/sbom.md)
90+
* 4.2 [Access Method Types](doc/04-extensions/02-access-types/README.md)
91+
* 4.2.1 [localBlob](doc/04-extensions/02-access-types/localblob.md)
92+
* 4.2.2 [ociArtifact](doc/04-extensions/02-access-types/ociartifact.md)
93+
* 4.2.3 [ociBlob](doc/04-extensions/02-access-types/ociblob.md)
94+
* 4.2.4 [helm](doc/04-extensions/02-access-types/helm.md)
95+
* 4.2.5 [gitHub](doc/04-extensions/02-access-types/github.md)
96+
* 4.2.6 [s3](doc/04-extensions/02-access-types/s3.md)
97+
* 4.2.7 [npm](doc/04-extensions/02-access-types/npm.md)
98+
* 4.3 [Storage Backend Mappings](doc/04-extensions/03-storage-backends/README.md)
99+
* 4.3.1 [OCIRegistry](doc/04-extensions/03-storage-backend/soci.md)
100+
* 4.3.2 [FileSystem (CTF)](doc/04-extensions/03-storage-backends/ctf.md)
101+
* 4.3.3 [FileSystem (Component Archive)](doc/04-extensions/03-storage-backends/component-archive.md)
102+
* 4.3.4 [AWS S3](doc/04-extensions/03-storage-backends/s3.md)
103+
* 4.4 [Algorithms](doc/04-extensions/04-algorithms/README.md)
104+
* 4.4.1 [Artifact Normalization](doc/04-algorithms/04-algorithms/artifact-normalization-types.md)
105+
* 4.4.2 [Digest Algorithms](doc/04-algorithms/04-algorithms/label-merge-algorithms.md)
106+
* 4.4.3 [Label Merge Algorithm](doc/04-algorithms/04-algorithms/digest-algorithms.md)
107+
* 4.4.4 [Component Descriptor Normalization Algorithms](doc/04-algorithms/04-algorithms/component-descriptor-normalization-algorithms.md)
108+
* 4.4.5 [Signing Algorithms](doc/04-algorithms/04-algorithms/signing-algorithms.md)
110109

111110
## Guidelines and Conventions
112111

113-
* 5.[Guidelines](doc05-guidelines/README.md)
112+
* 5.[Guidelines](doc/05-guidelines/README.md)
114113
* 5.1.[Transport](doc/05-guidelines/01-transport.md#transport)
115114
* 5.1.1.[Kinds of Transports](doc/05-guidelines/01-transport.md#kinds-of-transports)
116115
* 5.2.[Model Contract](doc/05-guidelines/02-contract.md#model-contract)

doc/01-model/01-model.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,11 @@ A formal specification must describe any repository that can be used to store co
9898
9999
Such a specification is usable by a language binding to gain access to this repository.
100100
In a concrete environment all those repositories are usable, for which an
101-
implementation of the [abstract model operations](../03-operations/README.md) exists.
101+
implementation of the [abstract model operations](../03-persistence/01-operations.md) exists.
102102
103-
A repository specification has a type, the *Repository Type* used to identify the required [mapping](../04-persistence/01-mappings.md) and the information required to identity a concrete repository instance.
103+
A repository specification has a type, the *Repository Type*
104+
used to identify the required [mapping](../03-persistence/02-mappings.md)
105+
and the information required to identity a concrete repository instance.
104106
105107
There are two kinds of types:
106108
@@ -112,7 +114,7 @@ There are two kinds of types:
112114
[A-Z][a-zA-Z0-9]*
113115
```
114116

115-
The defined types with their meaning and format can be found in [a later chapter](../04-persistence/README.md)
117+
The defined types with their meaning and format can be found in [a later chapter](../04-extensions/03-storage-backends/README.md)
116118

117119
- Vendor specific types
118120

doc/01-model/02-elements-toplevel.md

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11

22
# Model Elements
33

4-
The following section describes how a component (version) is specified in more detail. Please note that this section intends to give an overview and explain the principal elements and their structure. It is not a complete specification. See the [schemas](https://github.com/open-component-model/ocm/tree/main/resources) for a full definition.
4+
The following section describes how a component (version) is specified in more detail.
5+
Please note that this section intends to give an overview and explain the principal
6+
elements and their structure. It is not a complete specification.
7+
See the [schemas](https://github.com/open-component-model/ocm/tree/main/resources)
8+
for a full definition.
59

610
## Components and Component Versions
711

@@ -36,7 +40,8 @@ Those attributes are described by formal fields in the component descriptor:
3640

3741
- **`type`** (required) *string*
3842

39-
The type of an artifact specifies the logical interpretation of an artifact and is independent of its concrete technical representation.
43+
The type of an artifact specifies the logical interpretation of an artifact
44+
and is independent of its concrete technical representation.
4045

4146
- **`labels`** (optional) *[]Label*
4247

@@ -47,11 +52,17 @@ Those attributes are described by formal fields in the component descriptor:
4752

4853
### Artifact Types
4954

50-
The formal type of an artifact uniquely specifies the logical interpretation of an artifact and its kind, independent of its concrete technical representation.
55+
The formal type of an artifact uniquely specifies the logical interpretation of an artifact and its kind,
56+
independent of its concrete technical representation.
5157

52-
If there are different possible technical representations, the access specification determines the concrete format given by a media type used for the returned blob.
58+
If there are different possible technical representations,
59+
the access specification determines the concrete format given by a media type used for the returned blob.
5360

54-
For example, a helm chart (type `helmChart`) can be represented as OCI artifact or helm chart archive. Nevertheless, the technical meaning is the same. In both cases the artifact (resource)`type` will be `helmChart`. The acess specification however will be different. In the first case it will refer to the helm-chart archive. In the second case the access type will be `ociArtifact`.
61+
For example, a helm chart (type `helmChart`) can be represented as OCI artifact
62+
or helm chart archive. Nevertheless, the technical meaning is the same.
63+
In both cases the artifact (resource)`type` will be `helmChart`.
64+
The acess specification however will be different. In the first case it will refer to the helm-chart archive.
65+
In the second case the access method type will be `ociArtifact`.
5566

5667
```yaml
5768
...
@@ -78,7 +89,7 @@ For example, a helm chart (type `helmChart`) can be represented as OCI artifact
7889
imageReference: ghcr.io/open-component-model/helmexample/charts/mariadb:12.2.7
7990
```
8091
81-
The access type `ociArtifact` however is also used for container images:
92+
The access method type `ociArtifact` however is also used for container images:
8293

8394
```yaml
8495
...
@@ -92,15 +103,20 @@ resources:
92103
imageReference: bitnami/mariadb:10.11.2
93104
```
94105

95-
The resource type `ociImage` now describes an object that can be used as a container image. So, the technical representation in both cases will be an OCI image manifest. The semantics how these objects can be used are completely different. This is expressed by the `type` of the artifact.
106+
The resource type `ociImage` now describes an object that can be used as a container image.
107+
So, the technical representation in both cases will be an OCI image manifest.
108+
The semantics how these objects can be used are completely different.
109+
This is expressed by the `type` of the artifact.
96110

97-
An artifact's kind and logical interpretation is encoded into a simple string. The artifact type must be globally unique. OCM defines a naming scheme to guarantee this uniqueness.
111+
An artifact's kind and logical interpretation is encoded into a simple string.
112+
The artifact type must be globally unique. OCM defines a naming scheme to guarantee this uniqueness.
98113

99114
There are two kinds of types:
100115

101116
- Centrally defined type names managed by the OCM organization
102117

103-
These types use flat names following a camel case scheme with the first character in lower case, for example `ociArtifact`.
118+
These types use flat names following a camel case scheme with the first character
119+
in lower case, for example `ociArtifact`.
104120

105121
Their format is described by the following regular expression:
106122

@@ -110,16 +126,26 @@ There are two kinds of types:
110126

111127
- Vendor specific types
112128

113-
Any organization may define dedicated types on their own. Nevertheless, the meaning of those types must be defined. There may be multiple such types provided by different organizations with the same meaning. Organizations should share and reuse such types instead of introducing new type names.
129+
Any organization may define dedicated types on their own.
130+
Nevertheless, the meaning of those types must be defined.
131+
There may be multiple such types provided by different organizations with the same meaning.
132+
Organizations should share and reuse such types instead of introducing new type names.
114133

115-
To support a unique namespace for those type names vendor specific types MUST follow a hierarchical naming scheme based on DNS domain names. Every type name has to be preceded by a DNS domain owned by the providing organization, like `landscaper.gardener.cloud/blueprint`. The local type must follow the above rules for centrally defined type names
116-
and is appended, separated by a slash (`/`).
134+
To support a unique namespace for those type names vendor specific types
135+
MUST follow a hierarchical naming scheme based on DNS domain names.
136+
Every type name has to be preceded by a DNS domain owned by the providing organization,
137+
like `landscaper.gardener.cloud/blueprint`. The local type must follow the above rules
138+
for centrally defined type names and is appended, separated by a slash (`/`).
117139

118140
So, the complete pattern looks as follows:
119141

120142
```
121143
<DNS domain name>/[a-z][a-zA-Z0-9]*
122144
```
145+
146+
[Artifact Types](../01-model/07-extensions.md#artifact-types) are an extension point within the OCM model.
147+
All existing artifact types are listed [here](../04-extensions/01-artifact-types/README.md).
148+
123149
## Sources
124150
125151
A *Source* is an artifact which describes the sources that were used to generate one or more of the resources. Source elements do not have specific additional formal attributes.
@@ -161,7 +187,7 @@ A resource uses the following additional formal fields:
161187
Indicates whether the entity providing a component is also the provider of the resource ('local') or whether the
162188
resource is provided by a separate entity ('external'). This may be useful to determine whether the entity responsible
163189
for the component is also responsible for the resource.
164-
This property is purely informational and completely unrelated to the access type.
190+
This property is purely informational and completely unrelated to the access method type.
165191

166192
- **`digest`** (optional) *Digest Info*
167193

@@ -198,13 +224,13 @@ Example:
198224
type: ociArtefact
199225
```
200226
201-
The full list of resource types is [here](03-extensible-values.md#resource-types).
227+
The full list of resource types is [here](../04-extensions/01-artifact-types/README.md).
202228
203229
## References
204230
205231
A component version may refer to other component versions by adding a *reference* to the component version.
206232
207-
An *reference* does not habe a blob but it has:
233+
A *reference* does not have a blob but it has:
208234
209235
- an *Identity* in the context of the component version
210236
- a set of labels
@@ -246,6 +272,6 @@ Example:
246272
```
247273

248274

249-
# Model Summary
275+
## Summary
250276

251-
The OCM model describes component versions. A component version is stored in a component repository and consists of sources, resources and references. The component version itself as well as each resource, source and reference has an identity. Only sources and resources have content and therefore an access specification and an optional digest. All elements can have labels.
277+
The OCM model describes component versions. A component version is stored in a component repository and consists of sources, resources and references. The component version itself as well as each resource, source and reference has an identity. Only sources and resources have content and therefore an access specification and an optional digest. All elements can have labels.

0 commit comments

Comments
 (0)