-
Notifications
You must be signed in to change notification settings - Fork 31
/
INSTALL
82 lines (59 loc) · 2.67 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Laika is a Ruby on Rails application that targets JRuby/Glassfish for deployment.
Dependencies
============
* JRuby >= 1.1.6
* Sun Java 1.5 (1.6 is not yet supported)
* MySQL >= 5.0 (for UMLS)
* PostgreSQL >= 8.1 (for XDS)
(Laika itself supports either Postgres or MySQL database storage.)
See http://laika.wiki.sourceforge.net/LaikaXDSPIXPDQAlpha for information
about getting an Amazon EC2 system prepared to run Laika.
Installing/using multiple version of Java in Ubuntu
===================================================
$ # install both Java 1.5 and Java 1.6
$ sudo aptitude install sun-java5-jdk openjdk-6-jdk
$ # use Java 1.5
$ sudo update-java-alternatives -s java-1.5.0-sun
$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Server VM (build 1.5.0_16-b02, mixed mode)
$ # use Java 1.6
$ sudo update-java-alternatives -s java-6-openjdk
$ java -version
java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Server VM (build 1.6.0_0-b12, mixed mode)
Install jRuby on Ubuntu with Java 1.5
=====================================
$ wget http://dist.codehaus.org/jruby/1.1.6/jruby-src-1.1.6.tar.gz
$ tar -zvxf jruby-src-1.1.6.tar.gz
$ sudo aptitude install ant
$ cd jruby-1.1.6
$ ant jar-complete
Add the bin directory to your path
$ jruby -S gem install rspec activerecord-jdbc-adapter activerecord-jdbcmysql-adapter
Deploying to Amazon EC2
=======================
Here is a quick run-through of how deployment works so far. The first
step is to get a recent AMI of a base system. I used ami-362acd5f for
today's work. The rest of this section assumes you've got this or a
similar instance running and can connect to it using SSH.
From a checked-out copy of the latest webapp/trunk on your local
machine:
$ # add your Amazon-supplied SSH key to the ssh-agent
$ ssh-add ~/ec2-keys/mykey.pem
$ # customize your deployment config:
$ cp config/deploy_local.rb.example config/deploy_local.rb
$ vi config/deploy_local.rb
$ # this is only needed once
$ cap deploy:setup # bootstrap deployment
$ cap deploy:cold # start glassfish, if necessary
$ cap deploy:migrations # deploy and run the database migrations
$ cap deploy:start # start the application
As deployed, the app is configured to run in production mode on the web
root URL. I say "configured to" because I have yet to get glassfish to
respect my wishes in this regard: I can run the app standalone in dev or
production mode, but I can't figure out how to get it to play nice with
glassfish. Hopefully Ben or somebody else with glassfish experience can
determine what the problem is.