Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/#kong-community
Apache License 2.0
38.78k stars 4.77k forks source link

[kong start] should inform user of what ports it is listening on. #120

Closed nijikokun closed 9 years ago

nijikokun commented 9 years ago

Currently kong start does not tell you it is listening on ports, and what ports it is listening on, it would be beneficial to the end user to know this information;

Another useful thing would be to describe what is listening on those ports, example from Cassandra:

INFO  00:24:02 Starting Messaging Service on port 7000

Something like this would be extremely helpful.

thibaultcha commented 9 years ago

Since it's something configured in the nginx string, it's kind of messy, will have to do some regex magic to get it in the CLI

thibaultcha commented 9 years ago

The ideal would be to generate an nginx.conf entirely from our kong.yml configuration file, but we are not yet at this stage.

If I move the ports to 2 YAML properties:

proxy_port:
api_port:

and replace them in the nginx config string with a placeholder, the ports will be added to nginx.conf when the CLI outputs the nginx config. We could then have the ports in the CLI, and it would also make the ports property more visible to people while browsing the configuration. Should we do this? @thefosk

subnetmarco commented 9 years ago

The ideal would be to generate an nginx.conf entirely from our kong.yml configuration file.

I don't think I really like the idea, it's also nice to have the flexibility to configure the nginx internals, but I guess we need to learn from our users and see if they touch the nginx.conf at all.

thibaultcha commented 9 years ago

it's also nice to have the flexibility to configure the nginx internals

I agree. It's what Lapis is doing tho. Thoughts on the proposed solution for this issue?

subnetmarco commented 9 years ago

We can use placeholders like you suggested, and two YAML properties like:

port: 8000
admin_port: 8001

If you use placeholders, please make sure this also a placeholder in the same format: https://github.com/Mashape/kong/blob/master/kong.yml#L175

We still keep the nginx.conf if the user wants to make low-level changes to the nginx internals.

thibaultcha commented 9 years ago

Check #142