<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>]-[3ny0 ONLINE</title><link>http://blog.henyo.com/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/HenyoOnline" /><description>Technology Blog: SEO, Earn money online, Grails, Groovy, Java, Ubuntu, Windows 7, osx86, Social Gaming</description><language>en</language><managingEditor>noreply@blogger.com (Jessie Evangelista)</managingEditor><lastBuildDate>Sun, 20 May 2012 23:16:21 PDT</lastBuildDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">90</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">25</openSearch:itemsPerPage><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="henyoonline" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><itunes:explicit>no</itunes:explicit><itunes:subtitle>Technology Blog: SEO, Earn money online, Grails, Groovy, Java, Ubuntu, Windows 7, osx86, Social Gaming</itunes:subtitle><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">HenyoOnline</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item><title>Safely Rebooting a Hanging Server</title><link>http://blog.henyo.com/2012/04/safely-rebooting-hanging-server.html</link><category>System Administration</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Sun, 29 Apr 2012 18:44:45 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-3145006304229947993</guid><description>&lt;br /&gt;
When all else fails, go to the physical server console and hit:&lt;br /&gt;
Alt-SysRq R (wait for 21 secs)&lt;br /&gt;
Alt-SysRq E (wait for 21 secs)&lt;br /&gt;
Alt-SysRq I (wait for 21 secs)&lt;br /&gt;
Alt-SysRq S (wait for 21 secs)&lt;br /&gt;
Alt-SysRq U (wait for 21 secs)&lt;br /&gt;
Alt-SysRq B&lt;br /&gt;
&lt;br /&gt;
Then cross your fingers as the server should reboot&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-3145006304229947993?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-30T09:44:45.359+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Mirroring the grails documentation with wget</title><link>http://blog.henyo.com/2012/04/mirroring-grails-documentation-with.html</link><category>Software Development</category><category>Ubuntu</category><category>Grails</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Tue, 17 Apr 2012 08:03:42 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-6036242610724808580</guid><description>I will be offline most of the time in the next couple of days so I had to have a copy of the latest Grails 2.0.3 documentation available locally for browsing. Here is how I made one:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;wget \
--recursive \
--convert-links \
--page-requisites \
--domains grails.org \
--no-parent \
--no-clobber \
--exclude-directories="doc/2.0.3/api/" \
http://grails.org/doc/2.0.3/
&lt;/pre&gt;&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-6036242610724808580?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-17T23:03:42.604+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Problem with grails, maven and spring security</title><link>http://blog.henyo.com/2012/04/problem-with-grails-maven-and-spring.html</link><category>Software Development</category><category>Groovy</category><category>Ubuntu</category><category>Grails</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Fri, 13 Apr 2012 17:28:01 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-7769654905288707628</guid><description>Environment:&lt;br /&gt;
Ubuntu 12.04 3.2.0-20-generic-pae kernel&lt;br /&gt;
java version "1.6.0_24"&lt;br /&gt;
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-3ubuntu3)&lt;br /&gt;
OpenJDK Server VM (build 20.0-b12, mixed mode)&lt;br /&gt;
&lt;br /&gt;
I installed STS 2.9.1 RELEASE which includes apache-maven-3.0.3&lt;br /&gt;
&lt;br /&gt;
I placed the apache-maven-3.0.3 in my PATH environment variable&lt;br /&gt;
&lt;br /&gt;
I created a project with:&lt;br /&gt;
mvn archetype:generate \&lt;br /&gt;
-DarchetypeGroupId=org.grails \&lt;br /&gt;
-DarchetypeArtifactId=grails-maven-archetype \&lt;br /&gt;
-DarchetypeVersion=1.3.7 \&lt;br /&gt;
-Dversion=1.0.0alpha \&lt;br /&gt;
-DgroupId=com.henyo.foobar -DartifactId=foobar&lt;br /&gt;
&lt;br /&gt;
mvn proceeded to download the internet and then created the project folder with the pom file&lt;br /&gt;
I modified the pom file to set the source and target to 1.6 as described in the grails manual&lt;br /&gt;
&lt;br /&gt;
I then did:&lt;br /&gt;
mvn initialize&lt;br /&gt;
which created the grails directory structure&lt;br /&gt;
&lt;br /&gt;
I tried:&lt;br /&gt;
mvn grails:run-app&lt;br /&gt;
which resulted in the app successfully running&lt;br /&gt;
&lt;br /&gt;
I then tried running just the unit tests with:&lt;br /&gt;
mvn grails:exec -Dcommand=test-app -Dargs="--unit"&lt;br /&gt;
which resulted in successful build&lt;br /&gt;
&lt;br /&gt;
I then installed the spring security core plugin with:&lt;br /&gt;
mvn grails:install-plugin -DpluginName=spring-securit-core&lt;br /&gt;
&lt;br /&gt;
I then tried using the s2-quickstart script:&lt;br /&gt;
mvn grails:exec -Dcommand=s2-quickstart -Dargs="com.henyo.foobar.model User Role"&lt;br /&gt;
which resulted in a build FAILURE:&lt;br /&gt;
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:1.3.7:exec (default-cli) on project foobar: Unable to start Grails: java.lang.reflect.InvocationTargetException: org/springframework/security/core/Authentication: org.springframework.security.core.Authentication -&gt; [Help 1]&lt;br /&gt;
&lt;br /&gt;
It seems that the grails maven integration still needs a lot of work. I suspect this is a dependency resolution issue.&lt;br /&gt;
&lt;br /&gt;
Uploaded a sample project that has this issue: http://dl.dropbox.com/u/5541070/foobar.tar.gz&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-7769654905288707628?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-14T08:28:01.083+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Books for Software Development</title><link>http://blog.henyo.com/2010/04/books-for-software-development.html</link><category>Software Development</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Fri, 13 Apr 2012 08:45:14 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-5013685429560991864</guid><description>&lt;br /&gt;
My updated reading list&lt;br /&gt;
&lt;br /&gt;
Learning Programming&lt;br /&gt;
-------------&lt;br /&gt;
How to think like a computer scientist: Python Edition&lt;br /&gt;
Thinking in C beta 3&lt;br /&gt;
The Passionate Programmer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Learning Java&lt;br /&gt;
-------------&lt;br /&gt;
How to think like a computer scientist: Java Edition&lt;br /&gt;
Objects First with Java&lt;br /&gt;
Head First Java 2nd Ed&lt;br /&gt;
Thinking in Java 4th Ed&lt;br /&gt;
Big Java&lt;br /&gt;
Agile Java: Crafting Code with Test-Driven Development&lt;br /&gt;
Core Java Vol 1 &amp; 2&lt;br /&gt;
The Art &amp; Science of Java&lt;br /&gt;
The Java Programming Language&lt;br /&gt;
&lt;br /&gt;
Programming Practices&lt;br /&gt;
---------------------&lt;br /&gt;
The Pragmatic Programmer: From Journeyman to Master&lt;br /&gt;
Pragmatic Version control using git&lt;br /&gt;
Pragmatic Unit testing in Java with JUnit&lt;br /&gt;
Pragmatic Project Automation&lt;br /&gt;
Debug It&lt;br /&gt;
Ship it&lt;br /&gt;
Release it&lt;br /&gt;
&lt;br /&gt;
Learning Basic Web Frontend Development&lt;br /&gt;
---------------------------------------&lt;br /&gt;
Head First HTML with CSS &amp; XHTML&lt;br /&gt;
Head First Javascript&lt;br /&gt;
Javascript the Good Parts&lt;br /&gt;
Stylin' with CSS: A Designer's Guide (2nd Edition)&lt;br /&gt;
Designing with Web Standards by Jeffrey Zeldman and Ethan Marcotte&lt;br /&gt;
Web Design for Developers: A Programmer's Guide to Design Tools and Techniques by Brian P. Hogan&lt;br /&gt;
Eric Meyer on CSS: Mastering the Language of Web Design by Eric Meyer&lt;br /&gt;
JQuery in Action by Bear Bibeault and Yehuda Katz&lt;br /&gt;
Handcrafted CSS by Dan Cederholm with Ethan Marcotte&lt;br /&gt;
&lt;br /&gt;
Learning Swing Frontend Development&lt;br /&gt;
-----------------------------------&lt;br /&gt;
Desktop Java Live&lt;br /&gt;
Swing Second Edition&lt;br /&gt;
Java Swing&lt;br /&gt;
&lt;br /&gt;
Mastering Software Development&lt;br /&gt;
------------------------------&lt;br /&gt;
Head First Object-Oriented Analysis and Design&lt;br /&gt;
Program Development in Java&lt;br /&gt;
The Elements of Java(TM) Style&lt;br /&gt;
Effective Java&lt;br /&gt;
Practical Java&lt;br /&gt;
Code Complete: A practical handbook of Software Construction&lt;br /&gt;
Clean Code: A Handbook of Agile Software Craftsmanship&lt;br /&gt;
Head First Design Patterns&lt;br /&gt;
Design Patterns: Elements of Reusable Object-Oriented Software&lt;br /&gt;
Patterns of Enterprise Application Architecture&lt;br /&gt;
Domain-Driven Design&lt;br /&gt;
Refactoring: Improving the Design of Existing Code&lt;br /&gt;
Refactoring to Patterns&lt;br /&gt;
SQL Anti-patterns&lt;br /&gt;
Modular Java&lt;br /&gt;
Growing Object-Oriented Software Guided by Tests&lt;br /&gt;
Holub on Patterns:Learning Design Patterns by Looking at Code&lt;br /&gt;
Test Driven Development by Kent Beck&lt;br /&gt;
XUnit Test Patterns - Refactoring Test Code by Gerard Meszaros&lt;br /&gt;
&lt;br /&gt;
Methodology and Management&lt;br /&gt;
--------------------------&lt;br /&gt;
UML Distilled, 2nd Edition&lt;br /&gt;
Extreme Programming Explained&lt;br /&gt;
The Unified Software Development Process&lt;br /&gt;
Rapid Development: Taming Wild Software Schedules&lt;br /&gt;
Peopleware: Productive Projects and Teams&lt;br /&gt;
The Mythical Man-Month&lt;br /&gt;
Software Runaways: Monumental Software Disasters&lt;br /&gt;
Software Creativity&lt;br /&gt;
Agile Estimating and Planning by Mike Cohn&lt;br /&gt;
Agile Software Development, Principles, Patterns, and Practices by Robert (Bob) C. Martin&lt;br /&gt;
Agile Retrospectives: Making Good Teams Great by Esther Derby, Diana Larsen, and Ken Schwaber&lt;br /&gt;
Succeeding with Agile: Software Development Using Scrum by Mike Cohn&lt;br /&gt;
Agile Testing: A Practical Guide for Testers and Agile Teams by Lisa Crispin and Janet Gregory&lt;br /&gt;
Extreme Programming Installed by Ron Jeffries, Ann Anderson, and Chet Hendrickson&lt;br /&gt;
Behind Closed Doors: Secrets of Great Management by Johanna Rothman, and Esther Derby&lt;br /&gt;
Leading Lean Software Development: Results Are Not the Point by Mary and Tom Poppendieck&lt;br /&gt;
Lean-Agile Software Development: Achieving Enterprise Agility by Alan Shalloway, Guy Beaver, and James R. Trott&lt;br /&gt;
The Art of Agile Development by James Shore and Shane Warden&lt;br /&gt;
&lt;br /&gt;
Mastering Groovy and Grails&lt;br /&gt;
---------------------------&lt;br /&gt;
Groovy in Action&lt;br /&gt;
The Definitive Guide to Grails&lt;br /&gt;
Grails in Action&lt;br /&gt;
Groovy Recipes&lt;br /&gt;
Programming Groovy&lt;br /&gt;
&lt;br /&gt;
Mastering Web Design&lt;br /&gt;
--------------------&lt;br /&gt;
Web Design for Developers&lt;br /&gt;
Head First Web Design&lt;br /&gt;
Designing Web Usability&lt;br /&gt;
&lt;br /&gt;
Mastering User Interface Design&lt;br /&gt;
-------------------------------&lt;br /&gt;
User Interface Design for Programmers&lt;br /&gt;
Don't Make me Think&lt;br /&gt;
About Face: The Essentials of User Interface Design&lt;br /&gt;
Design of Everyday Things&lt;br /&gt;
The Non-Designer's Design Book&lt;br /&gt;
&lt;br /&gt;
Mastering Hardcore Stuff&lt;br /&gt;
------------------------&lt;br /&gt;
Code: The Hidden Language of Computer Hardware and Software by Charles Petzold&lt;br /&gt;
The C Programming Language&lt;br /&gt;
Structure and Interpretation of Computer Programs&lt;br /&gt;
Introduction to Algorithms by CLRS (Cormen,Leiserson,Rivest,Stein)&lt;br /&gt;
Compilers: Principles, Techniques and Tools&lt;br /&gt;
Test Driven Development for Embedded C&lt;br /&gt;
The Art of Computer Programming&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are also welcome to &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via reader&lt;/a&gt; to get updates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-5013685429560991864?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-13T23:45:14.988+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Trying Ubuntu 12.04LTS Precise Pangolin</title><link>http://blog.henyo.com/2012/04/trying-ubuntu-1204lts-precise-pangolin.html</link><category>Software Development</category><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Wed, 04 Apr 2012 08:06:02 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-2706185453487712423</guid><description>I migrated my desktop from Ubuntu 10.04LTS to Ubuntu 12.04LTS.&lt;br /&gt;
&lt;br /&gt;
A few things I needed to add after installation:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Chromium as my default browser&lt;/li&gt;
&lt;li&gt;adobe-flash to be able to play flash games on facebook&lt;/li&gt;
&lt;li&gt;openjdk-6-jdk for work stuff&lt;/li&gt;
&lt;li&gt;icedtea-plugin to be able to run charting applet on citisec&lt;/li&gt;
&lt;li&gt;pidgin for messaging&lt;/li&gt;
&lt;li&gt;git for more work&lt;/li&gt;
&lt;li&gt;smartgit for routine pushing and comitting to git repos&lt;/li&gt;
&lt;li&gt;smartsvn for routine pushing and comitting to git repos&lt;/li&gt;
&lt;li&gt;STS for work stuff&lt;/li&gt;
&lt;li&gt;DB Visualizer for work stuff&lt;/li&gt;
&lt;li&gt;Virtual Box for desktop virtualization&lt;/li&gt;
&lt;li&gt;Dia for diagramming&lt;/li&gt;
&lt;li&gt;synergy to share one keyboard between my desktop and laptop&lt;/li&gt;
&lt;li&gt;dropbox for personal file sharing&lt;/li&gt;
&lt;li&gt;pencil for mockups&lt;/li&gt;
&lt;li&gt;smplayer for watching videos&lt;/li&gt;
&lt;li&gt;vlc for videos that do not work with smplayer&lt;/li&gt;
&lt;li&gt;git gui for simple git commits&lt;/li&gt;
&lt;li&gt;myqsl-server for development work&lt;/li&gt;
&lt;li&gt;mysql workbench for managing mysql database&lt;/li&gt;
&lt;li&gt;postgresql for development work&lt;/li&gt;
&lt;li&gt;pgadmin for managing postgres database&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Should I be replacing stuff on the list with something else? What other stuff have I forgotten to install?&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-2706185453487712423?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-04T23:06:02.472+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Protecting ProxmoxVE VMs with IPCop on KVM</title><link>http://blog.henyo.com/2012/04/protecting-proxmoxve-vms-with-ipcop-on.html</link><category>System Administration</category><category>ProxmoxVE</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Mon, 02 Apr 2012 07:35:37 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-4176853251874094401</guid><description>I found out a few weeks ago that protecting openvz virtual machines running ubuntu was a bit problematic as I was unable to run UFW on them.&lt;br /&gt;
&lt;br /&gt;
I was able to setup IPCop v2.04 on KVM which will act as a virtual firewall for all of the virtual machines in our ProxmoxVE 2.0 cluster&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-4176853251874094401?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-02T22:35:37.834+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Building a good Software Startup</title><link>http://blog.henyo.com/2012/03/building-good-software-startup.html</link><category>Software Development</category><category>System Administration</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Thu, 29 Mar 2012 22:04:37 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-3652445340305485282</guid><description>If I were to build a good software startup today, I'd run with the following ideas.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Hire only good people who get things DONE.&lt;br /&gt;
Even if they are more expensive in terms of compensation. &lt;br /&gt;
Quality trumps numbers. No doubt about it.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Development Team&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1 Lead Developer&lt;/li&gt;
&lt;li&gt;1 Senior Developer&lt;/li&gt;
&lt;li&gt;2 Junior Developers&lt;/li&gt;
&lt;li&gt;2 Business Analyst/QA&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Operations Team&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;1 Lead Systems Admin&lt;/li&gt;
&lt;li&gt;1 Senior System Admin&lt;/li&gt;
&lt;li&gt;6 Junior System Admins&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Give your team a quiet working environment with ergonomic furniture and equipment&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Give your team good internet connection&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;the faster they can download their installers, the earlier they can start working on code&lt;/li&gt;
&lt;li&gt;the faster they can look up the solution on google or stackoverflow, the faster they can proceed to the next problem&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Give your team good computer hardware&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;at least dual core processors with virtualization support&lt;/li&gt;
&lt;li&gt;at least 8GB memory&lt;/li&gt;
&lt;li&gt;at least 2 hard drives for mirror setup&lt;/li&gt;
&lt;li&gt;at least 2 screens&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Make sure to have enough environments to test, deploy and support the system properly.&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Development Environment&lt;/li&gt;
&lt;li&gt;Staging Environment&lt;/li&gt;
&lt;li&gt;Support Environment&lt;/li&gt;
&lt;li&gt;Production Environment&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;Make use of Free or Open Source systems to manage the development process.&lt;br /&gt;
Buy a commercial product only if you can't find a solution that fits.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Project/Issue Tracking with Source Code Management Options:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Indefero&lt;/li&gt;
&lt;li&gt;Gitorious&lt;/li&gt;
&lt;li&gt;Gitlab&lt;/li&gt;
&lt;li&gt;Redmine+gitolite&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Continuous Integration Server Options:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Jenkins&lt;/li&gt;
&lt;li&gt;Team City&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Code Quality:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Sonar&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Setup google apps for for email, calendar and other stuff&lt;br /&gt;
&lt;br /&gt;
As an example, here is how I would set it up on three physical servers:&lt;br /&gt;
&lt;br /&gt;
Server#1 running ProxmoxVE&lt;br /&gt;
- Firewall/Proxy Server/Package Cache(apt,yum,mvn) VM&lt;br /&gt;
- Redmine+gitolite VM&lt;br /&gt;
- Jenkins VM&lt;br /&gt;
- Sonar VM&lt;br /&gt;
- NFS/Samba Server VM&lt;br /&gt;
&lt;br /&gt;
Server#2 running ProxmoxVE&lt;br /&gt;
- Development Environment VM&lt;br /&gt;
- Staging Environment VM&lt;br /&gt;
- Support Environment VM&lt;br /&gt;
&lt;br /&gt;
Server#3 for storage of backups&lt;br /&gt;
- nexentastor or freenas or centos+zfsonlinux&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-3652445340305485282?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-30T13:04:37.111+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>ProxmoxVE 2: Configuring DRBD</title><link>http://blog.henyo.com/2012/03/proxmoxve-2-configuring-drbd.html</link><category>System Administration</category><category>ProxmoxVE</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Tue, 27 Mar 2012 23:43:48 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-6147164348671522484</guid><description>I am running ProxmoxVE 2.0-35/d07f49c3 on two nodes connected using a cross cable on gigabit nics.&lt;br /&gt;
host1 ip: 10.0.10.201&lt;br /&gt;
host2 ip: 10.0.10.202&lt;br /&gt;
&lt;br /&gt;
Check if drbd module is available&lt;br /&gt;
&lt;pre class="code"&gt;modprobe -l | grep drbd
&lt;/pre&gt;Check if drbd module is loaded&lt;br /&gt;
&lt;pre class="code"&gt;lsmod | grep drbd
&lt;/pre&gt;If not, load it with&lt;br /&gt;
&lt;pre class="code"&gt;modprobe -v drbd
&lt;/pre&gt;Check the module version&lt;br /&gt;
&lt;pre class="code"&gt;modinfo drbd | grep version
&lt;/pre&gt;I installed the appropriate drbd8-utils package on both nodes&lt;br /&gt;
&lt;pre class="code"&gt;dpkg -i drbd8-utils_8.3.10-0_amd64.deb
&lt;/pre&gt;I built my own deb from source. You can find my build &lt;a href="https://sites.google.com/site/henyotech/drbd8-utils_8.3.10-0_amd64.deb"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I shrank the data volume on both of &lt;br /&gt;
I made use of the extents I freed up by &lt;a href="http://blog.henyo.com/2012/03/proxmoxve-20-shrinking-data-volume.html"&gt;shrinking the data volume&lt;/a&gt; to create an lvm volume that will be used for drbd. &lt;br /&gt;
&lt;pre class="code"&gt;lvcreate --verbose --extents 50000 --name lv4drbd pve
&lt;/pre&gt;Next I modified /etc/drbd.d/global_common.conf so that it only contains:&lt;br /&gt;
&lt;pre class="code"&gt;global {
    usage-count no;
}
common {
    protocol C;
    syncer {
        rate 30M; 
    }
}
&lt;/pre&gt;Next I created a new resouce file /etc/drbd.d/drbd0.res&lt;br /&gt;
&lt;pre class="code"&gt;resource drbd0 {
    protocol C;
    startup {
        wfc-timeout  0;
        degr-wfc-timeout 60;
        become-primary-on both;
    }
    net {
        cram-hmac-alg sha1;
        shared-secret "drbd0-secret";
        allow-two-primaries;
        after-sb-0pri discard-zero-changes;
        after-sb-1pri discard-secondary;
        after-sb-2pri disconnect;
    }
    on host1 {
        device /dev/drbd0;
        disk /dev/pve/lv4drbd;
        address 10.0.10.201:7780;
        meta-disk internal;
    }
    on host2 {
        device /dev/drbd0;
        disk /dev/pve/lv4drbd;
        address 10.0.10.202:7780;
        meta-disk internal;
    }
}
&lt;/pre&gt;I added the IP address of the other host into each of the /etc/hosts files.&lt;br /&gt;
&lt;br /&gt;
Next I started drbd on both nodes with&lt;br /&gt;
&lt;pre class="code"&gt;/etc/init.d/drbd start
&lt;/pre&gt;I then initialized drbd metatdata on both nodes with&lt;br /&gt;
&lt;pre class="code"&gt;drbdadm create-md drbd0
&lt;/pre&gt;Next I brought up the device on both nodes with&lt;br /&gt;
&lt;pre class="code"&gt;drbdadm up drbd0
&lt;/pre&gt;I checked the status on both nodes with&lt;br /&gt;
&lt;pre class="code"&gt;drbd-overview
&lt;/pre&gt;Next I started synchronization(should be instantaneous) from one node with&lt;br /&gt;
&lt;pre class="code"&gt;drbdadm -- --clear-bitmap new-current-uuid drbd0
&lt;/pre&gt;Lastly, I restarted the drbd service on both nodes to enable Primary/Primary operation&lt;br /&gt;
&lt;pre class="code"&gt;/etc/init.d/drbd stop
/etc/init.d/drbd start
&lt;/pre&gt;&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-6147164348671522484?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-28T14:43:48.308+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>ProxmoxVE 2.0: Shrinking the data volume</title><link>http://blog.henyo.com/2012/03/proxmoxve-20-shrinking-data-volume.html</link><category>System Administration</category><category>ProxmoxVE</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Tue, 27 Mar 2012 21:00:28 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-2202410991099581747</guid><description>After installing ProxmoxVE 2.0rc1, a data volume was created which makes use of most of the space on the drive.&lt;br /&gt;
&lt;br /&gt;
I wanted to carve out a separate volume for some other use so I needed to shrink this data volume:&lt;br /&gt;
&lt;br /&gt;
First, I unmounted the logical volume with:&lt;br /&gt;
&lt;pre class="code"&gt;umount /var/lib/vz
&lt;/pre&gt;Then I proceeded to shrink the file system to the minimum size possible with:&lt;br /&gt;
&lt;pre class="code"&gt;resize2fs -Mf /dev/pve/data
&lt;/pre&gt;Then I proceeded to reduce the size of the logical volume with:&lt;br /&gt;
&lt;pre class="code"&gt;lvreduce --verbose --extents -100000 /dev/pve/data
&lt;/pre&gt;Then I proceeded to grow the file system back to occupy the now reduced volume with:&lt;br /&gt;
&lt;pre class="code"&gt;resize2fs -f /dev/pve/data
&lt;/pre&gt;Lastly, I remounted the file system with:&lt;br /&gt;
&lt;pre class="code"&gt;mount /dev/pve/data /var/lib/vz
&lt;/pre&gt;&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-2202410991099581747?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-28T12:00:28.152+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>FizzBuzz in Javascript</title><link>http://blog.henyo.com/2012/03/fizzbuzz-in-javascript.html</link><category>Software Development</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Mon, 26 Mar 2012 05:07:17 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-9044863488455345289</guid><description>Joel and company probably won't hire me since he only gets rockstar developers but here is my attempt at FizzBuzz&lt;br /&gt;
&lt;pre class="code"&gt;&amp;lt;script&gt;
    for(var i=1;i&lt;=100;i++){
        if(i%3 != 0  &amp;&amp; i%5 != 0)
            document.write(i);
        if(i%3 == 0)
            document.write('Fizz');            
        if(i%5 == 0)
            document.write('Buzz');                    
        document.write(' ');
    } //end for loop
&amp;lt;/script&gt;
&lt;/pre&gt;I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-9044863488455345289?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-26T20:07:17.945+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>dailyLooper bash script</title><link>http://blog.henyo.com/2012/03/dailylooper-bash-script.html</link><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Fri, 23 Mar 2012 06:38:13 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-2325199423504804689</guid><description>&lt;br /&gt;
We needed to regenerate some data for the data warehouse so I had to run an extraction script once for each day of the month.&lt;br /&gt;
&lt;br /&gt;
I wrote a simple bash script to make it easier to run a command or other scripts once for every day of a target month and year.&lt;br /&gt;
&lt;br /&gt;
Code can be found below but may also be downloaded from &lt;a href="https://sites.google.com/site/henyotech/dailyLooper.sh"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;#!/bin/bash
usage(){
    echo "Usage: dailyLooper &amp;lt;year&gt; &amp;lt;month&gt; &amp;lt;script to run&gt;"
    echo "Each date in the given month will be passed into the script in yyyy-mm-dd format"
}


CURRENT_MONTH=$(date +%m)
TARGET_YEAR=$1
TARGET_MONTH=$2

if [ "$#" -lt 3 ]; then
    usage
    exit 1
fi

if [ "$3" = "" ]; then
    SCRIPT="echo"
else
    SCRIPT=$3    
fi

#returns the date yesterday if target month is the current month
#otherwise returns the last date for the target month
lastDayOfMonth(){
    local _year=$1
    local _month=$2   
    if [ $_month -lt $CURRENT_MONTH ]; then
        echo $(date -d "${TARGET_YEAR}-${TARGET_MONTH}-01 + 1 month - 1 day" +%d)
    else
        echo $(date -d "yesterday" +%d)
    fi    
}


main(){
    local _lastDay=$(lastDayOfMonth $TARGET_YEAR $TARGET_MONTH)
    i=1
    while [ "$i" -le $_lastDay ]
    do
        local _date=$(date -d "${TARGET_YEAR}-${TARGET_MONTH}-${i}" +%Y-%m-%d)
        $SCRIPT $_date
        ((i++))
    done #end day of month loop
}

main
&lt;/pre&gt;&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-2325199423504804689?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-23T21:38:13.644+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Cheap and Safe File Storage on Linux</title><link>http://blog.henyo.com/2012/03/cheap-and-safe-file-storage-on-linux.html</link><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Tue, 20 Mar 2012 05:26:02 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-723208128123987260</guid><description>&lt;br /&gt;
I needed to setup a Samba file server using off the shelf desktop components. &lt;br /&gt;
It will be used in a small office with 5-10 clients. &lt;br /&gt;
&lt;br /&gt;
Here are the relevant hardware specs:&lt;br /&gt;
Processor: i7&lt;br /&gt;
Memory: 16GB&lt;br /&gt;
Drives: 4 x 1TB sata drives&lt;br /&gt;
OS Installed: Ubuntu Sever 10.04LTS&lt;br /&gt;
&lt;br /&gt;
The primary requirement is for the files to be fairly safe i.e. if the server crashes in the middle of saving a file then on restart, the file should return to the consistent state before the save operation. Performance is secondary to safety.&lt;br /&gt;
&lt;br /&gt;
My initial plan was to use one drive for the OS and configure 3 drives in an mdraid level 5. After some research, I came across several references that state that mdraid level 10 works on odd numbered drives. It will work on 3 drives and even on 2. This looked like something I should try. I then had to decide what filesystem to use. I initially wanted to use xfs as I've heard and read a lot of good things about it. &lt;br /&gt;
&lt;br /&gt;
After studying how to setup both mdraid and xfs, I started a thread on the linux-raid mailing list asking for best practice guidelines and &lt;a href="http://www.spinics.net/lists/raid/msg37884.html"&gt;guidance on using xfs with mdraid 10n2&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Several days of additional research guided by the comments on the mailing list thread resulted in a lot of learnings for me:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;raid10n2 really works on 3 drives, I had my doubts at first but now I finally get how it can work with just three drives&lt;/li&gt;
&lt;li&gt;drive sector size can be either 512b or 4k which can lead to mis-aligned partitions and have a negative impact on performance&lt;/li&gt;
&lt;li&gt;ext4 provides the option: data=journal which makes it safer than xfs at the cost of some performance&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
The table below shows the average of the benchmark results I got. Yes, I know bonnie++ only tests sequential write/rewrite/read and some file operations and is not necessarily representative of the workload but IMHO, it is better than nothing. This was how things were setup for the benchmark:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;a 50GB primary partition was created on each device located 1GB from the start of the disk for partition alignment&lt;/li&gt;
&lt;li&gt;the md raid device is created on top of the primary partition created on each device&lt;/li&gt;
&lt;li&gt;the chunk was set to 64k&lt;/li&gt;
&lt;li&gt;the results below are for raid5 and raid10n2 only but I also tried raid10f2 and raid10n2&lt;/li&gt;
&lt;li&gt;raid 10f2 had better read performance but slower write compared to raid 10n2&lt;/li&gt;
&lt;li&gt;raid 10o2 performed quite closely to raid 10n2&lt;/li&gt;
&lt;li&gt;the benchmark was run three times and the average was taken&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;table style="text-align: left; margin-left: auto; margin-right: auto;"
border="1" cellpadding="3" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td colspan="2" class="header"&gt;&lt;b&gt;Bonnie 1.96&lt;/b&gt;&lt;/td&gt; &lt;td colspan="4" class="header"&gt;&lt;b&gt;Sequential Output&lt;/b&gt;&lt;/td&gt; &lt;td colspan="2" class="header"&gt;&lt;b&gt;Sequential Input&lt;/b&gt;&lt;/td&gt; &lt;td colspan="2" rowspan="2" class="header"&gt;&lt;b&gt;Random&lt;br /&gt;
&lt;br /&gt;
Seeks&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;64k chunk&lt;/td&gt; &lt;td&gt;Size&lt;/td&gt; &lt;td colspan="2"&gt;Block&lt;/td&gt; &lt;td colspan="2"&gt;Rewrite&lt;/td&gt; &lt;td colspan="2"&gt;Block&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td colspan="2"&gt;ext4/mdraid&lt;br /&gt;
&lt;/td&gt; &lt;td class="ksec"&gt;&lt;font size="-2"&gt;K/sec&lt;/font&gt;&lt;/td&gt; &lt;td class="ksec"&gt;&lt;font size="-2"&gt;% CPU&lt;/font&gt;&lt;/td&gt; &lt;td class="ksec"&gt;&lt;font size="-2"&gt;K/sec&lt;/font&gt;&lt;/td&gt; &lt;td class="ksec"&gt;&lt;font size="-2"&gt;% CPU&lt;/font&gt;&lt;/td&gt; &lt;td class="ksec"&gt;&lt;font size="-2"&gt;K/sec&lt;/font&gt;&lt;/td&gt; &lt;td class="ksec"&gt;&lt;font size="-2"&gt;% CPU&lt;/font&gt;&lt;/td&gt; &lt;td class="ksec"&gt;&lt;font size="-2"&gt;/sec&lt;/font&gt;&lt;/td&gt; &lt;td class="ksec"&gt;&lt;font size="-2"&gt;% CPU&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td class="rowheader" bgcolor="#ffffff"&gt;raid5&lt;br /&gt;
data=ordered&lt;/td&gt; &lt;td class="size" bgcolor="#ffffff"&gt;32G&lt;/td&gt; &lt;td bgcolor="#00ff00"&gt;144430&lt;/td&gt; &lt;td bgcolor="#24db00"&gt;11&lt;/td&gt; &lt;td bgcolor="#07f800"&gt;68725&lt;/td&gt; &lt;td bgcolor="#28d700"&gt;9.67&lt;/td&gt; &lt;td bgcolor="#807f00"&gt;249364&lt;/td&gt; &lt;td bgcolor="#7c8300"&gt;21&lt;/td&gt; &lt;td bgcolor="#cc3300"&gt;280.33&lt;/td&gt; &lt;td bgcolor="#ce3100"&gt;9.33&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td class="rowheader" bgcolor="#ffffff"&gt;raid5&lt;br /&gt;
data=journal&lt;/td&gt; &lt;td class="size" bgcolor="#ffffff"&gt;32G&lt;/td&gt; &lt;td bgcolor="#ff0000"&gt;25077&lt;/td&gt; &lt;td bgcolor="#ff0000"&gt;4.67&lt;/td&gt; &lt;td bgcolor="#ff0000"&gt;21605&lt;/td&gt; &lt;td bgcolor="#e51a00"&gt;5&lt;/td&gt; &lt;td bgcolor="#649b00"&gt;267283&lt;/td&gt; &lt;td bgcolor="#798600"&gt;22.33&lt;/td&gt; &lt;td bgcolor="#be4100"&gt;293.67&lt;/td&gt; &lt;td bgcolor="#1ce300"&gt;6&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td class="rowheader" bgcolor="#ffffff"&gt;raid10n2&lt;br /&gt;
data=ordered&lt;/td&gt; &lt;td class="size" bgcolor="#ffffff"&gt;32G&lt;/td&gt; &lt;td bgcolor="#10ef00"&gt;137365&lt;/td&gt; &lt;td bgcolor="#00ff00"&gt;8&lt;/td&gt; &lt;td bgcolor="#00ff00"&gt;69940&lt;/td&gt; &lt;td bgcolor="#0ef100"&gt;9&lt;/td&gt; &lt;td bgcolor="#bd4200"&gt;209180&lt;/td&gt; &lt;td bgcolor="#59a600"&gt;16&lt;/td&gt; &lt;td bgcolor="#708f00"&gt;365.03&lt;/td&gt; &lt;td bgcolor="#bc4300"&gt;11.67&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td class="rowheader" bgcolor="#ffffff"&gt;raid10n2&lt;br /&gt;
data=journal&lt;/td&gt; &lt;td class="size" bgcolor="#ffffff"&gt;32G&lt;/td&gt; &lt;td bgcolor="#bd4200"&gt;56249&lt;/td&gt; &lt;td bgcolor="#619e00"&gt;6&lt;/td&gt; &lt;td bgcolor="#ac5300"&gt;37491&lt;/td&gt; &lt;td bgcolor="#50af00"&gt;6&lt;/td&gt; &lt;td bgcolor="#c13e00"&gt;206548&lt;/td&gt; &lt;td bgcolor="#5ea100"&gt;16&lt;/td&gt; &lt;td bgcolor="#56a900"&gt;389.00&lt;/td&gt; &lt;td bgcolor="#1ee100"&gt;8&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
For those interested, you can find/get the script I used &lt;a href="https://sites.google.com/site/henyotech/raid-tester.sh"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I modified this &lt;a href="http://louwrentius.com/files/raid-tester.sh"&gt;script&lt;/a&gt; to run my tests.&lt;br /&gt;
&lt;br /&gt;
You can find the raw results &lt;a href="https://sites.google.com/site/henyotech/raid-test.log"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
You can also find the debug info &lt;a href="https://sites.google.com/site/henyotech/raid-test-debug.log"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I am considering re-running the tests but this time with iozone instead of bonnie++ so that I can get scores for random read and write.&lt;br /&gt;
&lt;br /&gt;
Next, I plan to do pull-the-plug testing on ext4,data=journal on top of raid10n2 while doing streaming writes of a huge file over samba. I plan to use 2 different video files greater than 3GB. First  I will copy file1 to the samba share and time it. I will then compute a checksum for file1 both locally and on the samba server. The computed checksum should be equal. Next, I will compute a checksum for file2 locally. It should be different from the value computed for file1. I will then move file1 to another directory and rename file2 to the the same name as file1. I will then attempt to copy the new file1 to the samba server. Halfway into the copy, I will pull the plug of the samba server. Next I will restart the samba server and recompute the checksum of file1. It should still be equal to the computed copy before.&lt;br /&gt;
&lt;br /&gt;
If the system behaves as expected, I will go with ext4,data=journal on top of raid10n2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-723208128123987260?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-20T20:26:02.738+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><enclosure url="http://louwrentius.com/files/raid-tester.sh" length="1399" type="application/x-sh" /><media:content url="http://louwrentius.com/files/raid-tester.sh" fileSize="1399" type="application/x-sh" /><itunes:explicit>no</itunes:explicit><itunes:subtitle> I needed to setup a Samba file server using off the shelf desktop components. It will be used in a small office with 5-10 clients. Here are the relevant hardware specs: Processor: i7 Memory: 16GB Drives: 4 x 1TB sata drives OS Installed: Ubuntu Sever 10.</itunes:subtitle><itunes:author>noreply@blogger.com (Jessie Evangelista)</itunes:author><itunes:summary> I needed to setup a Samba file server using off the shelf desktop components. It will be used in a small office with 5-10 clients. Here are the relevant hardware specs: Processor: i7 Memory: 16GB Drives: 4 x 1TB sata drives OS Installed: Ubuntu Sever 10.04LTS The primary requirement is for the files to be fairly safe i.e. if the server crashes in the middle of saving a file then on restart, the file should return to the consistent state before the save operation. Performance is secondary to safety. My initial plan was to use one drive for the OS and configure 3 drives in an mdraid level 5. After some research, I came across several references that state that mdraid level 10 works on odd numbered drives. It will work on 3 drives and even on 2. This looked like something I should try. I then had to decide what filesystem to use. I initially wanted to use xfs as I've heard and read a lot of good things about it. After studying how to setup both mdraid and xfs, I started a thread on the linux-raid mailing list asking for best practice guidelines and guidance on using xfs with mdraid 10n2. Several days of additional research guided by the comments on the mailing list thread resulted in a lot of learnings for me: raid10n2 really works on 3 drives, I had my doubts at first but now I finally get how it can work with just three drives drive sector size can be either 512b or 4k which can lead to mis-aligned partitions and have a negative impact on performance ext4 provides the option: data=journal which makes it safer than xfs at the cost of some performance The table below shows the average of the benchmark results I got. Yes, I know bonnie++ only tests sequential write/rewrite/read and some file operations and is not necessarily representative of the workload but IMHO, it is better than nothing. This was how things were setup for the benchmark: a 50GB primary partition was created on each device located 1GB from the start of the disk for partition alignment the md raid device is created on top of the primary partition created on each device the chunk was set to 64k the results below are for raid5 and raid10n2 only but I also tried raid10f2 and raid10n2 raid 10f2 had better read performance but slower write compared to raid 10n2 raid 10o2 performed quite closely to raid 10n2 the benchmark was run three times and the average was taken Bonnie 1.96 Sequential Output Sequential Input Random Seeks 64k chunk Size Block Rewrite Block ext4/mdraid K/sec % CPU K/sec % CPU K/sec % CPU /sec % CPU raid5 data=ordered 32G 144430 11 68725 9.67 249364 21 280.33 9.33 raid5 data=journal 32G 25077 4.67 21605 5 267283 22.33 293.67 6 raid10n2 data=ordered 32G 137365 8 69940 9 209180 16 365.03 11.67 raid10n2 data=journal 32G 56249 6 37491 6 206548 16 389.00 8 For those interested, you can find/get the script I used here. I modified this script to run my tests. You can find the raw results here. You can also find the debug info here. I am considering re-running the tests but this time with iozone instead of bonnie++ so that I can get scores for random read and write. Next, I plan to do pull-the-plug testing on ext4,data=journal on top of raid10n2 while doing streaming writes of a huge file over samba. I plan to use 2 different video files greater than 3GB. First I will copy file1 to the samba share and time it. I will then compute a checksum for file1 both locally and on the samba server. The computed checksum should be equal. Next, I will compute a checksum for file2 locally. It should be different from the value computed for file1. I will then move file1 to another directory and rename file2 to the the same name as file1. I will then attempt to copy the new file1 to the samba server. Halfway into the copy, I will pull the plug of the samba server. Next I will restart the samba server and recompute the checksum of file1. It should still be equal to the computed copy before. If the system behaves as expected, I will go with ext4,data=journal on top of raid10</itunes:summary><itunes:keywords>System Administration, Ubuntu</itunes:keywords></item><item><title>Check disk write-caching</title><link>http://blog.henyo.com/2012/03/check-disk-write-caching.html</link><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Wed, 14 Mar 2012 06:10:14 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-6818844858065871276</guid><description>&lt;br /&gt;
I'm investigating the performance of file systems and found myself needing to check if write-caching was enabled for my disk.&lt;br /&gt;
&lt;pre class="code"&gt;hdparm -W /dev/sda
&lt;/pre&gt;To turn off write-caching, do&lt;br /&gt;
&lt;pre class="code"&gt;hdparm -W0 /dev/sda
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-6818844858065871276?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-14T21:10:14.688+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Globe UnliAllTxt with PlaySMS</title><link>http://blog.henyo.com/2012/03/globe-unlialltxt-with-playsms.html</link><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Mon, 12 Mar 2012 01:15:22 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-1829427677039445706</guid><description>We are using PlaySMS on top of SMS Server Tools 3(http://smstools3.kekekasvi.com/index.php?p=) for our SMS gateway. &lt;br /&gt;
&lt;br /&gt;
We wanted to take advantage of the Unlimited All Text Promo of Globe. I couldn't get the USB modem to register for the promo. &lt;br /&gt;
&lt;br /&gt;
Registering thru a phone with the same SIM works. After reading the documentation of SMS Server Tools, I finally got it to work.&lt;br /&gt;
&lt;br /&gt;
First I had to set the correct SMSC for the modem.&lt;br /&gt;
&lt;pre class="code"&gt;smsc = 639170000130
&lt;/pre&gt;Next, I had to manually craft an SMS file that will be sent to the shorcode:8888.&lt;br /&gt;
&lt;pre class="code"&gt;To: s8888
Modem: GLOBE

UALLPLUS25
&lt;/pre&gt;I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-1829427677039445706?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-12T16:15:22.919+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>ProxmoxVE 2.0rc1 Notes:Setup</title><link>http://blog.henyo.com/2012/03/proxmoxve-20rc1-notessetup.html</link><category>System Administration</category><category>ProxmoxVE</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Wed, 07 Mar 2012 06:19:22 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-5226657062753480835</guid><description>This is Part#1 of a series of posts on my experience with Proxmox 2.0rc1.&lt;br /&gt;
&lt;br /&gt;
I was tasked to look for a suitable solution to build an internal cloud/virtualization infrastructure and I've decided to spend some time with &lt;a href="http://www.proxmox.com/"&gt;ProxmoxVE&lt;/a&gt; 2.0rc1.&lt;br /&gt;
&lt;br /&gt;
The list below is the hardware available to me:&lt;br /&gt;
2 desktop computers&lt;br /&gt;
Intel i3-530&lt;br /&gt;
4GB DDR3&lt;br /&gt;
1TB Hard drive&lt;br /&gt;
&lt;br /&gt;
Things I want to try:&lt;br /&gt;
- benchmark disk/file IO performance of host system&lt;br /&gt;
- benchmark dis/file IO performance of guest system&lt;br /&gt;
- openvz live migration&lt;br /&gt;
- kvm live migration&lt;br /&gt;
- HA storage for the VM using DRBD&lt;br /&gt;
- ProxmoxVE HA i.e. guest starting on secondary node when primary node goes down&lt;br /&gt;
- openvz ubuntu server 10.04LTS guest running tomcat6 on sun-java6-jdk&lt;br /&gt;
- kvm ubuntu server 10.04LTS guest running tomcat6 on sun-java6-jdk&lt;br /&gt;
&lt;br /&gt;
Installing ProxmoxVE 2.0rc1 on the hardware was fairly straight forward.&lt;br /&gt;
The installer took over the whole 1TB drive and partitioned it on its own.&lt;br /&gt;
&lt;br /&gt;
running &lt;b&gt;&lt;i&gt;fdisk -l /dev/sda &amp;&amp; df -Th&lt;/i&gt;&lt;/b&gt; revealed:&lt;br /&gt;
- /dev/sda1 is 495MB ext3 mounted on /boot&lt;br /&gt;
- dev/sda2 is 999.5GB LVM&lt;br /&gt;
&lt;br /&gt;
running &lt;b&gt;&lt;i&gt;pvscan &amp;&amp; vgscan&lt;/i&gt;&lt;/b&gt; revealed:&lt;br /&gt;
- /dev/sda2 was configured as an lvm2 physcial volume&lt;br /&gt;
- a volume group named pve was created by proxmox&lt;br /&gt;
&lt;br /&gt;
running &lt;b&gt;&lt;i&gt;lvscan &amp;&amp; mount&lt;/i&gt;&lt;/b&gt; revealed:&lt;br /&gt;
- a 4GB /dev/pve/swap volume was created for swap&lt;br /&gt;
- a 96GB /dev/pve/root ext3 volume mounted as the root file system&lt;br /&gt;
- a 899GB /dev/pve/data ext3 volume mounted on /var/lib/vz&lt;br /&gt;
&lt;br /&gt;
Next I updated ProxmoxVE 2.0rc1 which is Debian based.&lt;br /&gt;
The host is behind a proxy server so to update I ran:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;export http_proxy=http://10.0.0.1:3128&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;apt-get update &amp;&amp; apt-get -y upgrade&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I proceeded to install some useful tools:&lt;br /&gt;
&lt;b&gt;&lt;i&gt;apt-get install screen dstat&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Next, I configured NTP to sync to a time server on the local network&lt;br /&gt;
&lt;br /&gt;
Next I downloaded an openvz template for ubuntu 10.04LTS and proceeded to create and run a guest.&lt;br /&gt;
&lt;br /&gt;
I ran across an annoying bug while accessing the guest using the console. Tab completion was not working which made it difficult to work on the web console. I found a work around and made a separate post for the &lt;a href="http://blog.henyo.com/2012/03/proxmoxve-20rc1-web-console-tab-fix.html"&gt;web console tab fix&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Stay tuned for my next post in this series: Setting up DRBD backed storage even with just one hard disk&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-5226657062753480835?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-07T22:19:22.607+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>ProxmoxVE 2.0rc1 web console tab fix</title><link>http://blog.henyo.com/2012/03/proxmoxve-20rc1-web-console-tab-fix.html</link><category>System Administration</category><category>ProxmoxVE</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Wed, 07 Mar 2012 06:14:48 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-7620476176597966204</guid><description>&lt;br /&gt;
I ran across an annoying bug while accessing the guest using the console. Tab completion was not working which made it difficult to work on the web console. I found a work around which modifies /usr/share/pve-manager/ext4/pvemanagerlib.js with:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt; cp /usr/share/pve-manager/ext4/pvemanagerlib.js /root/pvemanagerlib.js.bak&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;cat /usr/share/pve-manager/ext4/pvemanagerlib.js | \&lt;br /&gt;
sed "s/'Show Controls', value: 'No'/'Show Controls', value: 'Yes'/" \&lt;br /&gt;
&gt; /usr/share/pve-manager/ext4/pvemanagerlib.js&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-7620476176597966204?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-07T22:14:48.037+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Mount a Proxmox KVM raw image in an LVM over DRBD</title><link>http://blog.henyo.com/2012/03/mount-proxmox-kvm-raw-image-in-lvm-over.html</link><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Wed, 07 Mar 2012 02:45:33 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-451221915235683991</guid><description>Hardware:&lt;br /&gt;
2 desktop computers&lt;br /&gt;
Intel i3-530&lt;br /&gt;
4GB DDR3&lt;br /&gt;
1TB Hard drive&lt;br /&gt;
&lt;br /&gt;
Setup:&lt;br /&gt;
- 2 node cluster of ProxmoxVE 2.0-35/d07f49c3(rc1)&lt;br /&gt;
- LVM volume group named drbd_storage created on top of a drbd block device&lt;br /&gt;
- Installed Ubuntu Server 10.04LTS in a kvm container named ubuntu-kvm-template&lt;br /&gt;
- proxmox created a logical volume in drbd_storage named vm-108-disk-1&lt;br /&gt;
&lt;br /&gt;
I want to mount the disk so that I can check something out. Apparently it is not that simple.&lt;br /&gt;
&lt;br /&gt;
I eventually figured it out thru trial and error of suggestions across serveral sources.&lt;br /&gt;
&lt;br /&gt;
losetup /dev/loop0 /dev/drbd_storage/vm-108-disk-1&lt;br /&gt;
fdisk -l /dev/loop0&lt;br /&gt;
apt-get install kpartx&lt;br /&gt;
kpartx -av /dev/loop0&lt;br /&gt;
pvscan&lt;br /&gt;
vgscan&lt;br /&gt;
lvscan&lt;br /&gt;
vgchange -ay&lt;br /&gt;
lvscan&lt;br /&gt;
mkdir -p /tmp/108&lt;br /&gt;
mount /dev/ubuntu-kvm-template/root /tmp/108&lt;br /&gt;
umount /mnt/108&lt;br /&gt;
lvchange -an /dev/ubuntu-kvm-template/*&lt;br /&gt;
kpartx -dv /dev/loop0&lt;br /&gt;
losetup -d /dev/loop0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-451221915235683991?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-07T18:45:33.660+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Finding the largest sized directory</title><link>http://blog.henyo.com/2011/12/finding-largest-sized-directory.html</link><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Fri, 16 Dec 2011 01:00:07 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-5070644176260913961</guid><description>&lt;br /&gt;
One of our servers keeps running out of disk space. To address this, we needed to find out which folders had the largest size.&lt;br /&gt;
&lt;br /&gt;
On ubuntu server 10.04LTS, this is how we found the directories with the greatest size:&lt;br /&gt;
&lt;br /&gt;
du -m /var/log | sort -n -r | head -n 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-5070644176260913961?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-16T17:00:07.394+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Creating a Latin1 PostgreSQL database in Ubuntu 10.04LTS</title><link>http://blog.henyo.com/2011/12/creating-latin1-postgresql-database-in.html</link><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Tue, 13 Dec 2011 22:27:30 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-2065352244149416471</guid><description>I've encountered this problem several times already and I've finally stumbled upon a solution.
&lt;h5&gt;The Problem:&lt;/h5&gt;
We were tasked to move a postgresql database from an centos based server to a new ubuntu based server. The database was in latin1 encoding.&lt;br /&gt;
&lt;br /&gt;
On the new ubuntu based server, creating a database with latin1 encoding results in an error.&lt;br /&gt;
Command: &lt;b&gt;createdb -E LATIN1 --template template0 trial&lt;/b&gt;&lt;br /&gt;
Result:&lt;br /&gt;
createdb: database creation failed: ERROR: &amp;nbsp;encoding LATIN1 does not match locale en_PH.utf8&lt;br /&gt;
DETAIL: The chosen LC_CTYPE setting requires encoding UTF8
&lt;h5&gt;The Fix:&lt;/h5&gt;
First we needed to modify /var/lib/locales/supported.d/local and add the line:&lt;br /&gt;
en_PH.ISO-8859-1 ISO-8859-1&lt;br /&gt;
&lt;br /&gt;
Next we had to regenerate the locale files with:&lt;br /&gt;
sudo dpkg-reconfigure locales
&lt;br /&gt;
&lt;br /&gt;
Afterwards we were able to create a latin1 database with:&lt;br /&gt;
createdb -E LATIN1 --template template0 --locale en_PH.ISO-8859-1 trial
&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-2065352244149416471?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-14T14:27:30.476+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Changing hostname on Ubuntu Server 10.04LTS</title><link>http://blog.henyo.com/2011/11/changing-hostname-on-ubuntu-server.html</link><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Thu, 17 Nov 2011 01:05:58 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-5988363366877262757</guid><description>I found out the hard way that it's changing the name of an Ubuntu Server 10.04LTS was not as straight forward as I initially thought.

To save you and me the trouble and for future reference, I document how I did it here.
&lt;pre class="code"&gt;
hostname NEW_NAME
echo NEW_NAME &gt; /etc/hostname
cat /etc/hosts | sed s/OLD_NAME/NEW_NAME/g &gt; /etc/hosts.new
mv /etc/hosts /etc/hosts.old
mv /etc/hosts.new /etc/hosts
&lt;/pre&gt;

I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-5988363366877262757?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-17T17:05:58.984+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Monitoring Tomcat6 with VisualVM on Ubuntu</title><link>http://blog.henyo.com/2011/11/monitoring-tomcat6-with-visualvm-on.html</link><category>Software Development</category><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Wed, 02 Nov 2011 04:36:51 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-7826698449754026236</guid><description>One of our applications running on Tomcat6 was encountering an issue which was drastically affecting the delivery of services to our clients. To diagnose this, we needed to monitor the state of the virtual machine running Tomcat6. This is what I had to do:&lt;br /&gt;
&lt;br /&gt;
Assumptions:&lt;br /&gt;
- tomcat6 installed on an ubuntu server instance&lt;br /&gt;
- firewall on the server instance is enabled&lt;br /&gt;
- server has non public ip address: 10.0.0.1&lt;br /&gt;
- client machine installed with java6 which includes visualvm&lt;br /&gt;
&lt;br /&gt;
1) download &lt;a href="http://apache.opensourceresources.org/tomcat/tomcat-6/v6.0.33/bin/extras/"&gt;catalina-jmx-remote.jar&lt;/a&gt; and copy it into the tomcat6 lib folder. At the time of this writing, I found it here: http://apache.opensourceresources.org/tomcat/tomcat-6/v6.0.33/bin/extras/&lt;br /&gt;
&lt;br /&gt;
2) modify /etc/defaults/tomcat6, add the following line to JAVA_OPTS&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=10.0.0.1&lt;/pre&gt;&lt;br /&gt;
3) modify /etc/tomcat6/server.xml, add the following line inside the server block near the other listeners:&lt;br /&gt;
&lt;pre class="code"&gt;&amp;lt;Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener"
rmiRegistryPortPlatform="8086" rmiServerPortPlatform="8086" /&gt;&lt;/pre&gt;&lt;br /&gt;
4) enable access to port 8086&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;ufw allow 8086&lt;/pre&gt;&lt;br /&gt;
5) restart tomcat6&lt;br /&gt;
&lt;pre class="code"&gt;service tomcat6 restart&lt;/pre&gt;&lt;br /&gt;
6) start visualvm on the client machine and add a jmx connection: 10.0.0.1:8086&lt;br /&gt;
&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-7826698449754026236?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-02T19:36:51.320+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Installing Oracle 10g XE on Ubuntu 10.10</title><link>http://blog.henyo.com/2011/09/installing-oracle-10g-xe-on-ubuntu-1010.html</link><category>System Administration</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Sun, 18 Sep 2011 06:46:36 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-583478268188740915</guid><description>Found myself needing to install oracle 10g xe on Ubuntu 10.10.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;add-apt-repository "deb http://oss.oracle.com/debian unstable main non-free"
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add -
apt-get install oracle-xe-universal
/etc/init.d/oracle-xe configure
/etc/init.d/oracle-xe enable
&lt;/pre&gt;&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-583478268188740915?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-18T21:46:36.645+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Creating a DVD Video Disc</title><link>http://blog.henyo.com/2011/07/creating-dvd-video-disc.html</link><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Thu, 14 Jul 2011 07:55:53 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-2044159755257571009</guid><description>I was asked to create a dvd out of 5 flash video files from youtube.&lt;br /&gt;
Also had to add 8 seconds of chapter title video using a png image for each chapter&lt;br /&gt;
&lt;br /&gt;
Used devede on ubuntu.&lt;br /&gt;
&lt;br /&gt;
create frames.txt:&lt;br /&gt;
&lt;pre class="code"&gt;for i in `seq 1 5`; do echo title.png; done &gt; frames.txt
&lt;/pre&gt;&lt;br /&gt;
used mencoder:&lt;br /&gt;
&lt;pre class="code"&gt;mencoder mf://@frames.txt -mf w=800:h=600:fps=1:type=png -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi
&lt;/pre&gt;&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-2044159755257571009?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-14T22:55:53.448+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Setting up Apache2 and Tomcat6 on Ubuntu 10.04</title><link>http://blog.henyo.com/2011/04/setting-up-apache2-and-tomcat6-on.html</link><category>System Administration</category><category>Ubuntu</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Wed, 15 Jun 2011 02:18:50 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-249938631069038550</guid><description>This is a short post on setting up Apache2 and Tomcat6&lt;br /&gt;
&lt;br /&gt;
Install Java&lt;br /&gt;
&lt;pre class="code"&gt;apt-get -y install python-software-properties
add-apt-repository "deb http://archive.canonical.com/ lucid partner"
apt-get update
apt-get install -y sun-java6-jdk
&lt;/pre&gt;&lt;br /&gt;
Install tomcat6 with apache2 support&lt;br /&gt;
&lt;pre class="code"&gt;apt-get -y install tomcat6 libtcnative-1 libapache2-mod-jk
&lt;/pre&gt;&lt;br /&gt;
Setup worker.properties with the following values:&lt;br /&gt;
workers.tomcat_home=/usr/share/tomcat6&lt;br /&gt;
workers.java_home=/usr/lib/jvm/java-6-sun&lt;br /&gt;
&lt;pre class="code"&gt;nano /etc/libapache2-mod-jk/workers.properties
&lt;/pre&gt;&lt;br /&gt;
Modify /etc/apache2/mods-available/jk.load&lt;br /&gt;
&lt;pre class="code"&gt;cat &gt;&gt;/etc/apache2/mods-available/jk.load &amp;lt;&amp;lt;EOF
JkWorkersFile /etc/libapache2-mod-jk/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel error
EOF
&lt;/pre&gt;&lt;br /&gt;
Setup virtual host&lt;br /&gt;
&lt;pre class="code"&gt;cat &gt;/etc/apache2/sites-available/test.henyo.com &amp;lt;&amp;lt;EOF
NameVirtualHost *
&amp;lt;VirtualHost *&gt;
        ServerName test.henyo.com
        JkMount /* ajp13_worker
&amp;lt;/VirtualHost&gt;
EOF
&lt;/pre&gt;&lt;br /&gt;
Activate the site&lt;br /&gt;
&lt;pre class="code"&gt;a2ensite test.henyo.com
&lt;/pre&gt;&lt;br /&gt;
Setup tomcat for ajp13&lt;br /&gt;
&lt;pre class="code"&gt;nano /etc/tomcat6/server.xml
&lt;/pre&gt;&lt;br /&gt;
Restart tomcat and apache2&lt;br /&gt;
&lt;pre class="code"&gt;service tomcat6 restart
service apache2 restart
&lt;/pre&gt;&lt;br /&gt;
Install and configure UFW&lt;br /&gt;
&lt;pre class="code"&gt;apt-get install ufw
ufw allow ssh
ufw allow http
ufw enable
&lt;/pre&gt;&lt;br /&gt;
Install and configure Tripwire&lt;br /&gt;
&lt;pre class="code"&gt;apt-get install tripwire
&lt;/pre&gt;&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-249938631069038550?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-15T17:18:50.912+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Setting up a Spring Data JPA Project</title><link>http://blog.henyo.com/2011/04/setting-up-spring-data-jpa-project.html</link><category>Software Development</category><author>noreply@blogger.com (Jessie Evangelista)</author><pubDate>Sun, 17 Apr 2011 07:16:03 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-29593944.post-749505374154901094</guid><description>&lt;iframe src="http://rcm.amazon.com/e/cm?t=henyo-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0596517335&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;This post is about setting up a Maven Project based on Spring Data JPA. I spent a few hours today nailing it down. Hopefully it saves someone some time to bring a project up quickly.&lt;br /&gt;
&lt;br /&gt;
- Spring Framework based application&lt;br /&gt;
- makes use of Spring Data JPA for easy Repositories&lt;br /&gt;
- makes use of JPA 2.0 persistence with EcliplseLink&lt;br /&gt;
- JUnit4 and spring-test&lt;br /&gt;
- Logging using SL4J to Log4J&lt;br /&gt;
&lt;br /&gt;
For the impatient, I uploaded a sample project on github: &lt;a href="https://github.com/henyojess/spring-data-jpa-trial"&gt; spring-data-jpa-trial &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can also download the &lt;a href="https://github.com/henyojess/spring-data-jpa-trial/tarball/master"&gt;tar ball&lt;/a&gt; or &lt;a href="https://github.com/henyojess/spring-data-jpa-trial/zipball/master"&gt;zip file&lt;/a&gt; from these links.&lt;br /&gt;
&lt;br /&gt;
I started with a blank Maven Project created with STS 2.5.2.SR1 created using&lt;br /&gt;
the New Maven Project wizard checking the Create a simple project(skip archetype selection). &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="code"&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
&amp;lt;modelVersion&gt;4.0.0&amp;lt;/modelVersion&gt;
&amp;lt;groupId&gt;test&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;test&amp;lt;/artifactId&gt;
&amp;lt;version&gt;0.0.1-SNAPSHOT&amp;lt;/version&gt;
&amp;lt;name&gt;test&amp;lt;/name&gt;
&amp;lt;description&gt;test&amp;lt;/description&gt;
&amp;lt;/project&gt;&lt;/pre&gt;&lt;br /&gt;
Added some entries to the pom file to setup 1.6 &lt;br /&gt;
&lt;pre class="code"&gt;&amp;lt;build&gt;
&amp;lt;plugins&gt;
&amp;lt;plugin&gt;
&amp;lt;groupId&gt;org.apache.maven.plugins&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;maven-compiler-plugin&amp;lt;/artifactId&gt;
&amp;lt;version&gt;2.3.2&amp;lt;/version&gt;
&amp;lt;configuration&gt;
&amp;lt;source&gt;1.6&amp;lt;/source&gt;
&amp;lt;target&gt;1.6&amp;lt;/target&gt;
&amp;lt;/configuration&gt;
&amp;lt;/plugin&gt;
&amp;lt;/plugins&gt;
&amp;lt;/build&gt;&lt;/pre&gt;&lt;br /&gt;
Setup spring-data-jpa dependency&lt;br /&gt;
&lt;pre class="code"&gt;&amp;lt;dependency&gt;
&amp;lt;groupId&gt;org.springframework.data&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;spring-data-jpa&amp;lt;/artifactId&gt;
&amp;lt;version&gt;1.0.0.M2&amp;lt;/version&gt;
&amp;lt;exclusions&gt;
&amp;lt;exclusion&gt;
&amp;lt;groupId&gt;commons-logging&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;commons-logging&amp;lt;/artifactId&gt;
&amp;lt;/exclusion&gt;
&amp;lt;/exclusions&gt;
&amp;lt;/dependency&gt;

&amp;lt;repository&gt;
&amp;lt;id&gt;spring-milestone&amp;lt;/id&gt;
&amp;lt;name&gt;Spring Maven MILESTONE Repository&amp;lt;/name&gt;
&amp;lt;url&gt;http://maven.springframework.org/milestone&amp;lt;/url&gt;
&amp;lt;/repository&gt;&lt;/pre&gt;&lt;br /&gt;
Setup persistence dependecies&lt;br /&gt;
&lt;pre class="code"&gt;&amp;lt;!-- Persistence dependencies --&gt;
&amp;lt;dependency&gt;
&amp;lt;groupId&gt;hsqldb&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;hsqldb&amp;lt;/artifactId&gt;
&amp;lt;version&gt;1.8.0.10&amp;lt;/version&gt;
&amp;lt;/dependency&gt;
&amp;lt;dependency&gt;
&amp;lt;groupId&gt;org.springframework&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;spring-instrument&amp;lt;/artifactId&gt;
&amp;lt;version&gt;${spring.framework.version}&amp;lt;/version&gt;
&amp;lt;scope&gt;runtime&amp;lt;/scope&gt;
&amp;lt;/dependency&gt;
&amp;lt;dependency&gt;
&amp;lt;groupId&gt;org.eclipse.persistence&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;eclipselink&amp;lt;/artifactId&gt;
&amp;lt;version&gt;2.2.0&amp;lt;/version&gt;
&amp;lt;scope&gt;runtime&amp;lt;/scope&gt;
&amp;lt;/dependency&gt;
&amp;lt;repository&gt;
&amp;lt;id&gt;EclipseLink Repo&amp;lt;/id&gt;
&amp;lt;url&gt;http://download.eclipse.org/rt/eclipselink/maven.repo&amp;lt;/url&gt;
&amp;lt;/repository&gt;&lt;/pre&gt;&lt;br /&gt;
Setup logging dependencies as discussed in the Spring Framework Reference Docs&lt;br /&gt;
&lt;pre class="code"&gt;&amp;lt;dependency&gt;
&amp;lt;groupId&gt;org.slf4j&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;jcl-over-slf4j&amp;lt;/artifactId&gt;
&amp;lt;version&gt;${sl4j.version}&amp;lt;/version&gt;
&amp;lt;scope&gt;runtime&amp;lt;/scope&gt;
&amp;lt;/dependency&gt;
&amp;lt;dependency&gt;
&amp;lt;groupId&gt;org.slf4j&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;slf4j-api&amp;lt;/artifactId&gt;
&amp;lt;version&gt;${sl4j.version}&amp;lt;/version&gt;
&amp;lt;scope&gt;runtime&amp;lt;/scope&gt;
&amp;lt;/dependency&gt;
&amp;lt;dependency&gt;
&amp;lt;groupId&gt;org.slf4j&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;slf4j-log4j12&amp;lt;/artifactId&gt;
&amp;lt;version&gt;${sl4j.version}&amp;lt;/version&gt;
&amp;lt;scope&gt;runtime&amp;lt;/scope&gt;
&amp;lt;/dependency&gt;
&amp;lt;dependency&gt;
&amp;lt;groupId&gt;log4j&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;log4j&amp;lt;/artifactId&gt;
&amp;lt;version&gt;1.2.16&amp;lt;/version&gt;
&amp;lt;scope&gt;runtime&amp;lt;/scope&gt;
&amp;lt;/dependency&gt;&lt;/pre&gt;&lt;br /&gt;
Setup Testing Dependencies&lt;br /&gt;
&lt;pre class="code"&gt;&amp;lt;dependency&gt;
&amp;lt;groupId&gt;junit&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;junit&amp;lt;/artifactId&gt;
&amp;lt;version&gt;4.8.2&amp;lt;/version&gt;
&amp;lt;scope&gt;test&amp;lt;/scope&gt;
&amp;lt;/dependency&gt;
&amp;lt;dependency&gt;
&amp;lt;groupId&gt;org.springframework&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;spring-test&amp;lt;/artifactId&gt;
&amp;lt;version&gt;${spring.framework.version}&amp;lt;/version&gt;
&amp;lt;scope&gt;test&amp;lt;/scope&gt;
&amp;lt;/dependency&gt;

&amp;lt;plugin&gt;
&amp;lt;groupId&gt;org.apache.maven.plugins&amp;lt;/groupId&gt;
&amp;lt;artifactId&gt;maven-surefire-plugin&amp;lt;/artifactId&gt;
&amp;lt;version&gt;2.8&amp;lt;/version&gt;
&amp;lt;configuration&gt;
&amp;lt;includes&gt;
&amp;lt;include&gt;**/*Tests.java&amp;lt;/include&gt;
&amp;lt;/includes&gt;        
&amp;lt;argLine&gt;-javaagent:spring-instrument-3.0.5.RELEASE.jar&amp;lt;/argLine&gt;
&amp;lt;/configuration&gt;
&amp;lt;/plugin&gt;&lt;/pre&gt;&lt;br /&gt;
I hope you found the post useful. You can &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=HenyoOnline&amp;amp;loc=en_US"&gt;subscribe via email&lt;/a&gt; or &lt;a href="http://feeds.feedburner.com/HenyoOnline"&gt;subscribe via a feed reader&lt;/a&gt; to get relevant updates from this blog. Have a nice day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29593944-749505374154901094?l=blog.henyo.com' alt='' /&gt;&lt;/div&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-17T22:16:03.831+08:00</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><enclosure url="https://github.com/henyojess/spring-data-jpa-trial/tarball/master" length="5714" type="application/octet-stream" /><media:content url="https://github.com/henyojess/spring-data-jpa-trial/tarball/master" fileSize="5714" type="application/octet-stream" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>This post is about setting up a Maven Project based on Spring Data JPA. I spent a few hours today nailing it down. Hopefully it saves someone some time to bring a project up quickly. - Spring Framework based application - makes use of Spring Data JPA for </itunes:subtitle><itunes:author>noreply@blogger.com (Jessie Evangelista)</itunes:author><itunes:summary>This post is about setting up a Maven Project based on Spring Data JPA. I spent a few hours today nailing it down. Hopefully it saves someone some time to bring a project up quickly. - Spring Framework based application - makes use of Spring Data JPA for easy Repositories - makes use of JPA 2.0 persistence with EcliplseLink - JUnit4 and spring-test - Logging using SL4J to Log4J For the impatient, I uploaded a sample project on github: spring-data-jpa-trial You can also download the tar ball or zip file from these links. I started with a blank Maven Project created with STS 2.5.2.SR1 created using the New Maven Project wizard checking the Create a simple project(skip archetype selection). &amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" &amp;lt;modelVersion4.0.0&amp;lt;/modelVersion &amp;lt;groupIdtest&amp;lt;/groupId &amp;lt;artifactIdtest&amp;lt;/artifactId &amp;lt;version0.0.1-SNAPSHOT&amp;lt;/version &amp;lt;nametest&amp;lt;/name &amp;lt;descriptiontest&amp;lt;/description &amp;lt;/project Added some entries to the pom file to setup 1.6 &amp;lt;build &amp;lt;plugins &amp;lt;plugin &amp;lt;groupIdorg.apache.maven.plugins&amp;lt;/groupId &amp;lt;artifactIdmaven-compiler-plugin&amp;lt;/artifactId &amp;lt;version2.3.2&amp;lt;/version &amp;lt;configuration &amp;lt;source1.6&amp;lt;/source &amp;lt;target1.6&amp;lt;/target &amp;lt;/configuration &amp;lt;/plugin &amp;lt;/plugins &amp;lt;/build Setup spring-data-jpa dependency &amp;lt;dependency &amp;lt;groupIdorg.springframework.data&amp;lt;/groupId &amp;lt;artifactIdspring-data-jpa&amp;lt;/artifactId &amp;lt;version1.0.0.M2&amp;lt;/version &amp;lt;exclusions &amp;lt;exclusion &amp;lt;groupIdcommons-logging&amp;lt;/groupId &amp;lt;artifactIdcommons-logging&amp;lt;/artifactId &amp;lt;/exclusion &amp;lt;/exclusions &amp;lt;/dependency &amp;lt;repository &amp;lt;idspring-milestone&amp;lt;/id &amp;lt;nameSpring Maven MILESTONE Repository&amp;lt;/name &amp;lt;urlhttp://maven.springframework.org/milestone&amp;lt;/url &amp;lt;/repository Setup persistence dependecies &amp;lt;!-- Persistence dependencies -- &amp;lt;dependency &amp;lt;groupIdhsqldb&amp;lt;/groupId &amp;lt;artifactIdhsqldb&amp;lt;/artifactId &amp;lt;version1.8.0.10&amp;lt;/version &amp;lt;/dependency &amp;lt;dependency &amp;lt;groupIdorg.springframework&amp;lt;/groupId &amp;lt;artifactIdspring-instrument&amp;lt;/artifactId &amp;lt;version${spring.framework.version}&amp;lt;/version &amp;lt;scoperuntime&amp;lt;/scope &amp;lt;/dependency &amp;lt;dependency &amp;lt;groupIdorg.eclipse.persistence&amp;lt;/groupId &amp;lt;artifactIdeclipselink&amp;lt;/artifactId &amp;lt;version2.2.0&amp;lt;/version &amp;lt;scoperuntime&amp;lt;/scope &amp;lt;/dependency &amp;lt;repository &amp;lt;idEclipseLink Repo&amp;lt;/id &amp;lt;urlhttp://download.eclipse.org/rt/eclipselink/maven.repo&amp;lt;/url &amp;lt;/repository Setup logging dependencies as discussed in the Spring Framework Reference Docs &amp;lt;dependency &amp;lt;groupIdorg.slf4j&amp;lt;/groupId &amp;lt;artifactIdjcl-over-slf4j&amp;lt;/artifactId &amp;lt;version${sl4j.version}&amp;lt;/version &amp;lt;scoperuntime&amp;lt;/scope &amp;lt;/dependency &amp;lt;dependency &amp;lt;groupIdorg.slf4j&amp;lt;/groupId &amp;lt;artifactIdslf4j-api&amp;lt;/artifactId &amp;lt;version${sl4j.version}&amp;lt;/version &amp;lt;scoperuntime&amp;lt;/scope &amp;lt;/dependency &amp;lt;dependency &amp;lt;groupIdorg.slf4j&amp;lt;/groupId &amp;lt;artifactIdslf4j-log4j12&amp;lt;/artifactId &amp;lt;version${sl4j.version}&amp;lt;/version &amp;lt;scoperuntime&amp;lt;/scope &amp;lt;/dependency &amp;lt;dependency &amp;lt;groupIdlog4j&amp;lt;/groupId &amp;lt;artifactIdlog4j&amp;lt;/artifactId &amp;lt;version1.2.16&amp;lt;/version &amp;lt;scoperuntime&amp;lt;/scope &amp;lt;/dependency Setup Testing Dependencies &amp;lt;dependency &amp;lt;groupIdjunit&amp;lt;/groupId &amp;lt;artifactIdjunit&amp;lt;/artifactId &amp;lt;version4.8.2&amp;lt;/version &amp;lt;scopetest&amp;lt;/scope &amp;lt;/dependency &amp;lt;dependency &amp;lt;groupIdorg.springframework&amp;lt;/groupId &amp;lt;artifactIdspring-test&amp;lt;/artifactId &amp;lt;version${spring.framework.version}&amp;lt;/version &amp;lt;scopetest&amp;lt;/scope &amp;lt;/dependency &amp;lt;plugin &amp;lt;groupIdorg.apache.maven.plugins&amp;lt;/groupId &amp;lt;artifactIdmaven-surefire-plugin&amp;lt;/artifactId &amp;lt;version2.8&amp;lt;/version &amp;lt;configuration &amp;lt;includes &amp;lt;include**/*Tests.java&amp;lt;/include &amp;lt;/includes &amp;lt;argLine-javaagen</itunes:summary><itunes:keywords>Software Development</itunes:keywords></item><media:rating>nonadult</media:rating></channel></rss>

