Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can we make opennews.org work via https? #48

Closed
ryanpitts opened this issue Apr 30, 2015 · 11 comments
Closed

can we make opennews.org work via https? #48

ryanpitts opened this issue Apr 30, 2015 · 11 comments
Milestone

Comments

@ryanpitts
Copy link
Collaborator

Currently sad-facing: https://opennews.org

@jbuck jbuck added this to the 2 * Cinco de Mayo milestone Apr 30, 2015
@jbuck
Copy link
Contributor

jbuck commented May 1, 2015

Looking at the configuration here, opennews.org is a static site hosted on S3. Switching this over to HTTPS will be easy to do with Cloudfront.

  • Get a certificate for opennews.org
  • Upload cert to AWS
  • Create cloudfront distribution for opennews.org
  • Point opennews.org DNS at cloudfront distro

@ryanpitts
Copy link
Collaborator Author

Nice!

@jbuck
Copy link
Contributor

jbuck commented May 5, 2015

I've placed the certificate request with Digicert and filed a tracking bug in Bugzilla so MoCo can track it there: https://bugzilla.mozilla.org/show_bug.cgi?id=1161705 . It needs Extended Validation approval so it might take a bit longer to get this certificate processed.

@jbuck jbuck modified the milestones: May Two-Four, '76 Canada Cup May 25, 2015
@jbuck
Copy link
Contributor

jbuck commented May 25, 2015

@ryanpitts Okay, I'm finally ready to roll on this. Looking at https://github.com/mozilla/mozilla-opennews I think the best way to get this rolling would be to setup Travis CI to handle deployment to S3. This is a change from your current Jenkins-based deployment though. How would you and the Open News gang feel about that?

@ryanpitts
Copy link
Collaborator Author

I think we'd feel pretty great about that -- one question, though. Is there an API endpoint that we can hit to trigger a build?

That was one of the nice discoveries about Jenkins, that you can enable an endpoint to trigger builds. Currently we have automatic deploy to staging upon changes to the repo, and then we have a Slackbot to trigger deploy to prod by hitting the Jenkins endpoint. Could we replicate that kind of workflow?

@ryanpitts
Copy link
Collaborator Author

Also, I bet you already know all this, but this guide to serving an S3 site via SSL was interesting to me: http://knightlab.northwestern.edu/2015/05/21/implementing-ssl-on-amazon-s3-static-websites/

@jbuck
Copy link
Contributor

jbuck commented May 26, 2015

@ryanpitts That's exactly how I deploy all of our static sites now, I just do it with a cloudformation template: https://github.com/MozillaFoundation/mofo-devops/blob/master/AWS/cloudformation-templates/s3-and-cloudfront.json

@jbuck
Copy link
Contributor

jbuck commented May 26, 2015

@ryanpitts that should be possible, though I'm not entirely certain how. What we've done for other sites is have two branches, one for staging, and one for production. And configure Travis to deploy to the appropriate environment based on the branch name.

Doing some sort of external trigger to deploy to production sounds neat, I'd like to figure out how to do that!

@ryanpitts
Copy link
Collaborator Author

Super easy with the /build endpoint in Jenkins: https://github.com/ryanpitts/membot/blob/master/membot/apps/membot/commands/build_opennews_site.py

We have a Slackbot that responds to commands like this:

screen shot 2015-05-26 at 1 05 21 pm

@jbuck jbuck modified the milestones: 216 web safe colours, Next Tasks Jun 16, 2015
@jbuck jbuck modified the milestones: Next Tasks, 404 jbuck not found Jul 13, 2015
@jbuck
Copy link
Contributor

jbuck commented Jul 28, 2015

@ryanpitts Okay, I've edited the deploy script on jenkins so this all works now. Hooray!

@jbuck jbuck closed this as completed Jul 28, 2015
@ryanpitts
Copy link
Collaborator Author

Whoa look at that! Awesome, thanks @jbuck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants