CDash
CDash copied to clipboard
Installation instructions / pre-built 3.0.0?
Great news that 3.0.0 is out, can't wait to try it!
Is there any chance to get a pre-built 3.0.0, as with the "pre-built" branch previously, as mentioned in the Installation instructions?
The instructions there and under https://public.kitware.com/Wiki/CDash:Upgrade seem out of date - with Ubuntu 18.04, npm install fails (for me at least, some version incompatibility I believe), under 20.04, it finishes but node_modules/.bin/gulp
does not exist, and npm run production
fails with Error: Command failed: git rev-parse HEAD fatal: No Git-Repository (or any of the parent folders): .git
(originally some german in that git output, translation by me).
Or is the folder already "done" after the npm install call and can be used by just configuring it to be served via e.g. apache (will try that next)?
Reading this issue I suppose there currently isn't an up-to-date installation guide available somewhere?
In any case, thanks a lot for your work!
Apologies for the slow reply.
Unfortunately, our previous prebuilt
strategy no longer works in light of our adoption of vue.js for the frontend. The technical reason is that the vue templates need to know what URL they're linking to, and this gets set when you run npm run dev
.
When you get a chance, please take a look at the following documents.
Updated installation docs Docker guide
Please let us know if these instructions don't work for you.
Thanks for the update!
As we do not have the possibility to run docker on the system this should eventually run, I followed the instructions in the first link (on an Ubuntu 20.04.1 system).
The instructions worked well and showed no issues (except for one or two warnings in I think it was the npm install
step, which warned that some package was outdated, but I didn't think it was important, and unfortunately didn't save the exact message). I'm serving the CDash/public folder via http via apache, directly under its own subdomain (i.e. http://cdash.myurl.net/ directly serves the public folder).
Somehow, the installed CDash does not seem fully functional yet; when navigating to the "start page" in Firefox, I get an empty page:
In the developer console, I see a few warnings:
- about non-standard property 'zoom'
- about some cookies using "SameSite" attribute incorrectly
- about a source-map error (404)
- and one server error on an api request:
XHR GET http://cdash.url-redacted.net/api/v1/viewProjects.php [HTTP/1.1 500 Internal Server Error 31ms]
Everything except maybe the last one seems non-critical; but I don't get an entry in the apache error log.
Navigating manually to .../install.php (as it was mentioned that there should be an automatic forward, I thought I'd try calling it manually). Unfortunately that page also isn't working, it only shows this:
Looks like I'm missing some javascript; or maybe some config? I was not 100% sure which of the config options I needed to set, I basically just set the database access settings, and the base URL; did I miss some steps maybe? Where could the trouble come from most likely?
Edit: Just discovered the error logs in storage/logs
. Seems the error 500 on viewProject is coming from two tables being tried to be accessed (but not existing), and a missing check on the result of a fetchColumn
:
[2020-09-28 15:57:32] development.ERROR: Table 'cdash.banner' doesn't exist
#0 /srv/http/cdash/app/cdash/include/CDash/Database.php(72): CDash\Database->logPdoError()
#1 /srv/http/cdash/app/cdash/include/pdo.php(403): CDash\Database->execute()
#2 /srv/http/cdash/app/cdash/app/Model/Banner.php(37): pdo_execute()
...
[2020-09-28 15:57:32] development.ERROR: Table 'cdash.project' doesn't exist
#0 /srv/http/cdash/app/cdash/include/CDash/Database.php(114): CDash\Database->logPdoError()
#1 /srv/http/cdash/app/cdash/app/Controller/Api/ViewProjects.php(49): CDash\Database->query()
...
[2020-09-28 15:57:32] development.ERROR: Table 'cdash.project' doesn't exist
#0 /srv/http/cdash/app/cdash/include/CDash/Database.php(114): CDash\Database->logPdoError()
#1 /srv/http/cdash/app/cdash/app/Controller/Api/ViewProjects.php(120): CDash\Database->query()
...
[2020-09-28 15:57:32] development.ERROR: Call to a member function fetchColumn() on bool {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function fetchColumn() on bool at /srv/http/cdash/app/cdash/app/Controller/Api/ViewProjects.php:121)
(CDash was cloned to /srv/http/cdash)
Why install.php doesn't do anything, I still have no idea
Thanks for taking the time to write up this detailed issue. It sounds like there may currently be a bug with trying to install into an existing, empty, MySQL database. I'll look into this & work on fixing it soon.
In the meantime, can you try installing into a database that doesn't exist yet?
Yes, this did the trick, thanks for the quick feedback! I deleted the database, and specified a user that can create a database (basically the mysql root user).
So from my perspective it would be great if the installation guide would mention this requirement (that the database must not exist, and that it will be created by CDash itself), then everything would be clear.
Ideally (for security reasons, when I use this in production) I would later replace the "root" database user with a user that only has access to the CDash database, right? Which config file would I need to edit there?
Next I'll try the migration of an old (2.6) database - will this work, by just pointing to an existing, populated database?
Ideally (for security reasons, when I use this in production) I would later replace the "root" database user with a user that only has access to the CDash database, right? Which config file would I need to edit there?
I can answer my own question now: CDash seems to take its DB login data from the .env file in the root folder.
One minor additional hiccup I noticed is that in some occasions, CDash (or more probably, my browser - since I started checking, I haven't found a single instance of a hard-coded https) will try to force HTTPS protocol (under which CDash is not available on my current test server).
Next I'll try the migration of an old (2.6) database - will this work, by just pointing to an existing, populated database?
Seemed to have worked more or less; here's what I did:
- Changed the DB account data to point to a copy of the CDash 2.6 database
- Navigated to the CDash page
- Log in
- Got an error 500, ignored and went back to start page via address bar
- Went to Maintenance, and did "Upgrade CDash" as mentioned in the wiki
Mostly everything seems to work; the one thing I have found not to work so far is the warnings detail page - when I click on the number of warnings in the list, I see an empty page with CDash header and footer:
I see no warnings or errors in the log file. I am unable to say at this point whether this issue comes from the migration or would also happen on a fresh install.
Glad to hear that it (mostly) went well for you!
I see no warnings or errors in the log file. I am unable to say at this point whether this issue comes from the migration or would also happen on a fresh install.
I think this is probably another manifestation of the http vs. https issue. The framework we've adopted (Laravel) assumes https if the app is configured in "production" mode.
Try setting this in your .env
file:
APP_ENV=development
The other thing to double check is that your APP_URL
is correctly listed as http (not https). You'll probably need to re-run npm run dev
after making these changes.
Thanks again for the fast and very helpful reply -
The other thing to double check is that your APP_URL is correctly listed as http (not https).
It indeed it was listed as https (shame on me!); I changed it in .env and in app/config/config.local.php, ran npm run dev
again, and now it's doing the right thing! Also the detail pages for warnings which previously were empty, now show up! Setting APP_ENV=development
was not necessary.
So, from my perspective now, the only (minor) thing missing in the install guide linked to above is that it should mention that the database configuration should
- Either point to a non-existing database, and the given user have rights to create it (and to later replace it with a user only having access rights to this database)
- Or if it points to an existing database, it should contain all the CDash tables already; in case it's from an old version, the instructions to update CDash should be followed afterwards.