tarbell-project / tarbell-template

3 stars 11 forks source link

Can't make S3 connection #5

Open Tomc50 opened 10 years ago

Tomc50 commented 10 years ago

David et. al., Got Tarbell running on local machine... using Gdox... thanks for your previous help.

Now having trouble with S3 connection:

Toms-iMac:herald Tomc$ tarbell publish staging

Deploying Herald-Sun Events Calendar Prototype to staging (http://tomco.s3-website-us-east-1.amazonaws.com)

Using default bucket credentials Traceback (most recent call last): File "/usr/local/bin/tarbell", line 9, in load_entry_point('tarbell==0.9b4', 'console_scripts', 'tarbell')()

... ... ... File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.> 7/socket.py", line 571, in create_connection raise err socket.error: [Errno 61] Connection refused

my guess is problem(s) in either: settings.yaml:

default_s3_access_key_id: xxxxxxxxxxxxxxxxxxxx default_s3_buckets: staging: http://tomco.s3-website-us-east-1.amazonaws.com/ default_s3_secret_access_key: xxxxxxxxxxxxxxxxxxxx google_account: tomcie@gmail.com project_templates:

s3_credentials: tomco.s3-website-us-east-1.amazonaws.com: access_key_id: xxxxxxxxxxxxxxxxxxxx secret_access_key: xxxxxxxxxxxxxxxxxxxx

or tarbell_config.py:

""" Tarbell project configuration """

Short project name

NAME = "Herald1"

Descriptive title of project

TITLE = "Herald-Sun Events Calendar Prototype"

Google spreadsheet key

SPREADSHEET_KEY = "0AsXRBiM5jfAwdERJTFFtUEYxaXNyX3VTVURuc3Nnemc"

Exclude these files from publication

EXCLUDES = ["*.md", "requirements.txt"]

Create JSON data at ./data.json, disabled by default

CREATE_JSON = True

S3_BUCKETS = { "staging": "http://tomco.s3-website-us-east-1.amazonaws.com/", "production": "http://tomco.s3-website-us-east-1.amazonaws.com/", }

S3CONFIG = { 'production': { 'bucket': '', 'key': '', 'key_id': '', }, 'staging': { 'bucket': 'https://834634662955.signin.aws.amazon.com/console', 'key': 'xxxxxxxxxxxxxxxxxxxx', 'key_id': 'xxxxxxxxxxxxxxxxxxxx', }, }

Default template variables

DEFAULT_CONTEXT = { 'name': 'Herald-Sun Events Calendar', 'title': 'Local events for Durham and Orange Counties' }

Questions: 1) Should the credentials for 'Defaults,' (lines 1-4 of settings.yaml) be the same as in the 'S3 credentials' structure at the bottom (lines 12-15)? ... seems funny to repeat them. 2) In the S3CONFIG structure of tarbell_config.py, I get the same error (shown), whether I put in the url for the aws.amazon.com/console (shown) or the 'endpoint' url. Which is correct? or does it matter?

Again, thanks... hope I'm not too confused.

TC

hbillings commented 10 years ago

Hi Tom,

Off-the-top-of-my-head answer here, but I believe you need to specify the bucket name instead of only your AWS S3 instance. So, for example, my config looks like this:

S3_BUCKETS = { "production": "s3://apps.chicagotribune.com/bucket-name-here/", "staging": "s3://apps.staging.chicagotribune.com/bucket-name-here/", }

I think you'll need to put that same bucket name in the S3CONFIG bucket line as well.

Tomc50 commented 10 years ago

Thanks, Heather... progress for sure.

Different error message anyway...

S3ResponseError: 404 Not Found <?xml version="1.0" encoding="UTF-8"?>

NoSuchBucketThe specified bucket does not exist>tomco.s3-website-us-east-1.amazonaws.com 9EDFB62582D90F79 N7Vrymxr1Grz39Xmpo8AqbtwtWAQWLjrFL+wM1f3vyn2h6STIFCRjDIJX/s2nVrI

Won't have time to experiment for til tomorrow... further thoughts welcome.

Thanks again. TC