lyft / presto-gateway

A load balancer / proxy / gateway for prestodb
Apache License 2.0
358 stars 156 forks source link

Not able to add a "GATEWAY_BACKEND" #121

Open ravi-krovvidi-exa opened 4 years ago

ravi-krovvidi-exa commented 4 years ago

curl -X POST http://localhost:8080/entity?entityType="GATEWAY_BACKEND" -d '{ "name": "presto1", "proxyTo": "http://localhost:9000","active": true, "routingGroup": "adhoc" }'

no matches found: http://localhost:8080/entity?entityType=GATEWAY_BACKEND

========= followed the steps in documentation and able to view the Presto Gateway UI locally (http://localhost:8080), just not able to add 'GATEWAY_BACKEND'

Note - I built from master branch

ravi-krovvidi-exa commented 4 years ago

I am able to add a new GATEWAY_BACKEND only via 'http://localhost:8080/entity'

ayushbilala commented 4 years ago

@ravi-krovvidi-exa Can you try below? curl --location --request POST 'http://localhost:8080/entity?entityType=GATEWAY_BACKEND' \ --header 'Content-Type: application/json' \ --data-raw '{
"name": "presto1", "proxyTo": "http://localhost:9000", "active": true, "routingGroup": "adhoc" }'

AvianshKumar commented 3 years ago

Hi @ayushbilala @ravi-krovvidi-exa, I am able installed presto-Gateway and it' up and runnng and api is also fine but How does presto-cli know about the redirection of url?

Please help...

endoplasmicR commented 2 years ago

the cli doesn't need to use the proxy URL, the idea was to use the gateway URL directly and the Presto/Trino traffic would be routed correctly