analysis/appengine, storage/appengine: update to go111 GAE runtime Change-Id: I81f68348f3495438cfe60792ae16c17e7f26b36b Reviewed-on: https://go-review.googlesource.com/c/perf/+/191378 Reviewed-by: Katie Hockman <katie@golang.org>
diff --git a/analysis/appengine/.gcloudignore b/analysis/appengine/.gcloudignore new file mode 100644 index 0000000..199e6d9 --- /dev/null +++ b/analysis/appengine/.gcloudignore
@@ -0,0 +1,25 @@ +# This file specifies files that are *not* uploaded to Google Cloud Platform +# using gcloud. It follows the same syntax as .gitignore, with the addition of +# "#!include" directives (which insert the entries of the given .gitignore-style +# file at that point). +# +# For more information, run: +# $ gcloud topic gcloudignore +# +.gcloudignore +# If you would like to upload your .git directory, .gitignore file or files +# from your .gitignore file, remove the corresponding line +# below: +.git +.gitignore + +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +# Test binary, build with `go test -c` +*.test +# Output of the go coverage tool, specifically when used with LiteIDE +*.out \ No newline at end of file
diff --git a/analysis/appengine/README.md b/analysis/appengine/README.md new file mode 100644 index 0000000..6356d75 --- /dev/null +++ b/analysis/appengine/README.md
@@ -0,0 +1,7 @@ +# perf.golang.org + +Deploy: + +``` +gcloud app deploy --project=golang-org app.yaml +```
diff --git a/analysis/appengine/app.go b/analysis/appengine/app.go index dfc3b34..e3eaa87 100644 --- a/analysis/appengine/app.go +++ b/analysis/appengine/app.go
@@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build appengine - -// Package appengine contains an AppEngine app for perf.golang.org -package appengine +// This binary contains an App Engine app for perf.golang.org +package main import ( "log" @@ -51,6 +49,7 @@ mux.ServeHTTP(w, r) } -func init() { +func main() { http.HandleFunc("/", appHandler) + appengine.Main() }
diff --git a/analysis/appengine/app.yaml b/analysis/appengine/app.yaml index 2ae243c..e7859a0 100644 --- a/analysis/appengine/app.yaml +++ b/analysis/appengine/app.yaml
@@ -1,19 +1,11 @@ -# Update with -# google_appengine/appcfg.py [-V dev-test] update . -# -# Using -V dev-test will run as dev-test.perf.golang.org. - -application: golang-org -module: perf -version: main -runtime: go -api_version: go1 +runtime: go111 +service: perf handlers: -- url: /_ah/remote_api - script: _go_app -- url: /.* - script: _go_app - secure: always + - url: /_ah/remote_api + script: auto + - url: /.* + script: auto + secure: always env_variables: - STORAGE_URL_BASE: "https://perfdata.golang.org" + STORAGE_URL_BASE: 'https://perfdata.golang.org'
diff --git a/storage/appengine/.gcloudignore b/storage/appengine/.gcloudignore new file mode 100644 index 0000000..199e6d9 --- /dev/null +++ b/storage/appengine/.gcloudignore
@@ -0,0 +1,25 @@ +# This file specifies files that are *not* uploaded to Google Cloud Platform +# using gcloud. It follows the same syntax as .gitignore, with the addition of +# "#!include" directives (which insert the entries of the given .gitignore-style +# file at that point). +# +# For more information, run: +# $ gcloud topic gcloudignore +# +.gcloudignore +# If you would like to upload your .git directory, .gitignore file or files +# from your .gitignore file, remove the corresponding line +# below: +.git +.gitignore + +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +# Test binary, build with `go test -c` +*.test +# Output of the go coverage tool, specifically when used with LiteIDE +*.out \ No newline at end of file
diff --git a/storage/appengine/README.md b/storage/appengine/README.md new file mode 100644 index 0000000..579e1f6 --- /dev/null +++ b/storage/appengine/README.md
@@ -0,0 +1,7 @@ +# perfdata.golang.org + +Deploy: + +``` +gcloud app deploy --project=golang-org app.yaml +```
diff --git a/storage/appengine/app.go b/storage/appengine/app.go index 7a45c60..7319fd9 100644 --- a/storage/appengine/app.go +++ b/storage/appengine/app.go
@@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build appengine - -// Package appengine contains an AppEngine app for perfdata.golang.org -package appengine +// This binary contains an App Engine app for perfdata.golang.org +package main import ( "errors" @@ -148,6 +146,7 @@ mux.ServeHTTP(w, r) } -func init() { +func main() { http.HandleFunc("/", appHandler) + appengine.Main() }
diff --git a/storage/appengine/app.yaml b/storage/appengine/app.yaml index 13c43ac..ddab39d 100644 --- a/storage/appengine/app.yaml +++ b/storage/appengine/app.yaml
@@ -1,24 +1,16 @@ -# Update with -# google_appengine/appcfg.py [-V dev-test] update . -# -# Using -V dev-test will run as dev-test.perfdata.golang.org. - -application: golang-org -module: perfdata -version: main -runtime: go -api_version: go1 +runtime: go111 +service: perfdata handlers: -- url: /_ah/remote_api - script: _go_app -- url: /.* - script: _go_app - secure: always + - url: /_ah/remote_api + script: auto + - url: /.* + script: auto + secure: always env_variables: - CLOUDSQL_CONNECTION_NAME: "golang-org:us-central1:golang-org" - CLOUDSQL_USER: "root" - CLOUDSQL_PASSWORD: "" - CLOUDSQL_DATABASE: "perfdata" - GCS_BUCKET: "golang-perfdata" - PERFDATA_VIEW_URL_BASE: "https://perf.golang.org/search?q=upload:" + CLOUDSQL_CONNECTION_NAME: 'golang-org:us-central1:golang-org' + CLOUDSQL_USER: 'root' + CLOUDSQL_PASSWORD: '' + CLOUDSQL_DATABASE: 'perfdata' + GCS_BUCKET: 'golang-perfdata' + PERFDATA_VIEW_URL_BASE: 'https://perf.golang.org/search?q=upload:'