How to run grimoirelab gitee? - grimoirelab-gitee/grimoirelab GitHub Wiki
Getting started
There are different options to run grimoirelab-gitee, considerring that our first coming users would be developers(just a guess...), so let's start with Source code and docker-compose.
Some hints would be highlighted here to reduce expected/possible troubles during the installations(because I met them before :)), but some steps might be missied in the first few versions. When you met problems, just pop up issues and we will help you.
Run with source code and docker-compose
(verified by ubuntu18.04, with root user)
- 1. Set enough virtual memory to secure ElasiticSearch up
- 2. Run docker-compose
- 3. Build source code
- 4. Install Gitee modules
- 5. Run Grimoirelab
By this option, ElasticSearch, Kibiter and MariaDB would be installed by docker-compose as the infrastructure. For the rest of the other grimoirelab related modules, they would be installed using the source code with help of build_grimoirelab
.
reference):
1. Set enough virtual memory to secure ElasiticSearch up(- option 1:
sysctl -w vm.max_map_count=262144
that is only valid for current session. - option 2: update
vm.max_map_count
setting in/etc/sysctl.conf
.
reference):
2a. Run docker-compose(If you haven't installed docker-compose, it is time to do it before next step(https://docs.docker.com/compose/install/)
$ cd /root
$ git clone https://github.com/grimoirelab-gitee/grimoirelab.git
$ cd grimoirelab/docker-compose
$ docker-compose -f docker-compose-elk-gitee.yml up -d
You can check if ElasticSearch and Kibiter was up by check
You can check if MariaDB was up by:
$ docker exec -it docker-compose_mariadb_1 bash
$ mysql -u root -proot -e 'SHOW DATABASES;'
2b. Run docker-compose(opensearch):
$ cd /root
$ git clone https://github.com/grimoirelab-gitee/grimoirelab.git
$ cd grimoirelab/docker-compose
$ docker-compose -f docker-compose-opensearch-gitee.yml up -d
reference)
3. Build source code(Build all modules by the latest release of GrimoireLab:
$ cd ~/repos/grimoirelab/utils
$ ./build_grimoirelab -l debug --logfile /root/tmp/log --build --install --check \
--relfile ../releases/latest --reposdir /root/repos \
--install_venv /root/ivenv
4. Install Gitee modules
Tips:
- We would use python develp mode, to allow you to conveniently modify your code after itโs installed to the (virtual) environment, and have the changes take effect immediately.
- Tips: sudo or root user would avoid some unexpected cases happened, like modules cannot be installed successfully.
- Activate virtual environment:
$ source ~/ivenv/bin/activate
- Install perceval-gitee:
$ cd /root/repos
$ git clone https://github.com/grimoirelab-gitee/grimoirelab-perceval-gitee.git
$ cd grimoirelab-perceval-gitee
$ python3 setup.py develop
You could check if perceval-gitee was intalled seccessfully by pip3 list
:
perceval-gitee 0.1.0 /root/repos/grimoirelab-perceval-gitee
- Replace grimoire-elk with new one: (to support backend plugin solution, you can find related discussion here)
$ pip3 uninstall grimoire-elk
$ rm -rf /root/repos/grimoire-elk
$ cd /root/repos
$ git clone https://github.com/grimoirelab-gitee/grimoirelab-elk.git
$ cd grimoirelab-elk
$ python3 setup.py develop
You could check if grimoire-elk was intalled seccessfully by pip3 list
:
grimoire-elk 0.86.0 /root/repos_grimoirelab/grimoireelk
- Install grimoire-elk-gitee:
$ cd /root/repos
$ git clone https://github.com/grimoirelab-gitee/grimoirelab-elk-gitee.git
$ cd grimoirelab-elk-gitee
$ python3 setup.py develop
You could check if perceval-gitee was intalled seccessfully by pip3 list
:
grimoire-elk-gitee 0.1.0 /root/repos_grimoirelab/grimoirelab-elk-gitee
- Install grimoirelab-panels:
$ pip3 uninstall grimoirelab-panels
$ cd /root/repos
$ rm -rf grimoirelab-sigils
$ git clone https://github.com/grimoirelab-gitee/grimoirelab-sigils.git
$ cd sigils
$ python3 setup.py develop
You could check if perceval-gitee was intalled seccessfully by pip3 list
:
grimoirelab-panels 0.0.60 /root/repos_grimoirelab/sigils
5. Run Grimoirelab
Tips: you need to configure your projects file and setup-gitee.cfg file before running it.
$ cd /root/grimoirelab/default-grimoirelab-settings/
$ sirmordred -c setup-gitee.cfg