Skip to content

Instantly share code, notes, and snippets.

@ss-abramchuk
Last active April 23, 2018 12:53

Revisions

  1. Sergio Abramchuk revised this gist Jul 4, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion installing-taiga-on-centos6-x64.md
    Original file line number Diff line number Diff line change
    @@ -93,7 +93,7 @@ Configure backend...

    DATABASES = {
        'default': {
            'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2',
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'NAME': '$TAIGA_POSTGRES_BD',
            'USER': '$TAIGA_POSTGRES_USER',
            'PASSWORD': '$TAIGA_POSTGRES_PASSWORD'
  2. Sergio Abramchuk revised this gist Jun 26, 2015. 1 changed file with 1 addition and 64 deletions.
    65 changes: 1 addition & 64 deletions installing-taiga-on-centos6-x64.md
    Original file line number Diff line number Diff line change
    @@ -202,67 +202,4 @@ Start the circus service.

    initctl start circus

    Backend installation complete.

    ##Installing Taiga Events // Review: doesn't work
    ...

    su - taiga
    git clone https://github.com/taigaio/taiga-events.git /opt/taiga-events
    cd /opt/taiga-events
    git checkout stable

    Install requirements...
    ...

    source activate taiga
    pip install -r requirements.txt
    exit

    Configure taiga-events...

    cat > /opt/taiga-events/conf.py << EOF
    secret_key = "$TAIGA_SECRET_KEY"

    repo_conf = {
    "kwargs": {"dsn": "dbname=$TAIGA_POSTGRES_BD"}
    }

    queue_conf = {
    "path": "taiga_events.queues.pg.EventsQueue",
    "kwargs": {
    "dsn": "dbname=$TAIGA_POSTGRES_BD"
    }
    }
    EOF

    chown taiga.taiga /opt/taiga-events/conf.py

    Configure circus...

    cat >> /etc/circus.ini << EOF

    [watcher:taiga-events]
    working_dir = /opt/taiga-events
    cmd = python run.py -f conf.py
    uid = taiga
    numprocesses = 1
    autostart = true
    stdout_stream.class = FileStream
    stdout_stream.filename = /var/log/taiga/events.stdout.log
    stdout_stream.max_bytes = 10485760
    stdout_stream.backup_count = 4
    stderr_stream.class = FileStream
    stderr_stream.filename = /var/log/taiga/events.stderr.log
    stderr_stream.max_bytes = 10485760
    stderr_stream.backup_count = 4
    copy_env = true
    virtualenv = /home/taiga/envs/taiga/
    EOF

    Restart circus after updating the configuration

    initctl restart circus

    ##Installing Taiga Frontend
    ...
    Backend installation complete.
  3. Sergio Abramchuk revised this gist Apr 11, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion installing-taiga-on-centos6-x64.md
    Original file line number Diff line number Diff line change
    @@ -204,7 +204,7 @@ Start the circus service.

    Backend installation complete.

    ##Installing Taiga Events
    ##Installing Taiga Events // Review: doesn't work
    ...

    su - taiga
  4. Sergio Abramchuk renamed this gist Feb 17, 2015. 1 changed file with 0 additions and 0 deletions.
  5. Sergio Abramchuk revised this gist Feb 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,7 @@
    ...

    cat > /etc/profile.d/miniconda.sh << EOF
    if [[ $PATH != */usr/local/miniconda3/bin* ]]
    if [[ \$PATH != */usr/local/miniconda3/bin* ]]
    then
    export PATH=/usr/local/miniconda3/bin:\$PATH
    fi
  6. Sergio Abramchuk revised this gist Feb 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -43,7 +43,7 @@
    cat > /etc/profile.d/miniconda.sh << EOF
    if [[ $PATH != */usr/local/miniconda3/bin* ]]
    then
    export PATH=/usr/local/miniconda3/bin:$PATH
    export PATH=/usr/local/miniconda3/bin:\$PATH
    fi
    EOF

  7. Sergio Abramchuk revised this gist Feb 14, 2015. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,15 @@

    ...

    echo 'export PATH=/usr/local/miniconda3/bin:$PATH' > /etc/profile.d/miniconda.sh
    cat > /etc/profile.d/miniconda.sh << EOF
    if [[ $PATH != */usr/local/miniconda3/bin* ]]
    then
    export PATH=/usr/local/miniconda3/bin:$PATH
    fi
    EOF

    ...

    source /etc/profile.d/miniconda.sh

    ##Installing Taiga Backend
  8. Sergio Abramchuk revised this gist Feb 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -41,7 +41,7 @@
    ...

    echo 'export PATH=/usr/local/miniconda3/bin:$PATH' > /etc/profile.d/miniconda.sh
    source /etc/profile
    source /etc/profile.d/miniconda.sh

    ##Installing Taiga Backend
    ...
  9. Sergio Abramchuk revised this gist Feb 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@

    ...

    echo "export PATH=/usr/local/miniconda3/bin:$PATH" >> /etc/profile
    echo 'export PATH=/usr/local/miniconda3/bin:$PATH' > /etc/profile.d/miniconda.sh
    source /etc/profile

    ##Installing Taiga Backend
  10. Sergio Abramchuk revised this gist Feb 11, 2015. 1 changed file with 10 additions and 5 deletions.
    15 changes: 10 additions & 5 deletions Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -45,6 +45,7 @@

    ##Installing Taiga Backend
    ...

    TAIGA_SECRET_KEY=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-20};echo;`

    adduser taiga
    @@ -59,6 +60,7 @@
    done

    ...

    su - taiga
    git clone https://github.com/taigaio/taiga-back.git /opt/taiga-back
    cd /opt/taiga-back
    @@ -107,11 +109,11 @@ Configure backend...
    SERVER_EMAIL = DEFAULT_FROM_EMAIL
    EOF

    Ownership...
    ...

    chown taiga.taiga /opt/taiga-back/settings/local.py

    Now populate the database with initial data.
    Populate the database with initial data...

    su - taiga
    source activate taiga
    @@ -126,6 +128,7 @@ Now populate the database with initial data.
    This creates a new user "admin" with password "123123".

    ##Circus and gunicorn
    ...

    conda install --yes pip
    pip install circus
    @@ -141,7 +144,7 @@ Output will be something like this:
    taiga /home/taiga/envs/taiga
    root * /usr/local/miniconda3

    Next...
    ...

    cat > /etc/circus.ini << EOF
    [circus]
    @@ -177,7 +180,7 @@ Next...
    PYTHONPATH=/home/taiga/envs/taiga/lib/python3.4/site-packages
    EOF

    Now we should...
    ...

    cat > /etc/init/circus.conf << EOF
    start on runlevel [2345]
    @@ -194,13 +197,15 @@ Start the circus service.
    Backend installation complete.

    ##Installing Taiga Events
    ...

    su - taiga
    git clone https://github.com/taigaio/taiga-events.git /opt/taiga-events
    cd /opt/taiga-events
    git checkout stable

    Install requirements
    Install requirements...
    ...

    source activate taiga
    pip install -r requirements.txt
  11. Sergio Abramchuk revised this gist Feb 11, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -39,6 +39,7 @@
    bash /tmp/Miniconda3-3.7.0-Linux-x86_64.sh -b -p /usr/local/miniconda3

    ...

    echo "export PATH=/usr/local/miniconda3/bin:$PATH" >> /etc/profile
    source /etc/profile

  12. Sergio Abramchuk revised this gist Feb 11, 2015. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@

    yum -y install postgresql94 postgresql94-contrib postgresql94-server postgresql94-devel postgresql94-libs
    service postgresql-9.4 initdb
    ..
    ...

    sed -i "/^host/s/ident/md5/g" /var/lib/pgsql/9.4/data/pg_hba.conf
    ...
    @@ -33,15 +33,17 @@
    su - postgres -c "createdb $TAIGA_POSTGRES_BD -O $TAIGA_POSTGRES_USER"

    ##Installing Python
    ...

    wget --directory-prefix=/tmp http://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh
    bash /tmp/Miniconda3-3.7.0-Linux-x86_64.sh -b -p /usr/local/miniconda3

    ...
    echo "export PATH=/usr/local/miniconda3/bin:$PATH" >> /etc/profile
    source /etc/profile

    ##Installing Taiga Backend

    ...
    TAIGA_SECRET_KEY=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-20};echo;`

    adduser taiga
    @@ -55,15 +57,20 @@
    fi
    done

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

    Create environment...

    conda create --yes -n taiga python
    source activate taiga
    conda install --yes pip

    Installing taiga.io requirements...

    export PATH=$PATH:/usr/pgsql-9.4/bin/
    pip install -r requirements.txt
    exit
  13. Sergio Abramchuk revised this gist Feb 11, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -20,11 +20,14 @@

    yum -y install postgresql94 postgresql94-contrib postgresql94-server postgresql94-devel postgresql94-libs
    service postgresql-9.4 initdb
    ..

    sed -i "/^host/s/ident/md5/g" /var/lib/pgsql/9.4/data/pg_hba.conf
    ...

    /sbin/chkconfig --level 35 postgresql-9.4 on
    service postgresql-9.4 start
    ...

    echo -e "$TAIGA_POSTGRES_PASSWORD\n$TAIGA_POSTGRES_PASSWORD\n" | su - postgres -c "createuser --pwprompt $TAIGA_POSTGRES_USER"
    su - postgres -c "createdb $TAIGA_POSTGRES_BD -O $TAIGA_POSTGRES_USER"
  14. Sergio Abramchuk revised this gist Feb 11, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions Installing taiga.io on CentOS 6 (x64).md
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,19 @@
    #Installing Taiga on CentOS 6 (x64)

    ##Dependencies
    ...

    yum update -y
    yum groupinstall "Development Tools" -y
    yum install libxslt-devel libxml2-devel libXt-devel curl git tmux -y

    ##Installing PostgreSQL
    ...

    TAIGA_POSTGRES_BD = taiga
    TAIGA_POSTGRES_USER = taiga
    TAIGA_POSTGRES_PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-20};echo;`
    ...

    rpm -ivh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm
    sed -i 's/^gpgkey.*/&\nexclude=postgresql*/' /etc/yum.repos.d/CentOS-Base.repo
  15. Sergio Abramchuk renamed this gist Feb 11, 2015. 1 changed file with 0 additions and 0 deletions.
  16. Sergio Abramchuk revised this gist Feb 11, 2015. No changes.
  17. Sergio Abramchuk renamed this gist Feb 11, 2015. 1 changed file with 0 additions and 0 deletions.
  18. Sergio Abramchuk created this gist Feb 11, 2015.
    241 changes: 241 additions & 0 deletions Installing Taiga on CentOS 6 (x64)
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,241 @@
    #Installing Taiga on CentOS 6 (x64)

    ##Dependencies

    yum update -y
    yum groupinstall "Development Tools" -y
    yum install libxslt-devel libxml2-devel libXt-devel curl git tmux -y

    ##Installing PostgreSQL

    TAIGA_POSTGRES_BD = taiga
    TAIGA_POSTGRES_USER = taiga
    TAIGA_POSTGRES_PASSWORD=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-20};echo;`

    rpm -ivh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm
    sed -i 's/^gpgkey.*/&\nexclude=postgresql*/' /etc/yum.repos.d/CentOS-Base.repo

    yum -y install postgresql94 postgresql94-contrib postgresql94-server postgresql94-devel postgresql94-libs
    service postgresql-9.4 initdb

    sed -i "/^host/s/ident/md5/g" /var/lib/pgsql/9.4/data/pg_hba.conf

    /sbin/chkconfig --level 35 postgresql-9.4 on
    service postgresql-9.4 start

    echo -e "$TAIGA_POSTGRES_PASSWORD\n$TAIGA_POSTGRES_PASSWORD\n" | su - postgres -c "createuser --pwprompt $TAIGA_POSTGRES_USER"
    su - postgres -c "createdb $TAIGA_POSTGRES_BD -O $TAIGA_POSTGRES_USER"

    ##Installing Python

    wget --directory-prefix=/tmp http://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh
    bash /tmp/Miniconda3-3.7.0-Linux-x86_64.sh -b -p /usr/local/miniconda3

    echo "export PATH=/usr/local/miniconda3/bin:$PATH" >> /etc/profile
    source /etc/profile

    ##Installing Taiga Backend

    TAIGA_SECRET_KEY=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-20};echo;`

    adduser taiga

    DIR="/var/log/taiga /opt/taiga-back /opt/taiga-events"
    for NAME in $DIR
    do
    if [ ! -d $NAME ]; then
    mkdir $NAME
    chown taiga.taiga $NAME
    fi
    done

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

    conda create --yes -n taiga python
    source activate taiga
    conda install --yes pip

    export PATH=$PATH:/usr/pgsql-9.4/bin/
    pip install -r requirements.txt
    exit

    Configure backend...

    cat > /opt/taiga-back/settings/local.py << EOF
    from .development import *

    DATABASES = {
        'default': {
            'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2',
            'NAME': '$TAIGA_POSTGRES_BD',
            'USER': '$TAIGA_POSTGRES_USER',
            'PASSWORD': '$TAIGA_POSTGRES_PASSWORD'
        }
    }

    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 = "$TAIGA_SECRET_KEY"

    DEBUG = False
    TEMPLATE_DEBUG = False

    PUBLIC_REGISTER_ENABLED = True

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

    Ownership...

    chown taiga.taiga /opt/taiga-back/settings/local.py

    Now populate the database with initial data.

    su - taiga
    source activate taiga
    cd /opt/taiga-back
    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 collectstatic --noinput
    exit

    This creates a new user "admin" with password "123123".

    ##Circus and gunicorn

    conda install --yes pip
    pip install circus

    You can check environment path with this command:

    su - taiga -c "conda info -e"

    Output will be something like this:

    # conda environments:
    #
    taiga /home/taiga/envs/taiga
    root * /usr/local/miniconda3

    Next...

    cat > /etc/circus.ini << EOF
    [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 = /opt/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 = /var/log/taiga/gunicorn.stdout.log
    stdout_stream.max_bytes = 10485760
    stdout_stream.backup_count = 4
    stderr_stream.class = FileStream
    stderr_stream.filename = /var/log/taiga/gunicorn.stderr.log
    stderr_stream.max_bytes = 10485760
    stderr_stream.backup_count = 4

    [env:taiga]
    PATH = \$PATH:/home/taiga/envs/taiga/bin
    TERM=rxvt-256color
    SHELL=/bin/bash
    USER=taiga
    LANG=en_US.UTF-8
    HOME=/home/taiga
    PYTHONPATH=/home/taiga/envs/taiga/lib/python3.4/site-packages
    EOF

    Now we should...

    cat > /etc/init/circus.conf << EOF
    start on runlevel [2345]
    stop on runlevel [016]

    respawn
    exec /usr/local/miniconda3/bin/circusd /etc/circus.ini
    EOF

    Start the circus service.

    initctl start circus

    Backend installation complete.

    ##Installing Taiga Events

    su - taiga
    git clone https://github.com/taigaio/taiga-events.git /opt/taiga-events
    cd /opt/taiga-events
    git checkout stable

    Install requirements

    source activate taiga
    pip install -r requirements.txt
    exit

    Configure taiga-events...

    cat > /opt/taiga-events/conf.py << EOF
    secret_key = "$TAIGA_SECRET_KEY"

    repo_conf = {
    "kwargs": {"dsn": "dbname=$TAIGA_POSTGRES_BD"}
    }

    queue_conf = {
    "path": "taiga_events.queues.pg.EventsQueue",
    "kwargs": {
    "dsn": "dbname=$TAIGA_POSTGRES_BD"
    }
    }
    EOF

    chown taiga.taiga /opt/taiga-events/conf.py

    Configure circus...

    cat >> /etc/circus.ini << EOF

    [watcher:taiga-events]
    working_dir = /opt/taiga-events
    cmd = python run.py -f conf.py
    uid = taiga
    numprocesses = 1
    autostart = true
    stdout_stream.class = FileStream
    stdout_stream.filename = /var/log/taiga/events.stdout.log
    stdout_stream.max_bytes = 10485760
    stdout_stream.backup_count = 4
    stderr_stream.class = FileStream
    stderr_stream.filename = /var/log/taiga/events.stderr.log
    stderr_stream.max_bytes = 10485760
    stderr_stream.backup_count = 4
    copy_env = true
    virtualenv = /home/taiga/envs/taiga/
    EOF

    Restart circus after updating the configuration

    initctl restart circus

    ##Installing Taiga Frontend
    ...