Standalone Version

Deploy a lightweight version of Quboo in your own server

Quboo has also a Standalone version that you can install in less than 5 minutes just using the Docker Compose file and setting up some configuration as environment variables. Just continue reading the sections below.

There are, however, some missing features compared to Quboo Cloud (like Campaigns) and it requires technical knowledge to make it work.

The way of working is similar, there is only a big difference: instead of having a plugin installed to push data from SonarQube, Quboo standalone connects directly to SonarQube’s API and gets data from there. It’s based on the assumption that, if you can deploy Quboo on premise, you can safely configure it in such a way that it has access to your server.

Changelog

  • 1.1 (2019-06-30). Added simple single-campaign mode. Set variable CAMPAIGNSTART_DATE to ignore issues that have been fixed before that date. In case you don’t want to use it, just set it to 1980-01-01.
  • 1.0 (2018-08-18). First version of Quboo Standalone.

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
CAMPAIGNSTART_DATE=2018-12-28

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
    • Do not use localhost. See below.
  • 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.

Do not use localhost in the configuration if your SonarQube server is installed in the host machine and you are using Windows or Mac. Since Quboo uses Docker, it will not be able to reach the host in some cases. Starting with Docker v18, you can replace localhost by host.docker.internal. See the docs for Windows and Mac (search “I want to connect from a container to a service on the host”).

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’.
  • CAMPAIGNSTART_DATE: it allows you to run multiple campaigns. Issues fixed before this date will be ignored so you can ignore score won during previous iterations of the game. If you don’t want to use this feature or you are not sure about how it works, just set it to a very old date like 1970-01-01.
Dates in Quboo
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.

Source Code

Quboo Standalone is Open Source. Check the code on GitHub, where you can also create an issue to suggest new features or report bugs.


Legacy Date
Support

Related Docs