Skip to content

Commit b3a21af

Browse files
committed
General framework
1 parent 25e38f1 commit b3a21af

File tree

6 files changed

+81
-80
lines changed

6 files changed

+81
-80
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727

2828
### Changed
2929

30+
- The extension is a framework for storage providers, it doesn't strictly define the individual providers.
3031
- The storage providers are grouped in `storage:schemes` and located in the Item Properties, Collections or Catalog metadata
3132
- Assets and Links reference the storage schemes by key in `storage:refs`
3233

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing
2+
3+
All contributions are subject to the
4+
[STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md).
5+
For contributions, please follow the
6+
[STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions
7+
for running tests are copied here for convenience.
8+
9+
## Running tests
10+
11+
The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid.
12+
To run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/).
13+
14+
First you'll need to install everything with npm once. Just navigate to the root of this repository and on
15+
your command line run:
16+
17+
```bash
18+
npm install
19+
```
20+
21+
Then to check markdown formatting and test the examples against the JSON schema, you can run:
22+
23+
```bash
24+
npm test
25+
```
26+
27+
This will spit out the same texts that you see online, and you can then go and fix your markdown or examples.
28+
29+
If the tests reveal formatting problems with the examples, you can fix them with:
30+
31+
```bash
32+
npm run format-examples
33+
```

README.md

Lines changed: 30 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -54,74 +54,47 @@ The fields in the table below can be used in these parts of STAC documents:
5454

5555
| Field Name | Type | Description |
5656
| -------------- | ------- | ----------- |
57-
| platform | string | **REQUIRED.** The [cloud provider](#platforms) where data is stored. |
58-
| region | string | The region where the data is stored. Relevant to speed of access and inter region egress costs (as defined by PaaS provider) |
59-
| requester_pays | boolean | Is the data requester pays or is it data manager/cloud provider pays. Defaults to `false` |
60-
| tier | string | The title for the tier type (as defined by PaaS provider) |
57+
| platform | string | **REQUIRED.** The cloud provider where data is stored as URI or URI template to the API. |
58+
| region | string | The region where the data is stored. Relevant to speed of access and inter region egress costs (as defined by PaaS provider). |
59+
| requester_pays | boolean | Is the data "requester pays" (`true`) or is it "data manager/cloud provider pays" (`false`). Defaults to `false`. |
60+
| ... | ... | Additional properties as defined in the URL template or in the platform specific documents. |
6161

62-
The properties `title` and `description` as defined in Common Metadata can be used as well.
62+
The properties `title` and `description` as defined in Common Metadata should be used as well.
6363

64-
#### Platforms
64+
#### platform
6565

66-
The `platform` field identifies the cloud provider where the data is stored.
66+
The `platform` field identifies the cloud provider where the data is stored as URI or URI template to the API of the service.
6767

68-
There are a couple of pre-defined values for common providers:
68+
If a URI template is provided, all variables must be defined in the Storage Scheme Object as a property with the same name.
69+
For example, the URI template `https://{bucket}.{region}.example.com` must have at least the properties
70+
`bucket` and `region` defined:
6971

70-
- Alibaba Cloud (Aliyun): `ALIBABA`
71-
- Amazon AWS: `AWS`
72-
- Microsoft Azure: `AZURE`
73-
- Google Cloud Platform: `GCP`
74-
- IBM Cloud: `IBM`
75-
- Oracle Cloud: `ORACLE`
76-
77-
All other PaaS solutions must use a unique URL to the service.
72+
```json
73+
{
74+
"platform": "https://{bucket}.{region}.example.com",
75+
"region": "eu-fr",
76+
"bucket": "john-doe-stac",
77+
"requester_pays": true
78+
}
79+
```
7880

7981
In case an `href` contains a non-HTTP URL that is not directly resolvable,
8082
the `platform` property must identify the host so that the URL can be resolved without further information.
81-
This is especially useful to provide the endpoint URL for custom S3 providers.
82-
In this case the `platform` is effectively the endpoint URL.
83-
84-
#### Tiers
85-
86-
Recommended values for the `tier` field:
87-
88-
| Minimum Duration | [Google Cloud Platform](https://cloud.google.com/storage/docs/storage-classes) | [Amazon AWS](https://aws.amazon.com/s3/storage-classes/) | [Microsoft Azure](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers) | [IBM Cloud](https://cloud.ibm.com/objectstorage/create#pricing) | [Oracle Cloud](https://www.oracle.com/cloud/storage/pricing.html) | [Alibaba Cloud](https://www.alibabacloud.com/product/oss/pricing) |
89-
| ------------- | --------- | ------------------------ | ------- |---------- | ----------------- | ----------------- |
90-
| 0 (Auto-Tier) | | Intelligent-Tiering | | Smart Tier |
91-
| 0 days | STANDARD | Standard | hot | Standard | Standard | Standard |
92-
| 30 days | NEARLINE | Standard-IA, One Zone-IA | cool | Vault | Infrequent Access | Infrequent Access |
93-
| 60 days | | | | | | Archive |
94-
| 90 days | COLDLINE | Glacier | | Cold Vault | Archive | |
95-
| 180 days | | Glacier Deep Archive | archive | | | Cold Archive |
96-
| 365 days | ARCHIVE | | | | | |
97-
98-
## Contributing
99-
100-
All contributions are subject to the
101-
[STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md).
102-
For contributions, please follow the
103-
[STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions
104-
for running tests are copied here for convenience.
83+
For example, this is especially useful to provide the endpoint URL for custom S3 providers.
84+
In this case the `platform` could effectively provide the endpoint URL.
10585

106-
### Running tests
86+
We try to collect pre-defined templates and specifications for as many providers as possible
87+
in this repository, but be aware that these are not part of the official extension releases
88+
and are not validated. This extension just provides the framework, the provider specifications
89+
may change at any time.
10790

108-
The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid.
109-
To run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/).
91+
The following providers have pre-defined specifications at this point:
11092

111-
First you'll need to install everything with npm once. Just navigate to the root of this repository and on
112-
your command line run:
113-
```bash
114-
npm install
115-
```
93+
- [AWS S3](platforms/aws.md)
94+
- [Generic S3 (non-AWS)](platforms/s3.md)
11695

117-
Then to check markdown formatting and test the examples against the JSON schema, you can run:
118-
```bash
119-
npm test
120-
```
96+
Feel encouraged to submit additional platform specifications via Pull Requests.
12197

122-
This will spit out the same texts that you see online, and you can then go and fix your markdown or examples.
98+
## Contributing
12399

124-
If the tests reveal formatting problems with the examples, you can fix them with:
125-
```bash
126-
npm run format-examples
127-
```
100+
See the [Contributor documentation](CONTRIBUTING.md) for details.

json-schema/schema.json

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,9 @@
101101
"properties": {
102102
"platform": {
103103
"title": "Platform",
104-
"oneOf": [
105-
{
106-
"type": "string",
107-
"enum": [
108-
"AWS",
109-
"GCP",
110-
"AZURE",
111-
"IBM",
112-
"ALIBABA",
113-
"ORACLE"
114-
]
115-
},
116-
{
117-
"type": "string",
118-
"format": "iri",
119-
"pattern": "^[\\w\\+.-]+://"
120-
}
121-
]
104+
"type": "string",
105+
"format": "uri-template",
106+
"pattern": "^[\\w\\+.-]+://"
122107
},
123108
"region": {
124109
"title": "Region",
@@ -128,12 +113,9 @@
128113
"type": "boolean",
129114
"title": "Requester pays",
130115
"default": false
131-
},
132-
"tier": {
133-
"title": "Tier",
134-
"type": "string"
135116
}
136-
}
117+
},
118+
"additionalProperties": true
137119
}
138120
},
139121
"additionalProperties": false

platforms/aws.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AWS S3
2+
3+
This defines the Amazon Web Services (AWS) S3 interface.
4+
5+
- `platform`: `https://{bucket}.s3.{region}.amazonaws.com`
6+
- `bucket`: The bucket name
7+
- `region`: One of the S3 regions (lowercase)

platforms/s3.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# S3 (non-AWS)
2+
3+
This defines the S3 interface for providers other than AWS (e.g. minio-based).
4+
5+
- `platform`: The API URL, must be the endpoint URL that can be used for the AWS CLI for example.

0 commit comments

Comments
 (0)