Difference between revisions of "Analytics"

From CoGepedia
Jump to: navigation, search
(Prerequisites:)
(Steps:)
Line 20: Line 20:
 
<br>  
 
<br>  
  
=== Steps:  ===
+
=== Get Analytics Running:  ===
  
 
#Once you have all the prerequisites installed, you need to get the Greentea (Analytics) repo from Github.  
 
#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`
+
##Run: `$ git clone https://github.com/LyonsLab/Greentea.git`  
#inside this new directory run: `$ lein run` it should pull in all the required dependencies* and start a Jetty servlet running on port 3456.
+
#Inside the cloned directory run: `$ lein run &amp;` 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.
  
'''*In the case of a common dependency issue with iplant-clojure-commons'''
+
=== Configure Apache to Proxy the /analytics Endpoint  ===
# We need to point to the missing dependency manually:
+
 
##run: `$ git clone https://github.com/iPlantCollaborativeOpenSource/iplant-clojure-commons.git`
+
#Now to setup apache to point localhost/analytics/ to port 3456
##In lein 2.0 this will create a file at "../iplant-clojure-commons/clojure-commons-1.3.3-SNAPSHOT-standalone.jar"
+
##Open '/etc/apache2/apache.conf' in your favorite editor and add these lines:
##run: `$ lein uberjar` in the iplant-clojure-commons directory.
+
 
 +
RewriteEngine On
 +
NameVirtualHost *:90
 +
Listen 90
 +
 +
&lt;VirtualHost *:90&gt;
 +
  ServerAdmin coge.genome@gmail.com ServerName localhost
 +
  #ServerAlias geco.com.analytics
 +
  ErrorLog /home/rchasman/logs/error.log CustomLog &lt;PATH&gt;/logs/access.log combined LogLevel warn
 +
  &lt;Directory &lt;PATH&gt;/Greentea/resources/public/&gt;                   
 +
    AllowOverride All                                                       
 +
    Order Allow,Deny                                                       
 +
    Allow from all                                                         
 +
  &lt;/Directory&gt;                                                               
 +
                                                               
 +
  DocumentRoot &lt;PATH&gt;/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/                 
 +
&lt;/VirtualHost&gt;
 +
 
 +
'''*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 lein 2.0 this will create a file at "../iplant-clojure-commons/clojure-commons-1.3.3-SNAPSHOT-standalone.jar"  
 +
##Run: `$ lein uberjar` in the iplant-clojure-commons directory.
 +
##Run: `mvn install:install-file -DgroupId=org.iplantc -DartifactId=clojure-commons -Dversion=1.3.3-SNAPSHOT -Dpackaging=jar -Dfile=&lt;PATH&gt;/iplant-clojure-commons/clojure-commons-1.3.3-SNAPSHOT-standalone.jar`
 +
##Try `$ lein clean` and then `$ lein run` again, the dependency issue should be resolved.

Revision as of 11:45, 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)


Get Analytics Running:

  1. Once you have all the prerequisites installed, you need to get the Greentea (Analytics) repo from Github.
    1. Run: `$ git clone https://github.com/LyonsLab/Greentea.git`
  2. Inside the cloned directory run: `$ lein run &` it should pull in all the required dependencies* and start a Jetty servlet running on port 3456.
    1. Check localhost:3456 to verify that the analytics platform is running.

Configure Apache to Proxy the /analytics Endpoint

  1. Now to setup apache to point localhost/analytics/ to port 3456
    1. 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:

  1. We need to point to the missing dependency manually:
    1. Run: `$ git clone https://github.com/iPlantCollaborativeOpenSource/iplant-clojure-commons.git`
    2. In lein 2.0 this will create a file at "../iplant-clojure-commons/clojure-commons-1.3.3-SNAPSHOT-standalone.jar"
    3. Run: `$ lein uberjar` in the iplant-clojure-commons directory.
    4. 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`
    5. Try `$ lein clean` and then `$ lein run` again, the dependency issue should be resolved.