*** rajm has joined #cip | 08:13 | |
*** toscalix has joined #cip | 08:29 | |
*** kristerman has joined #cip | 09:54 | |
*** christoskaramits has joined #cip | 11:01 | |
*** kristerman has quit IRC | 11:05 | |
*** christoskaramits has quit IRC | 11:46 | |
*** christoskaramits has joined #cip | 12:03 | |
*** christoskaramits has quit IRC | 12:05 | |
*** kristerman has joined #cip | 12:05 | |
*** toscalix has quit IRC | 12:24 | |
*** toscalix has joined #cip | 12:25 | |
*** toscalix has quit IRC | 12:25 | |
*** toscalix has joined #cip | 12:25 | |
kristerman | Hi Gwaihir | 12:31 |
---|---|---|
Gwaihir | kristerman, hi | 12:33 |
kristerman | I have a question, I noticed that for accessing files stored in /var/www/images/kernel-ci/<tree-name>/<arch-deconfig>/, links start with storage.kernelci.org | 12:34 |
*** toscalix has quit IRC | 12:34 | |
kristerman | Does this mean there is second server used for storage? | 12:34 |
Gwaihir | kristerman, yes, more precisely there is a second domain, the server right now is the same | 12:34 |
kristerman | second domain? can you elaborate please, because I didn't quite understand | 12:36 |
Gwaihir | the server is the same, we store the artifacts always on the same machine running kernelci.org | 12:37 |
Gwaihir | the web server is setup in order to serve kernelci.org, api.kernelci.org and storage.kernelci.org | 12:37 |
Gwaihir | the latter, is just the indexing of that filesystem directory | 12:37 |
Gwaihir | the "root" where the artifacts are stored: /var/www/images/kernel-ci | 12:38 |
kristerman | yes, our problem seems to be that, all artifacts cannot be accessed from root | 12:38 |
kristerman | at least when ran locally | 12:39 |
kristerman | and the only thing we changed in front-end is in file server.py, to make sure host='0.0.0.0' | 12:39 |
Gwaihir | if you use the same URL when making up the artifacts URL, yes, that is a problem, since localhost:5000 will just be the "frontend" side, not the "storage" side of things | 12:39 |
kristerman | aha | 12:40 |
kristerman | I think we are getting somewhere now | 12:40 |
kristerman | so this means, it cannot be ran locally? using the code as it is | 12:40 |
Gwaihir | yes, it can, but they are two different things: kernelci.org (what runs on localhost:5000 for you) is not the same code as storage.kernelci.org | 12:41 |
Gwaihir | in the kernelci.org app there is no routing logic to handle the requests to show you the content of the filesystem | 12:42 |
Gwaihir | so, if your artifacts URL have localhost:5000 as the base, they will always give you 404 | 12:42 |
kristerman | okay, so you are saying there is a way to access the artifacts even then ran locally? | 12:43 |
kristerman | s/then/when | 12:44 |
kristerman | and if so, why is localhost:5000 used as the base? | 12:46 |
kristerman | in our case | 12:46 |
Gwaihir | yes, you need to run another server/webapp on a different port, even "python -m SimpleHTTPServer 6000" run directly into the /var/www/images/kernel-ci/ dir should work, then on your frontend side give "localhost:6000" as the storage file URL | 12:46 |
wagi | hurray, irc from work | 12:46 |
kristerman | ok Gwaihir so from what I understand, what we need to add is what you said about running another server | 12:47 |
kristerman | and then the change on frontend side would be for variable fileserverURL? | 12:48 |
Gwaihir | yes | 12:49 |
kristerman | https://github.com/kernelci/kernelci-frontend/blob/master/app/dashboard/static/js/app/view-builds-id.2016.6.1.js | 12:49 |
kristerman | in this file right? | 12:49 |
Gwaihir | maybe port 6000 is not a good option for the python HTTP server, but port 8000 should work | 12:49 |
kristerman | alright thank you Gwaihir , that was really helpful clarification | 12:49 |
kristerman | because this was something vital missing from my thinking, the second server | 12:49 |
Gwaihir | you need to update this value: https://github.com/kernelci/kernelci-frontend/blob/master/app/dashboard/default_settings.py#L28 | 12:50 |
Gwaihir | and add there "localhost:8000/" (assuming you run the second server on localhost and on port 8000) | 12:50 |
kristerman | aha | 12:51 |
kristerman | and when this is not ran locally? | 12:51 |
Gwaihir | point that variable to the domain:port you setup | 12:51 |
kristerman | thank you very much | 12:52 |
Gwaihir | but it needs to be accessible in some way or the other | 12:52 |
Gwaihir | really, if you have the system running already, from /var/www/images/kernel-ci/, run: python -m SimpleHTTPServer 8000 | 12:52 |
kristerman | after changing the fileserver url variable | 12:53 |
Gwaihir | point that variable to "http://localhost:8000/" and restart the frontend app | 12:53 |
Gwaihir | yep | 12:53 |
kristerman | I will try shortly and let you know of the results, but what you say makes a lot of sense | 12:54 |
kristerman | hmm, still 404 | 12:59 |
kristerman | does it matter that for the kernelci-frontend/app/server.py we have added the argument host='0.0.0.0' ? | 13:00 |
Gwaihir | hmmm... no, it shouldn't | 13:01 |
kristerman | let met try port 6000 | 13:01 |
Gwaihir | how are the URL built now? | 13:01 |
Gwaihir | what is the URL for the articats you see on the UI | 13:01 |
kristerman | same as before | 13:01 |
Gwaihir | weird... it shouldn't be if you changed the file_server_url | 13:03 |
kristerman | in default_settings.py right | 13:03 |
kristerman | I changed FILE_SERVER_URL to http://localhost:8000/ | 13:04 |
Gwaihir | yeah, did you restart the app as well afterwards? | 13:04 |
kristerman | meaning run start_webserver.sh | 13:04 |
kristerman | yes | 13:04 |
Gwaihir | don't know what scriptdoes, but probably yes | 13:05 |
kristerman | it runs frontend server.py | 13:05 |
kristerman | and bin/activate | 13:05 |
Gwaihir | can you open the developer console of your browser on the page, and look for a "file-server" element in the page? | 13:06 |
kristerman | yes one sec | 13:06 |
Gwaihir | it's an input element, sorry; it's id is "file-server" | 13:06 |
kristerman | on page with build log right? | 13:07 |
Gwaihir | yeah, on the page where you have all the artifact links | 13:07 |
kristerman | file-server element has value 'localhost' | 13:08 |
kristerman | so that's the problem | 13:08 |
Gwaihir | it's not picking up the change in that file | 13:09 |
Gwaihir | do you have other settings file around? | 13:10 |
Gwaihir | the order the apps read those is: default_settings, then the hardcoded path at /etc/linaro/kernelci-frontend.cfg, then whatever is defined in the FLASK_SETTINGS env variable | 13:11 |
kristerman | not that I know of, from my understanding there is only one line of code altered in both backend and frontend | 13:11 |
kristerman | the host argument | 13:11 |
kristerman | and default_settings.py is run everytime server.py is ran, right? | 13:12 |
kristerman | Okay Gwaihir, I will try and investigate more, I think I am closer to get to the bottom of this | 13:13 |
kristerman | if I manage to change the file-server variable to http://ocalhost:8000 it should work | 13:13 |
Gwaihir | yeah, default_settings is the first file the app loads config from whenever you start it | 13:13 |
*** toscalix has joined #cip | 13:13 | |
kristerman | okay, I will trace what happens from then and on | 13:16 |
kristerman | and thanks again! | 13:16 |
Gwaihir | kristerman, you're welcome! if you need more help, ping me | 13:18 |
toscalix | we are getting close to the solution... | 13:28 |
kristerman | Gwaihir, managed to change the urls! I needed to change the config file in etc/linaro too | 13:34 |
Gwaihir | kristerman, cool! you actually only need to change it in /etc/linaro then, since that file is read after the default_settings one | 13:34 |
kristerman | this is the url I get: http://localhost:8000/cip-triceratops/v4.4.27/arm-allnoconfig/build.log | 13:34 |
Gwaihir | looks better, yeah | 13:35 |
kristerman | it looks right, but I get 'Unable to connect error' | 13:35 |
kristerman | Firefox can’t establish a connection to the server at localhost:8000. | 13:36 |
kristerman | I ran the python -m simpleHTTPServer command on /var/www/images/kernel-ci | 13:36 |
kristerman | and have this: Serving HTTP on 0.0.0.0 port 8000 ... | 13:37 |
kristerman | getting warmer.. | 13:38 |
*** toscalix has quit IRC | 13:38 | |
kristerman | could it be that, the file server is running from VM? | 13:39 |
*** toscalix has joined #cip | 13:40 | |
Gwaihir | hmmm... if I run that http server, I can see any directory I ran it into | 13:44 |
Gwaihir | if your files are stored in the VM where you run the frontend app, make sure your local port 8000 is connected to the VM one | 13:45 |
kristerman | for port 6000 I get "This adress is restricted" | 13:45 |
kristerman | ah, how do I do this? | 13:46 |
Gwaihir | yeah, port 6000 is restricted, I think it's the X Window one... | 13:46 |
Gwaihir | kristerman, have no idea of how your setup is working, but if "localhost:5000" is pointing to the VM that is serving the frontend website, I would say in the same way | 13:47 |
kristerman | okay, I will trace how this is happening and mirror | 13:47 |
Gwaihir | in VirtualBox, under its preferences, you need to set port forwarding | 13:47 |
kristerman | we are using vagrant | 13:48 |
kristerman | I think it is set in VagrantFile | 13:49 |
kristerman | found it | 13:50 |
*** toscalix has quit IRC | 14:36 | |
*** toscalix has joined #cip | 14:37 | |
*** toscalix has quit IRC | 16:23 | |
kristerman | Gwaihir, works now! \o/ | 16:38 |
Gwaihir | great! :-) | 16:38 |
kristerman | had to make a new vagrant version with the new forwarded port | 16:39 |
kristerman | and clone kernel repo again, that's why it took me so long | 16:39 |
*** rajm has quit IRC | 16:50 | |
kristerman | thanks again for support provided Gwaihir | 17:02 |
Gwaihir | you're welcome! :-) | 17:13 |
*** kristerman has quit IRC | 18:01 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!