Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Common Build Infrastructure/Virtual Server Setup/MacOSX"

(Install software)
(TODO)
 
(13 intermediate revisions by one other user not shown)
Line 1: Line 1:
This page documents how http://buildbox/ was set up for use in EclipseCon 2009's [http://www.eclipsecon.org/2009/sessions?id=302 Hands-On: Using the new Common Builder for Push-Button PDE Builds] tutorial.
+
This page documents how to set up a Mac OS X box for use in EclipseCon 2009's [http://www.eclipsecon.org/2009/sessions?id=302 Hands-On: Using the new Common Builder for Push-Button PDE Builds] tutorial.
  
==Acquire virtual server image==
+
== Run a build in Eclipse ==
  
* depending on where you are on the planet, this may be considered illegal. You could also create your own image using [http://www.vmware.com/products/converter/ VMWare Converter].  
+
* download and unpack Eclipse 3.4.2, then double-click the application icon.
  
* the details below apply to the "deadmoo" Mac OS X 10.4.1 image; using something newer, YMMV
+
* choose a workspace without spaces or a lengthy path, such as <code>~/Documents/workspace</code>
  
* update to 10.4.5 using [http://support.apple.com/downloads/Mac_OS_X_Update_10_4_5_Combo Mac OS X 10.4.5 Combo Update].
+
* download [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.commonbuilder.releng/psf/gef.psf?root=Technology_Project&view=co gef.psf].
  
==Install software ==
+
* import the psf into Eclipse using File > Import > Team > Project Set File. You should end up with three workspace projects, org.eclipse.releng.basebuilder, org.eclipse.dash.common.releng, and org.eclipse.gef.releng.
  
* find a terminal under Finder > Go > Applications > Utilities > Terminal, and drag it into the desktop or launcher bar for convenience.
+
* download [http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b3-bin.zip ant-contrib.jar] into ~/Documents/workspace/org.eclipse.dash.common.releng/lib/
  
* open Safari and go to http://support.apple.com/downloads/Java_2_SE_5_0_Release_1. Download and install.
+
* open gef.releng, configure build.properties to correct java and Eclipse platform settings. For example
  
* get Eclipse 3.4.2: http://download.eclipse.org/eclipse/downloads/drops/R-3.4.2-200902111700/
+
  dependencyURLs=http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5-200902021535/eclipse-SDK-3.5M5-macosx-carbon.tar.gz
 
+
* unpack into ~/eclipse
+
 
+
mkdir ~/eclipse; \
+
tar xvzf ~/Desktop/eclipse*.tar.gz -C ~/eclipse
+
mv ~/eclipse/eclipse ~/eclipse/eclipse342
+
 
+
* simplify the Java 5.0 path
+
 
+
cd ~/eclipse; ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/ java50
+
 
+
* run Eclipse
+
 
+
~/eclipse/eclipse342/eclipse -vm ~/eclipse/java50/bin/java
+
 
+
+ open a terminal, run as root
+
yum install -y ant-contrib
+
file /usr/share/java/ant-contrib.jar
+
 
+
+ open a terminal, run as root
+
yum install -y java-1.6.0-openjdk-devel cvs svn perl curl wget Xvfb vnc vnc-server
+
 
+
+ restart (can run the following as root)
+
shutdown -r now
+
 
+
== Configure Hudson to start automatically ==
+
 
+
+ as root, run the following to fetch the [https://hudson.dev.java.net/servlets/ProjectDocumentList latest Hudson]
+
mkdir -p /opt/hudson; cd /opt/hudson; wget https://hudson.dev.java.net/files/documents/2402/128546/hudson.jar
+
 
+
+ create the file <tt>/etc/init.d/hudson</tt> -- do NOT forget the "&" or your system will hang on restart!
+
#/bin/bash
+
# chkconfig: 2345 20 80
+
# description: runs Hudson
+
java -jar /opt/hudson/hudson.jar &
+
 
+
+ as root, run
+
chkconfig --add hudson; chkconfig --level 2345 hudson on
+
chmod 755 /etc/init.d/hudson
+
/etc/init.d/hudson &
+
 
+
+ once started, open firefox or from console
+
links http://localhost:8080/
+
 
+
+ restart (can run the following as root)
+
shutdown -r now
+
 
+
+ if anything goes wrong, hit F2 on reboot to enter grub menu, and add "single" to the grub commands to start in the single-user, networkless runlevel mode [http://en.wikipedia.org/wiki/Runlevel#Red_Hat_Linux_and_Fedora].
+
 
+
+ on restart, verify Hudson is started by opening the above URL
+
 
+
== Run a build in Eclipse ==
+
 
+
+ fire up Eclipse 3.4.2, fetch o.e.d.c.releng project from :pserver:anonymous@dev.eclipe.org:/cvsroot/technology/org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.common.releng
+
 
+
+ fetch gef.releng and basebuilder M5 via pcf file in org.eclipse.dash.common.releng/pcf
+
 
+
+ open gef.releng, configure build.properties to correct java and Eclipse platform settings. For example
+
 
+
  dependencyURLs=http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5-200902021535/eclipse-SDK-3.5M5-linux-gtk.tar.gz (or -ppc, or -x86_64, etc.)
+
 
   
 
   
  JAVA_HOME=/usr/lib/jvm/java
+
  JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
  JAVA14_HOME=/usr/lib/jvm/java
+
  JAVA14_HOME=/System/Library/Frameworks/JavaVM.framework/Home
  JAVADOC14_HOME=/usr/lib/jvm/java/bin
+
  JAVADOC14_HOME=/System/Library/Frameworks/JavaVM.framework/Home/bin
+
+ select build.xml, right-click and Run as > Ant Build
+
 
+
+ to kill a bad build in progress, open a terminal and run
+
pkill -f N200903
+
 
+
== Run a build in Hudson ==
+
 
+
+ open http://localhost:8080, click New Job
+
+ select 'free-style software project'
+
+ configure a job that runs the following script
+
  
export BUILDTYPE="${BUILDTYPE}"
+
* select build.xml, right-click and Run as > Ant Build
export EXTRAFLAGS="-javaHome /usr/lib/jvm/java ${EXTRAFLAGS}"
+
. /home/builduser/workspace/org.eclipse.dash.common.releng/hudson/gef-3.5.x-nightly.sh
+
  
+ define two build parameters
+
::[[Image:Run-CBI-on-MacOSX10.5.png|200px]]
  
BUILDTYPE (default value N, a nightly build)
+
* to kill a stuck process or bad build in progress, open a terminal (Finder > Go > Applications > Utilities > Terminal) and run
EXTRAFLAGS (default value blank, no extra flags
+
  
+ save the configuration, then click Build Now to start a build
+
ps ax | grep java | grep N200903
  
+ see also a sample [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.commonbuilder.releng/hudson/gef-3.5.x-nightly/buildbox/config.xml?root=Technology_Project&revision=1.1&content-type=text%2Fplain config.xml] which stores the UI configuration, and [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.commonbuilder.releng/hudson/gef-3.5.x-nightly/build.eclipse.org/config.xml?root=Technology_Project&revision=1.1&content-type=text%2Fplain build.eclipse.org's gef-3.5.x-nightly config.xml]
+
* then kill the associated process
  
== Remote Access==
+
kill -9 <processid>
  
+ set up the VBox instance to use BOTH Host Interface (192.168.2.*) and NAT (10.0.2.*). For more on NAT, see [http://mydebian.blogdns.org/?p=148 this blog]
 
  
::+ [[Image:Buildbox-Host-Interface.png|Host Interface|220px]]
+
== TODO ==
  
+ access the vserver via SSH on :22, or the Hudson web service on :8080
+
+ {{bug|268420}} - tests do not run - need to solve issues w/ headless X connection & carbon vs. cocoa dependencies
  
+ to save memory, edit /etc/inittab so that the server will start on [http://en.wikipedia.org/wiki/Runlevel#Typical_Linux_runlevels runlevel 3] (text login) instead of 5 (graphical login, with X started)
+
[[Category:Athena Common Build]]

Latest revision as of 01:33, 27 November 2009

This page documents how to set up a Mac OS X box for use in EclipseCon 2009's Hands-On: Using the new Common Builder for Push-Button PDE Builds tutorial.

Run a build in Eclipse

  • download and unpack Eclipse 3.4.2, then double-click the application icon.
  • choose a workspace without spaces or a lengthy path, such as ~/Documents/workspace
  • import the psf into Eclipse using File > Import > Team > Project Set File. You should end up with three workspace projects, org.eclipse.releng.basebuilder, org.eclipse.dash.common.releng, and org.eclipse.gef.releng.
  • download ant-contrib.jar into ~/Documents/workspace/org.eclipse.dash.common.releng/lib/
  • open gef.releng, configure build.properties to correct java and Eclipse platform settings. For example
dependencyURLs=http://download.eclipse.org/eclipse/downloads/drops/S-3.5M5-200902021535/eclipse-SDK-3.5M5-macosx-carbon.tar.gz

JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
JAVA14_HOME=/System/Library/Frameworks/JavaVM.framework/Home
JAVADOC14_HOME=/System/Library/Frameworks/JavaVM.framework/Home/bin
  • select build.xml, right-click and Run as > Ant Build
Run-CBI-on-MacOSX10.5.png
  • to kill a stuck process or bad build in progress, open a terminal (Finder > Go > Applications > Utilities > Terminal) and run
ps ax | grep java | grep N200903
  • then kill the associated process
kill -9 <processid>


TODO

+ bug 268420 - tests do not run - need to solve issues w/ headless X connection & carbon vs. cocoa dependencies

Copyright © Eclipse Foundation, Inc. All Rights Reserved.