Bug 147178 - Replace Google App Engine with AppScale
Summary: Replace Google App Engine with AppScale
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-21 18:12 PDT by Aakash Jain
Modified: 2017-03-15 17:19 PDT (History)
11 users (show)

See Also:


Attachments
Patch for migrating from google appengine to appscale (29.59 KB, patch)
2015-07-27 14:27 PDT, Aakash Jain
dbates: review-
dbates: commit-queue-
Details | Formatted Diff | Diff
Updated Patch, updated https port numbers. (29.61 KB, patch)
2015-07-28 12:16 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff
Updated port number corresponding to http(8080/8081) in master.cfg and urls.py as they are using http. (29.61 KB, patch)
2015-07-29 14:45 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff
Using default port numbers (80/443), server updated. (29.45 KB, patch)
2015-07-29 22:19 PDT, Aakash Jain
dbates: review+
Details | Formatted Diff | Diff
Updated ChangeLog (29.82 KB, patch)
2015-07-30 13:13 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2015-07-21 18:12:24 PDT
Google App Engine is deprecating the data model we’re currently using(Master-slave datastore : https://cloud.google.com/appengine/docs/deprecations/ms_datastore ).

Currently two of the apps webkit-queues and webkit-test-results(flakiness dashboard) use this data model. We need to switch to AppScale(open source solution) to host these apps.
Comment 1 Aakash Jain 2015-07-27 14:27:10 PDT
Created attachment 257590 [details]
Patch for migrating from google appengine to appscale
Comment 2 Daniel Bates 2015-07-27 17:04:08 PDT
Comment on attachment 257590 [details]
Patch for migrating from google appengine to appscale

View in context: https://bugs.webkit.org/attachment.cgi?id=257590&action=review

> LayoutTests/fast/harness/results.html:636
> +    return 'http://webkit-test-results.webkit.org:8081/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=' + encodeURIComponent(testList);

This is OK for now. Once we transition from appspot.com we should look to remove the need to explicitly specify a port number when accessing webkit-test-results.webkit.org. We will need to apply this change throughout this patch.

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:41
> +    this.baseURL = "http://webkit-queues.webkit.org:8080/";

Notice the queues.webkit.org currently HTTP redirects to <http://webkit-queues.appspot.com>. Can we make use of this existing CNAME instead of defining a new CNAME, webkit-queues?

This is OK for now. Once we transition from appspot.com we should look to remove the need to explicitly specify a port number when accessing webkit-queues.webkit.org. We will need to apply this change throughout this patch.

> Tools/QueueStatusServer/app.yaml:4
> +threadsafe: false

I'm assuming you verified that this setting is acceptable.

> Tools/TestResultServer/app.yaml:4
> +threadsafe: false

Ditto.

> Tools/TestResultServer/static-dashboards/loader.js:34
> -var TEST_RESULTS_SERVER = 'https://webkit-test-results.appspot.com/';
> +var TEST_RESULTS_SERVER = 'http://webkit-test-results.webkit.org:8081/';

Could this cause mixed content warnings?

> Websites/bugs.webkit.org/code-review.js:583
> -      statusBubble.src  = 'https://webkit-queues.appspot.com/status-bubble/' + attachment_id;
> +      statusBubble.src  = 'http://webkit-queues.webkit.org:8080/status-bubble/' + attachment_id;

r-; This will lead to a mixed content warning for each status bubble (*) because we are fetching content from a HTTP URL instead of an HTTPS URL.

(*) We redirect all HTTP traffic on bugs.webkit.org to use HTTPS.

> Websites/bugs.webkit.org/template/en/default/attachment/edit.html.tmpl:267
> -          <iframe src="https://webkit-queues.appspot.com/status-bubble/[% attachment.id %]"
> +          <iframe src="http://webkit-queues.webkit.org:8080/status-bubble/[% attachment.id %]"

This will cause a mixed content warning by a similar argument as for the status bubbles (above).

> Websites/bugs.webkit.org/template/en/default/attachment/list.html.tmpl:160
> -            <iframe src="https://webkit-queues.appspot.com/status-bubble/[% attachment.id %]"
> +            <iframe src="http://webkit-queues.webkit.org:8080/status-bubble/[% attachment.id %]"

Ditto.

> Websites/bugs.webkit.org/template/en/default/attachment/reviewform.html.tmpl:97
> -        <iframe src="https://webkit-queues.appspot.com/status-bubble/[% attachment.id %]"
> +        <iframe src="http://webkit-queues.webkit.org:8080/status-bubble/[% attachment.id %]"

Ditto.
Comment 3 Aakash Jain 2015-07-28 12:16:15 PDT
Created attachment 257669 [details]
Updated Patch, updated https port numbers.

Need to add appropriate SSL certificates to the server before committing.
Comment 4 Daniel Bates 2015-07-28 16:56:35 PDT
Comment on attachment 257669 [details]
Updated Patch, updated https port numbers.

View in context: https://bugs.webkit.org/attachment.cgi?id=257669&action=review

> Tools/QueueStatusServer/app.yaml:4
> +runtime: python27
> +threadsafe: false

It would be good to understand the need to explicitly use the Python 2.7 runtime.

Elaborating on the reasoning for specifying the YAML property threadsafe, we must explicitly define this property when using the Python 2.7 runtime per <https://cloud.google.com/appengine/docs/python/python25/migrate27#appyaml>. We define threadsafe to be false because the status server code was written to be run in AppEngine's CGI environment (by <http://trac.webkit.org/browser/trunk/Tools/QueueStatusServer/main.py?rev=174622#L90> and <https://cloud.google.com/appengine/docs/python/tools/webapp/utilmodule#run_wsgi_app>). And AppEngine's CGI programming model handles requests serially per section "Concurrent Requests and WSGI" of <https://cloud.google.com/appengine/docs/python/python25/migrate27>.
Comment 5 Aakash Jain 2015-07-29 14:45:58 PDT
Created attachment 257772 [details]
Updated port number corresponding to http(8080/8081) in master.cfg and urls.py as they are using http.

SSL certificates are already installed on the server, so we should be good to go.
Comment 6 Aakash Jain 2015-07-29 22:19:35 PDT
Created attachment 257816 [details]
Using default port numbers (80/443), server updated.

Reconfigured the server to listen on default ports (80,443) for both the apps. No need to hard-code the port numbers in the code now.
Comment 7 Daniel Bates 2015-07-30 11:35:09 PDT
Comment on attachment 257816 [details]
Using default port numbers (80/443), server updated.

View in context: https://bugs.webkit.org/attachment.cgi?id=257816&action=review

> Tools/QueueStatusServer/app.yaml:4
> +runtime: python27
> +threadsafe: false

We should add a remark to the appropriate ChangeLog line to describe how we came to these settings. See my remark in comment #4.

> Tools/TestResultServer/app.yaml:4
> +runtime: python27
> +threadsafe: false

Ditto.
Comment 8 Aakash Jain 2015-07-30 13:13:02 PDT
Created attachment 257847 [details]
Updated ChangeLog
Comment 9 Alexey Proskuryakov 2015-07-30 13:58:04 PDT
Committed <http://trac.webkit.org/r187605>.