SetupTasks » History » Version 6

Version 5 (Chris Cannam, 2010-12-07 11:50 AM) → Version 6/36 (Chris Cannam, 2010-12-07 08:40 PM)

h1. Setup on new server tasks

# -Install Apache, Postgres, Varnish, etc-
# -Install "Ruby EE":http://www.rubyenterpriseedition.com/ and "Phusion Passenger":http://modrails.org/-
# -Install (via gem) rake, rails version 2.3.5, pg, rmagick, ruby-openid-
# -Clone current soundsoftware code-
# -Set up postgresql user and initialise database-
# -Redmine initialisation-
# -Redmine permissions and ownership-
# -Basic Apache config for site on :81-
# -Varnish config for :80->:81-
# -PHP5 via fcgi-
# -Basic Drupal install-
# Set up hgwebdir, reposman-soundsoftware, soundsoftware Apache auth
# Pull across remaining bits of redmine server that are not in hg (fonts, files, etc)
# Pull across Drupal theme etc
# Ensure machine can be routed to!
# Configure SSL server
# Pull across hg repos
# Initial database load
# Set up test instances

in the future: put old host in admin mode, re-point dns, final hg / database / redmine files update

h2. MySQL to Postgres migration notes

Just to make things more fun, we're migrating the existing databases from MySQL to pgsql.

For Redmine, we don't attempt to dump and reload the schema -- more sensible to use Redmine to set up the schema (in case it has any database-specific set up) and then massage the data as we load it. That way we only see problems once.

"mysql2pgsql":http://pgfoundry.org/projects/mysql2pgsql/ does a reasonable job of converting the data (only -- no schema) as far as it goes. Some problems remain:

<pre>grep ERROR log/dbload.log |sort|uniq

ERROR: column "admin" is of type boolean but expression is of type integer
ERROR: column "assignable" is of type boolean but expression is of type integer
ERROR: column "hide_mail" is of type boolean but expression is of type integer
ERROR: column "is_closed" is of type boolean but expression is of type integer
ERROR: column "is_default" is of type boolean but expression is of type integer
ERROR: column "is_in_chlog" is of type boolean but expression is of type integer
ERROR: column "is_public" is of type boolean but expression is of type integer
ERROR: column "mail_notification" is of type boolean but expression is of type integer
ERROR: column "onthefly_register" is of type boolean but expression is of type integer
ERROR: column "protected" is of type boolean but expression is of type integer
ERROR: duplicate key value violates unique constraint "unique_schema_migrations"
ERROR: INSERT has more expressions than target columns
ERROR: invalid input syntax for type bytea
</pre>