SetupTasks » History » Version 9

Chris Cannam, 2010-12-07 08:43 PM

1 1 Chris Cannam
h1. Setup on new server tasks
2 1 Chris Cannam
3 2 Chris Cannam
# -Install Apache, Postgres, Varnish, etc-
4 2 Chris Cannam
# -Install "Ruby EE":http://www.rubyenterpriseedition.com/ and "Phusion Passenger":http://modrails.org/-
5 2 Chris Cannam
# -Install (via gem) rake, rails version 2.3.5, pg, rmagick, ruby-openid-
6 2 Chris Cannam
# -Clone current soundsoftware code-
7 2 Chris Cannam
# -Set up postgresql user and initialise database-
8 2 Chris Cannam
# -Redmine initialisation-
9 2 Chris Cannam
# -Redmine permissions and ownership-
10 2 Chris Cannam
# -Basic Apache config for site on :81-
11 2 Chris Cannam
# -Varnish config for :80->:81-
12 4 Chris Cannam
# -PHP5 via fcgi-
13 4 Chris Cannam
# -Basic Drupal install-
14 8 Chris Cannam
# Initial database load
15 8 Chris Cannam
# Pull across initial hg repos
16 8 Chris Cannam
# Configure SSL server
17 8 Chris Cannam
# Set up hgwebdir, reposman-soundsoftware, soundsoftware Apache auth (depend on SSL, db, web service key in db etc)
18 1 Chris Cannam
# Pull across remaining bits of redmine server that are not in hg (fonts, files, etc)
19 1 Chris Cannam
# Pull across Drupal theme etc
20 1 Chris Cannam
# Ensure machine can be routed to!
21 1 Chris Cannam
# Set up test instances
22 1 Chris Cannam
23 1 Chris Cannam
in the future: put old host in admin mode, re-point dns, final hg / database / redmine files update
24 6 Chris Cannam
25 6 Chris Cannam
h2. MySQL to Postgres migration notes
26 6 Chris Cannam
27 6 Chris Cannam
Just to make things more fun, we're migrating the existing databases from MySQL to pgsql.
28 6 Chris Cannam
29 9 Chris Cannam
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.  We just dump and reload the row data.  That way we only have to fix problems once.
30 6 Chris Cannam
31 9 Chris Cannam
"mysql2pgsql":http://pgfoundry.org/projects/mysql2pgsql/ does a reasonable job of converting the data, as far as it goes.  Some problems remain:
32 6 Chris Cannam
33 7 Chris Cannam
<pre>$ grep ERROR log/dbload.log |sort|uniq
34 6 Chris Cannam
ERROR:  column "admin" is of type boolean but expression is of type integer
35 6 Chris Cannam
ERROR:  column "assignable" is of type boolean but expression is of type integer
36 6 Chris Cannam
ERROR:  column "hide_mail" is of type boolean but expression is of type integer
37 6 Chris Cannam
ERROR:  column "is_closed" is of type boolean but expression is of type integer
38 6 Chris Cannam
ERROR:  column "is_default" is of type boolean but expression is of type integer
39 6 Chris Cannam
ERROR:  column "is_in_chlog" is of type boolean but expression is of type integer
40 6 Chris Cannam
ERROR:  column "is_public" is of type boolean but expression is of type integer
41 6 Chris Cannam
ERROR:  column "mail_notification" is of type boolean but expression is of type integer
42 6 Chris Cannam
ERROR:  column "onthefly_register" is of type boolean but expression is of type integer
43 6 Chris Cannam
ERROR:  column "protected" is of type boolean but expression is of type integer
44 6 Chris Cannam
ERROR:  duplicate key value violates unique constraint "unique_schema_migrations"
45 6 Chris Cannam
ERROR:  INSERT has more expressions than target columns
46 1 Chris Cannam
ERROR:  invalid input syntax for type bytea
47 7 Chris Cannam
$
48 6 Chris Cannam
</pre>