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

Switch to Cloudinary for a fully-featured image service / CDN #163

Open
3 of 4 tasks
krissy opened this issue Mar 26, 2017 · 3 comments
Open
3 of 4 tasks

Switch to Cloudinary for a fully-featured image service / CDN #163

krissy opened this issue Mar 26, 2017 · 3 comments

Comments

@krissy
Copy link
Member

krissy commented Mar 26, 2017

Blocks: #159

What

Currently we are serving our assets directly from an Amazon S3 bucket, not through a CDN. We signed up for the Free Tier service on the 10th of April, 2016, and will start being charged one year after (i.e. soon!).

In addition to this, going forward, we need to prioritise serving images quickly, revealing select image URLs securely in an API (signed), as well as being able to manipulate images easily.

Cloudinary is "a cloud-based service that provides an end-to-end image management solution including uploads, storage, manipulations, optimizations and delivery." In short, it should make our lives easier, and the free package does the job for us + does NOT expire. Thus, we should move our image management implementation over to Cloudinary. And ideally (but not necessarily) do it before the 10th of April.

How

There are several, detailed resources stepping through how to integrate Cloudinary with Rails, including how to migrate existing images over from another source:

https://devcenter.heroku.com/articles/cloudinary#using-with-ruby-on-rails
http://cloudinary.com/documentation/rails_integration#getting_started_guide

We may have to move over from using the current Paperclip gem to CarrierWave as this is more supported by Cloudinary. But if we want an intermediate step to migrating, there is a limited Paperclip-cloudinary gem we can look into using first.

  • Set up a DML cloudinary account and record any auth details in our secure passwords spreadsheet (ask the team to add your email if needed). NB: We currently do not enable S3 locally, which makes it hard to test in development mode before staging / production. We might want to change this, so in local development envs we have the same asset solution but pointing to another local Cloudinary instance. So we may need to set up 3 accounts, local / staging / production
  • Switch from Paperclip to Carrierwave as our image upload tool
  • Integrate Cloudinary with our solution following the steps in the docs linked above, moving away from using S3. Ensure local, staging and production envs use the appropriate cloudinary account.
  • Regression test all the things!
@kevinpmcc
Copy link

set up 3 cloudinary accounts. details are in passwords spreadsheet.

@kevinpmcc kevinpmcc assigned kevinpmcc and paulalexrees and unassigned kevinpmcc Mar 27, 2017
@kevinpmcc
Copy link

carrierwave and cloudinary added and working on local. some failing tests to fix.

@krissy
Copy link
Member Author

krissy commented Apr 2, 2017

That's great news @kevinpmcc! 👏 Feel free to push the branch up and open a pull request for 90% review even with specs pending. Never too early for feedback! Also feel free to push what you have to staging for some QA. If you merge into the staging branch it'll auto-deploy to drawmylife-staging.herokuapp.

This was referenced Apr 2, 2017
@CathMollie CathMollie added this to the DML Admin Tool release 2.0 milestone Apr 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants