Nicobar
Daniel Atallah
datallah at pidgin.im
Sun Aug 26 12:38:39 EDT 2012
Folks,
I've gotten a test clone of Trac working on nicobar and upgraded to Trac 0.12.3.
Mainly the work involved was figuring out all the pieces that needed
to be migrated over and updating a number of plugins to work with
0.12.3.
There are a few changes:
* Trac is running in apache2 instead of lighttpd
** I'm not sure if this is the right decision, but it's easy to
change back if necessary.
* Instead of the funky bouncing between https and http for logging in
and actual usage, it's all https now; accessing an old link via http
will redirect to the appropriate https page.
* I didn't bother setting up viewmtn - it doesn't seem worthwhile. We
can set up a redirect to hg (it probably would even be possible to
redirect to the appropriate revision, but that would take some work).
The test instance is at https://nicobar.pidgin.im/ - it's using the
developer.pidgin.im cert, so you'll either need to add an exception to
your browser or hack your /etc/hosts to point developer.pidgin.im to
67.202.116.116.
Note that if you access http://nicobar.pidgin.im it will redirect you
to https://developer.pidgin.im, which unless you update DNS, still is
imperial.
I've attached my notes.
I'm wondering what else needs to be done before we can ditch imperial
and move to nicobar.
At the very least, the server configuration needs to be reviewed to
make sure all the firewalls and etc. are set up appropriately.
Is anything else running on imperial?
-D
-------------- next part --------------
#On imperial:
# Make Trac RO
#Backup Trac DB
sudo -u postgres sh -c "pg_dumpall --globals && pg_dump -C trac" | gzip > /tmp/trac_db.dump.gz
cat << EOF > /tmp/trac_excludes
/srv/trac/developer.pidgin.im/deploy/htdocs/site/pidgin.mtn
/srv/trac/developer.pidgin.im/monotone_support/mtn_sync.log
/srv/trac/developer.pidgin.im/monotone_support/db
/srv/trac/developer.pidgin.im/log/*
/srv/trac/developer.pidgin.im/plugins_py2.4
/srv/trac/developer.pidgin.im/.egg-cache/*
/srv/trac/developer.pidgin.im/plugins/*.pyc
/srv/trac/developer.pidgin.im/plugins/*-py2.5.egg
EOF
sudo -u mtnsupport hg --cwd /srv/trac/developer.pidgin.im/mercurial_support/pidgin_main_repo up -C null
sudo -u mtnsupport hg --cwd /srv/trac/developer.pidgin.im/mercurial_support/pidgin_main_repo --config extensions.purge= purge
sudo tar cjf /tmp/trac_dir.tar.bz2 -X /tmp/trac_excludes /srv/trac/developer.pidgin.im
sudo tar cjf /tmp/trac_doxygen.tar.bz2 /srv/www/developer.pidgin.im/doxygen/
#Copy it over
scp /tmp/trac_db.dump.gz /tmp/trac_dir.tar.bz2 /tmp/trac_doxygen.tar.bz2 datallah at nicobar:~/
#On nicobar
#Restore Trac DB
sudo -u postgres dropdb trac
gunzip -c ~/trac_db.dump.gz | sudo -u postgres psql
#sudo -u postgres psql trac
tar xf trac_dir.tar.bz2
sudo mkdir -p /srv/trac
sudo rm -rf /srv/trac/developer.pidgin.im
sudo mv ./srv/trac/developer.pidgin.im /srv/trac/developer.pidgin.im
sudo chown -R root:root /srv/trac/developer.pidgin.im
sudo chown -R www-data:www-data /srv/trac/developer.pidgin.im/log
sudo chown -R www-data:www-data /srv/trac/developer.pidgin.im/.egg-cache
sudo chown -R www-data:www-data /srv/trac/developer.pidgin.im/attachments
sudo chown -R www-data:www-data /srv/trac/developer.pidgin.im/conf
sudo chown -R mtnsupport:mtnsupport /srv/trac/developer.pidgin.im/mercurial_support
sudo chown -R mtnsupport:mtnsupport /srv/trac/developer.pidgin.im/monotone_support
sudo chown -R mtnsupport:mtnsupport /srv/trac/developer.pidgin.im/deploy/htdocs/l10n
sudo chown mtnsupport:mtnsupport /srv/trac/developer.pidgin.im/localscripts/close_old_pending.log
sudo trac-admin /srv/trac/developer.pidgin.im upgrade --no-backup
sudo trac-admin /srv/trac/developer.pidgin.im wiki upgrade
mv /srv/trac/developer.pidgin.im/deploy /srv/trac/developer.pidgin.im/deploy.11.1
sudo trac-admin /srv/trac/developer.pidgin.im deploy /srv/trac/developer.pidgin.im/deploy
sudo cp -R /srv/trac/developer.pidgin.im/deploy.11.1/htdocs/doxygen /srv/trac/developer.pidgin.im/deploy/
sudo cp -R /srv/trac/developer.pidgin.im/deploy.11.1/htdocs/l10n /srv/trac/developer.pidgin.im/deploy/
sudo cp -R /srv/trac/developer.pidgin.im/deploy.11.1/htdocs/site /srv/trac/developer.pidgin.im/deploy/
sudo cp ~datallah/trac/trac_captcha/dist/TracCaptcha-0.4dev-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/TracGoogleAnalytics/dist/TracGoogleAnalytics-0.1.2-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/gf_extras/trac/cannedresponses/0.11/dist/CannedResponsesPlugin-0.11.1-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/trac_captcha/dist/TracCaptcha-0.4dev-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/voteplugin/dist/TracVote-0.1.3-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/batchmodifyplugin/dist/BatchModify-0.8.0_trac0.12_r10978-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/advancedticketworkflowplugin/0.12/dist/AdvancedTicketWorkflowPlugin-0.11dev_r9962-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/pendingticketplugin/removependingplugin/dist/RemovePendingStatusPlugin-0.0.4-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/CatPagesMacro-0.12/dist/CatPagesMacro-0.12-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/tocmacro/dist/TracTocMacro-11.0.0.3-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/doxygenplugin/dist/TracDoxygen-0.11.0.2_r10461-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/simpleticketplugin/dist/TracSimpleTicket-4.0_r11513-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/accountmanagerplugin/dist/TracAccountManager-0.3.2-py2.6.egg /srv/trac/developer.pidgin.im/plugins
sudo cp ~datallah/trac/CCMe.py /srv/trac/developer.pidgin.im/plugins
sudo mv /srv/trac/developer.pidgin.im/templates/site.html /srv/trac/developer.pidgin.im/templates/site.html.0.11.1
sudo cp ~datallah/trac/site.html /srv/trac/developer.pidgin.im/templates/site.html
sudo mv /srv/trac/developer.pidgin.im/conf/trac.ini /srv/trac/developer.pidgin.im/conf/trac.ini.0.11.1
sudo cp ~datallah/trac/trac.ini /srv/trac/developer.pidgin.im/conf/trac.ini
tar xf trac_doxygen.tar.bz2
sudo rm -rf /srv/www/developer.pidgin.im/doxygen
sudo mkdir -p /srv/www/developer.pidgin.im/
sudo mv ./srv/www/developer.pidgin.im/doxygen/ /srv/www/developer.pidgin.im/doxygen/
sudo chown -R mtnsupport:mtnsupport /srv/www/developer.pidgin.im/doxygen/
#set up mtnsupport cron
More information about the Devel
mailing list