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
Create a *runtime.env* file containing the following entries:
73
+
Create a `runtime.env` file containing the following entries:
80
74
81
75
```
82
-
TASK-TRAFFIC-ROUTER-WEBSERVER-TAG=
83
-
TASK-TRAFFIC-ROUTER-TAG=
84
-
CLEARML_API_HOST=https://api.
76
+
PROXY_TAG=
77
+
ROUTER_TAG=
78
+
ROUTER_NAME=main-router
79
+
ROUTER__WEBSERVER__SERVER_PORT=8010
80
+
ROUTER_URL=
81
+
CLEARML_API_HOST=
85
82
CLEARML_API_ACCESS_KEY=
86
83
CLEARML_API_SECRET_KEY=
87
-
ROUTER_URL=
88
-
ROUTER_NAME=main-router
89
-
AUTH_ENABLED=true
90
-
SSL_VERIFY=true
91
84
AUTH_COOKIE_NAME=
92
-
AUTH_BASE64_JWKS_KEY=
93
-
LISTEN_QUEUE_NAME=
94
-
EXTRA_BASH_COMMAND=
85
+
AUTH_SECURE_ENABLED=true
95
86
TCP_ROUTER_ADDRESS=
96
87
TCP_PORT_START=
97
88
TCP_PORT_END=
98
89
```
99
90
100
91
Edit it according to the following guidelines:
101
-
102
-
*`CLEARML_API_HOST`: URL usually starting with `https://api.`
103
-
*`CLEARML_API_ACCESS_KEY`: ClearML server api key
104
-
*`CLEARML_API_SECRET_KEY`: ClearML server secret key
105
-
*`ROUTER_URL`: URL for this router that was previously configured in the load balancer starting with `https://`
106
-
*`ROUTER_NAME`: Unique name for this router
107
-
*`AUTH_ENABLED`: Enable or disable http calls authentication when the router is communicating with the ClearML server
108
-
*`SSL_VERIFY`: Enable or disable SSL certificate validation when the router is communicating with the ClearML server
109
-
*`AUTH_COOKIE_NAME`: Cookie name used by the ClearML server to store the ClearML authentication cookie. This can usually be found in the `value_prefix` key starting with `allegro_token` in `envoy.yaml` file in the ClearML server installation (`/opt/allegro/config/envoy/envoy.yaml`) (see below)
110
-
*`AUTH_SECURE_ENABLED`: Enable the Set-Cookie `secure` parameter
111
-
*`AUTH_BASE64_JWKS_KEY`: Value form `k` key in the `jwks.json` file in the ClearML server installation
112
-
*`LISTEN_QUEUE_NAME`: (*optional*) Name of queue to check for tasks (if none, every task is checked)
113
-
*`EXTRA_BASH_COMMAND`: Command to be launched before starting the router
92
+
*`PROXY_TAG`: AI Application Gateway proxy tag. The Docker image tag for the proxy component, which needs to be
93
+
specified during installation. This tag is provided by ClearML to ensure compatibility with the recommended version.
94
+
*`ROUTER_TAG`: App Gateway Router tag. The Docker image tag for the router component. It defines the specific version
95
+
to be installed and is provided by ClearML as part of the setup process.
96
+
*`ROUTER_NAME`: In the case of [multiple routers on the same tenant](#multiple-router-in-the-same-tenant), each router
97
+
needs to have a unique name.
98
+
*`ROUTER__WEBSERVER__SERVER_PORT`: Webserver port. The default port is 8080, but it can be adjusted to meet specific network requirements.
99
+
*`ROUTER_URL`: External address to access the router. This can be the IP address or DNS of the node where the router
100
+
is running, or the address of a load balancer if the router operates behind a proxy/load balancer. This URL is used
101
+
to access AI workload applications (e.g. remote IDE, model deployment, etc.), so it must be reachable and resolvable for them.
102
+
*`CLEARML_API_HOST`: ClearML API server URL starting with `https://api.`
103
+
*`CLEARML_API_ACCESS_KEY`: ClearML server API key.
104
+
*`CLEARML_API_SECRET_KEY`: ClearML server secret key.
105
+
*`AUTH_COOKIE_NAME`: Cookie used by the ClearML server to store the ClearML authentication cookie. This can usually be
106
+
found in the `envoy.yaml` file in the ClearML server installation (`/opt/allegro/config/envoy/envoy.yaml`), under the
107
+
`value_prefix` key starting with `allegro_token`
108
+
*`AUTH_SECURE_ENABLED`: Enable the Set-Cookie `secure` parameter. Set to `false` in case services are exposed with `http`.
114
109
*`TCP_ROUTER_ADDRESS`: Router external address, can be an IP or the host machine or a load balancer hostname, depends on network configuration
115
110
*`TCP_PORT_START`: Start port for the TCP Session feature
116
111
*`TCP_PORT_END`: End port for the TCP Session feature
@@ -121,12 +116,42 @@ Run the following command to start the router:
121
116
sudo docker compose --env-file runtime.env up -d
122
117
```
123
118
124
-
:::note How to find my jwkskey
119
+
### Advanced Configuration
125
120
126
-
The *JSON Web Key Set* (*JWKS*) is a set of keys containing the public keys used to verify any JSON Web Token (JWT).
121
+
#### Using Open HTTP
127
122
128
-
In a `docker-compose` server installation, this can be found in the `CLEARML__secure__auth__token_secret` env var in the apiserver server component.
123
+
To deploy the App Gateway Router on open HTTP (without a certificate), set the `AUTH_SECURE_ENABLED` entry
124
+
to `false` in the `runtime.env` file.
129
125
130
-
:::
126
+
#### Multiple Router in the Same Tenant
127
+
128
+
If you have workloads running in separate networks that cannot communicate with each other, you need to deploy multiple
129
+
routers, one for each isolated environment. Each router will only process tasks from designated queues, ensuring that
130
+
tasks are correctly routed to agents within the same network.
131
+
132
+
For example:
133
+
* If Agent A and Agent B are in separate networks, each must have its own router to receive tasks.
134
+
* Router A will handle tasks from Agent A’s queues. Router B will handle tasks from Agent B’s queues.
135
+
136
+
To achieve this, each router must be configured with:
137
+
* A unique `ROUTER_NAME`
138
+
* A distinct set of queues defined in `LISTEN_QUEUE_NAME`.
139
+
140
+
##### Example Configuration
141
+
Each router's `runtime.env` file should include:
142
+
143
+
* Router A:
144
+
145
+
```
146
+
ROUTER_NAME=router-a
147
+
LISTEN_QUEUE_NAME=queue1,queue2
148
+
```
131
149
150
+
* Router B:
132
151
152
+
```
153
+
ROUTER_NAME=router-b
154
+
LISTEN_QUEUE_NAME=queue3,queue4
155
+
```
156
+
157
+
Make sure `LISTEN_QUEUE_NAME` is set in the [`docker-compose` environment variables](#docker-compose-file) for each router instance.
Copy file name to clipboardexpand all lines: docs/deploying_clearml/enterprise_deploy/appgw_install_k8s.md
+60-45
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,26 @@ title: Kubernetes Deployment
3
3
---
4
4
5
5
:::important Enterprise Feature
6
-
The Application Gateway is available under the ClearML Enterprise plan.
6
+
The AI Application Gateway is available under the ClearML Enterprise plan.
7
+
:::
8
+
9
+
This guide details the installation of the ClearML App Gateway Router.
10
+
The App Gateway Router enables access to your AI workload applications (e.g. remote IDEs like VSCode and Jupyter, model API interface, etc.).
11
+
It acts as a proxy, identifying ClearML Tasks running within its [K8s namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/)
12
+
and making them available for network access.
13
+
14
+
:::important
15
+
The App Gateway Router must be installed in the same K8s namespace as a dedicated ClearML Agent.
16
+
It can only configure access for ClearML Tasks within its own namespace.
7
17
:::
8
18
9
-
This guide details the installation of the ClearML AI Application Gateway, specifically the ClearML Task Router Component.
10
19
11
20
## Requirements
12
21
13
22
* Kubernetes cluster: `>= 1.21.0-0 < 1.32.0-0`
14
23
* Helm installed and configured
15
-
* Helm token to access `allegroai` helm-chart repo
16
-
* Credentials for `allegroai` docker repo
24
+
* Helm token to access `clearml` helm-chart repo
25
+
* Credentials for `clearml` docker repo
17
26
* A valid ClearML Server installation
18
27
19
28
## Optional for HTTPS
@@ -26,62 +35,55 @@ This guide details the installation of the ClearML AI Application Gateway, speci
Replace `<GITHUB_TOKEN>` with your valid GitHub token that has access to the ClearML Enterprise Helm charts repository.
45
+
35
46
### Prepare Values
36
47
37
-
Before installing the TTR, create a `helm-override` files named `task-traffic-router.values-override.yaml`:
48
+
Before installing the App Gateway Router, create a Helm override file:
38
49
39
50
```
40
51
imageCredentials:
41
-
password: "<DOCKERHUB_TOKEN>"
52
+
password: ""
42
53
clearml:
43
-
apiServerKey: ""
44
-
apiServerSecret: ""
45
-
apiServerUrlReference: "https://api."
46
-
jwksKey: ""
47
-
authCookieName: ""
54
+
apiServerKey: ""
55
+
apiServerSecret: ""
56
+
apiServerUrlReference: ""
57
+
authCookieName: ""
58
+
sslVerify: true
48
59
ingress:
49
-
enabled: true
50
-
hostName: "task-router.dev"
60
+
enabled: true
61
+
hostName: ""
51
62
tcpSession:
52
-
routerAddress: ""
53
-
portRange:
54
-
start:
55
-
end:
63
+
routerAddress: ""
64
+
service:
65
+
type: LoadBalancer
66
+
portRange:
67
+
start:
68
+
end:
56
69
```
57
70
58
-
Edit it accordingly to these guidelines:
59
-
60
-
*`clearml.apiServerUrlReference`: URL usually starting with `https://api.`
61
-
*`clearml.apiServerKey`: ClearML server api key
62
-
*`clearml.apiServerSecret`: ClearML server secret key
63
-
*`ingress.hostName`: URL of router we configured previously for load balancer starting with `https://`
64
-
*`clearml.sslVerify`: Enable or disable SSL certificate validation on apiserver calls check
65
-
*`clearml.authCookieName`: Value from `value_prefix` key starting with `allegro_token` in `envoy.yaml` file in ClearML server installation.
66
-
*`clearml.jwksKey`: Value form `k` key in `jwks.json` file in ClearML server installation (see below)
67
-
*`tcpSession.routerAddress`: Router external address can be an IP or the host machine or a load balancer hostname, depends on the network configuration
68
-
*`tcpSession.portRange.start`: Start port for the TCP Session feature
69
-
*`tcpSession.portRange.end`: End port for the TCP Session feature
70
-
71
-
:::note How to find my jwkskey
71
+
Configuration options:
72
72
73
-
The *JSON Web Key Set* (*JWKS*) is a set of keys containing the public keys used to verify any JSON Web Token (JWT).
*`clearml.apiServerSecret`: ClearML server secret key.
76
+
*`clearml.apiServerUrlReference`: ClearML API server URL starting with `https://api.`.
77
+
*`clearml.authCookieName`: Cookie used by the ClearML server to store the ClearML authentication cookie.
78
+
*`clearml.sslVerify`: Enable or disable SSL certificate validation on `apiserver` calls check.
79
+
*`ingress.hostName`: Hostname of router used by the ingress controller to access it.
80
+
*`tcpSession.routerAddress`: The external router address (can be an IP, hostname, or load balancer address) depending on your network setup. Ensure this address is accessible for TCP connections.
81
+
*`tcpSession.service.type`: Service type used to expose TCP functionality, default is `NodePort`.
82
+
*`tcpSession.portRange.start`: Start port for the TCP Session feature.
83
+
*`tcpSession.portRange.end`: End port for the TCP Session feature.
82
84
83
85
84
-
The whole list of supported configuration is available with the command:
86
+
The full list of supported configuration is available with the command:
85
87
86
88
```
87
89
helm show readme allegroai-enterprise/clearml-enterprise-task-traffic-router
@@ -94,9 +96,22 @@ To install the TTR component via Helm use the following command:
0 commit comments