Tuesday, November 22, 2016

[Tutorial] Installing Taiga Opensource Project Manager / Kanban on Linux Centos 7.x


I was looking for a Kanban platform to organize my notes and place reminders for my tasks that I found Trello. Trello is very user-friendly but it's not opensource and you have to rely on their website so I looked for an open-source alternative of that and found Taiga!

Taiga is much more than a Kanban platform, it's infact a project management system and a GTD (Get Things Done) framework!

They have a tutorial on how installing Taiga on Ubuntu here. Installing Taiga on Centos 7.x follows the same commands with the following exceptions:

To install prerequisiste packages:

yum install -y libfreetype6-devel zlib1g-devel libzmq3-devel libgdbm-devel libncurses5-devel


To install postgresql 9.5 package:

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm

yum install -y libpqxx-devel postgresql95-devel postgresql95-server postgresql95-contrib postgresql95-docs

/usr/pgsql-9.5/bin/postgresql95-setup initdb
export PATH=$PATH:/usr/pgsql-9.5/bin

systemctl start postgresql-9.5
systemctl enable postgresql-9.5


su postgres -c "createuser taiga"
su postgres -c "createdb taiga -O taiga"







To install rabbitmq:


yum install rabbitmq-server

 
To install python 3.5 on centos use IUS repo:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm https://centos7.iuscommunity.org/ius-release.rpm  

yum install python35u-pip python35u python35u-devel
 

To install circus:

pip2 install circus

cat > /usr/lib/systemd/system/circusd.service << EOF
[Unit]
Description=circus

[Service]
ExecStart=/usr/bin/circusd /etc/circus.ini
EOF


ln -s '/usr/lib/systemd/system/circusd.service' '/etc/systemd/system/circusd.service'


cat > /etc/circus.ini << EOF
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
stats_endpoint = tcp://127.0.0.1:5557
include_dir = /etc/circus.d
logoutput = /var/log/circusd.log
;debug = True
;; requires circus-web to be able to start the http dashboard
;httpd = True

[plugin:flapping]
use = circus.plugins.flapping.Flapping
retry_in = 3
max_retry = 2
EOF

mkdir /etc/circus.d/
mkdir -p /home/taiga/logs/

cat > /etc/circus.d/taiga-celery.ini << EOF
[watcher:taiga-celery]
working_dir = /home/taiga/taiga-back
cmd = celery
args = -A taiga worker -c 4
uid = taiga
numprocesses = 1
autostart = true
send_hup = true
stdout_stream.class = FileStream
stdout_stream.filename = /home/taiga/logs/celery.stdout.log
stdout_stream.max_bytes = 10485760
stdout_stream.backup_count = 4
stderr_stream.class = FileStream
stderr_stream.filename = /home/taiga/logs/celery.stderr.log
stderr_stream.max_bytes = 10485760
stderr_stream.backup_count = 4

[env:taiga-celery]
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
EOF

cat > /etc/circus.d/taiga.ini << EOF
[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
EOF


cat > /etc/circus.d/taiga-events.ini << EOF
[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
EOF



Monit config file for postgresql and rabbitmq:

check process postgresql with pidfile /var/lib/pgsql/9.5/data/postmaster.pid
    group postgres
    start program = "/usr/sbin/service postgresql-9.5 start"
    stop  program = "/usr/sbin/service postgresql-9.5 stop"
 if failed host localhost port 5432 protocol pgsql then restart
 if 5 restarts within 5 cycles then timeout
 

CHECK PROCESS rabbitmq-server WITH PIDFILE "/var/lib/rabbitmq/mnesia/rabbit@cl.pid"
  GROUP rabbitmq
  START PROGRAM "/usr/sbin/service rabbitmq-server start"
  STOP PROGRAM "/usr/sbin/service rabbitmq-server stop"
  IF DOES NOT EXIST FOR 3 CYCLES THEN RESTART
IF FAILED PORT 5672 4 TIMES WITHIN 6 CYCLES THEN RESTART
 

1 comment:

  1. hi Bro,,
    Why "Something happened and our Oompa Loompas are working on it." ?

    ReplyDelete