|
*Note: these are notes about using Google Cloud Storage as a CDN service. We use GCS in combination with CloudFlare.*
|
|
*Note: these are notes about using Google Cloud Storage to host a copy of MathJax. We use GCS in combination with CloudFlare which means these instructions are not always optimal if you are working in a pure GCS setup.*
|
|
|
|
|
|
### Preliminaries
|
|
### Preliminaries
|
|
|
|
|
... | @@ -6,6 +6,25 @@ |
... | @@ -6,6 +6,25 @@ |
|
* The main tool is `gsutil`.
|
|
* The main tool is `gsutil`.
|
|
* Note: due to rapid development a lot of information on the web uses outdated syntax (but is still useful, e.g., https://gist.github.com/mhulse/4362104).
|
|
* Note: due to rapid development a lot of information on the web uses outdated syntax (but is still useful, e.g., https://gist.github.com/mhulse/4362104).
|
|
|
|
|
|
|
|
### Setting a default ACL (access control list)
|
|
|
|
|
|
|
|
Notes:
|
|
|
|
* https://developers.google.com/storage/docs/gsutil/commands/defacl
|
|
|
|
|
|
|
|
**This is a one-time task**
|
|
|
|
|
|
|
|
The GCS default for access control is private. GCS does allow for ACLs to persist when files are overwritten.
|
|
|
|
|
|
|
|
Since we update files in `\latest` with every releases and files in `beta` during beta runs, we need to prevent GCS from marking those new files as private (breaking public access to the CDN).
|
|
|
|
|
|
|
|
The solution is to set the default ACL for the bucket once following the instructions in the gsutil documentation. The XML file should contain
|
|
|
|
|
|
|
|
<Entry>
|
|
|
|
<Scope type="AllUsers"/>
|
|
|
|
<Permission>READ</Permission>
|
|
|
|
</Entry>
|
|
|
|
|
|
|
|
|
|
### Copying
|
|
### Copying
|
|
|
|
|
|
Notes:
|
|
Notes:
|
... | | ... | |