.. _installdeb:

=======================
Baruwa on Ubuntu/Debian
=======================

There is two ways to install Baruwa on Ubuntu, you can download
and install the deb package or you can use the Baruwa Ubuntu PPA.
Both methods are described below.

Debian users can only use the download method at the moment.

Install & Configure RabbitMQ
============================

Install RabbitMQ::

	# apt-get install rabbitmq-server

.. include:: includes/rabbitmq.inc

Baruwa deb install
==================

Download the deb from http://www.topdog-software.com/oss/baruwa/

Install Baruwa::

    # apt-get install gdebi-core
    # gdebi baruwa_<version>_all.deb

Baruwa Ubuntu PPA install
=========================

The Baruwa Ubuntu PPA is located at https://launchpad.net/~topdog/+archive/baruwa

To install from this PPA you need to enable it::

	# sudo add-apt-repository ppa:topdog/baruwa

You can now install Baruwa from the PPA::

	# sudo apt-get update
	# sudo apt-get install baruwa

Automated configuration
=======================

The installation process will also configure apache, mysql and baruwa should you choose
let the install configure the system for you.

The install asks you for the following info

 + apache virtualhost name (The name used to configure the baruwa apache virtualhost)
 + database host (The hostname or ip of the host running your mysql database)
 + database admin user (A user account with admin access on the database server)
 + database admin password (The password fo the above user)
 + database user (The user baruwa will use to connect to the database)
 + database password (The password for the above)
 + database name (The name of the baruwa database)
 + rabbitmq host (The rabbitMQ hostname or IP address)
 + rabbitmq vhost (The RabbitMQ vhost)
 + rabbitmq user (The RabbitMQ user)
 + rabbitmq password (The RabbitMQ password)
 + baruwa admin user (The baruwa admin user)
 + baruwa admin password (The baruwa admin user password)
 + baruwa admin email (The baruwa admin user email address)

.. include:: includes/configure_ms_redhat.inc

Configure Baruwa
================

Edit the settings.py file and make configuration changes to suit your site.::

	# baruwa_path=$(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
	# vi $baruwa_path/baruwa/settings.py

.. warning::

    Make sure you change the SECRET_KEY, DO NOT USE THE DEFAULT, If you have a cluster the key
    should be the same on all the machines in the cluster.

.. include:: includes/testing.inc
