-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for part of ui, can you write a dockerfile for the environment setting etc ? #50
Comments
Can you explain what the problem is? It's not clear to me what's the problem a docker container would solve |
On Ubuntu server, our team met multiple problems. For me, it is: npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node-gyp-build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-07-20T03_52_10_813Z-debug.log
Traceback (most recent call last):
File "tools/install-build-deps", line 435, in <module>
sys.exit(Main())
File "tools/install-build-deps", line 414, in Main
InstallNodeModules()
File "tools/install-build-deps", line 294, in InstallNodeModules
cwd=UI_DIR)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/root/perfetto/ui/npm', 'install', '--no-save']' returned non-zero exit status 1 |
This seems like an interesting issue. We've run into this ourselves now and then but we've never managed to identify a fix for it. Using docker may be the most pragmatic way but unfortunately we don't have the bandwidth to investigate that at the moment. This may be something we revisit down the line. |
If we can't solve this problem through dockerfile now, and westill want to deploy similar ui.perfetto.dev service, can you tell us, what environment you deploy ui.perfetto.dev service? Hope answer can include Linux kernel version and os-release info. Thank you! |
for us it works on:
Now that you make me realize, we do have a Dockerfile which is guaranteed to build, it's the one that ci.perfetto.dev uses. You can the sources here: The image is here: |
Thank you |
@primiano what ports and needed for that container? E.g., what is the docker run command? |
That container is just for building the UI not for exposing the UI. The UI is a fully static site so if you're trying to serve it, you should use the Docker version of any mainstream server (nginx, Caddy, traefik etc). |
Gotcha - I'm just looking to run a tiny version, so I was looking at ui/run-dev-server, e.g.,
Have you seen any docker-compose or similar setups (even manual docker or kubernetes would work) of someone running all the components together? |
The run-dev-server script exposes the UI on port 10000. However please do not run such an instance in production: the UI's dev server is not at all intended for being exposed to the internet and there could be any number of issues (i.e. security) with it. Not sure what you mean by "all the components": the UI is really the only thing you'd want to run in a docker container. |
We want to primarily make a small app for users on a cluster, so it wouldn't be production exposed and it would only be maybe one person per app. However, if there is a production deployment that is known how to do, that would be really useful to be able to share. Do you know of one, akin to what I mentioned above? This above should at least serve for testing! |
No I'm not aware of any such deployment but as I say, once the UI is built it's just a static site: you can serve it with any server. e.g. for nginx: https://www.docker.com/blog/how-to-use-the-official-nginx-docker-image/ |
ohh gotcha - I can make a docker-compose set of containers to test this. And this also clarifies that point (sorry was not reading carefully!) #170 (comment) |
Thanks for the help! Here are examples of the single Docker / docker-compose setup with a self-signed cert that I threw together, in case someone else is looking for them! Please PR / suggest improvements to the repo too. https://github.com/rse-ops/perfetto-compose. |
For part of ui, Hope perfetto team can support a dockerfile from the environment setting.
I trying to build perfetto ui on my server, but I met lots of problem from environment setting, like downloading npm package.
I hope perfetto team can provide a dockerfile for ui parts.
The text was updated successfully, but these errors were encountered: