Installing and Configuring Taiga on CentOS 7 with PostgreSQL and Python 3.6

Taiga is a robust, free, and open-source solution tailored for project management. Unlike traditional tools, it adopts an incremental agile methodology to streamline project development. With a customizable architecture, Taiga offers substantial flexibility. Its backend is crafted using Python with the Django framework, while the frontend leverages JavaScript written in CoffeeScript and AngularJS. Key features include project collaboration, Kanban boards, bug and time tracking, reporting tools, backlogs, wiki integration, and more.

Requirements

  • An active CentOS 7 server instance with a minimum of 1GB RAM
  • A sudo-enabled user account

This setup utilizes taiga.example.com as the sample domain pointing to the server. Be sure to substitute it with your actual domain wherever it appears.

Before proceeding, ensure your system is up to date using the CentOS 7 update guide. After updating, move on to the PostgreSQL installation.

Installing PostgreSQL

PostgreSQL is a dependable and high-performance object-relational database engine. Taiga relies on it to manage and store its data. First, add the PostgreSQL repository to your server:


sudo yum -y install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-1.noarch.rpm

Install the PostgreSQL server along with essential components:


sudo yum -y install postgresql10-server postgresql10-contrib postgresql10

Initialize the PostgreSQL database:


sudo /usr/pgsql-10/bin/postgresql-10-setup initdb

Enable and start the PostgreSQL service to automatically launch on system boot:


sudo systemctl start postgresql-10
sudo systemctl enable postgresql-10

Set a new password for the default PostgreSQL user account:

Switch to the PostgreSQL user environment:

Create a new database user dedicated to Taiga:

Access the PostgreSQL shell for database operations:

Assign a secure password to the new Taiga user:


ALTER USER taiga WITH ENCRYPTED password ‘DBPassword’;

Make sure to replace DBPassword with a strong, secure password.

Next, set up a new database for Taiga and assign ownership to the created user:


CREATE DATABASE taiga OWNER taiga;

Exit the PostgreSQL shell:

Return to the sudo-enabled user account:

Installing Python 3.6

While CentOS 7 includes Python 2.7 by default, Taiga needs Python version 3.4 or newer. Here, Python 3.6 will be compiled from source. Begin by installing essential build packages and compilers:


sudo yum -y install gcc autoconf flex bison libjpeg-turbo-devel freetype-devel zlib-devel zeromq3-devel gdbm-devel ncurses-devel automake libtool libffi-devel curl git tmux libxml2-devel libxslt-devel openssl-devel gcc-c++

Download the Python 3.6 source archive:


wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz

Extract the archive and configure the build environment:


tar xf Python-3.6.3.tar.xz
cd Python-3.6.3
./configure –enable-optimizations –prefix=/usr

Execute an alternate installation to preserve the default Python version:

Important: Avoid overwriting the system Python as it is required by the YUM package manager.

Verify the Python 3.6 installation:

You should get this output:


[user@Python-3.6.3]$ python3.6 -V
Python 3.6.3

Use pip to install virtual environment tools:


sudo pip3.6 install virtualenv virtualenvwrapper
sudo pip3.6 install –upgrade setuptools pip

Virtual environments are essential for Python development. They provide isolated workspaces that contain their own package directories, avoiding conflicts with other environments or system-wide installations.

 

 

Installing RabbitMQ for Message Queuing

Taiga depends on RabbitMQ for processing message queues. RabbitMQ requires Erlang to operate correctly. Begin by installing Erlang:


sudo yum -y install erlang

Import RabbitMQ’s GPG signing key:


sudo rpm –import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc

Download and install RabbitMQ:


sudo yum -y install https://dl.bintray.com/rabbitmq/rabbitmq-server-rpm/rabbitmq-server-3.6.12-1.el7.noarch.rpm

Enable and start the RabbitMQ service:


sudo systemctl start rabbitmq-server
sudo systemctl enable rabbitmq-server

Create a user and virtual host for Taiga and grant necessary permissions:


sudo rabbitmqctl add_user taiga StrongMQPassword
sudo rabbitmqctl add_vhost taiga
sudo rabbitmqctl set_permissions -p taiga taiga “.*” “.*” “.*”

Replace StrongMQPassword with a secure password of your choice.

Installing Node.js and CoffeeScript

To compile Taiga’s frontend, Node.js version 7 or higher is required. Add the Node.js v8 repository:


curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash –

Install Node.js and the pwgen utility for generating secure keys:


sudo yum install -y nodejs pwgen

Install CoffeeScript and Gulp using npm:


sudo npm install -g coffee-script gulp

Setting Up the Taiga Backend

Create a new user under which the Taiga backend will run:


sudo useradd -s /bin/bash taiga
sudo su – taiga

Note: From this point on, run all commands as the taiga user until further notice.

Create a logs directory:

Clone the backend repository and check out the stable branch:


git clone https://github.com/taigaio/taiga-back.git taiga-back
cd taiga-back
git checkout stable

Set up the virtualenvwrapper to use Python 3.6 explicitly:


echo “VIRTUALENVWRAPPER_PYTHON=’/bin/python3.6′” >> ~/.bashrc
echo “source /usr/bin/virtualenvwrapper.sh” >> ~/.bashrc
source ~/.bashrc

Create and activate a new Python virtual environment:


mkvirtualenv -p /bin/python3.6 taiga
pip3.6 install –upgrade setuptools

Install Python dependencies from the requirements file:


pip3.6 install -r requirements.txt

Populate the database with essential data and perform static file preparation:


python3.6 manage.py migrate –noinput
python3.6 manage.py loaddata initial_user
python3.6 manage.py loaddata initial_project_templates
python3.6 manage.py compilemessages
python3.6 manage.py collectstatic –noinput

To install sample data for demo purposes, run:


python3.6 manage.py sample_data

Creating Backend Configuration

Generate a strong secret key to encrypt sessions:

You should see an output similar to:


CZfjWjHctPwnLZsDysWqaZcYfRCviHbI4fVRwfhpbtAHPNBtmkcegpwpYjTtEziJ

Edit the local backend settings file:


nano ~/taiga-back/settings/local.py

Insert the following configuration, replacing placeholders with actual values:


from .common import *

MEDIA_URL = “https://taiga.example.com/media/”
STATIC_URL = “https://taiga.example.com/static/”
SITES[“front”][“scheme”] = “https”
SITES[“front”][“domain”] = “taiga.example.com”

SECRET_KEY = “Generated_Secret_Key”

DEBUG = False
PUBLIC_REGISTER_ENABLED = True

DEFAULT_FROM_EMAIL = “mail@example.com”
SERVER_EMAIL = DEFAULT_FROM_EMAIL

#CELERY_ENABLED = True

EVENTS_PUSH_BACKEND = “taiga.events.backends.rabbitmq.EventsPushBackend”
EVENTS_PUSH_BACKEND_OPTIONS = {“url”: “amqp://taiga:StrongMQPassword@localhost:5672/taiga”}

#EMAIL_BACKEND = “django.core.mail.backends.smtp.EmailBackend”
#EMAIL_USE_TLS = False
#EMAIL_HOST = “mail.example.com”
#EMAIL_HOST_USER = “mail@example.com”
#EMAIL_HOST_PASSWORD = “SMTPPassword”
#EMAIL_PORT = 25

#GITHUB_API_CLIENT_ID = “yourgithubclientid”
#GITHUB_API_CLIENT_SECRET = “yourgithubclientsecret”

Running and Testing the Taiga Backend

To verify if the backend works, run the Django development server:


workon taiga
python manage.py runserver

You will see output similar to the following, indicating success:


Trying import local.py settings…
Performing system checks…

System check identified no issues (0 silenced).
Django version 1.10.6, using settings ‘settings’
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

In another terminal, confirm API access with curl:


curl http://127.0.0.1:8000/api/v1/

The API will return endpoints similar to this:


{“locales”: “…”, “auth”: “…”, “users”: “…”, “roles”: “…”, “user-storage”: “…”, “notify-policies”: “…”, “projects”: “…”, “projects/(?P\\d+)/fans”: “…”, “projects/(?P\\d+)/watchers”: “…”, “project-templates”: “…”}

Stop the backend with Ctrl + C and deactivate the environment:

 

Install and Configure Taiga Frontend

The frontend of Taiga provides the user-facing web interface. Begin by cloning the official frontend repository and switching to the latest stable branch:


cd ~
git clone https://github.com/taigaio/taiga-front-dist.git taiga-front-dist
cd taiga-front-dist
git checkout stable

Create and populate a configuration file for the frontend:


nano ~/taiga-front-dist/dist/conf.json


{
“api”: “https://taiga.example.com/api/v1/”,
“eventsUrl”: “wss://taiga.example.com/events”,
“eventsMaxMissedHeartbeats”: 5,
“eventsHeartbeatIntervalTime”: 60000,
“eventsReconnectTryInterval”: 10000,
“debug”: true,
“debugInfo”: false,
“defaultLanguage”: “en”,
“themes”: [“taiga”],
“defaultTheme”: “taiga”,
“publicRegisterEnabled”: true,
“feedbackEnabled”: true,
“privacyPolicyUrl”: null,
“termsOfServiceUrl”: null,
“maxUploadFileSize”: null,
“contribPlugins”: [],
“tribeHost”: null,
“importers”: [],
“gravatar”: true
}

Remember to update the domain and optional parameters as required.

Set Up Taiga Events for Real-Time Updates

Taiga Events powers real-time updates in Kanban, backlog, and other components. Clone the events module and install its dependencies:


cd ~
git clone https://github.com/taigaio/taiga-events.git taiga-events
cd taiga-events
npm install

Create the config file for Taiga Events:


nano ~/taiga-events/config.json


{
“url”: “amqp://taiga:StrongMQPassword@localhost:5672/taiga”,
“secret”: “Generated_Secret_Key”,
“webSocketServer”: {
“port”: 8888
}
}

Use the same secret key and message queue credentials defined in your backend configuration.

Manage Services with Circus

Now return to the sudo user session:

Install the Circus process manager:


sudo pip3.6 install circus

Create the necessary folders and initial configuration files:


sudo mkdir /etc/circus
sudo mkdir /etc/circus/conf.d
sudo nano /etc/circus/circus.ini


[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
include = /etc/circus/conf.d/*.ini

Configure backend and events watchers for Circus:


sudo nano /etc/circus/conf.d/taiga.ini


[watcher:taiga]
working_dir = /home/taiga/taiga-back
cmd = gunicorn
args = -w 3 -t 60 –pythonpath=. -b 127.0.0.1:8001 taiga.wsgi
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/gunicorn.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/gunicorn.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4

[env:taiga]
PATH = /home/taiga/.virtualenvs/taiga/bin:$PATH
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/taiga
PYTHONPATH=/home/taiga/.virtualenvs/taiga/lib/python3.6/site-packages

Now create the events process config:


sudo nano /etc/circus/conf.d/taiga-events.ini


[watcher:taiga-events]
working_dir = /home/taiga/taiga-events
cmd = /usr/bin/coffee
args = index.coffee
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/taigaevents.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 12
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/taigaevents.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 12

Create the systemd unit file to manage Circus as a service:


sudo nano /etc/systemd/system/circus.service


[Unit]
Description=Circus process manager
After=syslog.target network.target nss-lookup.target

[Service]
Type=simple
ExecReload=/usr/bin/circusctl reload
ExecStart=/usr/bin/circusd /etc/circus/circus.ini
Restart=always
RestartSec=5

[Install]
WantedBy=default.target

Start and enable Circus on boot:


sudo systemctl start circus
sudo systemctl enable circus
circusctl status

A successful status shows:


taiga: active
taiga-events: active

Serve Taiga Securely via Nginx with Let’s Encrypt

Install Nginx and Certbot:


sudo yum -y install nginx certbot

Adjust firewall rules for HTTP and HTTPS:


sudo firewall-cmd –permanent –zone=public –add-service=http
sudo firewall-cmd –permanent –zone=public –add-service=https
sudo firewall-cmd –reload

Ensure your domain is pointing to your server, then request the certificate:


sudo certbot certonly –standalone -d taiga.example.com

Schedule auto-renewal of the SSL certificate:

Add this cron job:


0 0 * * * /usr/bin/certbot renew –quiet

Generate a Diffie-Hellman key:


sudo openssl dhparam -out /etc/ssl/dhparam.pem 2048

Then configure your Nginx virtual host (use the config you’ve already provided).

Restart the web server and verify:


sudo systemctl restart nginx
sudo systemctl status nginx

Finally, adjust permissions to ensure correct ownership:


sudo chown -R taiga:taiga /home/taiga/
sudo chmod o+x /home/taiga/

Conclusion

You can now access Taiga at https://taiga.example.com. Use the default admin login:

  • Username: admin
  • Password: 123123

Create a new project or import from other platforms like GitHub, Jira, or Trello to get started.

Source: vultr.com

Create a Free Account

Register now and get access to our Cloud Services.

Posts you might be interested in: