ray/dashboard/modules/serve
shrekris-anyscale 510a0e038c
[Serve] Add host and port options to the Serve config file (#27026)
The Serve CLI and REST API always sets the host to `0.0.0.0` and the port to Serve's default. This change adds `host` and `port` as top level options in the Serve config file, so users can manually set the host and port of their Serve application to different values.

This change introduces a new Serve config file format:

```yaml
import_path: ...

runtime_env: ...

host: ...

port: ...

deployments: ...
    ...
```

`host` and `port` are optional and can be omitted. A running Serve application's `host` and `port` cannot be changed. If a user tries to `serve deploy` a config file with different `host` and `port` options than an already-running Serve application, `serve deploy` will fail without making any changes to the application. The user must `serve shutdown` their application and restart it with `serve deploy` to change their `host` and `port`.

**Follow-Up Items**
* The following CLI commands should **not** start Serve automatically. They should check whether Serve is running and perform some sort of no-op if it's not. That would alleviate the concern that the user starts Serve by accident through a `GET` request and needs to deal with default `host`/`port` options. Corresponding docs should also be updated.
    * `serve status`
    * `serve config`
    * `serve shutdown`
2022-07-28 11:26:46 -05:00
..
tests [Serve] Only start Serve in the CLI through the serve deploy command (#27063) 2022-07-27 13:21:19 -05:00
__init__.py [serve] Add REST API (#22578) 2022-02-24 10:00:26 -06:00
sdk.py Revert "Revert "[Dashboard][Serve] Move Serve related endpoints to dashboard agent"" (#26336) 2022-07-06 19:37:30 -07:00
serve_agent.py [Serve] Add host and port options to the Serve config file (#27026) 2022-07-28 11:26:46 -05:00