Project Management Tool For Linux Server

— Pending this post
Install with prebuilt script.
Nothing many to do. Just run the script.

git clone https://github.com/taigaio/taiga-scripts.git
cd taiga-scripts
bash setup-server.sh

It was installed easily. But something to fix is to operate well.

1. Singup fails.
There is a log at ‘logs/gunicorn.stderr.log’.
It’s about BadHeaderError at django/core/mail/message.py. It tells threre is invalid newline(‘\n’) at the header.
Fix it at ‘django/core/mail/utils.py’
Add ‘replace(‘\n’, ”)’ like the below.

self._fqdn = socket.getfqdn().replace('\n', '')

 

2. Opening or downloading attachment is fails.
When the attachment is clicked in Wiki page. It goes the url starting with ‘localhost:8000’.
It should be started with ‘pulic url like ‘www.xxx.com’.
Fix it at ‘taiga-back/setting/common.py’.

SITES = {
    "api": {"domain": "localhost:8000", "scheme": "http", "name": "api"},
    "front": {"domain": "localhost:9001", "scheme": "http", "name": "front"},
}

To

SITES = {
    "api": {"domain": "domain url", "scheme": "http", "name": "api"},
    "front": {"domain": "domain url", "scheme": "http", "name": "front"},
}

 

————————————————————–
Wiki page is important for a developer/engineer/programmer. But OrangeScrum doesn’t support it. And Orangescrum is not good at editing past written note or reply.
In conclusion, Orangescrum is too hard to edit a writing on a page. Because the system is for a conversation format.

So Taiga or Redmine is the best for a developer’s requirement.
I used Redmine. It’s so good and powerful, but not pretty. How to visualize is so important.
Finally the next try will be Taiga.

Began deploying Taiga.
Guide Document : http://taigaio.github.io/taiga-doc/dist/#_setup_development_environment

1st, Install dependencies.

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

2nd, Setup database

sudo apt-get install -y postgresql-9.3 postgresql-contrib-9.3
sudo apt-get install -y postgresql-doc-9.3 postgresql-server-dev-9.3

And configure database…

sudo -u postgres createuser taiga
sudo -u postgres createdb taiga -O taiga

3rd, Setup python environmnet for taiga’s 3rd party libraries

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

4th, Install Taiga
Download Source code …

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

Restart shell for the ‘virtualenv’ command

Create new virtualenv named taiga…

cd taiga-back
mkvirtualenv -p /usr/bin/python3.4 taiga

Install dependencies…

pip install -r requirements.txt

Populate the database with initial basic data…

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

(This creates a new user admin with password 123123.)

And as final step for setup taiga-back, you should create the intial configuration for proper static/media files resolution and optionally, email sending support:
Put this on ~/taiga-back/settings/local.py

from .common import *

MEDIA_URL = "http://example.com/media/"
STATIC_URL = "http://example.com/static/"
ADMIN_MEDIA_PREFIX = "http://example.com/static/admin/"
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "example.com"

SECRET_KEY = "theveryultratopsecretkey"

DEBUG = False
TEMPLATE_DEBUG = False
PUBLIC_REGISTER_ENABLED = True

DEFAULT_FROM_EMAIL = "no-reply@example.com"
SERVER_EMAIL = DEFAULT_FROM_EMAIL

# 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"

5th, Run Server

workon taiga python
manage.py runserver

Meet the error

psycopg2.OperationalError: FATAL: role "my account" does not exist

So applied it.

sudo -u postgres createuser "my account"

The warning message appear.

You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.

So applied it.

python manage.py migrate

Then passed all cases as a ‘OK’ message.
Occured to the message that is ‘ showed by previous command ‘python manage.py migrate –noinput’

6th, Frontend Installation
Download Frontend

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

Configuration

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

Edit conf.json

{ 
"api": "http://example.com/api/v1/", 
"eventsUrl": "ws://example.com/events", "debug": "true", 
"publicRegisterEnabled": true, 
"feedbackEnabled": true, 
"privacyPolicyUrl": null, 
"termsOfServiceUrl": null, 
"maxUploadFileSize": null, 
"contribPlugins": [] 
}

7th, Install process manager ‘Circus’

sudo pip2 install circus
mkdir -p ~/conf/

Initialize ~/conf/circus.ini

[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
statsd = true

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

Create log directory.

mkdir ~/logs

Setup circus for start on boot putting this on /etc/init/circus.conf

start on filesystem and net-device-up IFACE=lo
stop on runlevel [016]

respawn
exec /usr/local/bin/circusd /home/taiga/conf/circus.ini

Start circus

sudo service circus start

 

8th, ngnix

Install nginx

sudo apt-get install -y nginx

Add specific configuration for taiga-front-dist and taiga-back on /etc/nginx/sites-available/taiga

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

Disable the default nginx site (virtualhost)

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

Enable the recently created Taiga site (virtualhost)

sudo ln -s /etc/nginx/sites-available/taiga /etc/nginx/sites-enabled/taiga

verify the nginx configuration with the following command to track any error preventing the service to start

sudo nginx -t

Restart nginx

sudo service nginx restart

The sign-up process met an error. I made a several tries, but nothing works.

I found an another way to install Taiga as a prebuilt script.

It will be on the top of this page.

(The post will be updated.)
——————————–

There are posts about git and ftp for linux server. And a project management tool is necessary for co-working and a project management.
There are some tools such as Slack, Asana, Trello, Redmine, … etc.
Redmine is familiar because it was used at work. It’s good but a new one was selected to try.
There are some requirements.
1. Git Integration : It is to manage software project.
2. Installation On Server : It is for running a own server.

At first, set up apm.
http://sarghis.com/blog/680/

$) sudo /etc/init.d/apache2 restart
* Restarting web server apache2 AH00558: apache2: Could not reliably determine the server’s ed domain name, using 127.0.1.1. Set the ‘ServerName’ directto suppress this message

$) sudo vi /etc/hostname

add ‘127.0.0.1 localhost’

$) sudo vi /etc/apache2/apache.conf

add ‘ServerName localhost’

[change apache server root directory]

$) sudo vi /etc/apache2/apachce.conf
$) sudo vi /etc/apache2/sites-available/000-default.conf

[Database Setting]

$) mysql -u root -p
mysql> create database [database_name]
$) mysql -u root -p -h localhost [database_name] < database.sql

[orange scrum configuration]
source site : http://www.orangescrum.org/how-to-install-orangescrum-on-centos

[start page image not showing]
Step:1

orangescrum folder path – Make sure please create a folder called ‘orangescrum’ underneath html folder and copy source code here.

/var/www/html/orangescrum

Step:2
open this file and edit vi /etc/apache2/apache2.conf

Add this below file ( AllowOverride All instead of AllowOverride None)

Options Indexes FollowSymLinks
AllowOverride All
Require all granted

Save the file and restart the Apache service

Step:3
open this file and edit vi /etc/apache2/sites-available/000-default.conf

Add this below file

ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/orangescrum

Options Indexes FollowSymLinks
AllowOverride All

Save the file and restart the Apache service

Step:4 enable this module and restart the Apache service

sudo a2enmod rewrite
sudo a2enmod headers

service apache2 restart

Source site : https://groups.google.com/forum/m/#!topic/orangescrum-community-support/8Qmdcq3_5CM

This post will be updated…

Source Site : https://opensource.com/business/15/1/top-project-management-tools-2015

Project Management Tool For Linux Server

Git Management with gitolite.

The concept is to manage a git repository with an single gitolite user(account), not create users(accounts) for all git users.

$) git adduser gitolite

$) git adduser git

 

$) su – git

$) git clone git@https://github.com/sitaramc/gitolite.git

$) ./gitolite/install

 

$) su – gitolite

$) ssh-keygen

$) scp ~/.ssh/id_rsa.pub git@localhost:/home/git/.ssh/gitolite.pub

 

$) su – git

$) ./gitolite/src/gitolite setup -pk ~/.ssh/gitolite.pub

 

# Add Client User

$) su – gitolite

$) cd  gitolite-admin/keydir

$) scp [user_name]@localhost:/home/[user_name]/.ssh/id_rsa.pub . [user_name].pub

$) git add ./keydir/[user-name].pub

$) git commit -am “add user ‘[user_name]'”

$) git push

 

# Add A Repository

$) vi ./gitolite-admin/conf/gitolite.conf

repo gitolite-admin
    RW+     =   gitolite

repo testing
    RW+     =   @all

repo test
    RW+     =   [user_name]

$) git commit -am “add a [user_name] repository.”

$) git push

 

# Retrieve A Git Repository At A Client

$) su – [user_name]

$) git clone git@localhost:test.git

 

# Git Remote Reference and Branch
$) git ls-remote

$) git remote show

 

 

Reference Source
: http://www.whatwant.com/331
: https://git-scm.com/book/ko/v2/Git-%EB%B8%8C%EB%9E%9C%EC%B9%98-%EB%A6%AC%EB%AA%A8%ED%8A%B8-%EB%B8%8C%EB%9E%9C%EC%B9%98

 

Git Management with gitolite.

Git Server Setting on Ubuntu

# Install GIT

$) sudo add-apt-repository ppa:git-core/ppa

$) sudo apt-get update

$) sudo apt-get install git-core

$) git version

 

# Create an admin account

$) sudo adduser git

$) su – git

$) cd ~

$) mkdir .ssh

$) sudo chmod 700 .ssh

$) cat id_rsa.pub >> ~/.ssh/authorized_keys

$) chmod 600 ~/.ssh/authorized_keys

$) rm -rf id_rsa.pub

# Security Settings

$) sudo vi /etc/passwd
(If the message “user id(account) is not in the sudoers file.” shows, see here.)

from

git:x:1001:1001:,,,:/home/git:/bin/bash

to

git:x:1001:1001:,,,:/home/git:/usr/bin/git-shell

Now the access is denied.

 

# Create repository

Login or connect git account to local or remote machine.

$) cd ~

$) mkdir [repo-name].git

$) cd [repo-name].git

If it is a first try,

$) git init –bare –shared

Or there is a being used repository

$) git clone –bare –shared [repo-url]

 

# Retrieve by client

$) git clone git@[git-repo-url]:test.git

 

Reference Source : http://webdir.tistory.com/220

 

 

Git Server Setting on Ubuntu