Analytics: Difference between revisions
No edit summary |
|||
Line 37: | Line 37: | ||
<VirtualHost *:90> | <VirtualHost *:90> | ||
ServerAdmin coge.genome@gmail.com ServerName localhost | |||
#ServerAlias geco.com.analytics | |||
ErrorLog /home/rchasman/logs/error.log CustomLog <PATH>/logs/access.log combined LogLevel warn | |||
<Directory <PATH>/Greentea/resources/public/> | |||
AllowOverride All | |||
Order Allow,Deny | |||
Allow from all | |||
</Directory> | |||
DocumentRoot <PATH>/Greentea/resources/public | |||
ProxyPass /analytics/ http://localhost:3456/analytics/ | |||
ProxyPassReverse /analytics/ http://localhost:3456/analytics/ | |||
ProxyPass /analytics http://localhost:3456/analytics/ | |||
ProxyPassReverse /analytics http://localhost:3456/analytics/ | |||
ProxyPass /greentea/ http://localhost:3456/greentea/ | |||
ProxyPassReverse /greentea/ http://localhost:3456/greentea/ | |||
ProxyPass /greentea http://localhost:3456/greentea/ | |||
ProxyPassReverse /greentea http://localhost:3456/greentea/ | |||
</VirtualHost> | </VirtualHost> | ||
Line 64: | Line 64: | ||
#We need to point to the missing dependency manually: | #We need to point to the missing dependency manually: | ||
##Run: `$ git clone https://github.com/iPlantCollaborativeOpenSource/iplant-clojure-commons.git` | ##<pre>Run: | ||
##In lein 2.0 this will create a file at " | |||
## | `$ git clone https://github.com/iPlantCollaborativeOpenSource/iplant-clojure-commons.git`</pre> | ||
##<pre>In the iplant-clojure-commons directory, run: | |||
## | |||
`$ lein uberjar` | |||
In lein 2.0 this will create a file at "<PATH>/iplant-clojure-commons/clojure-commons-1.3.3-SNAPSHOT-standalone.jar"</pre> | |||
##<pre>Replacing with appropriate <PATH>, run: | |||
`mvn install:install-file -DgroupId=org.iplantc -DartifactId=clojure-commons -Dversion=1.3.3-SNAPSHOT -Dpackaging=jar -Dfile=<PATH>/iplant-clojure-commons/clojure-commons-1.3.3-SNAPSHOT-standalone.jar`</pre> | |||
##<pre>Now try | |||
`$ lein clean` | |||
and then | |||
`$ lein run` | |||
The dependency issue should be resolved.</pre> |
Revision as of 17:49, 12 February 2013
CoGe - Analytics
CoGe Analytics is a metrics and analytics engine for the CoGe platform written on Clojure's web framework Noir.
How To: Deploy on a Server via Apache Webserver
Prerequisites:
(You can install these CLI tools using your linux distributions preferred package manager)
- Apache2 - with plugins
- libapache2-mod-proxy-html - For proxying the running port to the correct endpoints.
- libxml2-dev
- Maven - For Clojure Dependencies
- Git - For cloning repos in from github
- Leingingen - Leiningen - Automate Clojure projects without setting your hair on fire.
Get Analytics Running:
- Once you have all the prerequisites installed, you need to get the Greentea (Analytics) repo from Github.
- Run: `$ git clone https://github.com/LyonsLab/Greentea.git`
- Inside the cloned directory run: `$ lein run &` it should pull in all the required dependencies* and start a Jetty servlet running on port 3456.
- Check localhost:3456 to verify that the analytics platform is running.
Configure Apache to Proxy the /analytics Endpoint
- Now to setup apache to point localhost/analytics/ to port 3456
- Open '/etc/apache2/apache.conf' in your favorite editor and add these lines:
RewriteEngine On NameVirtualHost *:90 Listen 90 <VirtualHost *:90> ServerAdmin coge.genome@gmail.com ServerName localhost #ServerAlias geco.com.analytics ErrorLog /home/rchasman/logs/error.log CustomLog <PATH>/logs/access.log combined LogLevel warn <Directory <PATH>/Greentea/resources/public/> AllowOverride All Order Allow,Deny Allow from all </Directory> DocumentRoot <PATH>/Greentea/resources/public ProxyPass /analytics/ http://localhost:3456/analytics/ ProxyPassReverse /analytics/ http://localhost:3456/analytics/ ProxyPass /analytics http://localhost:3456/analytics/ ProxyPassReverse /analytics http://localhost:3456/analytics/ ProxyPass /greentea/ http://localhost:3456/greentea/ ProxyPassReverse /greentea/ http://localhost:3456/greentea/ ProxyPass /greentea http://localhost:3456/greentea/ ProxyPassReverse /greentea http://localhost:3456/greentea/ </VirtualHost>
*In the case of a common dependency issue with iplant-clojure-commons:
- We need to point to the missing dependency manually:
Run:
`$ git clone https://github.com/iPlantCollaborativeOpenSource/iplant-clojure-commons.git`
In the iplant-clojure-commons directory, run:
`$ lein uberjar`
In lein 2.0 this will create a file at "<PATH>/iplant-clojure-commons/clojure-commons-1.3.3-SNAPSHOT-standalone.jar"
Replacing with appropriate <PATH>, run:
`mvn install:install-file -DgroupId=org.iplantc -DartifactId=clojure-commons -Dversion=1.3.3-SNAPSHOT -Dpackaging=jar -Dfile=<PATH>/iplant-clojure-commons/clojure-commons-1.3.3-SNAPSHOT-standalone.jar`
Now try
`$ lein clean`
and then
`$ lein run`
The dependency issue should be resolved.