Difference between revisions of "Stanford:AdministratorGuide"

From Protege Wiki

Jump to: navigation, search
m (9 revisions: Import from CF Pages (2))
Line 193: Line 193:
Change by Alex: /usr/local/tomcat6  it should start with /sbin/service tomact6 start
Change by Alex: /usr/local/tomcat6  it should start with /sbin/service tomact6 start
Password can be found in /etc/tomcat6/tomcat-users.xml
Password can be found in /etc/tomcat6/tomcat-users.xml

Latest revision as of 12:48, December 16, 2010


[edit] Installation and configuration of central server infrastructure

Infrastructure with all servers and information flow

It is recommended to install the tools in the proposed sequence, since we have the following dependencies:

  • Hudson uses Maven
  • Hudson includes the Sonar plugin and triggers Sonar
  • Maven retrieves libraries from Nexus
  • Hudson executes the Maven script
  • Maven includes profiles from Sonar and Nexus.

We assume that SVN is already installed and that the projects exist in SVN.

[edit] JAVA

  • Download and install java.
  • Set environment setting JAVA_HOME pointing to the java folder (e.g. on Windows “C:\Program Files\Java\jdk1.6.0_21\bin”).

[edit] Nexus

[edit] Initial Installation and configuration (one time)

Download file (OS dependent) from http:////nexus.sonatype.org/downloads (e.g. “nexus-oss-webapp-1.8.0-bundle.zip”). Extract files to final directory. OS dependent

  • Windows: Open command line with bin folder as current directory (e.g. “C:\nexus\nexus-oss-webapp-1.8.0\bin\jsw\windows-x86-32”). Run Installnexus and Startnexus from command line. Windows Users (Vista, Windows 7) need to execute cmd.exe as Administrator (go to “All Programs”, “Accessories”, “Command Prompt”, right mouse click on “Run as Administrator”.
  • Linux: Create folder /var/nexus/. Copy downloaded filder into this folder. Open command line with bin folder as current (e.g. /var/nexus/nexus-oss-webapp-1.8.0/bin/jsw/linux-x86-32). Run sudo ./nexus start

Alternatively you can install Nexus as service as described in http://www.sonatype.com/books/nexus-book/reference/ch03s06.html.

Test Nexus: http://localhost:8081/nexus/index.html. Login to Nexus with user name and password “admin” respectively XXX (/var/nexus/nexus-oss-webapp-1.8.0/conf/users.txt). Optionally make SMTP settings.

[edit] How to change the password

If the NEXUS password is changed (TODO: has to be done soon), this has to happen in two places: 1. Change it in Nexus itself using the administration/security interface 2. Change it in the settings.xml in maven/conf/ directory.

TODO: Change password.

[edit] Setting up repositories

[edit] Option 1: Upload files individually

Nexus comes with a predefined set of repositories. Now add the artifacts as described in the project manager's guide. TODO add link.

[edit] Option 2: Optionally import external repositories

After install there is a “storage” folder (e.g. “C:\nexus\sonatype-work\nexus\storage”).

Copy Sonar folder to storage and overwrite folder “thirdparty”. In thirdparty there are the Stanford libs. Please refer to the appendix to get an overview.

Current problem: the jars in the official repositories have not distinct versions. So it is not possible to point to a specific version. We are talking about the jars mentioned in the WebProtege developer guide (http://protegewiki.stanford.edu/wiki/WebProtegeDevelopersGuide) section “Fix project compilation errors”.

[edit] Sonar

Just download zip file sonar-2.2 from http://www.sonarsource.org/. Unpack it to our tools folder (e.g. to /var/sonar/sonar-2.2).

Start sonar from bin folder (e.g. /var/sonar/sonar-2.2/bin/linux-x86-32 folder:

  • Windows StartSonar
  • Linux: sonar.sh (don’t forget to make this file and wrapper to be executable (set permissions)

Test Sonar via http://localhost:9000. The default admin user name and password are admin/admin, however, there is no need to login.

Optionally install Sonar as LINUX service. Command line /var/sonar/sonar-2.2.3/sudo cp bin/linux-x86-64/sonar.sh /etc/init.d/sonar

The default password is changed. The current one can be found in /var/sonar/sonar-2.3/conf/users.txt. Or ask christian.johner@johner-institut.de.

[edit] Maven

[edit] Installation

Download Maven from http://maven.apache.org/download.html und chose apache-maven-2.2.1.

Add system environment variables:

  • M2_HOME pointing to new directory apache-maven-2.2.1
  • JAVA_HOME (if not already set)

Add to Path ;%M2_HOME%\bin

[edit] Configuration

Change file “apache-maven-2.2.1/conf/settings.xml”

  • Add profiles for sonar and nexus
  • Add servers

Hint: the passwords shown in the code above have been the default passwords. They do not match the actual password. The actual password can be found in the Maven directory /conf/settings.xml on bmir-hudson.standford.edu.

A complete settings.xml file can be downloaded from here.

[edit] Hudson

[edit] Install (one time) and start Hudson


  • Download war-file from www.hudson-ci.org. Just click on “latest and greatest”.
  • Start server with java –jar hudson.war. Runs on http://localhost:8080


[edit] Initial Configuration (one time)

Sonar can be added as plugin

Add plugins

  • Go to “Manage Hudson” → “Manage Plugins”.
  • Go to available plugins and install “Hudson Sonar Plugin”.
  • Optionally add additional plugins. E.g. for Twitter, Trigger, e.g. jabber. Build reports is not needed as we use Sonar.
Paths to Maven and JDK to be defined in the configuration settings

Go back to “Manage Hudson” and select “Configure System” and make the following changes/settings

  • Jdk: set name (e.g. “Java 1.6”) and path to Java (e.g. “C:\Program Files\Java\jdk1.6.0_21”). Hudson does not read the system variable JAVA_HOME.
  • Maven: Add Maven (not ANT) and set name (e.g. “Maven 2”) and path to Maven (e.g. “C:\Tools\apache-maven-2.2.1” respectively ). Hudson does not read the system variable MAVEN_HOME.
  • “Add Sonar”. Just add a name (e.g. “Sonar”). Set location e.g. to http://bmir-hudson1:9000.
  • Optionally set e-mail notifications

[edit] Add projects

Please refer to the project manager section. TODO add link.

[edit] Add Users

Go to Hudson > Manage Server > Configure System and add an user by entering a name in text field "User/group to add". Ignore the warning symbol, it will disappear as soon the user has registered himself. Give user rights by checking checkboxes. Click save.

[edit] Selenium Server (Selenium Remote Control)

Set up a central Selenium Server.

  • Download Selenium RC from http://seleniumhq.org/download/.
  • Unzip file. We only need selenium-server-1.0.3 subfolder.
  • Start server with java –jar selenium-server.jar
  • Make sure that the display is set, e.g. export DISPLAY=… (case sensitive, only WLAN IP worked?!?)

There is already a file /etc/init.d/start-selenium-server.sh.

[johner@bmir-hudson1 ~]$ export DISPLAY=
[johner@bmir-hudson1 ~]$ xhost
 access control disabled, clients can connect from any host
[johner@bmir-hudson1 ~]$ java -jar /var/selenium/selenium-server.jar

Note: the display settings have to be done before selenium is started!

Either there is a XServer running on the test machine or a client machine (or server itself) needs running X-Server, e.g. run xming –ac. XMing is available for Windows.

[edit] Tomcat

Standard out of the box: Either use yum or just download and extract apache-tomcat. Change in server-xml port to 8082 in order to avoid conflicts with Hudson.


 sudo /opt/tomcat/bin/startup.sh
 user name and password currently are currently set to admin/protégé.

Change by Alex: /usr/local/tomcat6 it should start with /sbin/service tomact6 start Password can be found in /etc/tomcat6/tomcat-users.xml

Personal tools