Skip to content

Latest commit

 

History

History
119 lines (95 loc) · 4.89 KB

README.md

File metadata and controls

119 lines (95 loc) · 4.89 KB

Running GrimoireLab with docker-compose

This folder host configuration files to run GrimoireLab using docker-compose, one of the easiest way to get started with GrimoireLab.

Requirements

  • A Git client
  • Docker Engine and Docker Compose v2 (the docker compose command). The compose file has no version: key, so the legacy standalone docker-compose (v1) needs to be 1.27.0 or later.
  • Recommended, at least, 2CPUs, 8GB memory RAM, and 2GB SWAP (MacOS users can manage it with Docker client for Mac)

For example, in one of my latest demos, I was using:

root@qiskit-6fc71ea6:~# git --version
git version 2.17.1
root@qiskit-6fc71ea6:~# free
              total        used        free      shared  buff/cache   available
Mem:        8167996     3463652      128844        1440     4575500     4413328
Swap:             0           0           0
root@qiskit-6fc71ea6:~# du -hs /
du: cannot access '/proc/2234/task/2234/fd/4': No such file or directory
du: cannot access '/proc/2234/task/2234/fdinfo/4': No such file or directory
du: cannot access '/proc/2234/fd/3': No such file or directory
du: cannot access '/proc/2234/fdinfo/3': No such file or directory
26G     /

Note: free and du are Linux utilities to display amount of free and used memory in the system, and to estimate file space usage, respectively.

You should ensure enough virtual memory for OpenSearch (one of GrimoireLab components). You can do it running the following command as root in Linux or as administrator user in MacOS:

Linux

sysctl -w vm.max_map_count=262144

Mac

$ screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
(then run:) sysctl -w vm.max_map_count=262144

Remember also to assign proper resources to Docker through the UI. 8GB Memory and 2GB Swap should work.

Getting started in 3 steps

  1. Clone this project:
git clone https://github.com/chaoss/grimoirelab
  1. By default, this repository comes with some configuration files in default-grimoirelab-settings. These files are the minimum set up to analyze git activity in this repository. If you want to analyze a different project with a different set of repositories and data sources, you need to modify projects.json and setup.cfg files. See below more information about these files format.

  2. Access to docker-compose folder and deploy GrimoireLab running this command:

cd grimoirelab/docker-compose
docker compose up -d

If everything goes well, data will be gathered and processed. To get access to them, go to http://localhost:8000/. To get access:

  • User: admin
  • Password: GrimoireLab.1

To manage contributors profile information with SortingHat, go to http://localhost:8000/identities/. To get access:

  • User: admin
  • Pass: admin

Note: you can change user and password in the docker-compose.yml file.

The GrimoireLab and SortingHat images use latest by default, while the other services (MariaDB, Valkey, OpenSearch, nginx) are pinned. To run a specific GrimoireLab release instead, set GRIMOIRELAB_VERSION (see the available tags):

GRIMOIRELAB_VERSION=1.21.0 docker compose up -d

This version doesn't come with visualizations. You need to manually import the dashboards from Sigils repository or create your own.

More information

Common questions

How to stop and restart deployed software infrastructure?

There might be 2 potential scenarios:

  1. If you want to do a simple configuration change and restart the platform:
docker compose restart
  1. If you want to destroy current deployed configuration, and after some changes, start from fresh one:
docker compose down

and once they are down:

docker compose up -d