Posts

Grails and Tomcat 7: Out of Memory (PermGen)

Image
Deploying a Grails application to Tomcat 7 for the first time you may encounter the following error: java . lang . OutOfMemoryError : PermGen space Assumption: Windows Service To correct the problem, just adjust the default memory and Perm Gen space allocated in Tomcat 7. Start the service config tool "tomcat7w.exe: Change the Java Options: Switch to the Java tab: Change the “Initial Memory pool” to 128 Change the “Maximum memory pool”  to 512 Perm Gen settings: Add the follow two lines to the Java options --XX:PermSize=256m --XX:MaxPermSize=265m   Restart the service. Test your application References: http://www.grails.org/FAQ http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html

Jenkins - Adding Build Lights - Delcom 904008

Image
Adding a build light notification to your Jenkins server/setup can provide immediate visual feedback to your development team regarding application builds. The following is for setting up on a Windows machine and assumes you already have Jenkins installed locally or on a server. Required Hardware : Delcom USB HID Visual Indicator RGY - 904008, approx $90. Delcom 904008, RGY Required software: Ruby (1.9.3 or above)-  http://www.ruby-lang.org/en/downloads/ Delcom DLL -  http://www.delcomproducts.com/productdetails.asp?ProductNum=890510 delcom-util github project -  https://github.com/sfbishop/delcom-util  - modified to work with Jenkins Place the Delcom.dll in the same directory as the project.  You should be able to run the "xmas_led.rb" to confirm things are working correctly. Verification Once the software is installed plug in the USB light. Windows should install a driver. Verify in Device Manager: Note : If you hav...

SVN and Eclipse - Keyword Substitution

Setting up keyword substitution in Eclipse: Prerequisite: Subclipse or Subversive is installed Configuring in Eclipse: Right-click on your project Choose Team -> Set Property Enter the property name: svn:keywords  Enter the text: Id Author Date Revision Check Set property recursively  Click Ok Adding svn tags to your source file: Source file before check-in: Source file after SVN commit SVN keywords are now substituted when you commit your file(s). References: http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.tour.revs.keywords  http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html http://johnbokma.com/mexit/2008/09/30/subversion-svn-keywords-property.html http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/176

SVN pre-commit on CentOS

To help ensure your team is providing useful detail regarding svn check-ins a pre-commit can be used to valid the commit message. Additional checks can be done to valid the task number against your Redmine Database/Jira Database. Locate your repository /path/to/repository/ cd hooks cp pre-commit.tmpl pre-commit edit the pre-commit file and the add code similar to below On the file is saved. Make is executable chmod 775 pre-commit A working script, CentOS(Linux) ver 6 using a Redmine database The pre-commit code checks the SVN commit for: 1. There is a commit message 2. The message starts with "Issue #nnnn" 3. The issue number nnnn is in the Redmine issues table in MySQL References: http://www.redmine.org/boards/2/topics/449 http://lisa-n-tom.com/blog/?p=29 http://www.zytrax.com/tech/web/regex.htm#simple http://stackoverflow.com/questions/8113289/svn-pre-commit-hook-failure http://blog.grimsy.net/2008/07/a-few-svn-pre-commit-hooks/ http://svn.haxx.se/...

Installing Apache and Subversion on CentOS

Using Apache modules to expose SVN for your team(s). The following setup was performed on CentOS(ver 6) to expose SVN via Apache. Install Apache Check the status Start the process Verify the install, the Apache test page should be view able http://localhost Ensure Apache starts by default Apache configuration file Install Subversion Install the needed Apache modules subversion and mod_dav_svn Update the subversion.conf Add an entry to the "subversion.conf" file Create users, command for the first user All other users Configure the repository Create the required directories Create the repository Change ownership of repos to apache Restart Apache Test via Browser http://localhost/repos You should see "Revision 0" Creating SVN structure Verify changes using your browser http://localhost/repos SVN Clients http://tortoisesvn.net/ References: http://wiki.centos.org/HowTos/Subversion http://linuxwave.blogspot.ca/2008/02/inst...

SVN to Hudson/Jenkins - Repository Hooks

Image
While you can set Hudson/Jenkins to poll SVN at specific times an alternative is to let SVN inform Hudson when a new change has been committed to the repository. Requirements: You will need access to the server that hosts your SVN repository. You have a project setup and configured in Hudson. Adding the SVN Plugin The following Hudson plugin is installed, version 1.20 for this example. From the Hudson Console: Click Manage Hudson-Manage Plugins Ensure the Subversion Plugin is added. Adding the SVN Hook to SVN Once the plugin has been added its time to update the SVN hook. Using a text editor, VM or VIM edit the "post-commit" file in your SVN repository hooks directory. An example based on the "Oracle Virutal Developer Days VM" Repository directory: /home/oracle/labs/Dev_labs/svn_repos/otnvdd/hooks File: post-commit An sample "post-commit" file: Verify your changes: Once you have the SVN hook in place, its time to make a change ...

Setting up SVN on Apache on Windows

Image
As part of getting some new members up to speed I needed create an SVN repository for project related check-in. I decided to go with Apache SVN which is easy to setup on Apache. Installation the following software Apache HTTP Server 2.2.1 http://httpd.apache.org/ Apache Subverion - 1.7.1 Win32Svn (32-bit client, server and bindings, MSI and ZIPs; maintained by David Darj) http://subversion.apache.org/packages.html Reboot to ensure paths are set correctly Apache Installation note Using port 80 it should install as a service to ensure SVN is active on restart Creating a repository on the Server Copy required modules Copy the files mod_authz_svn.so and mod_dav_svn.so Configure Apache httpd.conf In the modules section ensure the following setting exist Create and add user(s) to the authfile Connect and Confirm using IE, Chrome or FireFox Setting up the standard directories Checkout the repository using TortiseSVN or a command line tool Create the follow...