Skip to content

Running CobaltTester

hyperdefined edited this page Jul 1, 2024 · 2 revisions

CobaltTester has 2 parts to it, backend and web. The backend module is responsible for completing the tests for each instance, and outputting the results to web. The web module is used for hosting the results.

Requirements

Backend

For the backend, you will need Java 17+ and Maven installed. To build, use mvn package. This will create a jar file located in backend/target/ (use the one called CobaltTester-latest.jar). Afterwards, create a config.json file and place it next to your jar file. The contents should be this:

{
  "web_path": "../web/",
  "score_path": "../web/instance",
  "service_path": "../web/service",
  "instances_json_output": "../web/instances.json"
}

The web_path is where the backend will look for the template files and output. instances_json_output is where the output JSON containing the results will be created.

You can pass the argument web to make the files needed for the web module.

Web

For web, you will need Jekyll installed. To build, use bundle exec jekyll build. The contents are placed into _site. You must run the backend first before compiling the website, as the backend creates many files the site needs.

Due note: the web module has my own analytics included (using umami). You probably want to remove it. It's located in web/_layouts/default.html.

Bash Script

The run.sh script in the root folder is an example of running the program. Simply clone the repository, build the jar (see above), move the jar to backend/, and run the bash script. Pass the web_path location (see above) to the bash script: bash run.sh /var/www/mysite.com.

Clone this wiki locally