Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

[WIP]: Cloud endpoints and GAE Flex support #116

Closed
wants to merge 29 commits into from

Conversation

Splaktar
Copy link
Contributor

@Splaktar Splaktar commented Mar 18, 2017

Work in progress. Looking for help with the OpenAPI Spec description here.

Support Cloud Endpoints and GAE Flex deployment.
Enable Cloud Debug and Cloud Trace.
Support NodeJS 6.x+.
Fix deprecation warnings from NodeJS.
Add GAE Health check support.

Closes #100. Closes #99.
Relates to #85.
Fixes #80.

…Mongo.

upgrade to latest Express and related libraries
convert tasks to be triggered directly instead of via Redis+Clustering
convert cron to call new tasks
remove deprecated express-annotations
remove API docs since they depended upon express-annotations
convert rate metering to in-memory only since Redis is no longer an option
temporarily disable CSRF protection

Fixes #96 #80
trying to get rid of `sys` is deprecated warning, but no luck
…111!!11

update mongoose
use default network since Flex doesn't seem to work on Legacy network
it relied on `express-rate` which hasn't been updated in 5 years and depends on deprecated functions in NodeJS
we will use Cloud Endpoints for rate metering instead

Closes #115
trying to get rid of `sys` is deprecated warning, but no luck
…111!!11

update mongoose
use default network since Flex doesn't seem to work on Legacy network
…loudEndpointsAndGaeFlex

Conflicts:
	app.yaml
	lib/config/express.js
	lib/controllers/api/index.js
	package.json
	server.js
… cloudEndpointsAndGaeFlex

Conflicts:
	lib/controllers/api/index.js
	server.js
@Splaktar Splaktar added this to the v0.3.0 milestone Mar 18, 2017
cron:
- description: daily 9am EST ingestion job
url: /
schedule: every day 13:00
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • update this to do ingestion jobs once OpenAPI spec is done and Cloud Endpoints are all working.

port: process.env.PORT || process.env.NODEJS_PORT || 3000,
hostname: process.env.NODEJS_IP || undefined,
port: process.env.PORT || 3000,
hostname: undefined,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was key in getting GAE Flex working. If I put anything in here it would cause forwarding from the GAE proxy to Express to fail and give 503 errors.

@@ -61,6 +65,13 @@ module.exports = function (app) {
}));
}

// Configure GAE proxy and health checks. Force HTTPS.
app.enable('trust proxy');
// app.use(yesHttps({ maxAge: YES_HTTPS_MAX_AGE, includeSubdomains: true, preload: true }));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Re-enable yes-http once HTTPS is working with hub.gdgx.io on Cloud Endpoints.

var morgan = require('morgan');
var compression = require('compression');
var bodyParser = require('body-parser');
// var yesHttps = require('yes-https');
const MongoStore = require('connect-mongo')(session);
// var csrf = require('csurf');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Re-enable CSRF protection

"https"
],
"paths": {
"/chapters": {
Copy link
Contributor Author

@Splaktar Splaktar Mar 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenAPI Spec TODO:

  • events API
  • admin API
  • applications API
  • frisbee API
  • metrics API
  • tags API
  • users API
  • auth API

@Splaktar Splaktar closed this Mar 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant