Edgewall Software

Changes between Initial Version and Version 1 of CookBook/easyTrac


Ignore:
Timestamp:
Jan 31, 2011, 12:55:21 AM (13 years ago)
Author:
manuel.viera.tirado@…
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • CookBook/easyTrac

    v1 v1  
     1= easyTrac installer =
     2
     3The easyTrac installer is a source-installation kit that installs a complete Trac environment and all its dependecies.
     4
     5Feedback/bugs to:
     6 * Email: manuel.viera.tirado at gmail.com
     7 * Twitter: http://twitter.com/mviera
     8
     9
     10== Installation instructions ==
     11
     12The installer will compile '''Nginx''' and '''uWSGI''' and it will install all required python dependencies also.
     13But for compile Nginx and uWSGI a few dependencies are required to be installed in the system. This dependencies
     14are the following:
     15
     16=== Dependencies ===
     17 * libpcre3-dev
     18 * libssl-dev
     19 * libxml2-dev
     20 * libxslt-dev
     21 * libsqlite3-dev
     22 * libzzip-dev
     23 * libapr1-dev
     24 * libaprutil1-dev
     25
     26PLEASE NOTE: You can run the easyTrac installation as root or as a normal user. Personally, I prefer to run the installation as a normal user.
     27
     28The installer config works out of the box, but if you want, you can edit buildout.cfg and
     29modify the following parameters:
     30
     31 * '''nginx-http-port''': http port that will be used for Nginx.
     32 * '''nginx-https-port''': https port that will be used for Nginx (in case you want to use https).
     33 * '''supervisor-http-port''': http port that will be used for supervisor.
     34 * '''host''': host ip address of fqdn.
     35 * '''socket-directory''': directory where the socket will be stored.
     36 * '''pid-directory''': directory where the pid files will be stored.
     37 * '''log-directory''': logs directory.
     38 * '''trac-projects-directory''': directory where the Trac projects will be created.
     39 * '''svn-repository-directory''': directory where the svn repositories will be created.
     40
     41Once you have installed all required dependencies, you can continue with the installation process.
     42So you execute the following command:
     43{{{
     44$ python bootstrap.py
     45}}}
     46
     47You should have the buildout environment ready to go. Now, you must execute the buildout installation:
     48{{{
     49$ ./bin/buildout
     50}}}
     51
     52== How to start, stop, restart services ==
     53
     54Supervisor provides a control script to start, stop or restart our
     55services. In our supervisor we only get two services: nginx and uwsgi.
     56
     57The supervisorctl syntax is:
     58{{{
     59$ ./bin/supervisorctl <command> <service-name>
     60}}}
     61=== start services ===
     62{{{
     63$ ./bin/supervisorctl start nginx
     64}}}
     65=== stop services ===
     66{{{
     67$ ./bin/supervisorctl stop nginx
     68}}}
     69=== restart services ===
     70{{{
     71$ ./bin/supervisorctl restart nginx
     72}}}
     73Also, supervisor provides an especial word 'all', so we don't need to specify
     74every service name. For example, if we need to restart all services:
     75{{{
     76$ ./bin/supervisorct restart all
     77}}}
     78
     79Supervisor has an admin panel on where we can control our services via web. This admin control
     80panel is accesible at:
     81
     82http://localhost:9000
     83
     84NOTE: by default, the username is 'admin' and the password is 'admin.' To change the admin password,
     85edit the [supervisor] part in buildout.cfg and run bin/buildout.
     86
     87== Uninstall instructions ==
     88
     89 1. Stop supervisord by running: ./bin/supervisorctl shutdown
     90 1. Remove the folder <installdir>/easyTrac
     91
     92== Backup instructions ==
     93
     94easyTrac includes a backup script. So, if you want to make a backup you only must to
     95execute the following command:
     96{{{
     97$ ./bin/backup
     98}}}
     99and all the trac projects will be backed up into a tarball to the backups directory, called '''backups'''.
     100
     101== Restore instructions ==
     102
     103Also, easyTrac provides a restore script, useful to restore old backups. Its usage is as simple as follow:
     104{{{
     105$ ./bin/restore backups/backup-file.tar.gz
     106}}}
     107and all the trac projects will be restored.