I've been exploring the alpha Cloud Endpoints for a couple of days now and have a fairly long list of questions. Hopefully someone can point me in the right direction! I'm attempting to use Cloud Endpoints to expose a number of services that are deployed in GKE.1) Is there documentation around all of the arguments that can be passed into the ESP image? (i.e. -n, -s, -v and so on)
2) I have the need to do some mapping from the exposed service endpoint (say "/foo") to the path the underlying services are expecting (sometimes just "/"). I have tried using the nginx.conf from the sample here: the https://github.com/GoogleCloudPlatform/endpoints-samples/tree/master/gke . When using this config, along with a YAML based upon esp_echo_custom_config.yaml, I can get the mapping to work, but validation of (say) API keys then doesn't occur. When I switch back to the canned nginx config, along with a config based upon esp_echo.yaml API keys are now checked, but I can't perform URL mapping. Is something missing from the sample nginx.conf ?
3) I was hopeful that defining the service in swagger / OpenAPI would mean my API would be exposed via the API Explorer. I guess that is not the case? Or perhaps this is just something I'm unable to get working?
4) Is it possible to deploy multiple (different) swagger files to the same project (i.e. same host)?
5) In the case of GKE it's somewhat confusing that the swagger points to <PROJECT_ID>.appspot.com as the host, but my services are not available via this URL. Is it envisioned this will always be the case? If a GKE service COULD be exposed via the appspot URL then this could simplify use of SSL (using the appspot cert instead of having to create our own).
6) Are there any examples of steps necessary to set up a GKE service secured via known client IDs? I did make a (brief) attempt to test using the OAuth playground. I switched out the Auth endpoint for the one mentioned in the sample swagger files (https://www.googleapis.com/oauth2/v1/certs), but using this endpoint returns 3 certificates, and unsure how to proceed to test the flow. Using the standard Google Oauth endpoint & setting the Authorization: Bearer header appears not to work (Endpoints complains about invalid token).
The information transmitted, including any attachments, is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited, and all liability arising therefrom is disclaimed. If you received this in error, please contact the sender and delete the material from any computer. PricewaterhouseCoopers LLP is a Delaware limited liability partnership. This communication may come from PricewaterhouseCoopers LLP or one of its subsidiaries.
--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/ddb54ff6-113b-4093-8832-161fe5084226%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The information transmitted, including any attachments, is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited, and all liability arising therefrom is disclaimed. If you received this in error, please contact the sender and delete the material from any computer. PricewaterhouseCoopers LLP is a Delaware limited liability partnership. This communication may come from PricewaterhouseCoopers LLP or one of its subsidiaries.
--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/0fe48ff1-37d6-42b0-8cf0-1712f9005709%40googlegroups.com.
$ ./start_esp -h
usage: start_esp [-h] [-k SERVICE_ACCOUNT_KEY] [-s SERVICE] [-v VERSION]
[-n NGINX_CONFIG] [-p HTTP_PORT] [-P HTTP2_PORT]
[-S SSL_PORT] [-N STATUS_PORT] [-a BACKEND]
[-c SERVICE_CONFIG_URL] [-z HEALTHZ]
ESP start-up script. This script fetches the service configuration from the
service management service and configures ESP to expose the specified ports and
proxy requests to the specified backend.
The service name and config ID are optional. If not supplied, the script
fetches the service name and the config ID from the metadata service as
attributes "endpoints-service-name" and "endpoints-service-config-id".
ESP relies on the metadata service to fetch access tokens for Google services.
If you deploy ESP outside of Google Cloud environment, you need to provide a
service account credentials file by setting GOOGLE_APPLICATION_CREDENTIALS
environment variable or by passing "-k" flag to this script.
If a custom nginx config file is provided ("-n" flag), the script launches ESP
with the provided config file. Otherwise, the script uses the exposed ports
("-p", "-P", "-S", "-N" flags) and the backend ("-a" flag) to generate an nginx
config file.
optional arguments:
-h, --help show this help message and exit
-k SERVICE_ACCOUNT_KEY, --service_account_key SERVICE_ACCOUNT_KEY
Use the service account key JSON file to access the
service control and the service management. You can
also set GOOGLE_APPLICATION_CREDENTIALS environment
variable to the location of the service account
credentials JSON file. If the option is omitted, ESP
contacts the metadata service to fetch an access
token.
-s SERVICE, --service SERVICE
Set the name of the Endpoints service. If omitted and
-c not specified, ESP contacts the metadata service to
fetch the service name.
-v VERSION, --version VERSION
Set the service config ID of the Endpoints service. If
omitted and -c not specified, ESP contacts the
metadata service to fetch the service config ID.
-n NGINX_CONFIG, --nginx_config NGINX_CONFIG
Use a custom nginx config file instead of the config
template /etc/nginx/nginx-auto.conf.template. If you
specify this option, then all the port options are
ignored.
-p HTTP_PORT, --http_port HTTP_PORT
Expose a port to accept HTTP/1.x connections. By
default, if you do not specify any of the port options
(-p, -P, and -S), then port 8080 is exposed as
HTTP/1.x port. However, if you specify any of the port
options, then only the ports you specified are
exposed, which may or may not include HTTP/1.x port.
-P HTTP2_PORT, --http2_port HTTP2_PORT
Expose a port to accept HTTP/2 connections. Note that
this cannot be the same port as HTTP/1.x port.
-S SSL_PORT, --ssl_port SSL_PORT
Expose a port for HTTPS requests. Accepts both
HTTP/1.x and HTTP/2 secure connections. Requires the
certificate and key files /etc/nginx/ssl/nginx.crt and
/etc/nginx/ssl/nginx.key
-N STATUS_PORT, --status_port STATUS_PORT
Change the ESP status port. Status information is
available at /endpoints_status location over HTTP/1.x.
Default value: 8090.
-a BACKEND, --backend BACKEND
Change the application server address to which ESP
proxies the requests. Default value: 127.0.0.1:8081.
For HTTPS backends, please use "https://" prefix, e.g.
https://127.0.0.1:8081 and provide the certificate and
key files /etc/nginx/ssl/backend.crt and
/etc/nginx/ssl/backend.key. For HTTP/1.x backends,
prefix "http://" is optional. For GRPC backends,
please use "grpc://" prefix, e.g.
grpc://127.0.0.1:8081.
-c SERVICE_CONFIG_URL, --service_config_url SERVICE_CONFIG_URL
Use the specified URL to fetch the service
configuration instead of using the default URL
template https://servicemanagement.googleapis.com/v1/s
ervices/{}/config?configId={}.
-z HEALTHZ, --healthz HEALTHZ
Define a health checking endpoint on the same ports as
the application backend. For example, "-z healthz"
makes ESP return code 200 for location "/healthz",
instead of forwarding the request to the backend.
Default: not used.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.
Hi Mark,thanks for reaching out with your questions. I'll do my best to answer inline.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.