-
Notifications
You must be signed in to change notification settings - Fork 3
How to run grimoirelab gitee?
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.
(verified by ubuntu18.04, with root user)
1. Set enough virtual memory to secure ElasiticSearch up
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
.
1. Set enough virtual memory to secure ElasiticSearch up(reference):
- 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
.
2. Run docker-compose(reference):
If you haven't installed docker-compose, it is time to do it before next step(https://docs.docker.com/compose/install/)
$ cd /root/repos/
$ git clone https://github.com/grimoirelab-gitee/grimoirelab.git
$ cd grimoirelab/docker-compose
$ docker-compose -f docker-compose-infra-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;'
3. Build source code(reference)
Build all modules by the latest release of GrimoireLab:
$ cd ~/grimoirelab/utils
$ ./build_grimoirelab -l debug --logfile /root/tmp/log --build --install --check \
--relfile ../releases/latest --reposdir /root/repos \
--install_venv /root/ivenv
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
$ cd grimoireelk
$ rm -rf grimoireelk
$ git clone https://github.com/grimoirelab-gitee/grimoirelab-elk.git
$ cd grimoireelk
$ 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
Tips: you need to configure your projects file and setup-gitee.cfg file before running it.
$ cd /root/repos/grimoirelab/default-grimoirelab-settings/
$ sirmordred -c setup-gitee.cfg