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

Dashboard: Dockerize the drag-n-drop webapp #1230

Closed
felipesanches opened this issue Feb 16, 2017 · 9 comments
Closed

Dashboard: Dockerize the drag-n-drop webapp #1230

felipesanches opened this issue Feb 16, 2017 · 9 comments
Assignees

Comments

@felipesanches
Copy link
Collaborator

Currently the drag-n-drop webapp hosted at http://fontbakery.appspot.com/ does not run FontForge checks (or any other checks that require usage of the subprocess module) due to secutiry restrictions on Google App Engine.

If we migrate the webapp to Google Container Engine, we'll be able to run these additional checks, improving the coverage of the reports geenrated by this webapp.

@felipesanches felipesanches added this to the 0.2.0 milestone Feb 16, 2017
@felipesanches
Copy link
Collaborator Author

I've been chatting to a friend and he suggested that maybe the webapp could remain hosted at GAppEngine, and simply dispatch jobs on the same containers used for our dashboard system infrastructure. Sounds like a neat approach.

@opsxcq
Copy link

opsxcq commented Feb 17, 2017

We can keep the GAE application, for job orchestration it's possible to use google cloud pub/sub, it have a fair price ($0.06 per GB).

An use case example, the user drag-n-drop:

  • User drag a font to fontbakery.appspot.com
  • GAE Application put a message in the job queue with the font and generate an ID, return it to JS in the user browser so it can start pooling for the results.
  • Worker get the message from the queue, process it, and add the result to another queue,
  • GAE Application receive the message and store the results permanently in the database identified by the ID
  • User get the job result for generated ID and display it

Another interesting use case that this solution can solve, a git push:

  • User configure his github account to use webhooks to trigger specialized endpoint on http://fontbakery.appspot.com/
  • GAE Application create a job when that endpoint is triggered (a different type, maybe "git", or another type to differentiate from job request above, create a different field or queue for that) and generate an ID for the job
  • Worker checkout the font repository, and run the tests, and post the results for that job in the queue
  • GAE Application receive the message and store the results permanently in the database identified by the ID

About this second use case, where to display the result ?

If we choose not to use google cloud pub/sub, is possible to implement a simple queue system with GAE, and make the worker simply use a pooling for get the jobs.

Containers can run on Google Container Engine or Google Compute Engine, some questions to help to choose:

  • What are the satisfactory requirements to run a test ? (Memory, processor and disk capacity)
  • How many requests/jobs would run in a day ?
  • How much it will cost on both platforms to run those tests with a satisfactory performance ?

@felipesanches
Copy link
Collaborator Author

felipesanches commented Feb 17, 2017

Google Fonts has got a bit more than 8 hundred font families. In a simple first prototype of the dockerized dashboard (which is not really the topic of this issue, but #1223 instead) we could leave out webhooks and simply re-run all checks on the full set of families every N days (or whenever there's some manual stats update trigger requested by a dashboard user).

A better implementation employing webhooks could reduce the amount of testsuite reruns.

But for the drag-n-drop app, the problem seems much simpler. The goal of this issue is simply to have the current webapp ported to docker to benefit from the additional checks that rely on the python subprocess module.

@m4rc1e
Copy link
Collaborator

m4rc1e commented Feb 17, 2017

Hey guys,

I've used Docker on Digital Ocean for gfregression, site.

Reason for my own virtual server was so I can have free reign of my dependencies. If I want to jump to aws, it is no problem.

@davelab6
Copy link
Contributor

davelab6 commented Feb 18, 2017 via email

@davelab6
Copy link
Contributor

davelab6 commented Feb 18, 2017 via email

@felipesanches
Copy link
Collaborator Author

Now that the dockerized dashboard is running on GKE, I think the natural next step is to port the drag and drop feature into that and then deprecate the App Engine instance.

@davelab6
Copy link
Contributor

davelab6 commented Mar 10, 2017 via email

@felipesanches
Copy link
Collaborator Author

Migrating to fontbakery-dashboard issue tracker per #1383

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

5 participants