From 77a70eec4e2227ebb19268ec6d810d5b83d29453 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 6 Jun 2024 16:20:55 -0400 Subject: [PATCH 1/7] Add usage instructions Provide usage instructions for any user, including commercial users. --- README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b0916c..168e58f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,32 @@ # osmus/tileservice -Central repository for the OSM US vector tile service +This repository contains the source code for the OSM US [vector tile service](https://tile.ourmap.us/). + +## Planet Vector Tiles for General Use + +[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles are available on Amazon Web Services (AWS) for use by any project, including commercial usages by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). + +The OSMUS bucket name is `osmus-tile` in region `us-east-2`. + +With this architecture, the division of service is as follows: + +**Provided by OSMUS**: +1. Best-effort continuously-rendered planet updates in [PMtiles](https://docs.protomaps.com/pmtiles/) format, on an update cycle of approximately 4 hours. Service is not garaunteed, and updates may be delayed in the event of failures or during maintenance periods. +2. Requester-pays access to an s3 bucket in the us-east-2 (Ohio) AWS zone. In the requester-pays architecture, OSMUS pays the cost of s3 storage, while the requester pays for all egress traffic from the bucket. + +**Required by the user**: +1. Configuration of a vector-tile server connected to the s3 bucket. OSMUS recommends [Brandon Liu](https://github.com/bdon)'s [AWS guide](https://docs.protomaps.com/deploy/aws) for steps on how to configure a server. + +In general, the steps are as follows: +1. Configure an AWS lambda using the protomaps AWS guide and connect it to the OSMUS s3 bucket. +2. Modify the lambda code to add a RequestPayer property when accessing the bucket: +```javascript= +new GetObjectCommand({ + Bucket: process.env.BUCKET, + Key: pmtiles_path(this.archive_name, process.env.PMTILES_PATH), + Range: "bytes=" + offset + "-" + (offset + length - 1), + RequestPayer: "requester" // This line is added for requester pays + }) +``` +3. Add permissions to allow the lambda to connect to the OSMUS s3 bucket + +At this point, the lambda should be a usable vector-tile server. Most users will optionally want to add a content delivery network (CDN) cache on top of the lambda to lower costs. This can be done with Amazon CloudFront or any other CDN. The protomaps guide linked above has instructions on how to configure CloudFront for this purpose. Users will need to decide how aggressively to set the caching on their CDN instance, as there is no explicit trigger from the OSMUS side to indicate that the planet has been updated or that any individual tile has changed. From cacaa6f3c0501a5f6cf17ac66f07775edc0b8bfb Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 6 Jun 2024 16:22:48 -0400 Subject: [PATCH 2/7] Update README.md Fix copy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 168e58f..8305476 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repository contains the source code for the OSM US [vector tile service](ht ## Planet Vector Tiles for General Use -[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles are available on Amazon Web Services (AWS) for use by any project, including commercial usages by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). +[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles on Amazon Web Services (AWS). This service is available for use by any project, including commercial usages, by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). The OSMUS bucket name is `osmus-tile` in region `us-east-2`. From 2c545296597c4975312460fa6036ec51e46656f2 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 6 Jun 2024 16:24:00 -0400 Subject: [PATCH 3/7] Update README.md Fix copy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8305476..45351ae 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ With this architecture, the division of service is as follows: **Provided by OSMUS**: 1. Best-effort continuously-rendered planet updates in [PMtiles](https://docs.protomaps.com/pmtiles/) format, on an update cycle of approximately 4 hours. Service is not garaunteed, and updates may be delayed in the event of failures or during maintenance periods. -2. Requester-pays access to an s3 bucket in the us-east-2 (Ohio) AWS zone. In the requester-pays architecture, OSMUS pays the cost of s3 storage, while the requester pays for all egress traffic from the bucket. +2. Requester-pays access to an s3 bucket with the planet file in the us-east-2 (Ohio) AWS zone. In the requester-pays architecture, OSMUS pays the cost of s3 storage, while the requester pays for all egress traffic from the bucket. **Required by the user**: 1. Configuration of a vector-tile server connected to the s3 bucket. OSMUS recommends [Brandon Liu](https://github.com/bdon)'s [AWS guide](https://docs.protomaps.com/deploy/aws) for steps on how to configure a server. From 2fe8c07852686d9d19d84980e7e46a50c9b29175 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 6 Jun 2024 16:26:12 -0400 Subject: [PATCH 4/7] Update README.md Add copy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45351ae..f39695a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repository contains the source code for the OSM US [vector tile service](ht ## Planet Vector Tiles for General Use -[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles on Amazon Web Services (AWS). This service is available for use by any project, including commercial usages, by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). +[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles on Amazon Web Services (AWS). This service is available for use by any project, including commercial usages, by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). Users of this service are able to take advantage of AWS's generous [free tier](https://aws.amazon.com/free/), which allows any users to host a planet tileserver for free, provided that they stay below the free tier limits. The OSMUS bucket name is `osmus-tile` in region `us-east-2`. From 96e42b72e5d69969f560f7cc074ab48ab2894c63 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 6 Jun 2024 16:26:52 -0400 Subject: [PATCH 5/7] Update README.md fix copy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f39695a..0fe7287 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repository contains the source code for the OSM US [vector tile service](ht ## Planet Vector Tiles for General Use -[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles on Amazon Web Services (AWS). This service is available for use by any project, including commercial usages, by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). Users of this service are able to take advantage of AWS's generous [free tier](https://aws.amazon.com/free/), which allows any users to host a planet tileserver for free, provided that they stay below the free tier limits. +[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles on Amazon Web Services (AWS). This service is available for use by any project, including commercial usages, by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). Users of this service are able to take advantage of AWS's generous [free tier](https://aws.amazon.com/free/), which allows any user to host a planet tileserver for free, provided that they stay below the free tier limits. The OSMUS bucket name is `osmus-tile` in region `us-east-2`. From 773d37214d65e94bf6be1a32eb812aa965aebe32 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 6 Jun 2024 16:27:38 -0400 Subject: [PATCH 6/7] Update README.md Fix copy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fe7287..8a9bead 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The OSMUS bucket name is `osmus-tile` in region `us-east-2`. With this architecture, the division of service is as follows: **Provided by OSMUS**: -1. Best-effort continuously-rendered planet updates in [PMtiles](https://docs.protomaps.com/pmtiles/) format, on an update cycle of approximately 4 hours. Service is not garaunteed, and updates may be delayed in the event of failures or during maintenance periods. +1. Best-effort continuously-rendered planet updates in [PMtiles](https://docs.protomaps.com/pmtiles/) format, on an update cycle of approximately 4 hours. Service is not guaranteed, and updates may be delayed in the event of failures or during maintenance periods. 2. Requester-pays access to an s3 bucket with the planet file in the us-east-2 (Ohio) AWS zone. In the requester-pays architecture, OSMUS pays the cost of s3 storage, while the requester pays for all egress traffic from the bucket. **Required by the user**: From d3dc78b00c294eefdf49b824d83085e81414013f Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 6 Jun 2024 16:28:50 -0400 Subject: [PATCH 7/7] Update README.md Fix copy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a9bead..31936d6 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repository contains the source code for the OSM US [vector tile service](ht ## Planet Vector Tiles for General Use -[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles on Amazon Web Services (AWS). This service is available for use by any project, including commercial usages, by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). Users of this service are able to take advantage of AWS's generous [free tier](https://aws.amazon.com/free/), which allows any user to host a planet tileserver for free, provided that they stay below the free tier limits. +[OSMUS](https://openstreetmap.us/) provides OpenMapTiles-compatible planet vector tiles on Amazon Web Services (AWS). This service is available for use by any project, including commercial usages, by connecting to an OSMUS-hosted [requester-pays](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html) s3 bucket. The steps in this guide allow any user to set up a planet vector tile server equivalent to the OSMUS community vector tile [server](https://tile.ourmap.us/). Users of this service are able to take advantage of AWS's generous [free tier](https://aws.amazon.com/free/), which allows any user to host a planet tileserver for little to no cost, provided that they stay below the free tier limits. The OSMUS bucket name is `osmus-tile` in region `us-east-2`.