Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi All, I'M Trying To Deploy Trains On Rancher (Nice Kubernetes Cluster Orchestration Project) Where I'M Quite New To Rancher And Kubernetes. I Have Been Able To Install Trains Using Helm

Hi all,
I'm trying to deploy trains on Rancher (nice Kubernetes cluster orchestration project) where I'm quite new to Rancher and Kubernetes.
I have been able to install trains using helm 🙂
I have a problem understanding the configuration of a load ballancer documented https://allegro.ai/docs/deploying_trains/trains_server_kubernetes_helm/ .
In Rancher I can add Ingress instances for load ballancing and domain but I'm not sure about the configuration.
I have multiple options like adding multiple rules each handling once configuration.
A configuration is either a service where once selected the target from the drop down list e.g. apiserver-service only ports exposed can be selected, in this case 8008 is provided in another dropdown list, which is what I expected.
correspondingly behaves the filesystem-servis and lists only the port 8081, but when selecting the 'webserver-service' I expected to get the port 8080 but I got 80 as only selectable list entry.
The second option is to not use a service but a 'Workload'. When using this, and selecting the target 'webserver' from the identified pods/targets, I can add any numeric value as port.
I had a couple of tries trying to find an ingress configuration which uses the ports I entered...
I identified, that I had to define 3 ingress instances, each one handling one service.
Unfortunately they still are not getting out of the state 'initializing' 😞
The yampl files I draged and droped to the posting. maybe they will be shared.

Let's assume I will be able to configure the load ballancer and will somehow have access to the trains webUI.
How can I add additional trains-agents to the cluster?
I guess I need to create docker images running trains-agent with parameters to create a queue listening on for work.
Will such an docker image need a trains configuration file?
Can I just create a local conf file an add it to the docker image?
To which path would I need to copy it to?
BR
Wasili

  
  
Posted 4 years ago
Votes Newest

Answers 18


Hi WickedGoat98
Regardless on the ingress configuration (which seems like you have the hang of), the API instance itself needs to be configured with persistent volume (the web / file server do not need direct access to the API server).
Can you get the API to run properly ?

Regrading the trains-agent once you have the API/Web/File server configured, you can configure it like the trains-agent-services is configured inside the docker-compose (e.g. set the environment variable with the correct configuration)
(do not forget to use the trains-agent docker instead https://hub.docker.com/r/allegroai/trains-agent )

https://github.com/allegroai/trains-server/blob/b93591ec322662156eab1ef90cf8151b81149488/docker-compose.yml#L116

  
  
Posted 4 years ago

Hi AgitatedDove14
seems I used a wrong ip for the API tests.
When contacting the dockers Rancher IP:30080 I get the trains webUI 🙂
strange, I would expect that it would answer also on the address the webserver image got assigned to
root@56a6f444f140:/var/lib/rancher# ping 10.42.0.106
PING 10.42.0.106 (10.42.0.106): 56 data bytes
64 bytes from 10.42.0.106: icmp_seq=0 ttl=64 time=0.063 ms
64 bytes from 10.42.0.106: icmp_seq=1 ttl=64 time=0.064 ms
64 bytes from 10.42.0.106: icmp_seq=2 ttl=64 time=0.063 ms
^C--- 10.42.0.106 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.063/0.063/0.064/0.000 ms
root@56a6f444f140:/var/lib/rancher# curl http://10.42.0.106:30080
curl: (7) Failed to connect to 10.42.0.106 port 30080: Connection refused
root@56a6f444f140:/var/lib/rancher# curl http://172.17.0.2:30080            
<!doctype html>

<html lang="en">

<head>  <meta charset="utf-8">  <title>trains</title>  <base href="/">  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">  <link rel="icon" type="image/x-icon" href="favicon.ico?v=5">  <script>    if (global === undefined) {      var global = window;    }  </script>  <meta name="theme-color" content=" "> </head> <body class="dark-theme">  <sm-root></sm-root>  <noscript>Please enable JavaScript to continue using this application.</noscript> <script src="runtime-es2015.d081064e058ab9d4530f.js" crossorigin="use-credentials" type="module"></script><script src="runtime-es5.d08 1064e058ab9d4530f.js" crossorigin="use-credentials" nomodule defer></script><script src="polyfills-es5.dd6fc9cc359ba3460100.js" crosso rigin="use-credentials" nomodule defer></script><script src="polyfills-es2015.56361711d9390b84d552.js" crossorigin="use-credentials" t ype="module"></script><script src="styles-es2015.2a0ebecfcb437fdb1c02.js" crossorigin="use-credentials" type="module"></script><script src="styles-es5.2a0ebecfcb437fdb1c02.js" crossorigin="use-credentials" nomodule defer></script><script src="vendor-es2015.7dac968ddae b1621c029.js" crossorigin="use-credentials" type="module"></script><script src="vendor-es5.7dac968ddaeb1621c029.js" crossorigin="use-c redentials" nomodule defer></script><script src="main-es2015.a828262587d45134a613.js" crossorigin="use-credentials" type="module"></sc ript><script src="main-es5.a828262587d45134a613.js" crossorigin="use-credentials" nomodule defer></script></body> <footer>  <script crossorigin="use-credentials" src="app/webapp-common/assets/plotly-1.52.2.min.js"></script> </footer> </html> root@56a6f444f140:/var/lib/rancher#

  
  
Posted 4 years ago

also logging in is possible

  
  
Posted 4 years ago

even when running these commands from within the docker container instance I do not get any responce 😞
root@56a6f444f140:/var/lib/rancher# curl http://10.43.97.217:30080
^C
root@56a6f444f140:/var/lib/rancher# curl http://10.43.138.186:8080
^C
root@56a6f444f140:/var/lib/rancher# curl http://10.43.138.186:8081
^C
root@56a6f444f140:/var/lib/rancher# curl http://10.43.138.186:8008
^C
root@56a6f444f140:/var/lib/rancher# curl http://10.43.97.217:8080
^C
root@56a6f444f140:/var/lib/rancher# curl http://10.43.97.217:8081
^C
root@56a6f444f140:/var/lib/rancher# curl http://10.43.97.217:8008
^C
root@56a6f444f140:/var/lib/rancher#

sounds like I need to get rancher configured correctly first before trying to find answers here 😉

  
  
Posted 4 years ago

Hi WickedGoat98 ,
I think you are correct 😞
I would guess it is something with the ingress configuration (i.e. ConfigMap)

  
  
Posted 4 years ago

AgitatedDove14 unfortunately all tries to get any responce from the webUI failed 😞
(py38) wgo@NVidia-power : ~ $ ping 10.43.138.186
PING 10.43.138.186 (10.43.138.186) 56(84) Bytes Daten.
^C
--- 10.43.138.186 ping statistics ---
4 Pakete übertragen, 0 empfangen, 100% Paketverlust, Zeit 3062ms

(py38) wgo@NVidia-power : ~ $ curl http://10.43.97.217:30080
^C
(py38) wgo@NVidia-power : ~ $ curl http://10.43.138.186
^C
(py38) wgo@NVidia-power : ~ $ curl http://10.43.138.186:8080
^C
(py38) wgo@NVidia-power : ~ $ curl http://10.43.138.186:8081
^C
(py38) wgo@NVidia-power : ~ $ curl http://10.43.138.186:8008
^C
(py38) wgo@NVidia-power : ~ $ curl http://10.43.97.217:8080
^C
(py38) wgo@NVidia-power : ~ $ curl http://10.43.97.217:8081
^C
(py38) wgo@NVidia-power : ~ $ curl http://10.43.97.217:8008
^C
(py38) wgo@NVidia-power : ~ $

  
  
Posted 4 years ago

WickedGoat98
The webUI will look like the demo server 🙂https://demoapp.trains.allegro.ai/
2. curl http://server-ip:8008 should return something like:
{"meta":{"id":"78a9dc77081348e2930d1f429fd7e092","trx":"78a9dc77081348e2930d1f429fd7e092","endpoint":{"name":"","requested_version":1.0,"actual_version":null},"result_code":400,"result_subcode":0,"result_msg":"Invalid request path /","error_stack":null},"data":{}}%3. curl http://server-ip:8080 should return something like:
` <!doctype html>

<html lang="en"> ... `4. curl http://server-ip:8081 should return: ` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>405 Method Not Allowed</title> <h1>Method Not Allowed</h1> <p>The method is not allowed for the requested URL.</p> `5. If all three are configured, you will be able to login to the web UI

Once you have these up and running, we can dive into the agents 😉
Sounds good?

  
  
Posted 4 years ago

That sounds like success!

  
  
Posted 4 years ago

AgitatedDove14 The problem I have with getting the ingress running ... seems to be caused by the fact that I'm running rancher in single node mode (using a docker image ...) where the port 80 is already in use so the webservice (WebUI) of trains cannot be mapped to the same port ...
Nevertheless I will continue with a real Kubernets cluster installation and try to get Trains + additional own agents running on it 😉
thanks so far for the support you provided. I will try to collect the installation steps in a document and share it to the community once ready

  
  
Posted 4 years ago

but I still need the laod ballancer ...

No you are good to go, as long as someone will register the pods IP automatically on a dns service (local/public) you can use the regsitered address instead of the IP itself (obviously with the port suffix)

Thanks for your support

With pleasure!

  
  
Posted 4 years ago

🙂 but I still need the laod ballancer ...
nevermind some day I will have it running 😉

  
  
Posted 4 years ago

WickedGoat98

I will try to collect the installation steps in a document and share it to the community once ready

Thank you! this will be awesome !

We're here if you need anything 🙂

  
  
Posted 4 years ago

👍

  
  
Posted 4 years ago

Thanks for your support

  
  
Posted 4 years ago

Will such an docker image need a trains configuration file?

If you need to configure things other than credentials (see above) than yes you might need to map trains.conf into the pod.
Specifically, if you need, map your trains.conf to /root/.trains inside the pod/container

  
  
Posted 4 years ago

Maybe the only thing to worry about is making sure the IP address is stable, so if k8s replaces the node, you do not have to reconfigure the clients 🙂

  
  
Posted 4 years ago

AgitatedDove14 thanks for the reply. I'm not sure if O understand how to check if the API is running propperly. I haven't seen the webUI so far since I don't know how ... I will continue trying to get it running ;)

  
  
Posted 4 years ago

WickedGoat98 nice!!
Can you also pass the login screen (i.e. can you access the api server)

  
  
Posted 4 years ago
1K Views
18 Answers
4 years ago
one year ago
Tags
Similar posts