Installation

You can install Quboo in less than 5 minutes just using the Docker Compose file and setting up some configuration as environment variables. Just continue reading below.

Configuring Quboo

Before starting up the game for the first time, you need to set up some configuration values via environment variables. The game will then be able to connect to your SonarQube server and compute the scores based on what you consider legacy code.

How to set configuration values

You can set up the configuration values in two different ways:

  • Set some Environment Variables with the parameter names described below.
    • e.g. export GAME_DATES_LEGACY=2018-01-01
  • Download the docker-compose-quboo.yml and create a .env file within the same folder, containing the configuration values.
    • e.g. GAME_DATES_LEGACY=2018-01-01

This sample .env file can serve you as a template:

SONAR_SERVER=https://sonarcloud.io
SONAR_TOKEN=your_token_[optional]
LEGACY_DATE=2018-06-15
EARLYBIRD_DATE=2018-12-31
QUBOO_CODE=code_if_you_become_patron_[optional]

SonarQube server

The following configuration is related to the connection to the SonarQube server:

  • SONAR_SERVER: the value has to be set to the URL in which your SonarQube server is accessible. You can also use SonarCloud.
    • Example URL for your own server: SONAR_SERVER=https://194.10.1.90:9000
    • URL when using SonarCloud: SONAR_SERVER=https://sonarcloud.io
  • SONAR_TOKEN (optional): if your server requires authentication to access the REST API, you need to generate an API token and set this variable to this value. You can get some help on this page.
  • SONAR_ORGANIZATION (optional): if your Sonar server contains multiple organizations and you only want to use one of them, set this property to the name of your organization as it is listed in the server. Important: if you use this functionality, you must specify a token for it to work properly.

If you use SonarCloud, you should use the SONAR_ORGANIZATION variable. Otherwise, you’ll get users that may not belong to your organization.

Note that the SONAR_ORGANIZATION parameter may cause errors in old Sonar versions. Use it only when connecting to SonarCloud or a Sonar server with multiple organizations.

Game Settings

There are a couple of game settings that you need to configure before you start it for the first time.

  • LEGACY_DATE: the most important configuration value is the date that you want to define as the latest one for which a player will receive points. That is, if a player resolves a Sonar issue that is older than that date, they will score points. If the issue is more recent, Quboo will not add points to the player.
  • EARLYBIRD_DATE: one of the first badges you can get in the game is the ‘Early Bird Badge’, when you fix an issue before a given date. This is to encourage game adoption, and you can configure until which date a player is considered to be an ‘early bird’.
  • QUBOO_CODE (optional): If you want to remove the Patreon buttons from the Web interface and, at the same time, support the game creator, you can get a Code that you can enter as a configuration value. If the code is valid, you’ll get your name in the footer and all references to Patreon will be hidden.

Dates in Quboo

Running the game

The easiest option to install and run the game is via Docker Compose. If you need to install it, you can follow these instructions.

Download the file docker-compose-game.yml. You can click the link or you can use the terminal if you prefer. For example, using curl:

$ curl https://quboo.tpd.io/assets/game/docker-compose-quboo.yml --output docker-compose-quboo.yml

Then, if you’re using the .env file to configure the server, place it on the same folder. Now run this command:

$ docker-compose -f docker-compose-quboo.yml up

It will take some time to download the images from the repository (only for the first time). Then, you should see the docker images starting up and writing their output to the console. If you’re familiar with Docker, you will prefer to run the docker-compose command in daemon mode.

The first time you access to the interface (http://[host]:1827 by default), you need to specify (or just confirm) where the Quboo server can be found. Your browser will then use that address to collect data from Quboo. You may need to change the host if you deployed quboo-backend in a different hostname than the web interface, or if you customized the port. If you are not sure about this configuration and you did not change anything, just confirm the default value and try.

Quboo Backend URL

Now just create your teams and start playing Quboo.