Closed
Bug 1298349
Opened 9 years ago
Closed 9 years ago
Configure amo2kinto-lambda blocked page generator and serve s3 bucket pages.
Categories
(Cloud Services :: Operations: Deployment Requests - DEPRECATED, task)
Cloud Services
Operations: Deployment Requests - DEPRECATED
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rhubscher, Assigned: jason)
Details
amo2kinto 1.5.0 have been released with a blocklist description pages generator.
https://github.com/mozilla-services/amo2kinto-lambda/releases/tag/1.5.0
The according lambda endpoint have been created:
https://github.com/mozilla-services/amo2kinto-lambda/blob/master/lambda.py#L59
You can configure with its name `lambda.blockpages_generator`
Event parameters are:
- server: The kinto server to read data from.
(i.e: https://kinto.stage/)
- aws_region: The S3 bucket region. e.g eu-central-1
- bucket_name: The S3 bucket name. e.g amo-blocked-pages
- bucket: The readonly public and signed bucket. e.g blocklists
- addons-collection: The add-ons collection name. e.g addons
- plugins-collection: The plugin collection name. e.g plugins
i.e:
{
"server": "https://kinto.stage.mozaws.net/v1",
"aws_region": "eu-central-1",
"bucket_name": "amo-blocked-pages"
}
}
| Assignee | ||
Comment 1•9 years ago
|
||
This has been deployed to stage at https://blocked.stage.mozaws.net. The Content-Type of the html objects are currently being set to 'binary/octet-stream'. This is unusual since S3 should be able to infer the type based on extension. Either way I think we need to explicitly set the Content-Type of these objects to 'text/html'.
https://github.com/mozilla-services/svcops/pull/1218
| Assignee | ||
Comment 2•9 years ago
|
||
I manually changed the metadata on the object to 'text/html' for testing purposes https://blocked.stage.mozaws.net/i100.html
| Reporter | ||
Comment 3•9 years ago
|
||
Ok so I guess there is something to fix in my sync_file_to_s3 function to set the correct mimetype. I will upgrade the lambda script.
| Reporter | ||
Comment 4•9 years ago
|
||
I have updated the lambda.zip file, can you try it there? https://github.com/mozilla-services/amo2kinto-lambda/releases/tag/1.4.1-2
| Reporter | ||
Comment 5•9 years ago
|
||
Hey Jason, do you think it would be possible to make https://blocked.stage.mozaws.net/ to open https://blocked.stage.mozaws.net/index.html too?
| Assignee | ||
Comment 6•9 years ago
|
||
Thanks, I've updated the lambda function and the mimetype is now set correctly. I've also updated the CDN configuration to set a root document for https://blocked.stage.mozaws.net. Please test and let me know if it looks good.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 7•9 years ago
|
||
It seems to work ! Great !
| Reporter | ||
Comment 8•9 years ago
|
||
Did we deploy this to prod already?
| Assignee | ||
Comment 9•9 years ago
|
||
Yes it was deployed to prod as part of the phase 1 migration.
| Assignee | ||
Comment 10•9 years ago
|
||
| Reporter | ||
Comment 11•9 years ago
|
||
Are Firefox users already redirected to it?
| Assignee | ||
Comment 12•9 years ago
|
||
Yes, requests like https://blocklist.addons.mozilla.org/en-US/firefox/blocked/p1415 are being redirected to the endpoint.
https://github.com/mozilla-services/puppet-config/blob/master/amo/modules/amo_proxy/templates/nginx.blocklist.conf.erb#L32-L34
| Reporter | ||
Comment 13•9 years ago
|
||
Awesome thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•