Difference between revisions of "AgShare/Tech"

From Creative Commons
Jump to: navigation, search
(Deploying new WARs)
Line 31: Line 31:
  
 
/etc/rc.local contains a call to run ~/tomcat/bin/startup.sh as the agshare user. That's kind of hackish, I realize.
 
/etc/rc.local contains a call to run ~/tomcat/bin/startup.sh as the agshare user. That's kind of hackish, I realize.
 +
 +
== Piwik analytics ==
 +
 +
We use a self-hosted package called [http://piwik.org/ Piwik] to record search engine queries and measure traffic to the website.
 +
 +
You can use the [http://search.agshare.org/static/piwik/piwik/index.php Piwik interface from here] if you have an account. If you want an account, talk to Nathan.
 +
 +
=== Piwik general configuration ===
 +
 +
* Configuration: It uses a MySQL database. You can see the details in the Piwik configuration file.
 +
* Path on the server: '''/var/www/search.agshare.org/www/static'''
 +
* Web serving: Apache + mod_php5 serve it up. We set up '''/var/www/search.agshare.org/www/static''' to be served by Apache; you can see that in /etc/apache2/sites-available/search.agshare.org.
 +
 +
=== Site search ===
 +
 +
We added the [http://github.com/BeezyT/piwik-sitesearch the sitesearch plugin] (still in beta; see [http://dev.piwik.org/trac/ticket/49 this Piwik ticket]) to let us analyze site search.
 +
 +
The site search plugin requires that we:
 +
* Add piwik to the default template
 +
* Change the default translations so that they
 +
* Configure it:
 +
 +
You can adminster
 +
 +
* Plugins: '''piwik/plugins/SiteSearch''' is a git clone of

Revision as of 15:15, 12 October 2010


The AgShare deployment works analogously to the CC Labs deployment of DiscoverEd. Some important things to note:

  • Username: agshare
  • Host name: search.agshare.org (currently the same as discovered.labs.creativecommons.org)

So, for example, to set up your environment, do:

$ sudo su - agshare

Given that, give Running DiscoverEd a look!

Deploying new WARs

To deploy a new war, do this:

  • rm -rf ~/tomcat/webapps/ROOT
  • cp nutch-1.1.war ~/tomcat/webapps/ROOT.war

Then restart Tomcat.

Restarting Tomcat

The AgShare deployment uses a Tomcat instance in its $HOME (supported by the tomcat6-instance-create script). It's wrapped as "/etc/init.d/agshare" so the boot process can use it. But you can restart it this way:

  • ~/tomcat/bin/shutdown.sh
  • ~/tomcat/bin/startup.sh

Starting Tomcat at boot

/etc/rc.local contains a call to run ~/tomcat/bin/startup.sh as the agshare user. That's kind of hackish, I realize.

Piwik analytics

We use a self-hosted package called Piwik to record search engine queries and measure traffic to the website.

You can use the Piwik interface from here if you have an account. If you want an account, talk to Nathan.

Piwik general configuration

  • Configuration: It uses a MySQL database. You can see the details in the Piwik configuration file.
  • Path on the server: /var/www/search.agshare.org/www/static
  • Web serving: Apache + mod_php5 serve it up. We set up /var/www/search.agshare.org/www/static to be served by Apache; you can see that in /etc/apache2/sites-available/search.agshare.org.

Site search

We added the the sitesearch plugin (still in beta; see this Piwik ticket) to let us analyze site search.

The site search plugin requires that we:

  • Add piwik to the default template
  • Change the default translations so that they
  • Configure it:

You can adminster

  • Plugins: piwik/plugins/SiteSearch is a git clone of