confetti-clj / confetti

🎉 A tool to help creating and deploying static sites with AWS
Mozilla Public License 2.0
101 stars 6 forks source link

Cloudflare #2

Closed podviaznikov closed 7 years ago

podviaznikov commented 9 years ago

I would suggest looking also into Cloudflare and potentially implement integration into confetti.

I want to share my current setup/process for static sites.

  1. I buy domain at namecheap.com
  2. I use stout which will create s3 bucket and cloudfront distribution
  3. I go to cloudflare, setup new domain.
  4. Change name servers in namecheap to point to cloudflare
  5. Setup CNAME in the cloudflare pointing to the cloudfront distribution host
  6. Setup page rules in cloudflare to automatically redirect http to https

I used to use Route53 before cloudflare. But now I think Cloudflare is better because:

  1. it's free and for Route53 you still need to pay
  2. it has free SSL, not setup required
  3. it has caching features, analytics etc

It seems that cloudflare has nice API and I suggest looking into it so instead of setting up Route53 and provisioning certificates user would be able to get same features using cloudflare (and for free). I think if I have cloudflare support I would use confetti instead of stout:)

martinklepsch commented 9 years ago

I'd definitely be interested in supporting multiple options if possible but there are some nice properties to staying on AWS too:

I also think Route53's price is negligible and setting up SSL for the CloudFront distribution should not be too hard. As for caching features: that's what CloudFront handles right?

That said I'm not against it, it just seems like making the implementation more complex just to save 50c.

Does that make sense?

podviaznikov commented 9 years ago

I was suggesting this as optional feature. Getting SSL for free and automatically was the biggest feature I moved to Cloudflare.

What would be the interface to use this tool? Did you consider boot tasks that can be chained together?

What do you think about creating Google Analytics account and Google Webmaster tools account automatically in the future (I don't know if API expose those functionalities)? Will it feat confetti or it's responsibility for another tool in your mind?

martinklepsch commented 8 years ago

Analytics and webmaster accounts are out of scope for confetti itself I think.

I looked into cloudflare but it seems they don't provide an API that we could use to programmatically create and configure distributions? Are you aware of any such thing?

Also I just pushed a bunch of new stuff, feel free to give it a try. (You can delete all created resources with two clicks in the cloudformation console.)

I might move the repo into an org, so please don't spread any links yet :)

podviaznikov commented 8 years ago

https://api.cloudflare.com/#zone-properties - what about this one. I never used their API, but it seems that they have a lot of relevant endpoints

podviaznikov commented 8 years ago

Nice, you already moved it to an org! Nice logo btw. Will try it either today or in few days

martinklepsch commented 8 years ago

@podviaznikov huh, strange I didn't find these cloudflare docs. Only thing I found was http://appdev.cloudflare.com/ which made me think they haven't thought about this stuff much at all.

podviaznikov commented 8 years ago

@martinklepsch I run this script and I see that some things were created: like s3 bucket. But no route53 zone was created and no cloudformation

martinklepsch commented 8 years ago

Route53 is optional and can be enabled via the dns option. If you go into the cloudformation console you should see a "stack" that holds all resources. There is some UI to explore those as well I believe. On Thu, 26 Nov 2015 at 05:51, Anton Podviaznikov notifications@github.com wrote:

@martinklepsch https://github.com/martinklepsch I run this script and I see that some things were created: like s3 bucket. But no route53 zone was created and no cloudformation

— Reply to this email directly or view it on GitHub https://github.com/confetti-clj/confetti/issues/2#issuecomment-159804390 .

martinklepsch commented 7 years ago

I'll close this, Cloudflare is out of scope for this lib.