Installation Instructions

Version 12 (J. Simmons, 05/08/2011 03:01 pm)

1 1 J. Simmons
h1. Installation Instructions
2 1 J. Simmons
3 2 J. Simmons
Open Design Engine (ODE) is based on "Redmine":http://redmine.org.  The official installation method is to install the "Bitnami Redmine Stack":http://bitnami.org/stack/redmine, apply some custom configuration to the stack, and then upgrade the installed Redmine instance to the ODE source code.  Support for other stacks (or bootstrapped installations) will come with future releases.  With luck, one or more of the stack providers will add ODE to their list of supported stacks.  
4 2 J. Simmons
5 7 J. Simmons
Note, these instructions assume you are running the Ubuntu VM image of the Bitnami Redmine Stack and are *running all commands under* @sudo@.  They were tested with "version 1.1.3":http://bitnami.org/files/stacks/redmine/1.1.3-0/bitnami-redmine-1.1.3-0-ubuntu-10.10.zip in "VMWare Player":http://www.vmware.com/products/player/. 
6 3 J. Simmons
7 3 J. Simmons
Useful Paths
8 4 J. Simmons
* @(bitnami_base) = /opt/bitnami@ in VM images
9 3 J. Simmons
10 3 J. Simmons
Steps to install ODE
11 3 J. Simmons
* Import the Bitnami Redmine Stack into VMWare (the free VMWare Player is supported)
12 3 J. Simmons
* Configure Redmine to run at http://hostname/ instead of http://hostname/redmine
13 4 J. Simmons
** Edit @(bitnami_base)/apache2/conf/httpd.conf@ and comment out the line:
14 3 J. Simmons
<pre>
15 5 J. Simmons
DocumentRoot "/opt/bitnami/apache2/htdocs"
16 1 J. Simmons
</pre>
17 5 J. Simmons
** Edit @(bitnami_base)/apps/redmine/conf/redmine.conf@ to match the following (the key areas are the addition of the virtual host section and changing all references of @/redmine@ to @/@):
18 5 J. Simmons
<pre>
19 5 J. Simmons
<VirtualHost *:80>
20 5 J. Simmons
  ServerAdmin haha.huhu.com
21 5 J. Simmons
  ServerName server.our.lan
22 5 J. Simmons
  ServerAlias server
23 5 J. Simmons
  ErrorLog "logs/error.log" 
24 5 J. Simmons
  CustomLog "logs/access.log" combined
25 5 J. Simmons
 # this not only blocks access to .svn directories, but makes it                
26 5 J. Simmons
 # appear as though they aren't even there, not just that they are              
27 5 J. Simmons
 # forbidden                                                                    
28 5 J. Simmons
 <DirectoryMatch "^/.*/\.svn/">
29 5 J. Simmons
    ErrorDocument 403 /404.html
30 5 J. Simmons
    Order allow,deny
31 5 J. Simmons
    Deny from all
32 5 J. Simmons
    Satisfy All
33 5 J. Simmons
  </DirectoryMatch>
34 5 J. Simmons
  # This passes through remote_user to mongrel                                  
35 5 J. Simmons
  RewriteEngine On
36 5 J. Simmons
  # Redirect non-static requests to cluster                                     
37 5 J. Simmons
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
38 5 J. Simmons
  RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA,L]
39 5 J. Simmons
</VirtualHost>
40 5 J. Simmons
41 5 J. Simmons
#ProxyPass / balancer://redminecluster
42 5 J. Simmons
#ProxyPassReverse / balancer://redminecluster
43 5 J. Simmons
44 5 J. Simmons
<Proxy balancer://redminecluster>
45 5 J. Simmons
  BalancerMember http://127.0.0.1:3001
46 5 J. Simmons
  BalancerMember http://127.0.0.1:3002
47 5 J. Simmons
  # The number of balancer members depends on the number of mongrels running
48 5 J. Simmons
  # We use only one mongrel on port 3001 by default for the BitNami Cloud Hosting
49 5 J. Simmons
  # Please remove the others like 3002 above in such a case.
50 5 J. Simmons
</Proxy>
51 5 J. Simmons
</pre>
52 6 J. Simmons
** Edit @(bitnami_base)/apps/redmine/config/mongrel_cluster.yml@ and change references to @prefix: /redmine@ to @prefix: @
53 5 J. Simmons
** Restart Redmine by running:
54 5 J. Simmons
<pre>
55 5 J. Simmons
(bitnami_base)/ctlscript stop
56 1 J. Simmons
(bitnami_base)/ctlscript start
57 7 J. Simmons
</pre>
58 7 J. Simmons
* Configure SVN in Redmine
59 7 J. Simmons
** Install dependencies
60 7 J. Simmons
<pre>
61 7 J. Simmons
apt-get update
62 7 J. Simmons
apt-get install build-essential
63 7 J. Simmons
apt-get install zlib1g-dev
64 7 J. Simmons
(bitnami_base)/perl/bin/cpan  # accept defaults and choose CPAN servers
65 7 J. Simmons
cpan> install Test::Simple
66 7 J. Simmons
cpan> install DBI
67 7 J. Simmons
cpan> install DBD::mysql
68 7 J. Simmons
cpan> quit
69 8 J. Simmons
apt-get install libapache2-svn libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libdigest-sha1-perl libauthen-simple-ldap-perl
70 8 J. Simmons
</pre>
71 8 J. Simmons
** Enable newly installed apache modules by editing @(bitnami_base)/apache/conf/httpd.conf@
72 8 J. Simmons
*** Uncomment approximately line 108:
73 8 J. Simmons
<pre>
74 8 J. Simmons
LoadModule dav_svn_module modules/mod_dav_svn.so
75 8 J. Simmons
</pre>
76 8 J. Simmons
*** Add a line at the end of the load modules list for mod_perl:
77 8 J. Simmons
<pre>
78 8 J. Simmons
LoadModule perl_module modules/mod_perl.so
79 5 J. Simmons
</pre>
80 9 J. Simmons
** Copy Redmine.pm into the perl library
81 9 J. Simmons
<pre>
82 9 J. Simmons
cp (bitnami_base)/apps/redmine/extra/svn/Redmine.pm (bitnami_base)/perl/lib/site_perl/5.8.8/i686-linux/Apache/
83 9 J. Simmons
</pre> 
84 9 J. Simmons
** Create the directory structure for the svn repositories (_Note, ODE is setup to store all project related content in the @(bitnami_base)@ directory, so it uses a non-traditional location to store the svn repositories._)
85 9 J. Simmons
<pre>
86 9 J. Simmons
cd (bitnami_base)
87 9 J. Simmons
mkdir repos
88 9 J. Simmons
chown root:daemon repos
89 9 J. Simmons
chmod 0755 repos
90 9 J. Simmons
cd repos
91 9 J. Simmons
mkdir svn
92 9 J. Simmons
chown root:daemon svn
93 9 J. Simmons
chmod 0750 svn
94 9 J. Simmons
</pre>
95 10 J. Simmons
** Document the following production values in @(bitnami_base)/apps/redmine/config/database.yml@:
96 9 J. Simmons
*** username
97 9 J. Simmons
*** password
98 9 J. Simmons
*** socket
99 9 J. Simmons
*** database
100 9 J. Simmons
*** host
101 1 J. Simmons
** Edit @(bitnami_base)/apps/redmine/conf/redmine.conf@ to configure apache to host the svn repositories
102 10 J. Simmons
*** Add the following line between @RewriteEngine On@ and the first @RewriteCond@ to prevent calls to svn from being forwarded to Redmine:
103 10 J. Simmons
<pre>
104 10 J. Simmons
RewriteCond %{REQUEST_URI} !/svn(/|$)
105 10 J. Simmons
</pre>
106 11 J. Simmons
*** Add the following directives to the end of @redmine.conf@ to enable svn over http (note the various fields that need to be updated with values for your installation, including the values you noted earlier from @database.yml@):
107 11 J. Simmons
<pre>
108 11 J. Simmons
# /svn location for users
109 11 J. Simmons
PerlLoadModule Apache::Redmine
110 11 J. Simmons
<Location /svn>
111 11 J. Simmons
  DAV svn
112 11 J. Simmons
  SVNParentPath "(bitnami_base)/repos/svn"
113 11 J. Simmons
  Order deny,allow
114 11 J. Simmons
  Deny from all
115 11 J. Simmons
  Satisfy any
116 11 J. Simmons
117 11 J. Simmons
  PerlAccessHandler Apache::Authn::Redmine::access_handler
118 11 J. Simmons
  PerlAuthenHandler Apache::Authn::Redmine::authen_handler
119 11 J. Simmons
  AuthType Basic
120 11 J. Simmons
  AuthName "Redmine SVN Repository"
121 11 J. Simmons
122 11 J. Simmons
  #read-only access   
123 11 J. Simmons
  <Limit GET PROPFIND OPTIONS REPORT>
124 11 J. Simmons
     Require valid-user
125 11 J. Simmons
     Allow from localhost
126 11 J. Simmons
     # Allow from another-ip
127 11 J. Simmons
     Satisfy any
128 11 J. Simmons
  </Limit>
129 11 J. Simmons
  # write access
130 11 J. Simmons
  <LimitExcept GET PROPFIND OPTIONS REPORT>
131 11 J. Simmons
    Require valid-user
132 11 J. Simmons
  </LimitExcept>
133 11 J. Simmons
134 11 J. Simmons
  ## for mysql
135 11 J. Simmons
  RedmineDSN "DBI:mysql:database=(database);host=(host);mysql_socket=(socket)"
136 11 J. Simmons
137 11 J. Simmons
  RedmineDbUser "(username)"
138 11 J. Simmons
  RedmineDbPass "(password)"
139 11 J. Simmons
</Location>
140 11 J. Simmons
</pre>
141 12 J. Simmons
** Restart Redmine by running:
142 12 J. Simmons
<pre>
143 12 J. Simmons
(bitnami_base)/ctlscript stop
144 12 J. Simmons
(bitnami_base)/ctlscript start
145 12 J. Simmons
</pre>
146 12 J. Simmons
* Configure Redmine to automatically create svn repositories