Install Taiga.io Project Management Tool on Ubuntu 18.04 LTS
source link: https://computingforgeeks.com/how-to-install-taiga-io-project-management-tool-on-ubuntu-18-04-lts/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Welcome to our guide on how to install Taiga.io Project Management Tool on Ubuntu 18.04. Taiga.io is a Project management web application with scrum. It is built on top of Django and AngularJS. Taiga gives you an easy and efficient project collaboration, time tracking, bug tracking, Kanban board, wiki, reporting, backlogs e.t.c.
Update for Ubuntu 20.04: Install Taiga Project Management Platform on Ubuntu 20.04
Step 1: Setup all Pre-requisites / dependencies
Set your host system hostname and update the system
sudo hostnamectl set-hostname taiga.example.com
sudo apt update
Then install Taiga.io dependency packages by running the commands:
sudo apt -y install git pwgen automake wget curl gettext circus build-essential libgdbm-dev binutils-doc autoconf flex gunicorn bison libjpeg-dev libzmq3-dev libfreetype6-dev zlib1g-dev libncurses5-dev libtool libxslt-dev libxml2-dev libffi-dev python3 virtualenvwrapper python3-dev python3-pip python3-dev libssl-dev circus nginx
Confirm Python version installed, should be 3.6
$ python3 -V
Python 3.6.6
It is recommended to upgrade pip to the latest release
sudo pip3 install --upgrade setuptools pip
Another dependency Package is Node.js, install it with coffee-script Node package.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y gcc g++ make nodejs
sudo npm install -g gulp coffee-script
We also need to create a user account that will be used to run and manage Taiga.io services
sudo adduser taiga
sudo adduser taiga sudo
Step 2: Install and Configure PostgreSQL
Taiga.io requires PostgreSQL database server. Install and configure it like below:
Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
Add PostgreSQL apt repository:
echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
Update the package lists and install postgresql
package
sudo apt update
sudo apt -y install postgresql-10
The configuration file for PostgreSQL 10 is:
/etc/postgresql/10/main/postgresql.conf
Set PostgreSQL admin user’s password using:
$ sudo passwd postgres
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Create a database and user for Taiga.io
$ sudo su - postgres postgres@taiga:~$ createuser taiga postgres@taiga:~$ psql psql (10.5 (Ubuntu 10.5-2.pgdg18.04+1)) Type "help" for help. postgres=# ALTER USER taiga WITH ENCRYPTED password 'StrongPassword'; postgres=# CREATE DATABASE taiga OWNER taiga; postgres=# \q postgres@taiga:~$ exit
Replace:
- taiga with your Database username for Taiga.io
- StrongPassword with strong database password for taiga user.
Step 3: Install Erlang and Configure RabbitMQ
Taiga message queue is processed by RabbitMQ but it is not installed by default on Ubuntu. In this section, you’ll install Erlang and RabbitMQ.
How to install Latest Erlang on Ubuntu 18.04 LTS
How to install Latest RabbitMQ Server on Ubuntu 18.04 LTS
Once RabbitMQ server is installed, create a user and vhost for Taiga
sudo rabbitmqctl add_user taiga StrongPassword sudo rabbitmqctl add_vhost taiga sudo rabbitmqctl set_permissions -p taiga taiga ".*" ".*" ".*"
Step 4: Install and configure Taiga Backend
Switch to Taiga user account created in step 1 and create logs folder
su - taiga
mkdir -p ~/logs
Clone Taiga Backend Project from Github
git clone https://github.com/taigaio/taiga-back.git
cd taiga-back
git checkout stable
Create Virtualenv
Then Create a Virtualenv for Taiga.io Backend and install required dependencies
mkvirtualenv -p /usr/bin/python3 taiga_venv
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
Data will be imported to your PostgreSQL database on running above commands. This also creates the administrator account whose login credentials are admin
with a password 123123
If you need sample data, you can load it with python3 manage.py sample_data
. This is for DEMO PURPOSES ONLY, it may be hard to clean up the data later.
Crete Config
Copy the following config into ~/taiga-back/settings/local.py
and update it with your own details:
from .common import *
MEDIA_URL = "http://taiga.example.com/media/"
STATIC_URL = "http://taga.example.com/static/"
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "taiga.example.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:StrongPassword@localhost: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 fit your environment, set RabbitMQ connection username and password, Taiga.io domain, secret key, and optional email settings.
Validation
To make sure that everything works, issue the following command to run the backend in development mode for a test:
workon taiga_venv
python manage.py runserver
curl http://127.0.0.1:8000/api/v1/
Sample successful output:
Performing system checks...
System check identified no issues (0 silenced).
October 24, 2018 - 22:21:54
Django version 1.11.2, using settings 'settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Disable your Virtualenv to begin Front end installation.
$ deactivate
Step 5: Install and configure Taiga Frontend
The taiga-front is written mostly in angularjs and CoffeeScript and depends on the backend. You need to have Taiga backend configured before doing these section configurations.
Switch to a taiga
user account
su - taiga
Clone the Project source code from Github
git clone https://github.com/taigaio/taiga-front-dist.git
cd taiga-front-dist
git checkout stable
Copy the example config file:
cp ~/taiga-front-dist/dist/conf.example.json ~/taiga-front-dist/dist/conf.json
Edit the example configuration following the pattern below (replace with your own details):
$ cat ~/taiga-front-dist/dist/conf.json { "api": "http://taiga.example.com/api/v1/", "eventsUrl": "ws://taiga.example.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"] }
Replace taiga.example.com
with your Taiga actual domain name. You can also change the other parameters to fit your use.
Step 6: Install Taiga Events
Taiga-events is the Taiga websocket server which allows taiga-front to show real-time changes in the backlog, taskboard, kanban, and issues listing. Taiga-events use rabbitmq as a message broker.
cd ~
git clone https://github.com/taigaio/taiga-events.git taiga-events
cd taiga-events
Install the javascript dependencies needed
npm install
sudo npm install -g coffee-script
Create a configuration file for Taiga Events.
cp config.example.json config.json
Edit the fileconfig.json
and update rabbitmq uri
and the secret key.
$ cat ~/taiga-events/config.json { "url": "amqp://taiga:StrongPassword@localhost:5672/taiga", "secret": "OQOEJNSJIQHDBQNSUQEJSNNANQPAASQLSMSOQND", "webSocketServer": { "port": 8888 } }
Replace StrongPassword
with your RabbitMQ taiga user password and OQOEJNSJIQHDBQNSUQEJSNNANQPAASQLSMSOQND
with your secret key generated and configured earlier.
Step 7: Configure Circus
Circus is a Python Applications process manager used to run the Taiga backend and events.
sudo vim /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
Also create one for Taiga under /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_venv/bin:$PATH
TERM=rxvt-256color
SHELL=/bin/bash
USER=taiga
LANG=en_US.UTF-8
HOME=/home/taiga
PYTHONPATH=/home/taiga/.virtualenvs/taiga_venv/lib/python3.6/site-packages
Reload the circusd configurations:
sudo systemctl restart circusd
sudo systemctl status circusd
To verify that the services are running, issue:
$ circusctl status circusd-stats: active plugin:flapping: active taiga: active taiga-events: active
Step 8: Configure Nginx
The last step is to create a new nginx virtualhost for Taiga.
sudo vim /etc/nginx/conf.d/taiga.conf
Add the following data:
server {
listen 80;
server_name taiga.example.com;
large_client_header_buffers 4 32k;
client_max_body_size 50M;
charset utf-8;
access_log /var/log/nginx/taiga.access.log;
error_log /home/taiga/logs/taiga.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;
}
}
Confirm configuration syntax:
$ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Now you can restart your nginx service
sudo systemctl restart nginx
sudo systemctl status nginx
Now you should have the service up and running on http://example.com/
. Login with the username admin and password 123123.
Change Admin Password on Administrator > Change Password
Provide the old password and the new one then click Save. If you encounter any application related issues, view configured logs to help you quickly resolve them.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK