CDash
CDash copied to clipboard
Problems migrating existing CDash 2.6 installation to 3.0.3
I am trying to migrate from CDash 2.6 in conjunction with Postgres 12 to the current version 3.0.3. The old setup is a self-dockerized version built upon the 'prebuilt' 2.6 version. I have tried to migrate to the 'official' dockerized version of 3.0.3, but cannot get things to run, while retaining the existing data. The installation instructions only describe how to set up CDash 3 from scratch, but not how to migrate an existing installation. I have created the following Dockerfile to build upon the official docker image. It adds msmtp to the image and raises the memory limits for PHP:
FROM kitware/cdash:v3.0.3
RUN apt-get update && apt-get -y upgrade
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install msmtp-mta mailutils less
RUN echo "ServerName cdash" >>/etc/apache2/apache2.conf
RUN sed -i -e 's/memory_limit\s*=\s*.*$/memory_limit=1024M/' /home/kitware/cdash/app/cdash/php.ini
COPY config/msmtprc /etc
ARG CDASH_ROOT_ADMIN_PWD
ENV CDASH_ROOT_ADMIN_PASS=$CDASH_ROOT_ADMIN_PWD
RUN /docker-entrypoint.sh -v install configure
The docker-compose file contains the following information:
cdash:
build:
context: .
args:
- CDASH_ROOT_ADMIN_PWD=<removed>
expose:
- "80"
networks:
- default
restart: unless-stopped
container_name: cdash
hostname: cdash
depends_on:
- postgres
links:
- postgres
environment:
APP_TIMEZONE: Europe/Berlin
CDASH_CONFIG: |
$$CDASH_DB_HOST = 'postgres';
$$CDASH_DB_LOGIN = 'cdash';
$$CDASH_DB_PASS = '<removed>';
$$CDASH_DB_NAME = 'cdash';
$$CDASH_DB_TYPE = 'pgsql';
$$CDASH_DB_CONNECTION_TYPE = 'host';
$$CDASH_BASE_URL = '<removed>';
$$CDASH_ASYNCHRONOUS_SUBMISSION = true;
$$CDASH_ASYNC_WORKERS = 1;
$$CDASH_EMAILADMIN = '<removed>';
$$CDASH_EMAIL_FROM = '<removed>';
$$CDASH_EMAIL_REPLY = '<removed>';
$$CDASH_GEOLOCATE_IP_ADDRESSES = false;
$$CDASH_AUTOREMOVE_BUILDS = '1';
$$CDASH_LOG_LEVEL = LOG_DEBUG;
With this setup, CDash still launches the install routine and tries to create a new database, which is not what I want. Any help how to proceed would be appreciated very much.
Does this work for you?
docker-compose run --rm cdash configure
That should run CDash's configure step without reinstalling a fresh database.
https://github.com/Kitware/CDash/blob/master/docs/docker.md#install-cdash
As I wrote, I have created a derived image in order to install additional software into the image. I changed my Dockerfile to contain
RUN /docker-entrypoint.sh -v configure
instead of
RUN /docker-entrypoint.sh -v install configure
but this yields the same result. The presented web page (install.php) contains my parameters for the database configuration, but requires the admin mail address and password to be entered. When I do this and click on 'Install' I get an "500 server error",
The presented web page (install.php) contains my parameters for the database configuration, but requires the admin mail address and password to be entered. When I do this and click on 'Install' I get an "500 server error",
If you run the entrypoint in "serve" mode, does CDash still redirect you to install.php? If so, that means it's most likely having trouble connecting to your database container (postgres).
When I do this and click on 'Install' I get an "500 server error",
This will recreate a new, empty database for you from scratch. So it sounds like that's probably not what you want? But if it is, try checking docker logs to see if there's any other clues as to what's going wrong.
I have attached the output from docker-compose. I have added intermediate empty lines as follows:
- The first part is what I get after running docker-compose up, which creates the containers from scratch
- The second part is what I get, after I navigate to the entry page
- The third part is what I get, when I hit 'Install' after entering the mail address and password. This even contains output containing 'mysql', so I assume, that it tries to install from scratch despite the arguments I pass in. docker-compose.log
I'll experiment locally with reusing an existing database container for a new CDash 3.0.3 docker container. I'll let you know how it goes.
Thanks for letting me know. Please don't invest too much time, if necessary I can install from scratch and keep the old installation running in parallel for reference only. The only reason I want to retain the data is to be able to investigate back, when a given test first failed.