Knowledge Base > Diffblue Cover Reports 2.0 > 2. Installing / Upgrading Cover Reports

Installing / Upgrading Cover Reports

BETA

Cover Reports is a web application that is installed using docker.

Therefore, before installation the following must be installed:

Choose a location

Since Cover Reports is run in docker, the chosen host must have access to dockerhub to allow images to be downloaded.

Please contact Diffblue Support for access to our dockerhub repository.

Also, the chosen host must be accessible by:

  • Cover CLI
  • Users who want to view reports

Port

Diffblue recommends using the default port of 8080.
Should you need to change the port, edit docker-compose.ymland change the default from 8080 to the port you want to serve Cover Reports on.

Deploy Cover Reports

To deploy:

  • Log in to your chosen host (e.g. docker-hub)
  • Navigate to the directory where the installation is to be made. This will be the home directory of Cover Reports e.g.:

    cd $COVER_REPORTS_HOME
    
  • Copy the Cover Reports docker-compose.yml into $COVER_REPORTS_HOME
  • Start the application in the home directory of Cover Reports using:

    docker-compose up -d
    

The application is now installed and deployed. Once docker has run, you can open your selected host - default http://localhost:8080/ to see a page similar to this:

To run docker-compose in the background, add the -d option.

Version number

The version number is at the bottom of the window, on the left.

Pre-loaded sample project

An example project is included with Cover Reports as part of the installation, to help users get started quickly. Click on the Open Demo Project button.

The next step is to use Cover to upload your report bundles into Cover Reports.

Stopping the service

Please use the command:

docker-compose down

Upgrading Cover Reports

Cover Reports is designed to perform upgrades automatically upon deployment. This means there are no actions required to trigger an upgrade. However, since Cover Reports is already installed, there are a few additional steps needed to replace the current installation.

On the Cover Reports host machine:

  • Navigate into the directory on the host machine where Cover Reports is installed 
  • To stop the current system, run: docker-compose down
  • Rename the docker-compose.yml to include the current installation release version in its name, e.g. docker-compose-2022.09.01.yml. (In future, this (and the associated docker TAR file, if used) can be archived.)
  • Copy the new release docker-compose.yml into the same directory
  • If using the docker TAR file, install the docker images into the local repository as before, e.g.: docker load -i cover-reports.tar.gz 
  • To start the application, run: docker-compose up -d .

During startup the need to upgrade will be determined. If required, the upgrade process will run. This may take some time, especially where the database has a large number of project runs. It will not be possible to upload new project runs until this upgrade has completed. During this time, viewing reports may also be limited.

The completion of the upgrade will result in the application being up and running and able to upload new project runs. Currently, this can only be determined from the docker logs for the report-web image, which should contain “Upgrade completed successfully”.

Because the upgrade process can take time and the system will be unavailable at this time, it is best to perform the upgrade when there are no users on the system.