You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this demo, a DAG node is defined through the `bind` method of the Deployment, and it is deployed using the `Serve.run` API.
73
-
Furthermore, a Deployment can bind other Deployments, and users can use the Deployment input parameters in a similar way to `DeploymentHandle`. For example:
70
+
In this demo, a deployment is defined through the `bind` method, and it is deployed using the `Serve.run` API.
71
+
Furthermore, a deployment can bind other deployments, and users can use the deployment input parameters in a similar way to the`DeploymentHandle`. For example:
Using a config file, we can deploy the Serve application through the CLI. For Java deployment, we can also describe it in a Python file and generate the corresponding deployment configuration in the config file. Let's take the example of the text.py file:
In this code, we define the Java Deployment `World` using the Python API and then bind it with a Python Deployment `Hello` into the `Ingress` to form an app. By using the `serve build` command, the Serve config file can be generated.
164
+
```shell
165
+
$ serve build text:app -o serve_config.yaml
166
+
```
167
+
The generated config file looks like this:
168
+
```yaml
169
+
proxy_location: EveryNode
170
+
171
+
http_options:
172
+
host: 0.0.0.0
173
+
port: 8000
174
+
175
+
grpc_options:
176
+
port: 9000
177
+
grpc_servicer_functions: []
178
+
179
+
applications:
180
+
- name: app1
181
+
route_prefix: /
182
+
import_path: text:app
183
+
runtime_env: {}
184
+
deployments:
185
+
- name: Hello
186
+
- name: World
187
+
- name: Ingress
188
+
189
+
```
190
+
By using this serve config file, the Application can be deployed through the "serve run" command:
191
+
```shell
192
+
$ serve run serve_config.yaml
193
+
```
130
194
131
195
### Serve Handle C++ Core
132
196
@@ -157,6 +221,5 @@ This is also done to maintain consistency with the Python API, and to allow for
157
221
## Test Plan and Acceptance Criteria
158
222
Related test cases will be provided under ray/java/serve, and they will cover the three scenarios mentioned above.
159
223
## (Optional) Follow-on Work
160
-
- Modify the Ray Serve Java API to support the usage of DAGs.
161
224
- Optimize the code by removing unused components and improving cross-language parameter handling.
0 commit comments