Unfamiliar with Docker? Start here.
The following instructions spin up CDash for local experimentation.
- If you haven't done so already, begin by cloning the CDash repository:
git clone https://github.com/Kitware/CDash
cd CDash- Next, use docker compose to spin up your new CDash instance:
docker compose -f docker/docker-compose.yml \
-f docker/docker-compose.dev.yml \
-f docker/docker-compose.postgres.yml \
--env-file .env.dev up -d- Browse to http://localhost:8080. You should see a freshly installed copy of CDash with the latest database schema.
If you choose not to use an external OAuth2 or SAML authentication provider with CDash, you may want to create users manually. Use the following command to create a user from the command line:
docker exec --user www-data cdash bash -c "php artisan user:save --email=<email> --password=<password> --firstname=<first name> --lastname=<last name> --institution=<institution> --admin=<1/0>"Once a user with administrative privileges has been created, you can use that user to create other users via the web interface.
docker exec -it cdash /bin/bash
cd _build
ctestYou may have noticed that CDash's docker compose configuration is split across multiple files. The allows us to support various workflows (production vs. development, local vs MinIO storaage, etc) while minimizing code duplication.
For example, to use MinIO instead of local storage, pass -f docker/docker-compose.minioyml to the docker compose commands mentioned in this document.
To change the default database password, modify DB_PASSWORD in docker/docker-compose.postgres.yml.
Once you're happy with your changes, re-run docker compose up (with the appropriate-f flags) to build and run services for CDash and its database.
If you would prefer to build your own Docker images for CDash, pass the --build option to your docker compose up command.
A production installation differs from a testing installation in the following ways:
- Traffic is served over https. For this reason, these instructions assume you don't already have a web server on your host system that's serving traffic on port 443.
- CDash will be serving traffic over an externally-visible URL (not
localhost). - CDash's submissions will be parsed asychronously. Note that the
cdash_workerservice will emit errors until the database tables are created.
To set up a CDash production instance using docker compose, follow these steps:
- Generate or obtain SSL certificate files. Some possibilities here are Let's Encrypt or self-signed certificates. Make sure the resulting files will be readable to the
www-datauser (UID 33) in the CDash container. cp .env.example .env- Edit
.envand modify the following lines:APP_URL=https://<my-cdash-url>SSL_CERTIFICATE_FILE=</path/to/certs/cdash.pem>SSL_CERTIFICATE_KEY_FILE=</path/to/certs/cdash.key>NUM_WORKERS=<desired number of queue worker replicas, defaults to 1>WORKER_MEMORY_LIMIT: restart worker after parsing a job if it consumed more than this amount of memory (in MB). Default: 256.
- For postgres only, edit
docker/docker-compose.postgres.ymland uncomment theworkersection. - Run this command to start your CDash containers:
docker compose --env-file .env \
-f docker/docker-compose.yml \
-f docker/docker-compose.production.yml \
-f docker/docker-compose.postgres.yml \
up -dIf you're using prebuilt images from DockerHub, run the following command to download the latest image:
docker compose -f docker/docker-compose.yml \
-f docker/docker-compose.production.yml \
-f docker/docker-compose.postgres.yml \
pull cdash
and then repeat your docker compose up command to start your CDash containers.
If you prefer to build your own images locally, you can pass the --build option to your docker compose up command as shown previously in this document.
CDash's docker compose system creates volumes for persistent data. A primary benefit of this setup is that you won't lose the contents of your database if that container stops running.
If you're done experimenting with CDash locally and you would like to remove these volumes, perform the following commands:
docker volume ls # shows what volumes are defined on your system
docker volume rm cdash_storage # CDash's local storage for submission files
docker volume rm cdash_postgresqldata # for postgres