Re: Upgrading python versions?

2012-03-02 Thread Anton Cohen
On Fri, Mar 2, 2012 at 10:58 AM, Tucker j...@gmail.com wrote:

 Should I do a whole new install and migrate the DB?

 On Tue, Feb 28, 2012 at 2:43 PM, Tucker j...@gmail.com wrote:
  I decided to try and build pylucene again on CentOs 5.2.  I kept
  running into problems with python2.4, so I built jcc against python2.6
  (ActivePython).  I eventually got it working (using openjdk-1.6 and a
  modern version of ant) but ReviewBoard doesn't seem to agree and I
  can't enable search.  Since I built jcc with python2.6 and installed
  ReviewBoard using python2.4. this makes sense.


If you can migrate to CentOS 6 your life will be easier.

If you have to stay with CentOS 5, you can't upgrade Python, as in you
can't replace Python 2.4 (/usr/bin/python). You can install Python 2.6
in parallel. The EPEL http://fedoraproject.org/wiki/EPEL repository has a
python26 package, and some dependencies you'll need like
python26-distribute, python26-mysqldb,
and python26-mod_wsgi. python26-distribute should provide a
python26 specific version of pip/easy_install you can try to use to install
Review Board. I've never tried it, but it's probably possible. Again,
CentOS 6 is easier.

-Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: Apache Setup/Configuration

2012-02-17 Thread Anton Cohen
On Thu, Feb 16, 2012 at 8:03 AM, Britt doubl...@gmail.com wrote:

 That's when Apache crashed - when I attempted
 to restart it, I get the error: Syntax error on line 8 of /etc/
 apache2/sites-enabled/reviewBoard: Invalid command
 'WSGIPassAuthorization', perhaps misspelled or defined by a module not
 included in the server configuration.


sudo apt-get install libapache2-mod-wsgi
sudo a2enmod wsgi
sudo service apache2 restart
# The last two might be done by the package post install scripts.

-Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: Migrating Review Board Database

2012-01-19 Thread Anton Cohen
On Thu, Jan 19, 2012 at 10:24 PM, Chris Baron topher.ba...@gmail.comwrote:

 There is a reviewboard 0.1 version in production.

 There is a 1.6 version in a test environment.  Anyone have suggestions
 on the best way to copy the 0.1 production data, transform it into 1.6
 data?


What will need to be done will depend on the specific version you are
moving from, and what is missing/different in the database. I did a
migration from a pre-1.0 to 1.5.5. Though it wasn't 0.1, if it had a
version it probably would have been something like 0.9.

I detailed the upgrade in this post:
http://groups.google.com/group/reviewboard/msg/5b445e99632190ab

If your old version is close enough to 1.0 you may not need to
manually manipulate the database at all, just install a new site with a
dump of the old database, and let the Django evolutions do their thing. If
your old version is really, really old, there may be a lot of manual DB
manipulation. I was pretty lucky that there was only one table missing and
I could copy the whole table from a new install.

-Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: CentOS Installation

2011-11-19 Thread Anton Cohen
On Thu, Nov 17, 2011 at 1:37 PM, Chris Tooley ch...@tooley.com wrote:

 during none of those times has it worked until I go
 in and reset all of the permissions via:

 cd /usr/lib/python2.4
 find . -type d | xargs chmod o+rx
 find . -type f | xargs chmod o+r


I doubt this is caused by RB, easy_install, or RHEL. Most likely there is
something wrong with your umask, maybe it's getting set to a screwy setting
on all your servers. The umask can be set in lots of places, your umask,
root's umask, /etc/sudoers, and PAM configuration.

-Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Re: Clean install of 1.6.1 serves up 404 error

2011-09-22 Thread Anton Cohen
On Thu, Sep 22, 2011 at 4:31 PM, Christian Hammond chip...@chipx86.com wrote:
 The logs keep referencing this HTTP_FORBIDDEN.html.var. This is not provided
 by us or by any listed config.

There are at least 16 other .conf files included in the config. SUSE
might have taken the idea of modular configs a little too far.

 My hunch is that this is somehow related to you having compiled your own 
 Apache.

Fortunately, I think he is using the version shipped with SLES 11, the
settings probably came from something like httpd -V.

Sandeep,

Can you look at or provide the apache error logs, they are probably in
/var/log/apache2. They should list what is causing the error.

According to the httpd.conf provided, on SLES virtual host files
belong in /etc/apache2/vhosts.d/. Try moving reviewboard.test.com.conf
to /etc/apache2/vhosts.d/.

-Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: mod_python mandatory for reviewboard 1.6?

2011-09-21 Thread Anton Cohen
On Tue, Sep 20, 2011 at 9:18 PM, Sanjay Lal sklqui...@gmail.com wrote:
 [root ReviewBoard-1.6]# yum install mod_wsgi
 Loaded plugins: security
 http://cheeseshop.python.org/pypi/ReviewBoard/repodata/repomd.xml:
 [Errno 14] HTTP Error 404: Not Found ()
 Trying other mirror.
 Error: Cannot retrieve repository metadata (repomd.xml) for
 repository: download_base. Please verify its path and try again

Is it really giving an error that mentions ReviewBoard when you are
trying to install an unrelated package? Did you modify anything in
/etc/yum.conf or /etc/yum.repos.d? It seems like you might have put a
Python pypi URL in a yum config.

Do this to list the repositories:
yum -v repolist

 I have set following
 http_proxy=www-proxy.us.oracle.com:80
 ftp_proxy=www-proxy.us.oracle.com:80
 secure_proxy=www-proxy.us.oracle.com:80

Here is how to setup yum through a proxy:
http://www.centos.org/docs/5/html/yum/sn-yum-proxy-server.html

If a proxy is always required, it's probably best to do it in
yum.conf, instead of as an environment variable. If you do the env
method, don't forget to export http_proxy so it works outside your
shell.


If you are just playing around, maybe consider installing RB in
OpenShift. That way you won't have to do any of the Linux stuff, all
you have to do is git pull/push:

https://github.com/openshift/reviewboard-example

-Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: mod_python mandatory for reviewboard 1.6?

2011-09-20 Thread Anton Cohen
On Tue, Sep 20, 2011 at 2:13 PM, Sanjay Lal sklqui...@gmail.com wrote:
 Hi Is mod_python.so load module mandatory for reviewBoard 1.6? I have
 redhad linux 5.5, python 2.4.3 , apache 2.1.9.
 While building mod_python.so I was getting the error - connobject.c:
 142: error: request for member next in something not a structure or
 union . So I got the connobject.c from

On Tue, Sep 20, 2011 at 2:49 PM, Sanjay Lal sklqui...@gmail.com wrote:
 Hi,
 I would like to verify if I am doing things correctly - I have install
 reviewboard 1.6, apache 2.1.9 and all the dependencies etc. I have
 following conf files in /usr/local/apache2/htdocs/reviews.hsgbu.com/
 conf -

 apache-wsgi.conf  search-cron.conf  settings_local.py
 settings_local.pyc

 Should I just append the contents of  /usr/local/apache2/htdocs/
 reviews.hsgbu.com/conf/apache-wsgi.conf  to /usr/local/apache2/conf/
 httpd.conf?  Or I am supposed to do anything else?

Are you able to start fresh, maybe with a different Linux distro?

There are a few things wrong here.
* You said redhad linux 5.5, I'm going to assume that is RHEL 5 or a
rebuild of it like Oracle or CentOS. RHEL 5 has pretty old versions of
things, like Python 2.4. You would be better off with something based
on RHEL 6, like CentOS 6. RHEL 5 will work if you have to use it.

* You should not compile apache from source, almost no one should.
2.1.9 is really ancient, even RHEL comes with 2.2.3 by default.
Install apache with:
yum groupinstall Web Server

* You do not need mod_python. It would be better to use mod_wsgi.
mod_wsgi is in the EPEL repository for RHEL 5, Google will tell you
how to install the EPEL repository. Neither of them should be
installed from source, instead do:
yum install mod_python
yum install mod_wsgi

* In a normal install of Red Hat, you should avoid editing httpd.conf
(in /etc/httpd/conf/), instead copy the virtual host configs to
/etc/httpd/conf.d/.

* Avoid using apachectl. Instead use:
service httpd start|stop|restart|graceful
OR
/etc/init.d/httpd start|stop|restart|graceful


Overall advice for Linux admins, do not install from source. If you
find yourself about to install from source, step back, and find a
package/repository. Even fairly cutting-edge things like CouchDB and
Redis have packages in EPEL.

Hope that helps,
Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Upgrading from 1.0 to… well… anything

2011-09-13 Thread Anton Cohen
On Tue, Sep 13, 2011 at 5:33 AM, insysion s.tai...@insysion.net wrote:
 Ok, so I made the cardinal sin of not reading everything you sent. I
 guess what I need to know is whether that error looks like migrating
 this site is the best option or whether to go with generating a new
 site and linking it to the old database.

I'm not sure about the error. settings_local.py should tell you what
DB you are using.

I think a new site is the best way to go. By site I mean the
directory structure and files created by 'rb-site install'. The
directory structure and files of an old SVN pull are totally different
than a new easy_install/rb-site created site. After creating the new
site you point local settings at the old database (or better, a copy
of the old database), and run 'rb-site upgrade' to evolve the
database. You also need to copy any persistent data stored in the file
system, from the old site to the new site, which as far as I know is
only the stuff in htdocs/media/uploaded.

-Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Upgrading from 1.0 to… well… anything

2011-09-12 Thread Anton Cohen
I did an upgrade from pre-1.0 SVN to 1.5.5. The instructions are in a
previous post:
http://goo.gl/KFIiT

Your steps will be a little different because you are using
easy_install. And you might not have the missing table issue I had.

easy_install is generally easy to get:
Red Hat-based: yum install python-setuptools
Debian-based: apt-get install python-setuptools

Considering how old 1.0 is, the OS could be EOL'd, you might want to
start on a new server. If you don't have spare servers/VMs, at least
do the testing in a VM on your workstation. I would dump the database
and restore it to a test database. And copy the site files to a test
location. Then test doing upgrades of the test DB and files until you
get it right. Then shutdown the real site, do a backup, then upgrade.

-Anton

On Mon, Sep 12, 2011 at 12:33 PM, Christian Hammond chip...@chipx86.com wrote:
 rb-site is provided by the ReviewBoard package, which you should install by
 doing easy_install -U ReviewBoard.

 You shouldn't need to touch the tatballs. I don't know why it was angry
 about setup.py, but perhaps it's just too old.

 Best way to back up the database is by doing an SQL dump. That varies
 depending on whether you're using MySQL, PostreSQL, etc. It won't be in our
 site directory unless you're using SQLite (which we don't recommend).

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: ReviewBoard on OpenShift Express

2011-09-12 Thread Anton Cohen
On Mon, Sep 12, 2011 at 2:51 PM, Stephen Gallagher
step...@gallagherhome.com wrote:
 Mostly I thought it might prove interesting to those admins having setup
 troubles (especially on Windows)

Yeah, this should be a big help to people trying to run Django apps
without Linux experiences. I'm pretty excited about OpenShift (Red
Hat's PaaS) and Cloud Foundry (VMware's PaaS). The open source Cloud
Foundry supports Python/Django, but the hosted cloudfoundry.com
doesn't yet.

Thanks!
Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Permissions issue

2011-09-11 Thread Anton Cohen
On Sun, Sep 11, 2011 at 4:10 AM, Rohini Kumar Tharigonda
rok...@gmail.com wrote:
 chmod -R 777 /var/www/reviewboard/

I would not recommend doing this. It is very dangerous to allow the
apache user, or any untrusted user the ability to write to your web
root. It means if there is a vulnerability they will be able to
re-write the .wsgi and .py files, or be able to drop a php shell in
htdocs. Ideally places in htdocs where apache can write, like
uploaded/ would have script handlers disabled.

 service iptables stop

I doubt this is the issue, the OP got an error on the RB web page, so
web access works. I personally like firewalls.

 in /etc/selinux/config  SELINUX=disabled

SELinux can cause things like this. I didn't for me. For me the RB
install with a local DB worked with SELinux. Only search and remote DB
were blocked by SELinux. But SELinux is a good thing to check. The
SELinux logs are in /var/log/audit.

 chown -R apache /var/www/reviewboard/data
 chown -R apache /var/www/reviewboard/

I my opinion apache should not own the whole reviewboard directory,
for the security reason above. Do this instead:

chown -R apache:apache /var/www/rb/htdocs/media/uploaded
chown -R apache:apache /var/www/rb/data

Thanks,
Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Permissions issue

2011-09-09 Thread Anton Cohen
What Linux distro are you using?
How are you starting apache?
What is the path to rb (/var/www/rb)?

Thanks,
Anton

On Fri, Sep 9, 2011 at 5:52 PM, hs_etd hblogt...@gmail.com wrote:
 Started from scratch but I see the same thing happening.

 ls -ld data returns

 [root@etd-rb rb]# ls -ld data
 drwxr-xr-x. 2 apache root 4096 Sep  9 19:46 data

 --
 Want to help the Review Board project? Donate today at 
 http://www.reviewboard.org/donate/
 Happy user? Let us know at http://www.reviewboard.org/users/
 -~--~~~~--~~--~--~---
 To unsubscribe from this group, send email to 
 reviewboard+unsubscr...@googlegroups.com
 For more options, visit this group at 
 http://groups.google.com/group/reviewboard?hl=en


-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Fedora 2.6 Installation

2011-09-07 Thread Anton Cohen
On Wed, Sep 7, 2011 at 10:00 AM, MonicaS castaneda.mon...@gmail.com wrote:
 This is a test server. My apache server runs as root.

httpd should run as user 'apache' on Fedora. The rpm installed with
yum will install it that way, don't change it, and don't install
apache httpd from source.

 I defined that I wanted to use fastcgi.

Use WSGI.

 I modified the httpd.conf file and I added at the end of the file the
 file generated from reviewboard called apache-fastcgi.conf.

The config file generated by rb-site should be put in
/etc/httpd/conf.d/. You very rarely have to edit
/etc/httpd/conf/httpd.conf, unless you really know what you are doing.

 What am I doing wrong?

If this is testing for a real deployment, I would start over. Fedora
is not a good server OS, it EOLs after 13 months and stops getting
security updates. CentOS 6 is Red Hat-based and has a long life-cycle.
Or use Ubuntu LTS or Debian stable.

If you go with Red Hat-based, install everything from packages in yum
repositories. With CentOS you can use the EPEL repository.

An install on CentOS 6 would looks something like this, depending on
the database and VCS you use:

Install the packages:
# sudo rpm -ivh
http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
# sudo yum groupinstall Web Server MySQL Database
# sudo yum install ReviewBoard mod_wsgi memcached python-memcached git

Configure and start memcached:
# sudo vi /etc/sysconfig/memcached
CACHESIZE=2048 # Or however much (in MB) RAM you want memcached to use.
# sudo chkconfig memcached on
# sudo service memcached start

Start mysqld:
# sudo chkconfig mysqld on
# sudo service mysqld start

Create an empty database:
# mysql -u root
CREATE DATABASE reviewboard;
GRANT ALL PRIVILEGES ON reviewboard.* TO 'reviewboard'@'localhost'
IDENTIFIED BY 'yourpassword';

Create site, it will create files and load the database:
# sudo rb-site install /var/www/reviewboard

Modify permission where apache has to write:
# sudo chown -R apache:apache /var/www/reviewboard/htdocs/media/uploaded
# sudo chown -R apache:apache /var/www/reviewboard/data

Copy the apache config:
# sudo cp /var/www/reviewboard/conf/apache-wsgi.conf
/etc/httpd/conf.d/reviewboard.conf

Start apache:
# sudo chkconfig httpd on
# sudo service httpd restart

I'm probably missing something, but that's pretty close to a complete install.

Hope that helps,
Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: Installing PyLucene on Redhat

2011-07-25 Thread Anton Cohen
On Mon, Jul 25, 2011 at 8:33 AM, Stephen Gallagher
step...@gallagherhome.com wrote:
 Could you write up your complete steps to getting PyLucene installed and
 working on Red Hat? I'd like to turn those steps into a tool to include
 with my EPEL packages.

I don't have steps, but I have packages.

RPMs are on S3:
http://shrub.appspot.com/files.antoncohen.com/software/pylucene/

PyLucene is the only package required by Review Board. But to build
PyLucene from source (e.g., rpmbuild --rebuild) you need JCC, and to
build JCC you need to patch python-setuptools. The setuptools patch
comes from their bug tacker [1], modified to patch against the EL6
version. I based the spec files on ones created by Felix Schwarz [2].
The SRPMs build with rpmbuild, though I haven't tried from in mock.
Tested on Scientific Linux 6 with Review Board 1.5.5 from EPEL. If you
are going to build these packages I recommend building on a throw-away
dev machine (or in a chroot), and only installing the PyLucene package
in production, that way you don't have a weird patched setuptools in
production.

[1] http://bugs.python.org/setuptools/issue43
[2] http://www.schwarz.eu/opensource/rpm/

Thanks,
Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: 403 forbidden in Apache

2011-06-21 Thread Anton Cohen
On Tue, Jun 21, 2011 at 3:11 AM, Krles antonin.nechva...@gmail.com wrote:
 # Direct all other requests to the fastcgi server

Unless you have a specific reason for using fastcgi, I recommend using
wsgi. mod_fcgid has a bunch of timeouts that make it hard to tune for
an application that may take a while to run. I would redo 'rb-site
install' and use mod_wsgi.

Thanks,
Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en


Re: upgrade 1.0-1.5

2011-05-10 Thread Anton Cohen
On Tue, May 10, 2011 at 11:51 AM, Christian Hammond chip...@chipx86.com wrote:
 Absolutely. What you can do is just generate a new site with rb-site after
 you install the eggs and reuse the existing database.

I did an upgrade from pre-1.0 SVN to 1.5.5 recently, and basically did
as Christian said and created a new site pointed at the old database,
then upgraded it (database evolutions). One issue was that the install
was so old it didn't have a siteconfig_siteconfiguration table, so
that had to be added. The upgrade moved the web server from EL5 using
mod_python to EL6 using mod_wsgi. Review Board was installed from
EPEL, PyLucene from a package I built.

Overview:
* ReviewBoard and PyLucene installed from RPMs
* Create a new site using local test database
* Dump the siteconfig_siteconfiguration table
* Drop the DB and re-create
* Restore the old DB and the new siteconfig table
* Do an rb-site upgrade
* Copy old uploads/images
* Test
* Dump the local DB and restore to production cluster
* Point site at production DB cluster

Details:

Configure and start memcached:
# sudo vi /etc/sysconfig/memcached # Not needed, we have more RAM than
we know what to do with
CACHESIZE=1024
# sudo chkconfig memcached on
# sudo service memcached start

Configure and start mysqld:
# sudo vi /etc/my.cnf
max_allowed_packet=32M
# sudo chkconfig mysqld on
# sudo service mysqld start

Create an empty database:
# mysql -u root
CREATE DATABASE rbtestdb;
GRANT ALL PRIVILEGES ON rbtestdb.* TO 'rbtest'@'localhost'
IDENTIFIED BY 'password';

Create site, it will create files and load the database:
# sudo rb-site install /var/www/reviews

Modify permission where apache has to write:
# sudo chown -R apache:apache /var/www/reviews/htdocs/media/uploaded
# sudo chown -R apache:apache /var/www/reviews/data

Copy the apache config:
# sudo cp /var/www/reviews/conf/apache-wsgi.conf /etc/httpd/conf.d/reviews.conf

Start apache:
# sudo chkconfig httpd on
# sudo service httpd restart

Dump the siteconfig_siteconfiguration table, our old database doesn't have it.
# mysqldump --user=rbtest --password=password --add-drop-table
rbtestdb siteconfig_siteconfiguration  siteconfig.mysqldump

Extract an RB backup:
# tar -xvf reviewboard-backup.tar.gz

Drop and re-create the database:
# mysql -u root
# DROP DATABASE rbtestdb;
# CREATE DATABASE rbtestdb;
# GRANT ALL PRIVILEGES ON rbtestdb.* TO 'rbtest'@'localhost'
IDENTIFIED BY 'password';

Restore the backup database and siteconfig:
# mysql -u root -h localhost -D rbtestdb --max_allowed_packet=32M 
reviewboard-backup.mysqldump
# mysql -u root -h localhost -D rbtestdb --max_allowed_packet=32M 
siteconfig.mysqldump

Upgrade the site, this performs database evolutions:
# sudo rb-site upgrade /var/www/reviews

Copy images:
# Copy the files in reviewboard-backup/htdocs/media/uploaded/images/
to /var/www/reviews/htdocs/media/uploaded/images/
# sudo chown -R apache:apache /var/www/reviews/htdocs/media/uploaded

Probably should restart httpd and memcached at this point:
# sudo service httpd restart
# sudo service memcached restart

Search???:
# sudo mkdir -p /var/www/reviews/search-index
# sudo chown apache:apache /var/www/reviews/search-index
# sudo cp /var/www/reviews/conf/search-cron.conf /etc/cron.d/rb-index
Should probably edit the above to run as apache
# Enable Search in WebUI, with path /var/www/reviews/search-index
# sudo -u apache /usr/bin/python /usr/bin/rb-site manage
/var/www/reviews index -- --full

Dump the database:
# mysqldump --user=rbtest --password=password --add-drop-table
rbtestdb  rbtest-real.mysqldump

Restore the database to a cluster:
# mysql -u root -h cluster
# CREATE DATABASE rbrealdb;
# GRANT ALL PRIVILEGES ON rbrealdb.* TO 'rbuser'@'%' IDENTIFIED BY 'password';
# mysql -u root -h cluster -D rbrealdb --max_allowed_packet=32M 
rbtest-real.mysqldump

Point the site at the DB cluster:
# sudo vi /var/www/reviews/conf/settings_local.py
# DATABASE_NAME = 'rbrealdb'
# DATABASE_USER = 'rbuser'
# DATABASE_PASSWORD = 'password'
# DATABASE_HOST = 'cluster'
# Clear browser Review Board cookies

Change apache config to force SSL:
# sudo vi /etc/httpd/conf.d/reviews.conf

Change name/URL in WebUI:
# Settings - General
# Database - Sites


Hope that help,
Anton

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en