Deletions are marked like this. | Additions are marked like this. |
Line 53: | Line 53: |
The following is configured in usr/local/etc/apache22/httpd.conf | The following is configured in usr/local/etc/apache22/httpd.conf |
Line 68: | Line 68: |
Line 76: | Line 76: |
Line 93: | Line 93: |
# -- test0 app | # -- test1 app |
Line 102: | Line 102: |
Line 108: | Line 108: |
Line 109: | Line 110: |
1. Git pull/fetch |
1. Git pull/fetch. Typically: {{{ git pull origin master }}} |
Line 111: | Line 118: |
1. Use 'sudu gem install' as necessary to install any missing Gems 1. Run rake tasks as necessary 1. Perform any tweeks in the database as necessary. Use the following user/password to access the DB server 1. mysql -uroot -psqladmin 1. Test the result 1. Open http://v2.softxs.ch/maps 1. Or open http://v2.softxs.ch/v2p0 |
{{{ bundle install }}} Use 'sudu gem install' as necessary to install any missing Gems. Note that it appears that bundle install detects the presence of sudo and asks for a password for the bundle install if new gems must be installed. If any Gems are installed then you need to restart Apache: {{{ cd /usr/local/etc/rc.d sudo ./apache22 restart }}} Then check in /var/log/httpd-error.log to make sure there were no errors when Apache restarted. 1. Run rake tasks as necessary. The typical list of rake tasks is: {{{ rake db:drop rake db:create rake db:migrate rake db:seed_fu rake db:populate }}} 1. If you need to perform any tweaks in the database, use the following user/password to access the DB server: {{{ mysql -uroot -psqladmin }}} 1. Test the result. Links: 1. '''MAPS''' http://v2.softxs.ch/maps 1. '''V2p0''' http://v2.softxs.ch/v2p0 |
V2 Deployment
Introduction
This pages describe how to install V2 and MAPS on public beta and production systems.
Installation on V2 Server
Environment
The V2 server is a virtual host on the zg-3.softxs.ch server.
The server has following software systems:
- FreeBSD 9.0-RELEASE FreeBSD 9.0-RELEASE #0
- Apache Server version: Apache/2.2.23 (FreeBSD)
- Phusion Passenger apache module
- Ruby: ruby 1.9.3p327 (2012-11-10 revision 37606) [amd64-freebsd9]
- Rails 3.2.11
- mysql Ver 14.14 Distrib 5.5.28, for FreeBSD9.0 (amd64) using 5.2
- And many Gems
The installation location for Rails applications:
- /v01/local/www/rails
For each application two items are required:
- In the rails directory the following is required:
- A directory with the path {app}-app where the git repository is cloned
- A symbolic link {app} which points to the {app}-app/public directory
In /usr/local/etc/apache22/httpd.conf there must be a RackBaseUri defined. See below
Example directory structure for the V2pp and MAPS installations:
- Note that the V2p0 and MAPS applications are currently configured for the development environment
$ cd /v01/local/www/rails $ ls -l lrwxr-xr-x 1 alan www 16 Jan 24 13:00 maps -> maps-app/public drwxrwxr-x 13 root www 21 Jan 24 13:00 maps-app lrwxr-xr-x 1 root www 15 Jan 17 16:20 v2p0 -> v2p0-app/public drwxrwxrwx 15 alan www 23 Jan 24 17:14 v2p0-app
Apache Configuration
The following is configured in usr/local/etc/apache22/httpd.conf
## ====== Rails ====== LoadModule passenger_module /usr/local/lib/ruby/gems/1.9/gems/passenger-3.0.17/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/1.9/gems/passenger-3.0.17 PassengerRuby /usr/local/bin/ruby19 <VirtualHost *:80> DocumentRoot /v01/local/www/rails ServerName v2.softxs.ch <Directory /v01/local/www/rails> Allow from all </Directory> # -- v2p0 app RackBaseURI /v2p0 <Directory /v01/local/www/rails/v2p0> RailsEnv development Options -MultiViews </Directory> # -- maps app RackBaseURI /maps <Directory /v01/local/www/rails/maps> RailsEnv development Options -MultiViews </Directory> # -- test0 app RackBaseURI /test0 <Directory /v01/local/www/rails/test0> RailsEnv development Options -MultiViews </Directory> # -- test1 app RackBaseURI /test1 <Directory /v01/local/www/rails/test1> RailsEnv test Options -MultiViews </Directory> </VirtualHost>
Procedure
- Log into zg-3.softxs.ch
- You must be a member of group www
- cd to the {app}-app dircetory
- Git pull/fetch. Typically:
git pull origin master
- Bundle install
bundle install
Use 'sudu gem install' as necessary to install any missing Gems. Note that it appears that bundle install detects the presence of sudo and asks for a password for the bundle install if new gems must be installed. If any Gems are installed then you need to restart Apache:cd /usr/local/etc/rc.d sudo ./apache22 restart
- Run rake tasks as necessary. The typical list of rake tasks is:
rake db:drop rake db:create rake db:migrate rake db:seed_fu rake db:populate
- If you need to perform any tweaks in the database, use the following user/password to access the DB server:
mysql -uroot -psqladmin
- Test the result. Links: