Giter Site home page Giter Site logo

Comments (8)

kioopi avatar kioopi commented on June 5, 2024

Hi,

  • Click "Permissions" -> "Edit bucket policy". This will open the "Bucket Policy Editor" (Basically a text-field).
  • Copy the correct JSON snippet from https://github.com/codevise/pageflow/wiki/Zencoder-Bucket-Policies (Main or Output)
  • Replace and placeholders with the full bucket name. (You can copy it from above in the same window.)

Hope this helps. I will update the wiki-page.
Greetings

from pageflow.

digitalkram avatar digitalkram commented on June 5, 2024

Great! Thanks a lot kioopi! I was looking for an additional section like "Permissions". There was no indication that it is actually INSIDE the permission section. The modified wiki entry is a lot better. :)

Zencoder configuration worked fine. For Amaazon S3 two more questions:

  1. Where in AWS S3 mgmt conosle do I find the proper values for "s3_host_name" and "s3_host_alias"?
  2. in config/initializers/pageflow.rb it says that hardcoding the values is not a good idea. I would tend to use ENV vars and dotenv. But question here: Is there a list of ENV vars to set? Which ENV var name stands for which configuration option? Is it simply named as in the file? For instance api_key, output_bucket, s3_host_name, secret_access_key etc... ?

from pageflow.

kioopi avatar kioopi commented on June 5, 2024

About the S3 conf:

Most of the info is hidden somehere in here: http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html

The gist is:
If your bucket is on a server in the eu (you picked "ireland" when creating the bucket) the s3_host_name should be "s3-eu-west-1.amazonaws.com". (otherwise it's "s3.amazonaws.com", i think.)

The s3_host_alias should be set to .<s3_host_name>:
"de-mycompany-pageflow-development.s3-website-eu-west-1.amazonaws.com"

This may seem redundant configuration, but can be used to set up CDN support.

I'll get back to point 2. later. I'm in a hurry, sorry.

from pageflow.

digitalkram avatar digitalkram commented on June 5, 2024

Thanks again. Fine for s3_host_name. For the s3_host_alias I've been puzzled because unlike what you state above the s3_host_name looks different to the host alias and also the bucket part is not identical:
bucket => 'com-example-pageflow-development' s3_host_name => 's3-eu-west-1.amazonaws.com' s3_host_alias => 'com-example-pageflow.s3-website-eu-west-1.amazonaws.com'

in alias the bucket part (as per your definition above) is com-example-pageflow whereas bucket is defined different (+ -development).

in alias the hostname part (as per your definition above) is s3-eu-west-1.amazonaws.com but is defined different ( + -website - +): s3-website-eu-west-1.amazonaws.com

Which leads to yet another confusion:
config.zencoder_options: output_bucket => 'com-example-pageflow-out'
config.paperclip_s3_default_options: bucket => 'com-example-pageflow-development'

Which differs to the naming convention proposed by "wiki/Setting-up-External-Services":

de-mycompany-pageflow-development
de-mycompany-pageflow-development-out

But based on your feedback I assume that I am fine when I set:

bucket => xyz
s3_host_alias = <bucket>.<s3_host_name>

config.zencoder_options:
output_bucket => xyz-out
s3_host_alias = <output_bucket>.<s3_host_name>

so only the "-website-" in the middle of the "s3_host_name" value for s3_host_alias is not 100% clear to me. Can you help me out here?

And thanks again for also looking into # 2 (ENV var naming/list) once you find the time. :)

Cheers,

from pageflow.

kioopi avatar kioopi commented on June 5, 2024

Yes, i should have re-read what i've written. The -website- is necessary in the s3_host_alias

So it's:
s3_host_name = "s3-eu-west-1.amazonaws.com"
s3_host_alias = ".s3-website-eu-west-1.amazonaws.com"

is always the full name of the bucket.

from pageflow.

digitalkram avatar digitalkram commented on June 5, 2024

Great. I corrected my config accordingly. Hardcoded for now (this playground is only meant for installation testing as of now). Once the list of ENV var names is published I'll improve it and close this issue. Thanks!

Still there is an issue with uploading an image (not the uploading itself but with the post-processing). I'll open another issue for that.

from pageflow.

tf avatar tf commented on June 5, 2024

Re Item 2: There is no such list. The naming and definition of the ENV variables is completely up to you and you'll have to wire up the ENV variables in the pageflow initializer yourself, passing them to the corresponding config options.

We decided not to couple the pageflow engine to a specific configuration method since it trends to depend heavily on your hosting choices.

from pageflow.

digitalkram avatar digitalkram commented on June 5, 2024

Ah okay, I see. Now i feel a bit stupid as it is kind of obvious. Thanks for the pointer though. Also the wiki could pot. link to a page that indicates how to access ENV vars in ruby for those of us how are more sysadmin-ish than ruby developers. But googleing helped a lot so I am pretty sure I'll manage that. :)

from pageflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.