Monday, April 2, 2012

Deploying Tornado based Webapp on Centos with nginx,supervisor and Tornado in production




===========================================================================
Deploying Web app on Centos with nginx ,supervisor and Tornado in production
============================================================================

==============================
Alfred Help Desk Introduction
==============================

Introduction
---------------------
        Alfred Help desk is a software application that is used to provide customers with technical information on a product or service, while also supplying them with a connection to a support representative. The goal of this software is to increase a company’s efficiency and their productivity when using technology by providing workers and clients with timely answers to their questions and pertinent information that can aid them in solving their problems.

        Essentially, a alfred help desk is a database consisting of customer information, call reports, information regarding hardware and/or software, problems and solutions logs, and service level agreements.

Features
---------------

    * Web help desk ticket creation
    * Email reply to help desk tickets
    * Manage user accounts
    * Ticket history and post frequency
    * Customer feedback
    * Departments classify help desk tickets for specific staff group
    * Limit access of help desk support staff and customers to specific departments
    * SMS Notification to customer
    * Ticket Reports in PDF & XLS Format

Demo Link : Alfred Ticketing System

Credential

username admin

password admin

Don't misuse and infiltrate, your activities are monitored by out team

This site is for Demo use Only.

Contact Us Sidharth Shah
  • Office Phone: 022-26124412 
  • Website : http://fafadiatech.com
  • Email: customercare@fafadiatech.com
  • Portfolio : Fafadiatech Portfolio

Other Products  : Click image to zoom

 


    ============================================
    Alfred Help Desk Installation Prerequisites
    ============================================

    Prerequisites
    ----------------------

        Alfred Help Desk is Python Web Application runs on `Tornado Web Server <http://www.tornadoweb.org/>`_, following are the prerequisites to install alfred help desk.


    Prerequisites:

        * Python 2.6 or Python 2.7
        * Python-setuptools 2.6 or 2.7
        * Python-pip
        * Nginx
        * Mysql
        * Mysql-server
        * Mysql-devel
        * Python Modules
            * DateUtils==0.5.1
            * Mako==0.6.2
            * MySQL-python==1.2.3
            * distribute==0.6.24
            * docutils==0.8.1
            * httplib2==0.4.0
            * pyPdf==1.13
            * python-dateutil==1.5
            * reportlab==2.5
            * simplejson==2.3.3
            * tornado==2.2
            * wsgiref==0.1.2
            * xlwt==0.7.3
            * supervisor==3.0a12
            * sms==0.4
            * pyserial==2.6
            * meld3==0.6.8


    Installing Prerequisites


    **Installing Python 2.6 or Python 2.7:**
       
    # Download Python Source
           
    # For Python 2.7

    ``$ wget http://www.python.org/ftp/python/2.7/Python-2.7.tgz``


    # For Python 2.6
       
    ``$ wget http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz``

    # Extract Python Source

    # For Python 2.7

    ``$ wget tar -zxfv Python-2.7.tar.gz``

    # For Python 2.6
               
    ``$ wget tar -zxfv Python-2.6.7.tar.gz``

    # Run Configuration Script

    # For Python 2.7

    ``$ ./configure``

    # For Python 2.6

    ``$ ./configure``

    # Create make file

    # For Python 2.7

    ``$ make``

    # For Python 2.6

    ``$ make``

    # Install python using make file   

    # For Python 2.7

    ``$ make install``

    # For Python 2.6

    ``$ make install``





    Install Python Setup tools

    # Download Python Setuptools Egg

    # For Python 2.7

    ``$ wget http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea``

    # For Python 2.6

    ``$ wget http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086``

    # Install Python Setuptools


    # For Python 2.7

    ``$ sh setuptools-0.6c11-py2.7.egg``


    # For Python 2.6

    ``$ sh setuptools-0.6c11-py2.6.egg``

    **Install Python-pip**

    # Install Python-pip using easy_install

    # For Python 2.7

    `$ easy_install-2.7 pip``

     Python 2.6

    ``$ easy_install-2.6 pip``


    Install Python Modules using pip
           

    # Install Python Modules using requirements file "Prerequisites"

    # For Python 2.7

    ``$ pip-2.7 install -r requirements.txt``


    # For Python 2.6

    ``$ pip-2.6 install -r requirements.txt``



    Alternate way to install python modules
       
    # For Python 2.7

    ``$ pip-2.7 install "python module name"`` (For Ex: pip install MySQL-python)

    # For Python 2.6

    ``$ pip-2.6 install "python module name"`` (For Ex: pip install MySQL-python)


    Install Mysql Server

    # Installing Mysql server using YUM
       
    ``$ yum install mysql mysql-server mysql-devel``

    # Setup Mysql server
           
    ``$ mysql_secure_installation``

    &&

    My-sql Config

    #/etc/init.d/mysqld restart

    #mysqladmin -uroot password xyz

    #mysql -u root -p

    #password = xyz

    mysql>create database alfred; ===> creating DB

    mysql> source /yourpath/xxx.sql

    mysql>source /root/apps/tornado-production-skeleton/ftech.org/db/webapp.sql   ==>importing DB of webapp

    mysql> quit

    The last method can be used with PHP, Python or Perl scripting mysql API.

    login in mysql and type
           


    Installing Nginx

    # Install Nginx using yum

    # set hostname hostname ftech.org for eg

    # hostname -f

    # rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

    # yum update   

    ``$ yum install nginx``

    Supervisord
    -----------------------

    # echo_supervisord_conf > /etc/supervisord.conf

    change setting of config

    # supervisord -c supervisord.conf

    requirement for running webapp on port 8888 or user defined port

    No comments:

    Post a Comment