Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8c31dfd
feat: multi tile storage destinations including fs
melancholiai Oct 3, 2023
b322c21
fix: test config nesting
melancholiai Oct 3, 2023
e11f59d
ci: wip
melancholiai Oct 3, 2023
92a91ae
ci: wip
melancholiai Oct 3, 2023
2be103c
ci: wip
melancholiai Oct 3, 2023
6e5def9
ci: wip
melancholiai Oct 3, 2023
941b6b8
ci: wip
melancholiai Oct 3, 2023
cf469f9
docs: updated docs
melancholiai Oct 3, 2023
0f9ec57
ci: wip
melancholiai Oct 3, 2023
bcf3685
ci: wip
melancholiai Oct 3, 2023
dc3534f
refactor: added cleanup-registry
melancholiai Oct 3, 2023
ac3b2ff
ci: wip
melancholiai Oct 3, 2023
5ba1b24
ci: wip
melancholiai Nov 13, 2023
b39ab9f
ci: wip
melancholiai Nov 13, 2023
cf1e307
ci: wip
melancholiai Nov 13, 2023
159fab8
ci: wip
melancholiai Nov 13, 2023
872db6c
ci: wip
melancholiai Nov 13, 2023
8097345
ci: wip
melancholiai Nov 13, 2023
da273cd
ci: wip
melancholiai Nov 13, 2023
12efa82
ci: wip
melancholiai Nov 14, 2023
5acfb57
ci: wip
melancholiai Nov 14, 2023
7dc5778
ci: wip
melancholiai Nov 14, 2023
6c457fd
ci: wip
melancholiai Nov 14, 2023
a24b692
ci: wip
melancholiai Nov 14, 2023
8e9e6b6
ci: wip
melancholiai Nov 14, 2023
1da1654
ci: wip
melancholiai Nov 14, 2023
6e40a96
ci: wip
melancholiai Nov 14, 2023
fa5f074
ci: wip
melancholiai Nov 14, 2023
4c0d0ed
ci: wip
melancholiai Nov 14, 2023
a7847db
ci: wip
melancholiai Nov 14, 2023
c57be92
ci: wip
melancholiai Nov 14, 2023
1b8cdfd
ci: wip
melancholiai Nov 14, 2023
e2ddbc3
ci: wip
melancholiai Nov 14, 2023
ce51bea
ci: wip
melancholiai Nov 14, 2023
2442470
ci: wip
melancholiai Nov 14, 2023
c396af0
ci: completed ci
melancholiai Nov 14, 2023
44bedde
refactor: changes according to pr
melancholiai Nov 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,31 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
minio:

minio1:
image: bitnami/minio:2022
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- 9000:9000
MINIO_ROOT_USER: minioadmin1
MINIO_ROOT_PASSWORD: minioadmin1
MINIO_API_PORT_NUMBER: '9003'
options: >-
--health-cmd "curl -f http://localhost:9003/minio/health/live"
--health-interval 10s
--health-timeout 5s
--health-retries 5

minio2:
image: bitnami/minio:2022
env:
MINIO_ROOT_USER: minioadmin2
MINIO_ROOT_PASSWORD: minioadmin2
MINIO_API_PORT_NUMBER: '9004'
options: >-
--health-cmd "curl -f http://localhost:9004/minio/health/live"
--health-interval 10s
--health-timeout 5s
--health-retries 5

strategy:
matrix:
node: [16.x, 18.x]
Expand Down Expand Up @@ -99,9 +117,6 @@ jobs:

- name: Run tests
run: npm run test
env:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin

- uses: actions/upload-artifact@v2
with:
Expand Down
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,29 @@ flowchart TD

`app.map.wms.styles`: styles in which layers are to be rendered, a comma-separated list of style names

`app.tilesStorage.s3Bucket`: the bucket name for tiles storage
`app.tilesStorage.providers`: an array of tile storage destinations of type `s3` or `fs`, schema is the following:
- for `s3` type:
```json
{
"type": "s3",
"endpoint": "s3-endpoint",
"bucketName": "s3-bucket-name",
"region": "s3-region",
"forcePathStyle": "boolean flag",
"credentials": {
"accessKeyId": "s3 access-key-id",
"secretAccessKey": "s3 secret-access-key"
}
}
```

- for `fs` type:
```json
{
"type": "fs",
"basePath": "local tile storage destination path"
}
```

`app.tilesStorage.layout.format`: the format of the tile's key in the storage bucket, the z, x, y values of the tile can be retrieved to the key. defaults to `prefix/{z}/{x}/{y}.png`
e.g. `prefix/{z}/{x}/{y}.png` formated to the tile
Expand Down
11 changes: 3 additions & 8 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,10 @@
}
},
"tilesStorage": {
"s3ClientConfig": {
"endpoint": "S3_ENDPOINT",
"region": "S3_REGION",
"forcePathStyle": {
"__name": "S3_FORCE_PATH_STYLE",
"__format": "boolean"
}
"providers": {
"__name": "TILES_STORAGE_PROVIDERS",
"__format": "json"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't validate its schema right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added ajv on the factory function

},
"s3Bucket": "S3_BUCKET",
"layout": {
"format": "TILES_STORAGE_LAYOUT_FORMAT",
"shouldFlipY": {
Expand Down
28 changes: 18 additions & 10 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"prettyPrint": false
},
"metrics": {
"enabled": true,
"buckets": [0.1, 0.5, 1, 5, 15, 50, 250, 500]
}
},
Expand Down Expand Up @@ -45,16 +46,23 @@
}
},
"tilesStorage": {
"s3ClientConfig": {
"endpoint": "http://s3-domain/",
"region": "region",
"forcePathStyle": true
},
"s3Bucket": "bucket-name",
"layout": {
"format": "prefix/{z}/{x}/{y}.png",
"shouldFlipY": true
}
"providers": [
{
"kind": "s3",
"endpoint": "http://s3-domain/",
"bucketName": "bucket-name",
"region": "region",
"forcePathStyle": true,
"credentials": {
"accessKeyId": "accessKeyId",
"secretAccessKey": "secret"
}
}
]
},
"layout": {
"format": "prefix/{z}/{x}/{y}.png",
"shouldFlipY": true
}
}
}
38 changes: 32 additions & 6 deletions config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,38 @@
}
},
"tilesStorage": {
"s3ClientConfig": {
"endpoint": "http://minio:9000",
"region": "us-east-1",
"forcePathStyle": true
},
"s3Bucket": "test"
"providers": [
{
"kind": "s3",
"endpoint": "http://minio1:9003",
"bucketName": "test1",
"region": "us-east-1",
"forcePathStyle": true,
"credentials": {
"accessKeyId": "minioadmin1",
"secretAccessKey": "minioadmin1"
}
},
{
"kind": "s3",
"endpoint": "http://minio2:9004",
"bucketName": "test2",
"region": "us-east-1",
"forcePathStyle": true,
"credentials": {
"accessKeyId": "minioadmin2",
"secretAccessKey": "minioadmin2"
}
},
{
"kind": "fs",
"basePath": "/tmp/test"
}
],
"layout": {
"format": "prefix/{z}/{x}/{y}.png",
"shouldFlipY": true
}
}
}
}
Loading