google endpoints on flex app engine
When we use endpoints with std app engine environment Following lines in app.yaml, defines the starting point of the app - url: /_ah/spi/.* script: main.api But as flex engine uses 'gunicorn' to define the staring point as given below entrypoint: gunicorn -b :$PORT main:app How should define main.py of my cloud endpoint to be starting point with google app engine in flex environment ? Edit1: after the suggestion below from this link. I updated my app.yaml to: runtime: python env: flex entrypoint: gunicorn -b :$PORT main:api service: s2 endpoints_api_service: name: echo-api.endpoints.my-project-id.cloud.goog config_id: my-config-id but now while deploying, in my main.py file I get the import error ImportError: No module named endpoints even changing the import statment to from google.appengine.ext import endpoints does not help Edit2: I added the endpoints library to the project lib folder and also added appengine_config.py file to take care of this library, still it breaks at import endpoints. for my directory structure refer the image below
A summary from Quickstart for Endpoints on App Engine Flexible Environment (assuming python below, if using other language select the respective examples): configure endpoints: To configure Endpoints, replace YOUR-PROJECT-ID with your own project ID in the openapi.yaml configuration file's host field: swagger: "2.0" info: description: "A simple Google Cloud Endpoints API example." title: "Endpoints Example" version: "1.0.0" host: "echo-api.endpoints.YOUR-PROJECT-ID.cloud.goog" deploy your Open API specification: To deploy your Open API specification, run the following gcloud command: gcloud service-management deploy openapi.yaml This will create a new Cloud Endpoints service with the name echo-api.endpoints.YOUR-PROJECT_ID.cloud.goog if it does not exist, and then update that service's configuration to your Open API specification. The command returns several lines of information, including a line similar to the following: Service Configuration [2016-04-27R2] uploaded for service "echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog" Make a note of the service name and the service configuration ID, it is used in the next step. update your app.yaml: Edit app.yaml to reflect the Endpoints configuration ID and add the following to enable Endpoints API Management features on App Engine Flex and add the service name and configuration ID: beta_settings: use_endpoints_api_management: true endpoints_api_service: name: echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog config_id: YOUR-CONFIG-ID # 2016-04-27R2 in this example. Save the app.yaml file. You will need to repeat these steps and update the app.yaml file when you make changes to your Open API specification.
For Endpoints Frameworks v1.0, you have to copy the endpoints module into your app directory to deploy it on Flex. If you're using the Cloud SDK, it's located in /path/to/google-cloud-sdk/platform/google_appengine/lib/endpoints-1.0.
Are crons executed globally or per app instance (i.e. load dependent)?
AppEngine as WebService and S3 as storage
Setting cookie in LiftFilter
Send Emails From AppEngine Locally
ImportError: cannot import name taskqueue
gwt appengine - user service return page
Uploading a file to AppEngine using GWT: How to provide feedback to the user?
Blackberry Push SDK on Google App Engine
App engine 1.4.0 urlfetch() data over 1M
Google App Engine + Validation
GQL Random Record [duplicate]
AppEngine entity modeling - minimizing entity groups and achieving atomic cascading update/delete
What does _ah mean in Google App Engine?
Spring Roo with GAE error on most basic tests
Running a web crawler for selected sites on google app engine?
Many-to-many relationship modeling in google app engine