우분투에서 Taiga.io 민첩 한 프로젝트 관리 소프트웨어를 설치 16.04

Taiga.io is an open source project management system for agile developers, 디자이너, 및 프로젝트 관리자. 그것은 신생 기업에 대 한 간단 하 고 복잡 한 프로젝트를 처리할 수 있는 아름 다운 프로젝트 관리 도구, 소프트웨어 개발자 등.

타이가 플랫폼은 세 가지 주요 구성 요소, 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.

이 자습서에서는, I will show you step-by-step how to install the Taiga.io project management tool on Ubuntu 16.04 서버. We will learn how setup Ubuntu server for Taiga.io installation.

필수 구성 요소

  • 우분투 16.04
  • 루트 권한

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. 테스트

단계 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, Nginx를 포함 하 여, RabitMQ, Redis etc.

로 시작, update the repository and upgrade the system.

sudo 적합성 업데이트
sudo apt upgrade -y

- 종속성을 설치

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

- 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

설치가 완료 된 후, start the Nginx service and enable it to launch at system boot, something that you can do using the systemctl command.

systemctl 시작 nginx
systemctl 사용 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

설치가 완료 된 후, 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

다음, 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

- 파이썬 설치

'taiga-back' is created with Django Web Framework, and it's uses 'Python 3.5'. So we need to install Python 3.5 시스템에서.

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.

이 가이드에 대 한, 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

설치가 완료 된 후, 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.

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 시작 postgresql
systemctl 사용 postgresql

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

Login to the 'postgres' user.

su - 포스트 그레스

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.

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

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

단계 2 - Add New User Taiga

이 단계에서, 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.

단계 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.

이 단계에서, 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

다음, 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 '관리자' with password '123123'.

다음, 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.  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 '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. 이 가이드에 대 한, 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. 광산은: 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.

단계 4 - Configure Taiga Frontend

이 단계에서, 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

이 후, 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": []
}

저장 하 고 종료.

Configure Taiga Frontend

The Taiga frontend configuration has been completed.

단계 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. 이 단계에서, 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 설치
sudo npm install -g coffee-script

Configure Taiga Events

다음, 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
}
}

저장 하 고 종료.

참고:

  • 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.

단계 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.

이 단계에서, 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

저장 하 고 종료.

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

저장 하 고 종료.

다음, 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, 아래와 같이.

Configure Circus and Gunicorn

단계 7 - Configure Taiga Nginx Virtual Host

이 단계에서, 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;
}
}

저장 하 고 종료.

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

nginx-t
systemctl 다시 시작 nginx

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

Configure Taiga Nginx Virtual Host

단계 8 - 테스트

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 '관리자' and password '123123'.

And you will get the result as below.

Admin account

다음, 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.

참조

소스

답을 남겨주세요