Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

[ad-hoc] [2] Question about running the kelp on Kubernetes #584

Closed
Ebioro opened this issue Nov 12, 2020 · 10 comments
Closed

[ad-hoc] [2] Question about running the kelp on Kubernetes #584

Ebioro opened this issue Nov 12, 2020 · 10 comments
Assignees
Milestone

Comments

@Ebioro
Copy link

Ebioro commented Nov 12, 2020

Hi,

I am trying to run the kelp on Kubernetes. One pod runs the kelp container and another one the ccxt-container. I have tried to run kelp with the server command as follows:

command:
[ "./bin/kelp"]
args: ["server","--no-electron","--ccxt-rest-url","$(CCXT_REST_URL)"]

Where CCXT_REST_URL is the ip address of the service that is exposing the ccxt pod.

Run initializes correctly. However, when building the ui I get the following error: "exec: "xdg-open": executable file not found in $PATH". Do you know what this might be?

Below the final lines of the log file:

2020/11/12 14:43:53 ... all CCXT instances initialized
2020/11/12 14:43:53 generating contents of /go/src/github.com/stellar/kelp/gui/web/build ...
2020/11/12 14:43:54 yarn run v1.22.5
2020/11/12 14:43:54 $ react-scripts build
2020/11/12 14:43:56 Creating an optimized production build...
2020/11/12 14:44:39 Compiled successfully.
2020/11/12 14:44:39
2020/11/12 14:44:39 File sizes after gzip:
2020/11/12 14:44:39
2020/11/12 14:44:39 191.89 KB build/static/js/2.8611f4f2.chunk.js
2020/11/12 14:44:39 20.42 KB build/static/js/main.935887f0.chunk.js
2020/11/12 14:44:39 6.08 KB build/static/css/main.4195cb50.chunk.css
2020/11/12 14:44:39 762 B build/static/js/runtime~main.a8a9905a.js
2020/11/12 14:44:39
2020/11/12 14:44:39 The project was built assuming it is hosted at the server root.
2020/11/12 14:44:39 You can control this with the homepage field in your package.json.
2020/11/12 14:44:39 For example, add this to build it for GitHub Pages:
2020/11/12 14:44:39
2020/11/12 14:44:39 "homepage" : "http://myname.github.io/myapp",
2020/11/12 14:44:39
2020/11/12 14:44:39 The build folder is ready to be deployed.
2020/11/12 14:44:39 You may serve it with a static server:
2020/11/12 14:44:39
2020/11/12 14:44:39 yarn global add serve
2020/11/12 14:44:39 serve -s build
2020/11/12 14:44:39
2020/11/12 14:44:39 Find out more about deployment here:
2020/11/12 14:44:39
2020/11/12 14:44:39 https://bit.ly/CRA-deploy
2020/11/12 14:44:39
2020/11/12 14:44:39 Done in 45.86s.
2020/11/12 14:44:39 ... finished generating contents of /go/src/github.com/stellar/kelp/gui/web/build
2020/11/12 14:44:39
2020/11/12 14:44:39 starting server on port 8000
2020/11/12 14:44:39 sleeping for 1 seconds before showing the ready string indicator...
2020/11/12 14:44:40 Serving frontend and API server on HTTP port: 8000
2020/11/12 14:44:40 exec: "xdg-open": executable file not found in $PATH

@Ebioro
Copy link
Author

Ebioro commented Nov 12, 2020

@nikhilsaraf: I am not familiar with go, but it seems that the solution to this problem can be found here

@nikhilsaraf
Copy link
Contributor

nikhilsaraf commented Nov 12, 2020

@Ebioro xdg-open is used to automatically open a url in the browser. The service should already be up and running for you even though it logs that error.

if you try accessing Kelp on port 8000 does it still work for you?

PS: we have not added support for "remote server" mode in kelp, but we will add soon. The only difference between what we have today and the "remote server" mode will be that we will not attempt to automatically open the url in the local browser for you, i.e. you won't see the error on the last line. So if you ignore the last line right now I think it should work.

@Ebioro
Copy link
Author

Ebioro commented Nov 12, 2020

Humm ok, the problem is that kelp crashes after getting to that line and the pod gets restarted over and over. I therefore thought that that was the problem by looking into this issue kubernetes/minikube#7168

@nikhilsaraf
Copy link
Contributor

@Ebioro yes, that's possible. It may be trying to open the browser on the local container that is running the kelp server.

Can you comment out this line and recompile from source and try running it?

@nikhilsaraf nikhilsaraf changed the title Question about running the kelp on Kubernetes [ad-hoc] [2] Question about running the kelp on Kubernetes Nov 12, 2020
@nikhilsaraf nikhilsaraf self-assigned this Nov 12, 2020
@nikhilsaraf nikhilsaraf added this to the v1.10.1 milestone Nov 12, 2020
@Ebioro
Copy link
Author

Ebioro commented Nov 12, 2020

Yeah I was trying that. However, I am developing locally with MacOS and when I try to recompile from source for linux I get an error. I am using the following command env GOOS=linux GOARCH=amd64 ./scripts/build.sh. but it does not work.

@nikhilsaraf
Copy link
Contributor

Can you try this:

If you go to the ./scripts/build.sh file and edit the first occurrence of “go build” to add the GOOS and GOARCH values, I think it should do the trick

@Ebioro
Copy link
Author

Ebioro commented Nov 14, 2020

@nikhilsaraf: I created a different repository and updated this function and now everything works fine in Kubernetes. You might try to add something similar to the source code. Please keep in mind that I am not a Go developer so you might want to check where best that piece of code fits

@nikhilsaraf
Copy link
Contributor

@Ebioro that is the correct function to modify. 👍

adding official support is on our list, see this github issue: #347

We are also planning to make it easier to run Kelp-as-a-Service (KaaS) with many more "SaaS" related features, which you can track in this issue if interested: #509

@Ebioro
Copy link
Author

Ebioro commented Nov 25, 2020 via email

@nikhilsaraf
Copy link
Contributor

@Ebioro it will be ready in Q1 of 2021. You should sign up to the announcement email list, I will send an email there once it's launched. You can find a link to it in the README file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants