Install Taiga.io Agile Project Management Software on Ubuntu 16.04

Taiga.io is an open source project management system for agile developers, designers, and project managers. It's a beautiful project management tool that can handle both simple and complex projects for startups, software developers etc.

The Taiga platform has three main components, and each component has its own dependencies.

  1. taiga-back: Backend of the application that provides an API. Written in Python and Django.
  2. taiga-front-dist: Taiga Frontend is written in AngularJS and CoffeeScript.
  3. taiga-events: Taiga WebSocket server to show real-time changes in the apps. And using RabbitMQ as a message broker.

In this tutorial, I will show you step-by-step how to install the Taiga.io project management tool on Ubuntu 16.04 server. We will learn how setup Ubuntu server for Taiga.io installation.

Prerequisites

  • Ubuntu 16.04
  • Root Privileges

What we will do

  1. Install Prerequisites
  2. Add Taiga User
  3. Install and Configure Taiga Backend
  4. Install and Configure Taiga Frontend
  5. Install and Configure Taiga Events
  6. Configure Circus and Gunicorn
  7. Configure Taiga Nginx Virtualhost
  8. Testing

Step 1 - Install Prerequisites

Before installing all Taiga.io components, we need to prepare the system by installing required packages. In this first step, we will install packages that needed for all Taiga components and modules, including Nginx, RabitMQ, Redis etc.

To begin with, update the repository and upgrade the system.

sudo apt update
sudo apt upgrade -y

- Install Dependencies

The following packages will be used for compiling some python modules. Run the apt command below to install all of them on the system.

sudo apt install -y build-essential binutils-doc autoconf flex bison libjpeg-dev libfreetype6-dev zlib1g-dev libzmq3-dev libgdbm-dev libncurses5-dev automake libtool libffi-dev curl git tmux gettext

- Install Nginx

Taiga.io is a web-based application tool. It's running on the web server. And for this guide, we will be using Nginx web server for the installation.

Install Nginx using the apt command below.

sudo apt install nginx -y

After the installation is complete, start the Nginx service and enable it to launch at system boot, something that you can do using the systemctl command.

systemctl start nginx
systemctl enable nginx

Now check using netstat and make sure the HTTP port is on the list.

netstat -plntu

Nginx successfully installed

- Install Redis and RabbitMQ

This is an optional package if you don't want async notification. Install Redis and RabbitMQ using the apt command below.

sudo apt install -y redis-server rabbitmq-server

After the installation is complete, start the redis and rabbitmq services and add those services to the boot time.

systemctl start redis

systemctl start rabbitmq-server
systemctl enable rabbitmq-server

Next, we need to create a new user and virtual host named 'taiga' for RabbitMQ - it will be used for 'taiga-events'.

Run commands below for creating new user and vhost named taiga with password 'aqwe123', then set the permission for the 'taiga' user.

sudo rabbitmqctl add_user taiga aqwe123
sudo rabbitmqctl add_vhost taiga
sudo rabbitmqctl set_permissions -p taiga taiga ".*" ".*" ".*"

Install Redis and RabbitMQ

- Install Python

'taiga-back' is created with Django Web Framework, and it's uses 'Python 3.5'. So we need to install Python 3.5 on the system.

Run the following command to install Python 3.5 with all required dependencies.

sudo apt install -y python3 python3-pip python-dev python3-dev python-pip virtualenvwrapper libxml2-dev libxslt-dev

- Install Circus

Circus is a process manager and socket manager. It can be used for monitoring and controlling process and sockets on the Linux system.

For this guide, we will be using circus for managing the 'taiga-events' process created with CoffeeScript.

Install circus with the apt command below.

sudo apt install -y circus

After the installation is complete, start the 'circusd' service and enable to launch everytime at system boot.

systemctl start circusd
systemctl enable circusd

Now check the service using following commands.

systemctl status circusd
circusctl status

And you will get the result as below.

Install Circus

- Install and Configure PostgreSQL Database

Taiga.io is using PostgreSQL as the database, and the component 'taiga-back' is using PostgreSQL (>= 9.4) as the database.

Install PostgreSQL 9.5 by running following apt commands.

sudo apt install -y postgresql-9.5 postgresql-contrib-9.5
sudo apt install -y postgresql-doc-9.5 postgresql-server-dev-9.5

If the database installation is complete, start the PostgreSQL service and enable it to launch everytime at system boot.

systemctl start postgresql
systemctl enable postgresql

Next, we will create new database and user for the Taiga.io installation.

Login to the 'postgres' user.

su - postgres

Create a new database and user named 'taiga' using commands below.

createuser taiga
createdb taiga -O taiga

The PostgreSQL database has been installed, and the database for Taiga.io has been created.

Configure Postgres

- Install Nodejs

Node is needed by 'taiga-events' - add the nodejs nodesource repository and install it with apt command.

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt install -y nodejs

All packages needed for Taiga.io installation has been installed successfully.

Step 2 - Add New User Taiga

In this step, we will create a new system user named 'taiga', and then add it to the sudo group.

Run command to create the new 'taiga' user.

useradd -m -s /bin/bash taiga
passwd taiga

Now add the 'taiga' user to the 'sudo' group.

usermod -a -G sudo taiga

Now login as 'taiga' and try to use the sudo command.

su - taiga
sudo su

Type your password and make sure you get the root privileges.

Add taiga user

New 'taiga' user has been created.

Step 3 - Configure Taiga Backend

Taiga-back is a backend of Taiga.io that provides an API. It's written in Python and Django Web Framework.

In this step, we will install and configure the taiga component 'taiga-back' as a backend that provides an API.

Login to the 'taiga' user and download the 'taiga-back' source code from GitHub.

su - taiga
git clone https://github.com/taigaio/taiga-back.git taiga-back

Now go to the 'taiga-back' directory and change the branch to the 'stable' branch.

cd taiga-back/
git checkout stable

Next, we need to create new python environment 'taiga' using the virtualenv.

mkvirtualenv -p /usr/bin/python3.5 taiga

Configure Taiga Backend

Log in to the new 'taiga' virtual environment and install all python modules needed by the 'taiga-back' using pip command as shown below.

workon taiga
pip install -r requirements.txt

After installation of all required modules is complete, we need to populate the database with initial basic data.

Run all initialize commands below.

python manage.py migrate --noinput
python manage.py loaddata initial_user
python manage.py loaddata initial_project_templates
python manage.py compilemessages
python manage.py collectstatic --noinput

The commands will automatically create an administrator account 'admin' with password '123123'.

Next, create a new configuration for 'taiga-back' using vim.

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

Paste the following configuration there.

from .common import *

MEDIA_URL = "http://taiga.hakase-labs.co/media/"
STATIC_URL = "http://taiga.hakase-labs.co/static/"
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "taiga.hakase-labs.co"

SECRET_KEY = "myverysecretkey"

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"

Save and exit.

Note:

  • Change the 'MEDIA_URL' and 'STATIC_URL' with your own domain name.
  • Change the 'SECRET_KEY' with your own secret key.
  • Change the EVENTS_PUSH_BACKEND_OPTIONS password value to your own RabbitMQ value. For this guide, we are using password 'aqwe123'.

Now test 'taiga-back' with the command below.

workon taiga
python manage.py runserver 0.0.0.0:8000

The command will run taiga-back under the server public IP with port 8000.

run taiga-back under the server public IP

Open the web browser and visit the following address. Mine is: http://192.168.33.10:8000/api/v1/

And you should get the 'taiga-back' API with JSON format as below.

API in json format

Installation and configuration of 'taiga-back' as backend has been completed.

Step 4 - Configure Taiga Frontend

In this step, we will download and configure the taiga frontend. The frontend will handle all taiga interfaces.

Login as the taiga user.

su - taiga

Download the 'taiga-front-dist' script using git command.

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

After this, go to the 'taiga-front-dist' directory and change the branch to 'stable'.

cd taiga-front-dist/
git checkout stable

Now copy the sample of 'taiga-front-dist' configuration to 'conf.json' and edit it using the vim editor.

cp ~/taiga-front-dist/dist/conf.example.json ~/taiga-front-dist/dist/conf.json
vim ~/taiga-front-dist/dist/conf.json

Make all configuration as below and change the 'api' and 'eventsUrl' with your own domain name.

{
    "api": "http://taiga.hakase-labs.co/api/v1/",
    "eventsUrl": "ws://taiga.hakase-labs.co/events",
    "debug": "true",
    "publicRegisterEnabled": true,
    "feedbackEnabled": true,
    "privacyPolicyUrl": null,
    "termsOfServiceUrl": null,
    "maxUploadFileSize": null,
    "contribPlugins": []
}

Save and exit.

Configure Taiga Frontend

The Taiga frontend configuration has been completed.

Step 5 - Configure Taiga Events

Taiga-events is a WebSocket server that allows you to show real-time changes in the Taiga.io Dashboard, and it uses RabbitMQ as a message broker. In this step, we will download and configure 'taiga-events'.

Login as 'taiga' user.

su - taiga

Download the 'taiga-events' source code from GitHub using git command and go to the 'taiga-events' directory.

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

Now install all of the javascript modules needed by 'taiga-events' using npm and then install the 'coffee-script' package to the system.

npm install
sudo npm install -g coffee-script

Configure Taiga Events

Next, copy the default configuration of 'taiga-events' to 'config.json' and edit it using vim editor.

cp config.example.json config.json
vim config.json

Make the configuration as below.

{
    "url": "amqp://taiga:[email protected]:5672/taiga",
    "secret": "myverysecretkey",
    "webSocketServer": {
        "port": 8888
    }
}

Save and exit.

Note:

  • Change the 'url' value with your own rabbitmq user and password.
  • For the 'secret' value, make sure it matches with the 'SECRET_KEY' on 'local.py' the configuration file of 'taiga-back'.

Taiga-events configuration has been completed.

Step 6 - Configure Circus and Gunicorn

Circus will be used for controlling and managing 'taiga-back' and 'taiga-events' process. 'taiga-events' is running as a coffee script, and 'taiga-back' is running under Gunicorn.

In this step, we will add new taiga-events and taiga-bac to circusd.

For the 'taiga-events', create new file 'taiga-events.ini' using vim.

vim /etc/circus/conf.d/taiga-events.ini

Paste configuration below.

[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

Save and exit.

And for the taiga-back, create new file 'taiga.ini'.

vim /etc/circus/conf.d/taiga.ini

Paste the following configuration there.

[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.5/site-packages

Save and exit.

Next, we need to create new 'logs' directory for both 'taiga-events' and 'taiga-back' processes.

su - taiga
mkdir -p ~/logs

Now restart the circusd service and check all of the processes available.

systemctl restart circusd
circusctl status

And make sure the 'taiga-events' and 'taiga-back' is active on the process list, as shown below.

Configure Circus and Gunicorn

Step 7 - Configure Taiga Nginx Virtual Host

In this step, we will configure Nginx virtual host for Taiga.io. We will create new virtual host file under 'conf.d' directory for our Taiga.io installation.

Go to the nginx configuration directory and delete the 'default' virtual host file.

cd /etc/nginx/
sudo rm -f sites-enabled/default

Now create new virtual host file 'taiga.conf' under the 'conf.d' directory.

vim /etc/nginx/conf.d/taiga.conf

Paste the following configuration there.

server {
    listen 80 default_server;
    server_name _;

    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;
    }

    # Django 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;
    }

    # Taiga-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;
    }
}

Save and exit.

Now run test nginx configuration and make sure there is no error. Then restart the web server service.

nginx -t
systemctl restart nginx

Nginx virtual host configuration for Taiga.io has been completed.

Configure Taiga Nginx Virtual Host

Step 8 - Testing

Open your web browser and visit the Taiga.io domain name. Mine is: http://taiga.hakase-labs.co

And you will get the default taiga home page.

Test taiga.io

Now click the 'Login' button on the top right and you will get the admin login page.

Taiga.io Login

Login with the default user 'admin' and password '123123'.

And you will get the result as below.

Admin account

Next, we will reset the default admin password.

Click the 'administrator' button on the top right, then click 'Change Password'.

Change administrator password

Now type the old password '123123' and the new password as you want, then click 'Save'.

Change password

Installation and configuration for Taiga.io on Ubuntu 16.04 has been completed successfully.

Reference

Share this page:

Suggested articles

0 Comment(s)

Add comment