Got fargoPublisher self-hosting up on heroku, but S3 bucket not getting written

24 views
Skip to first unread message

Rick Cogley

unread,
Oct 25, 2014, 5:22:52 AM10/25/14
to far...@googlegroups.com

Hello everyone, I wonder if I could get some assistance with self-publishing fargoPublisher. First, thanks to Dave and the many other kind souls who wrote down what they did to get it working. What a nifty system!


Ok. I have been reading the various posts available about doing this setup, and I think I am close. My problem is, when I render the outline, nothing gets written over to my S3 bucket. 


Let me summarize what I did so far and maybe someone might recognize what I missed? - 


* Created an Amazon bucket, static01.cogley.info, set the S3 bucket up to host, set index as index.html, and set permissions. The policy I used is pasted below. 

* Used the key and secret key credentials I used later in the heroku variables to connect via Panic Transmit (ftp client that supports s3), and there were no access errors there. Then I created a sample sub-folder and put an index.html file in it, to prove the bucket is hosting: 

* http://static01.cogley.info/test/

* Set up CNAMEs in my DNS (as an aside I'm using Route53 also on AWS). 

* S3 Bucket static01.cogley.info maps to static01.cogley.info.s3-website-ap-northeast-1.amazonaws.com.

* blog.cogley.info maps to cogley-fargo1.herokuapp.com.

* Created a Heroku account and app, cogley-fargo1.herokuapp.com. Had the tool belt set up from before and everything seems to be working as expected. I can do a "heroku logs" and see that fargopublisher.js is starting up just fine. I can do "heroku restart" to restart the dyno. All my vars are set. (setting the fpServerPort to 80 does not work and causes the js to crash, so I removed it)

* Did a git clone of the github repo to my local, and did "git push heroku master" after committing a change to package.json, which I think I needed. 

* Once the heroku variables were set, I can access /version and see 0.96: 

* cogley-fargo1.herokuapp.com/version

* In fargo.io I created a new outline testing1, gave it a name testing1, and set Settings/CMS/Server to cogley-fargo1.herokuapp.com

* I added some content to the new outline, and did File, Render All Pages. I see that dropbox picks them up. 


However, nothing is sent to S3, and when I access http://blog.cogley.info, I get "There is no content to display at /static01.cogley.info/users/blog/index.html". 


My questions are: 


* is there anything glaring that I missed?

* in the setup where I'm taking advantage of heroku's node, I don't need to install the prerequisite node modules, do I? (npm install aws-sdk url request). I did not see mention of this except when setting up what is essentially a node server proper, which in my case, heroku is doing. 

* I don't see anything about heroku failing to write to S3 in the logs, so, I am wondering how I can prove what is happening. Is there some kind of verbose mode setting? 

* Do I need to create the bucket subfolders manually? 

* Is "fargo.io" the right URL to use to author the outline? I ask because I did see something like beta.fargo.io or whatnot and am not sure. 


I pasted a few relevant snippets below. Any help greatly appreciated. 

 

Sincerely,

Rick 


===heroku log===


> fargoPu...@0.7.4 start /app

2014-10-25T08:24:59.476647+00:00 app[web.1]:

2014-10-25T08:24:59.476302+00:00 app[web.1]:

2014-10-25T08:24:59.476733+00:00 app[web.1]:

2014-10-25T08:24:59.476756+00:00 app[web.1]: S3 data path == /static01.cogley.info/data/.

2014-10-25T08:24:59.476710+00:00 app[web.1]: Fargo Publisher server v0.96.

2014-10-25T08:24:59.476779+00:00 app[web.1]: S3 names path == /static01.cogley.info/data/names/.

2014-10-25T08:24:59.476802+00:00 app[web.1]: S3 stats path == /static01.cogley.info/data/stats/.

2014-10-25T08:24:59.476847+00:00 app[web.1]: Domain == blog.cogley.info.

2014-10-25T08:24:59.476872+00:00 app[web.1]: Port == 40598.

2014-10-25T08:24:59.476908+00:00 app[web.1]: Redirect == false.

2014-10-25T08:24:59.476929+00:00 app[web.1]:

2014-10-25T08:24:59.932128+00:00 heroku[web.1]: State changed from starting to up


===heroku vars===


jrc@MBP ~/Repositories/fargoPublisher (git)-[master] % heroku config

=== cogley-fargo1 Config Vars

AWS_ACCESS_KEY_ID:     12345adsfasdfasdfasdfasdf

AWS_SECRET_ACCESS_KEY: 12345asdfasdfasdfasdfasdfasdfasdfasdf

TZ:                    Japan

fpDataPath:            /static01.cogley.info/data/

fpDomain:              blog.cogley.info

fpHostingPath:         /static01.cogley.info/users/

fpRedirect:            false


===package.json===


jrc@MBP ~/Repositories/fargoPublisher (git)-[master] % cat package.json

{

  "name": "fargoPublisher",

  "subdomain": "fargoPub1",

  "description": "A JavaScript project to connect to Fargo to publish a folder in Dropbox.",

  "author": "Dave Winer...",

  "version": "0.7.4",

  "scripts": {

     "start": "node publisher.js"

     },

  "domains": [

     "blog.cogley.info"

     ],

  "repository": {

    "type": "git",

    "url": "https://github.com/scripting/fargoPublisher.git"

    },

  "dependencies" : {

    "aws-sdk": "*",

    "request": "*"

    },

  "license": "MIT",

  "engines": {

    "node": "0.6.x"

    }

  }

  

===bucket policy===


{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::static01.cogley.info/*"
}
]
}

Dave Winer

unread,
Oct 25, 2014, 10:02:45 AM10/25/14
to far...@googlegroups.com
Have you verified that Fargo is talking correctly to your server?

If you can open the browser console while you're publishing, Fargo displays some of the information about the conversation with the server.

If there are errors they may show up there.

Dave

Rick Cogley

unread,
Oct 25, 2014, 10:19:43 AM10/25/14
to far...@googlegroups.com
Hi Dave - no, I haven't. I've just searched for "browser console" and Fargo.io, and looked through the menus to no avail. I probably have not read the right things yet. Could you please tell me how to open the browser console for Fargo? 

Thanks in advance.
Rick

Dave Winer

unread,
Oct 25, 2014, 11:07:00 AM10/25/14
to far...@googlegroups.com
It's not a function of Fargo, it's a function of the browser you're using. 

In Chrome, the console is accessed through the menu:

View/Developer/JavaScript Console

It's a different place in each browser.

Dave



--
Fargo docs: http://fargo.io/docs/
 
How to ask for help with software: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
 
Mail list: https://groups.google.com/d/forum/fargo2
---
You received this message because you are subscribed to the Google Groups "fargo2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fargo2+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andy Sylvester

unread,
Oct 25, 2014, 2:51:48 PM10/25/14
to far...@googlegroups.com
Rick,

I had a similar problem in setting up a River4 install (could not see any files being sent to my S3 folder). I wrote a blog post summarizing the S3 issues I had (http://andysylvester.com/2014/09/22/notes-on-a-river4-initial-installation/). These might be applicable, since both River4 and Fargo2 self-publishing should send files to your S3 bucket if you have it configured that way. I saw the other post that Fargo errors might be appearing in the browser console window. If you see "Access Denied" errors there, some of the items in my post might be helpful.

Andy Sylvester

Rick Cogley

unread,
Oct 26, 2014, 7:05:56 AM10/26/14
to far...@googlegroups.com
Thanks for your help guys.
 
My problem ended up being that, I was using a domain which was in use for other sites, and therefore somehow conflicting with what I was trying to do in fargo. I decided to try with a fresh domain, with no DNS records at all, then add a *.mydomain.com CNAME pointing at the heroku server, and a static.mydomain.com CNAME pointing at the S3 bucket. (I am using Amazon Route 53 for the zone hosting; it's fast, cheap and good). 

After setting those records then resetting heroku settings, and outline settings, it started working. It works in Japanese, too. 

Now I'll start exploring. What a cool system.

Thanks for the great software, Dave. 
Best regards
Rick 
Reply all
Reply to author
Forward
0 new messages