Install Taiga project management tool on CentOS 8
You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose
Taiga is an open source agile project management platform for small and large enterprise companies. Its functions are on par with commercial project management solutions such as Jira and Trello. The Taiga platform is built on Python, Django, AngularJS and CoffeeScript. You can easily start using Taiga by using a cloud-based product, or you can install it on your internal infrastructure in the difficult way. In today’s guide, we will delve into the installation and configuration of Taiga project management tools on CentOS 8.
With Taiga, you can greatly improve the work process and save a lot of management and communication time within the internal team and with customers. The ticketing system is excellent and can be the main way to quickly respond to customer needs.
The Taiga platform has three main modules, namely:
- Coniferous forest -Written in Python and Django
- taiga-front-dist -Written with AngularJS and CoffeeScript
- taiga activity -Written in JavaScript.
You need to reinstall the CentOS 8 server to make this setting. Ensure that the server is updated by running the following command.
sudo dnf -y update
After the update is complete, please consider restarting.
sudo systemctl reboot
Step 1: Relax SELinux and set the server hostname
If the server SELinux has been set to Enforcing, put it in Permissive mode:
sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
Set the FQDN host name on the server.
fqdn_hostname="projects.hirebestengineers.com"
sudo hostnamectl set-hostname ${fqdn_hostname} --static
sudo hostnamectl set-hostname ${fqdn_hostname} --transient
Confirm the host name setting.
$ hostnamectl
Static hostname: projects.hirebestengineers.com
Icon name: computer-vm
Chassis: vm
Machine ID: 5ba3065ca48e47fca70cdbaf22866fc7
Boot ID: 15a036b5710f4bb4a6c6da83ac6c05eb
Virtualization: kvm
Operating System: CentOS Linux 8 (Core)
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-193.19.1.el8_2.x86_64
Architecture: x86-64
Add the correct IP address and FQDN to the /etc/hosts directory.
95.217.216.7 projects.hirebestengineers.com
check:
$ sudo dnf -y install bind-utils
$ host projects.hirebestengineers.com
projects.hirebestengineers.com has address 95.217.216.7
Also add an A record in your DNS server.
Confirm whether the records can be queried from the local computer.
$ dig A projects.hirebestengineers.com
; <<>> DiG 9.11.13-RedHat-9.11.13-6.el8_2.1 <<>> A projects.hirebestengineers.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57153
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;projects.hirebestengineers.com. IN A
;; ANSWER SECTION:
projects.hirebestengineers.com. 273 IN A 95.217.216.7
;; Query time: 0 msec
;; SERVER: 213.133.98.98#53(213.133.98.98)
;; WHEN: Fri Oct 02 21:10:27 CEST 2020
;; MSG SIZE rcvd: 75
Step 2: Install the dependency package
Let’s install the basic standard software package on CentOS 8.
sudo dnf -y install epel-release
sudo dnf config-manager --set-enabled PowerTools
sudo dnf -y install git wget curl bash-completion vim pwgen
Install the Python package:
sudo dnf -y install @python38 python38-devel virtualenv
sudo pip3 install virtualenvwrapper
Install Nginx web server:
sudo dnf -y install nginx
Step 3: Install Redis, RabbitMQ and Node.js
Install Redis:
sudo dnf -y install @redis
sudo systemctl enable --now redis
Install RabbitMQ:
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
sudo dnf -y install rabbitmq-server
sudo systemctl enable --now rabbitmq-server.service
After installing the RabbitMQ server, create users and virtual hosts for Taiga:
$ sudo rabbitmqctl add_user taiga StrongPassword
Adding user "taiga" ...
$ sudo rabbitmqctl add_vhost taiga
Adding vhost "taiga" ...
$ sudo rabbitmqctl set_permissions -p taiga taiga ".*" ".*" ".*"
Setting permissions for user "taiga" in vhost "taiga" ...
Install Node.js
sudo dnf -y install @nodejs
Step 4: Install and configure PostgreSQL
Taiga requires the PostgreSQL database server to retain data. Run the following command to install PostgreSQL database server on CentOS 8.
sudo dnf install -y @postgresql
Initialize the database server:
sudo /usr/bin/postgresql-setup initdb
Start and enable the PostgreSQL database service.
sudo systemctl enable --now postgresql
Use the following command to set the password of the PostgreSQL administrator user:
$ sudo passwd postgres
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Create a database and user for Taiga.
$ sudo su - postgres [email protected]:~$ createuser taiga [email protected]:~$ psql psql (10.14) Type "help" for help. postgres=# ALTER USER taiga WITH ENCRYPTED password 'StrongPassword'; postgres=# CREATE DATABASE taiga OWNER taiga; postgres=# q [email protected]:~$ exit
replace:
- Coniferous forest Use your Taiga.io database username
- Strong password Provide strong database passwords for taiga users.
Step 5: Install and configure Taiga backend
Create a dedicated taiga user on CentOS Linux.
$ sudo adduser taiga
$ sudo passwd taiga
Changing password for user taiga.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
$ sudo usermod -aG wheel taiga
Switch to Taiga user account and create log folder
$ su - taiga
$ mkdir -p ~/logs
$ ls
logs
Github’s clone Taiga backend project
$ git clone https://github.com/taigaio/taiga-back.git
Cloning into 'taiga-back'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 37230 (delta 13), reused 26 (delta 8), pack-reused 37190
Receiving objects: 100% (37230/37230), 18.97 MiB | 5.50 MiB/s, done.
Resolving deltas: 100% (25889/25889), done.
$ cd taiga-back
$ git checkout stable
Upgrade pip3:
sudo pip3 install --upgrade pip
Install Python dependencies using pip:
pip3 install -r requirements.txt
Populate the database with initial basic data
python3 manage.py migrate --noinput
python3 manage.py loaddata initial_user
python3 manage.py loaddata initial_project_templates
python3 manage.py compilemessages
python3 manage.py collectstatic --noinput
After running the above command, the data will be imported into the PostgreSQL database.This will also create an administrator account with login credentials admin
With password 123123
Create configuration
Copy the following configuration to ~/taiga-back/settings/local.py
:
$ vim ~/taiga-back/settings/local.py
Copy and update the following:
from .common import *
MEDIA_URL = "http://projects.hirebestengineers.com/media/"
STATIC_URL = "http://projects.hirebestengineers.com/static/"
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "projects.hirebestengineers.com"
SECRET_KEY = "OQOEJNSJIQHDBQNSUQEJSNNANsqQPAASQLSMSOQND"
DEBUG = False
PUBLIC_REGISTER_ENABLED = True
DEFAULT_FROM_EMAIL = "[email protected]"
SERVER_EMAIL = DEFAULT_FROM_EMAIL
#CELERY_ENABLED = True
EVENTS_PUSH_BACKEND = "taiga.events.backends.rabbitmq.EventsPushBackend"
EVENTS_PUSH_BACKEND_OPTIONS = {"url": "amqp://taiga:[email protected]:5672/taiga"}
# Uncomment and populate with proper connection parameters
# for enable email sending. EMAIL_HOST_USER should end by @domain.tld
#EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
#EMAIL_USE_TLS = False
#EMAIL_HOST = "localhost"
#EMAIL_HOST_USER = ""
#EMAIL_HOST_PASSWORD = ""
#EMAIL_PORT = 25
# Uncomment and populate with proper connection parameters
# for enable github login/singin.
#GITHUB_API_CLIENT_ID = "yourgithubclientid"
#GITHUB_API_CLIENT_SECRET = "yourgithubclientsecret"
Change the settings to suit your environment, set:
- RabbitMQ connection username and password
- Taiga domain
- Key and
- Optional email settings.
To make sure everything is in order, issue the following command to run the backend in development mode for testing:
python3 manage.py runserver
Sample successful output:
Trying import local.py settings...
Trying import local.py settings...
Performing system checks...
System check identified no issues (0 silenced).
October 02, 2020 - 20:53:40
Django version 2.2.16, using settings 'settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Open another shell and try to curl:
curl http://127.0.0.1:8000/api/v1/
Step 6: Install and configure Taiga front end
After installing Taiga and confirming that it can work normally, we can continue to install Taiga front-end modules.
Switch to taiga
user account
su - taiga
Clone the project source code from Github
$ git clone https://github.com/taigaio/taiga-front-dist.git
Cloning into 'taiga-front-dist'...
remote: Enumerating objects: 807, done.
remote: Counting objects: 100% (807/807), done.
remote: Compressing objects: 100% (686/686), done.
remote: Total 8580 (delta 374), reused 526 (delta 101), pack-reused 7773
Receiving objects: 100% (8580/8580), 62.04 MiB | 7.13 MiB/s, done.
Resolving deltas: 100% (3616/3616), done.
$ cd taiga-front-dist
$ git checkout stable
Copy the sample configuration file:
cp ~/taiga-front-dist/dist/conf.example.json ~/taiga-front-dist/dist/conf.json
vim ~/taiga-front-dist/dist/conf.json
Edit the sample configuration in the following pattern (replace with your own details):
{
"api": "http://projects.hirebestengineers.com/api/v1/",
"eventsUrl": "ws://projects.hirebestengineers.com/events",
"eventsMaxMissedHeartbeats": 5,
"eventsHeartbeatIntervalTime": 60000,
"eventsReconnectTryInterval": 10000,
"debug": true,
"debugInfo": false,
"defaultLanguage": "en",
"themes": ["taiga"],
"defaultTheme": "taiga",
"publicRegisterEnabled": true,
"feedbackEnabled": true,
"supportUrl": "https://tree.taiga.io/support",
"privacyPolicyUrl": null,
"termsOfServiceUrl": null,
"GDPRUrl": null,
"maxUploadFileSize": null,
"contribPlugins": [],
"tribeHost": null,
"importers": [],
"gravatar": true,
"rtlLanguages": ["fa"]
}
You should substitute projects.hirebestengineers.com
With your DNS name.
Step 7: Install Taiga Activities
Taiga-events is a Taiga web socket server, which allows taiga-front to display real-time changes in the backlog, task board, kanban and issue list. The Taiga event uses Rabbitmq as a message broker.
$ cd ~
$ git clone https://github.com/taigaio/taiga-events.git taiga-events
Cloning into 'taiga-events'...
remote: Enumerating objects: 107, done.
remote: Counting objects: 100% (107/107), done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 245 (delta 38), reused 90 (delta 28), pack-reused 138
Receiving objects: 100% (245/245), 44.87 KiB | 553.00 KiB/s, done.
Resolving deltas: 100% (113/113), done.
$ cd taiga-events
Install the required JavaScript dependencies:
npm install
Create configuration files for Taiga events.
cp config.example.json config.json
Edit the configuration file and set the rabbitmq URL and key:
$ vim config.json
{
"url": "amqp://taiga:[email protected]:5672/taiga",
"secret": "OQOEJNSJIQHDBQNSUQEJSNNANsqQPAASQLSMSOQND",
"webSocketServer": {
"port": 8888
}
}
The secret value of config.json Must be the same as SECRET_KEY in ~/taiga-back/settings/local.py!
Add taiga events to the systemd configuration:
sudo tee /etc/systemd/system/taiga_events.service<<EOF
[Unit]
Description=taiga_events
After=network.target
[Service]
User=taiga
WorkingDirectory=/home/taiga/taiga-events
ExecStart=/bin/bash -c "node_modules/coffeescript/bin/coffee index.coffee"
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
EOF
Reload Systemd and start the service:
sudo systemctl daemon-reload
sudo systemctl start taiga_events
sudo systemctl enable taiga_events
Check whether the service is running:
$ systemctl status taiga_events.service
● taiga_events.service - taiga_events
Loaded: loaded (/etc/systemd/system/taiga_events.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2020-10-02 23:01:00 CEST; 12s ago
Main PID: 15170 (node)
Tasks: 7 (limit: 24392)
Memory: 38.6M
CGroup: /system.slice/taiga_events.service
└─15170 node node_modules/coffeescript/bin/coffee index.coffee
Oct 02 23:01:00 projects.hirebestengineers.com systemd[1]: Started taiga_events.
Step 8: Start Taiga service
Create a new taiga systemd file:
sudo tee /etc/systemd/system/taiga.service<<EOF
[Unit]
Description=taiga_back
After=network.target
[Service]
User=taiga
Environment=PYTHONUNBUFFERED=true
WorkingDirectory=/home/taiga/taiga-back
ExecStart=/home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
EOF
Reload the systemd daemon and start the taiga service:
sudo systemctl daemon-reload
sudo systemctl start taiga
sudo systemctl enable taiga
Execute the following command to check if the service is running.
$ sudo systemctl status taiga
● taiga.service - taiga_back
Loaded: loaded (/etc/systemd/system/taiga.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2020-10-02 23:03:48 CEST; 50s ago
Main PID: 15494 (gunicorn)
Tasks: 5 (limit: 24392)
Memory: 298.5M
CGroup: /system.slice/taiga.service
├─15494 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
├─15497 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
├─15498 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
├─15501 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
└─15502 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15494] [INFO] Listening at: http://127.0.0.1:8001 (15494)
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15494] [INFO] Using worker: sync
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15497] [INFO] Booting worker with pid: 15497
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15498] [INFO] Booting worker with pid: 15498
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15501] [INFO] Booting worker with pid: 15501
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15502] [INFO] Booting worker with pid: 15502
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: Trying import local.py settings...
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: Trying import local.py settings...
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: Trying import local.py settings...
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: Trying import local.py settings...
Step 9: Configure Nginx
NGINX is used as a static file web server to serve taiga-front-dist and send proxy requests to taiga-back. First delete the default Nginx configuration file.
Create NGINX virtual host for Taiga:
sudo vim /etc/nginx/conf.d/taiga.conf
Modify the configuration file accordingly.
server {
listen 80;
server_name projects.hirebestengineers.com www.projects.hirebestengineers.com; # See http://nginx.org/en/docs/http/server_names.html
large_client_header_buffers 4 32k;
client_max_body_size 50M;
charset utf-8;
access_log /home/taiga/logs/nginx.access.log;
error_log /home/taiga/logs/nginx.error.log;
# Frontend
location / {
root /home/taiga/taiga-front-dist/dist/;
try_files $uri $uri/ /index.html;
}
# Backend
location /api {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8001/api;
proxy_redirect off;
}
# Admin access (/admin/)
location /admin {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8001$request_uri;
proxy_redirect off;
}
# Static files
location /static {
alias /home/taiga/taiga-back/static;
}
# Media files
location /media {
alias /home/taiga/taiga-back/media;
}
# Events
location /events {
proxy_pass http://127.0.0.1:8888/events;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
}
}
Verify the Nginx configuration:
$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Setting permissions:
sudo chown -R taiga:taiga /home/taiga/
sudo chmod o+x /home/taiga/
sudo chmod o+rx ~taiga/taiga-back/media
If everything is normal, please start the nginx service:
sudo systemctl daemon-reload
sudo systemctl restart nginx taiga
sudo systemctl enable nginx taiga
Check status:
$ systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2020-10-02 23:14:06 CEST; 5s ago
Process: 16260 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
Process: 16257 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Process: 16255 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
Main PID: 16261 (nginx)
Tasks: 3 (limit: 24392)
Memory: 5.4M
CGroup: /system.slice/nginx.service
├─16261 nginx: master process /usr/sbin/nginx
├─16262 nginx: worker process
└─16263 nginx: worker process
Oct 02 23:14:06 projects.hirebestengineers.com systemd[1]: Starting The nginx HTTP and reverse proxy server...
Oct 02 23:14:06 projects.hirebestengineers.com nginx[16257]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Oct 02 23:14:06 projects.hirebestengineers.com nginx[16257]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Oct 02 23:14:06 projects.hirebestengineers.com systemd[1]: Started The nginx HTTP and reverse proxy server.
Step 10: Visit the Taiga Web login information center
Open your favorite web browser and go to:
http://your_taiga_domain.com
You should see it at the bottom of the Taiga page.
Log in with the following default credentials:
Username: admin
Password: 123123
Then change the administrator password on Admin>Change Password
How to disable self-registration
To disable self-user registration, edit the file ~/taiga-back/settings/local.py and set the value of PUBLIC_REGISTER_ENABLED to false.
$ su - taiga
$ vim ~/taiga-back/settings/local.py
PUBLIC_REGISTER_ENABLED = False
Change the settings of Taiga front-end:
$ vim ~/taiga-front-dist/dist/conf.json
"publicRegisterEnabled": false
After updating the configuration, restart all Taiga services:
sudo systemctl restart 'taiga*'
Reload nginx:
sudo systemctl reload nginx
prior to:
Rear:
For Ubuntu installation, please use the following guide.
Install Taiga Project Management Platform on Ubuntu
You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose