Re: upgrade 1.0->1.5
Wow, pre-1.0. I'm glad you managed to get that working ;) Thanks for the detailed step-by-step. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Tue, May 10, 2011 at 4:46 PM, Anton Cohen wrote: > On Tue, May 10, 2011 at 11:51 AM, Christian Hammond > 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/ > -~--~~~~--~~---
Re: upgrade 1.0->1.5
On Tue, May 10, 2011 at 11:51 AM, Christian Hammond 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
Re: upgrade 1.0->1.5
Absolutely. What you can do is just generate a new site with rb-site after you install the eggs and reuse the existing database. Another option, if you already have a site directory set up somewhere, is to generate a temporary site with rb-site and then take the generated Apache config, update the paths, and have Apache use that. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Tue, May 10, 2011 at 11:46 AM, infraction wrote: > My intention was to not use the development environment at all. > Is there a way to get everything to just point at the egg's that are > installed from easy install? > > Thanks. > > -- > 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: upgrade 1.0->1.5
My intention was to not use the development environment at all. Is there a way to get everything to just point at the egg's that are installed from easy install? Thanks. -- 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
Hi, This looks like you're possibly running with an older version of Djblets. You might want to run sudo setup.py develop inside the reviewboard tree to get all the new dependencies. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Mon, May 9, 2011 at 11:04 PM, infraction wrote: > I've worked through a few issues in an update from 1.0->1.5 but now > encountering the following and stuck. > > Background is that the machine does have a git branch of reviewboard, > and we were doing local changes. > > However, I would like to switch to the release 1.5.5 branch. > I installed reviewboard through easy install, and have run the > rb-site upgrade. easy install and rb-site ran with very few issues, > update > of the data folder ownership from root to my git user was the main > issue. > > Here is the error followed by the apache config: > > === apache log > > [notice] mod_python: Creating 4 session mutexes based on 256 max > processes and 0 max threads. > [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal > operations > [error] [client [Mon May 09 22:46:44 2011]] PythonHandler > myvirtualdjango: Traceback (most recent call last): > [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ > python2.4/site-packages/mod_python/apache.py", line 299, in > HandlerDispatch\nresult = object(req) > [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ > python2.4/site-packages/Django-1.3-py2.4.egg/django/core/handlers/ > modpython.py", line 213, in handler\nreturn ModPythonHandler() > (req) > [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ > python2.4/site-packages/Django-1.3-py2.4.egg/django/core/handlers/ > modpython.py", line 174, in __call__\nself.load_middleware() > [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ > python2.4/site-packages/Django-1.3-py2.4.egg/django/core/handlers/ > base.py", line 45, in load_middleware\nmod = > import_module(mw_module) > [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ > python2.4/site-packages/Django-1.3-py2.4.egg/django/utils/ > importlib.py", line 35, in import_module\n__import__(name) > [error] [client] PythonHandler myvirtualdjango: File "/home/git/ > reviewboard/reviewboard/admin/middleware.py", line 13, in ?\nfrom > reviewboard.webapi.json import service_not_configured > [error] [client] PythonHandler myvirtualdjango: File "/home/git/ > reviewboard/reviewboard/webapi/json.py", line 52, in ?\n > http_status=400) # 400 Bad Request) > [error] [client] PythonHandler myvirtualdjango: TypeError: __init__() > got an unexpected keyword argument 'http_status' > > === end apache log > > mysite -> internal name... > I have debugging and autoreload on for debugging purposes > > > === begin config > > >ServerName mysite.domain.com >DocumentRoot "/var/www/mysite/htdocs" > ># Error handlers >ErrorDocument 500 /errordocs/500.html > ># Serve django pages > >PythonPath "['/var/www/mysite/conf'] + sys.path" >SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings >SetEnv PYTHON_EGG_CACHE "/var/www/mysite/tmp/ > egg_cache" >SetEnv HOME "/var/www/mysite/data" >SetHandler mod_python >PythonHandler django.core.handlers.modpython >PythonAutoReload True >PythonDebug True ># Used to run multiple mod_python sites in the same > apache >PythonInterpreter reviewboard_mysite > > ># Serve static media without running it through mod_python ># (overrides the above) > >SetHandler None > > >SetHandler None > > > >AllowOverride All > > ># Alias static media requests to filesystem >Alias /media "/var/www/mysite/htdocs/media" >Alias /errordocs "/var/www/mysite/htdocs/errordocs" > > > === end config > > Thanks for any help? > > 1. Is there a hidden file pointing me at the development area > somewhere on my system. > > > > -- > 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://grou
upgrade 1.0->1.5
I've worked through a few issues in an update from 1.0->1.5 but now encountering the following and stuck. Background is that the machine does have a git branch of reviewboard, and we were doing local changes. However, I would like to switch to the release 1.5.5 branch. I installed reviewboard through easy install, and have run the rb-site upgrade. easy install and rb-site ran with very few issues, update of the data folder ownership from root to my git user was the main issue. Here is the error followed by the apache config: === apache log [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads. [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations [error] [client [Mon May 09 22:46:44 2011]] PythonHandler myvirtualdjango: Traceback (most recent call last): [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\nresult = object(req) [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ python2.4/site-packages/Django-1.3-py2.4.egg/django/core/handlers/ modpython.py", line 213, in handler\nreturn ModPythonHandler() (req) [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ python2.4/site-packages/Django-1.3-py2.4.egg/django/core/handlers/ modpython.py", line 174, in __call__\nself.load_middleware() [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ python2.4/site-packages/Django-1.3-py2.4.egg/django/core/handlers/ base.py", line 45, in load_middleware\nmod = import_module(mw_module) [error] [client] PythonHandler myvirtualdjango: File "/usr/lib/ python2.4/site-packages/Django-1.3-py2.4.egg/django/utils/ importlib.py", line 35, in import_module\n__import__(name) [error] [client] PythonHandler myvirtualdjango: File "/home/git/ reviewboard/reviewboard/admin/middleware.py", line 13, in ?\nfrom reviewboard.webapi.json import service_not_configured [error] [client] PythonHandler myvirtualdjango: File "/home/git/ reviewboard/reviewboard/webapi/json.py", line 52, in ?\n http_status=400) # 400 Bad Request) [error] [client] PythonHandler myvirtualdjango: TypeError: __init__() got an unexpected keyword argument 'http_status' === end apache log mysite -> internal name... I have debugging and autoreload on for debugging purposes === begin config ServerName mysite.domain.com DocumentRoot "/var/www/mysite/htdocs" # Error handlers ErrorDocument 500 /errordocs/500.html # Serve django pages PythonPath "['/var/www/mysite/conf'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings SetEnv PYTHON_EGG_CACHE "/var/www/mysite/tmp/ egg_cache" SetEnv HOME "/var/www/mysite/data" SetHandler mod_python PythonHandler django.core.handlers.modpython PythonAutoReload True PythonDebug True # Used to run multiple mod_python sites in the same apache PythonInterpreter reviewboard_mysite # Serve static media without running it through mod_python # (overrides the above) SetHandler None SetHandler None AllowOverride All # Alias static media requests to filesystem Alias /media "/var/www/mysite/htdocs/media" Alias /errordocs "/var/www/mysite/htdocs/errordocs" === end config Thanks for any help? 1. Is there a hidden file pointing me at the development area somewhere on my system. -- 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