vmware-archive / dispatch

Dispatch is a framework for deploying and managing serverless style applications.
http://dispatchframework.io
Apache License 2.0
532 stars 58 forks source link

Add local API gateway to API manager #556

Closed kars7e closed 6 years ago

kars7e commented 6 years ago

Part of https://github.com/vmware/dispatch/issues/518

Added

Fixed

Note: Local API gateway does a best effort to match Kong's behavior and currently passes e2e tests:

➜  export API_GATEWAY_HTTP_HOST="http://127.0.0.1:8081"
➜  export API_GATEWAY_HTTPS_HOST="https://127.0.0.1:8444"
➜  INSTALL_DISPATCH=0 e2e/scripts/run-e2e.sh e2e/tests/apis.bats
=> running clean first
 ✓ Clean all

1 test, 0 failures
=> e2e/tests/apis.bats
 ✓ Create Images for test
 ✓ Create Functions for test
 ✓ Test APIs with HTTP(S)
 ✓ Test APIs with HTTPS ONLY
 ✓ Test APIs with Kong Plugins
 ✓ Test APIs with CORS
 ✓ Test API Updates
 ✓ Cleanup

8 tests, 0 failures

finished

When executed like this:

➜  dispatch-server local --enable-tls
INFO[0000] API Gateway: serving HTTP traffic at http://127.0.0.1:8081
WARN[0000] HTTPS requested but key and cert paths are empty. using self-generated PKI
INFO[0000] API Gateway: serving HTTPS traffic at https://127.0.0.1:8444
WARN[0000] Tracer endpoint not provided, OpenTracing is disabled
INFO[0000] Dispatch HTTP server: serving HTTP traffic at http://127.0.0.1:8080
WARN[0000] HTTPS requested but key and cert paths are empty. using self-generated PKI
INFO[0000] Dispatch HTTP server: serving HTTPS traffic at https://127.0.0.1:8443