<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Things on a content management system</title>
	<atom:link href="http://cqdump.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cqdump.wordpress.com</link>
	<description>Tips and tricks for Day Communique</description>
	<lastBuildDate>Thu, 05 Jan 2012 21:50:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cqdump.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Things on a content management system</title>
		<link>http://cqdump.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cqdump.wordpress.com/osd.xml" title="Things on a content management system" />
	<atom:link rel='hub' href='http://cqdump.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Custom dispatcher invalidation rules</title>
		<link>http://cqdump.wordpress.com/2012/01/05/custom-dispatcher-invalidation-rules/</link>
		<comments>http://cqdump.wordpress.com/2012/01/05/custom-dispatcher-invalidation-rules/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 21:50:53 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[dispatcher]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=425</guid>
		<description><![CDATA[Most web sites use different approaches of caching to improve their performance, some within the application and some on the delivery side of the site, such as a content delivery network (CDN) or a simple reverse proxy like squid or varnish. Of course all of these can also be used together with CQ5, the default [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=425&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most web sites use different approaches of caching to improve their performance, some within the application and some on the delivery side of the site, such as a content delivery network (CDN) or a simple reverse proxy like squid or varnish. Of course all of these can also be used together with CQ5, the default caching approach on the delivery side of CQ5 is the dispatcher.</p>
<p>The dispatcher is a pretty straight-forward cache, which has some built-in rules for invalidation. The most important rule is: <em>Whenever a page is invalidated, all pages, which are located deeper in the content hierarchy below this page, are invalidated as well.</em></p>
<p>Some background: This might be based on the assumption, that a change on any page can influence the appearance of pages higher in the hierarchy; you should think of a change of the page title, which must be reflected in the navigation items of all other pages in that area. Combined with the /statfileslevel parameter you should be able to deliver always a correctly rendered page and never outdated content. At the cost of the cache hit ratio in the dispatcher.</p>
<p>I already described the inner working of the dispatcher <a href="http://cqdump.wordpress.com/2008/12/29/dispatcher-caching-and-content-structure/">in an older article</a>. Knowing these internals also give you some more options if you want to tune this. In the following I describe an approach, which allows you to implement custom invalidation rules. The caching and the delivery of the cached files doesn&#8217;t change, only the cache invalidation.</p>
<p>The basic idea is to replace the call to /dispatcher/invalidate.cache (which is the standard handler for cache invalidation) by a custom script, which runs the invalidation on the cache. This custom script is configured as target URL in the invalidation agent(s) and updates the &#8220;last modification date&#8221; of the statfile according to your requirement.</p>
<p>For example you can have this perl script, which should behave like the dispatcher invalidation logic:</p>
<pre>/usr/bin/perl -w
use strict;
use CGI;
use File::Find;
use File::Touch;
my $cacheroot = "/opt/www/docroot";
my $q = CGI-&gt;new;
my $path = q-&gt;param("Handle");
my $invalidation_path = $cacheroot . $path;
File::Find::find({wanted =&gt; \&amp;wanted}, $invalidation_path);
exit;

sub wanted {
  my $f = shift;
  if ($f =~ /\.stat/) {
    touch ($f);
  }
}</pre>
<p>Configure this script as a CGI on &#8220;/dispatcher/custom.invalidation&#8221;, then configure your invalidation accordingly, and voila, you&#8217;re done. You run your custom invalidation script. If you don&#8217;t like the standard behaviour (obviously you don&#8217;t &#8230;), adjust the logic in the wanted procedure.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/425/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=425&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2012/01/05/custom-dispatcher-invalidation-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>CQ5 init script</title>
		<link>http://cqdump.wordpress.com/2011/11/15/cq5-init-script/</link>
		<comments>http://cqdump.wordpress.com/2011/11/15/cq5-init-script/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 20:48:42 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=419</guid>
		<description><![CDATA[Nearly all Unix flavors have the notion of so-called initscripts, which are executed at startup (or when you switch the runlevel) and which start all required services or adapt settings. Usually all daemon and server processes are started via such initscripts. CQ5 doesn&#8217;t provide such a script out-of-the-box, but a rather complex shell script called [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=419&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Nearly all Unix flavors have the notion of so-called initscripts, which are executed at startup (or when you switch the runlevel) and which start all required services or adapt settings. Usually all daemon and server processes are started via such initscripts. CQ5 doesn&#8217;t provide such a script out-of-the-box, but a rather complex shell script called &#8220;serverctl&#8221;, which performs many steps you would expect from a initscript:</p>
<ul>
<li>assembling parameters</li>
<li>setting environment variables</li>
<li>start/stop/status of the server process (start and stop are also available a separate scripts for ease of use)</li>
</ul>
<p>This would easily qualify this script as a initscript, but it lacks one important task: Changing the uid for the to-be-started process, it doesn&#8217;t run as root user. While from a purely functional perspective this isn&#8217;t important, every sysadmin will tell you, that you shouldn&#8217;t run processes as root, when they don&#8217;t require such permissions to perform their tasks. And the security guys won&#8217;t even let you golive with such a setting. So if you write an init script, you should add this functionality there.</p>
<p>And one last plea: Do not start the java process directly in the initscript and assemble the commandline yourself, but call the start&amp;stop scripts. Especially if you are not that familiar with the serverctl script. So, a simple initscript  could look like this:</p>
<pre>#!/bin/sh
CQ5_ROOT=/opt/cq5
CQ5_USER=cq5

########
SERVER=${CQ5_ROOT}/crx-quickstart/server
START=${SERVER}/start
STOP=${SERVER}/stop
STATUS="${SERVER}/serverctl status" 

case "$1" in
  start)
    su - ${CQ5_USER} ${START}
  stop)
    su - ${CQ5_USER} ${STOP}
  status)
    su - ${CQ5_USER} ${STATUS}
  *)
    echo "Unknown argument $1"
esac</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/419/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=419&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2011/11/15/cq5-init-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>Meta: adaptTo, CQ Blueprints</title>
		<link>http://cqdump.wordpress.com/2011/09/20/meta-adaptto-cq-blueprints/</link>
		<comments>http://cqdump.wordpress.com/2011/09/20/meta-adaptto-cq-blueprints/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 19:49:32 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=414</guid>
		<description><![CDATA[Last week the adaptTo  event happened in Berlin/Germany, which was a smaller conference related to Apache Sling, Jackrabbit and also CQ5 (or WEM, how it&#8217;s called now in Adobish). Sadly I wasn&#8217;t able to attend for family reasons, but you can download all slides on the website of pro!vision, sponsor of that conference. I especially [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=414&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last week the adaptTo  event happened in Berlin/Germany, which was a smaller conference related to Apache Sling, Jackrabbit and also CQ5 (or WEM, how it&#8217;s called now in Adobish). Sadly I wasn&#8217;t able to attend for family reasons, but you can download all slides on the <a href="http://www.pro-vision.de/cms/adaptto/rubrik/5/5481.adapttoberlin.htm">website of pro!vision</a>, sponsor of that conference. I especially like the <a href="http://www.pro-vision.de/adaptto/downloads/2011_Repository_performance_tuning.pdf">presentation by Jukka</a> (Jackrabbit/CRX performance tuning), as he shows many design principles of Jackrabbit, which have an influence on performance. And every developer and application designer working with sling should have a look at the presentation <a href="http://www.pro-vision.de/adaptto/downloads/2011_lightning_Know_your_URLs.pdf">by Achim Schermuly-Koch</a>, as he covers a very interesting security and also performance pattern, which affects many sites.</p>
<p>Another intesting site I recently fell about is <a href="http://www.cqblueprints.com/xwiki/bin/view/Main/WebHome">CQ Blueprints</a>, which has the claim to collect best practices for CQ 5.2 till CQ 5.4; I browsed through and found some interesting ideas, but also some tips, which are not &#8220;best practices&#8221; in my opinion. Haven&#8217;t found the time to write constructive comments there.</p>
<p>A short outlook: I plan to write short posts about &#8220;init scripts for CQ5&#8243; and &#8220;dispatcher invalidation&#8221;. The latter topic is rather intesting, as I recently adviced several people to bypass the regular invalidation, while in the last years there was never a need to do so. So, stay tuned.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/414/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=414&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2011/09/20/meta-adaptto-cq-blueprints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>Java 7 support for CQ5?</title>
		<link>http://cqdump.wordpress.com/2011/08/01/java-7-support-for-cq5/</link>
		<comments>http://cqdump.wordpress.com/2011/08/01/java-7-support-for-cq5/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 20:27:27 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=410</guid>
		<description><![CDATA[As Java 7 has been launched these days, the question arises real soon: &#8220;Does Adobe support Java 7 as runtime for CQ5?&#8221;. So, the clear answer is: No, it isn&#8217;t supported. Mostly because of some issues which can cause corruptions in the Lucene index. So, of course, you give it a try and tackle the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=410&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://www.oracle.com/us/corporate/features/java-7-launched-435823.html">Java 7 has been launched these days</a>, the question arises real soon: &#8220;Does Adobe support Java 7 as runtime for CQ5?&#8221;.</p>
<p>So, the clear answer is: <a href="http://dev.day.com/content/docs/en/crx/current/deploying/crx_installation_guide.html#Java%20Runtime%20Environments">No, it isn&#8217;t supported</a>. Mostly because of some issues which can <a href="http://www.eweekeurope.co.uk/news/apache-developers-java-7-contains-bugs-35619">cause corruptions in the Lucene index</a>. So, of course, you give it a try and tackle the risk yourself (as you can run CQ5 on a Windows 7 box or on Debian Linux); but don&#8217;t complain, if you receive some strange behaviour.</p>
<p>ps: Just adding <code>-XX:-UseLoopPredicate</code> to your JVM parameters won&#8217;t solve the problem (according to the Lucene Website).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/410/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/410/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/410/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=410&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2011/08/01/java-7-support-for-cq5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding JMX-support</title>
		<link>http://cqdump.wordpress.com/2011/07/29/adding-jmx-support/</link>
		<comments>http://cqdump.wordpress.com/2011/07/29/adding-jmx-support/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 21:05:03 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Tips&Tricks]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=406</guid>
		<description><![CDATA[CQ5 (even in its latest incarnation CQ 5.4) has a rather poor support for monitoring. If you take a look at the system via the popular &#8220;jconsole&#8221; tool, you don&#8217;t get any useful mbeans, which can tell you anything about the system. Only some logging stuff. If you decide to instrument your code and provide [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=406&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>CQ5 (even in its latest incarnation CQ 5.4) has a rather poor support for monitoring. If you take a look at the system via the popular &#8220;jconsole&#8221; tool, you don&#8217;t get any useful mbeans, which can tell you anything about the system. Only some logging stuff.</p>
<p>If you decide to instrument your code and provide some information via JMX (that&#8217;s something I would recommend to everyone, who adds non-trivial services to CQ5), have a look at Apache Aries, especially at the <a href="http://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.aries.jmx/org.apache.aries.jmx.whiteboard/0.3">JMX whiteboard</a>. Deploy this bundle to your CQ5 and then just register your mbeans as services. Voila, that&#8217;s it. You don&#8217;t need to register and unregister your mbeans, as this is handled by the JMX whiteboard.</p>
<p>Sadly documentation is currently rather poor, but the sourcode isn&#8217;t that hard to understand. You can start with the <a href="https://issues.apache.org/jira/browse/ARIES-430">initial patch in the Aries issue tracking</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/406/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=406&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2011/07/29/adding-jmx-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>Is my CRX performance I/O bound?</title>
		<link>http://cqdump.wordpress.com/2011/06/09/is-my-crx-performance-io-bound/</link>
		<comments>http://cqdump.wordpress.com/2011/06/09/is-my-crx-performance-io-bound/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 07:34:33 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=400</guid>
		<description><![CDATA[In the last months I&#8217;ve seen many situations, where the CQ5 performance was poor, while the CPU usage was quite low (on a 16 core machine 15 cores were idling). The next assumption, that the I/O is the problem, wasn&#8217;t confirmed by the tools like top, iostat or sar, because they showed an I/O wait [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=400&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the last months I&#8217;ve seen many situations, where the CQ5 performance was poor, while the CPU usage was quite low (on a 16 core machine 15 cores were idling). The next assumption, that the I/O is the problem, wasn&#8217;t confirmed by the tools like top, iostat or sar, because they showed an I/O wait of 3-4%, which indicates that there&#8217;s I/O, but the system is not loaded with it.</p>
<p>Further investigation using threaddumps and profiler showed, that there was indeed a I/O problem. Because they showed a lot of blocked threads within the JVM, which wanted to do I/O. So how goes this together?</p>
<p>Basically it can be easily explained. Your operation system is optimized to handle multiple parallel threads/processes, which want to do I/O. If there are too much of them or the I/O subsystem is too slow, the I/O wait ratio will increase. But in the CRX case it&#8217;s a bit different. Because of its internal structures CRX requires locking to synchronize its write actions to disk (reads are done in parallel). So for many operations (like updating metadata, writing journal log etc) only 1 thread can actually write to the filesystem, all others are waiting for this thread to finish its write action. For the operating system this looks like a single write action, which can be handled quite easily without the I/O wait skyrocketing.</p>
<p>So if you suspect that you have an I/O problem, use a profiler or threaddumps (or /crx/diagnostic/prof.jsp), the data which are displayed by top don&#8217;t tell the whole truth.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/400/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=400&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2011/06/09/is-my-crx-performance-io-bound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>CRX 2.1: Improved backup</title>
		<link>http://cqdump.wordpress.com/2011/03/23/crx-2-1-improved-backup/</link>
		<comments>http://cqdump.wordpress.com/2011/03/23/crx-2-1-improved-backup/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 19:22:25 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=392</guid>
		<description><![CDATA[As promised the article regarding an optimized CRX backup procedure. Starting with CRX 2.1 an improvement over the classic ZIP backup is available, which reduces the duration of the backup procedure, and allows you to use the incremental backup feature of your backup software.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=392&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://dev.day.com/content/docs/en/crx/2-1.html">CRX 2.1</a> introduced no major changes, but only smaller improvements in many places. In simple geometrixx-based performance tests you can get a speedup of about 30% (at least that&#8217;s the result I benchmarked with CRX 2.1 and CRX Hotfix 2.1.0.5), just because of improvements in Jackrabbit and CRX code. So, going to CRX 2.1 is a recommendation I would make for every CQ 5.3 project.</p>
<p>And next to these improvements a small extension to the online backup was introduced. Up to and including CRX 2.0 you backuped to a zip file (which contains the complete quickstart and the repository). In CRX 2.1 it is no longer required to zip the backuped data, but the backup procedure can simply <a href="http://dev.day.com/content/docs/en/crx/2-1/administering/backup_and_restore.html#Backing%20up%20to%20a%20Directory">drop it into a directory</a>. This directory still contains all data (quickstart and the repository), so you run the zip programm yourself if you want. So, what&#8217;s the great deal here?</p>
<p>First of all, your backup software can do an incremental backup on this directory. Especially the tar files and the index will change quite often (think of the <a href="http://dev.day.com/content/docs/en/crx/2-1/administering/persistence_managers.html#Optimizing%20Tar%20Files">TarPM optimizer</a>), but the datastore files won&#8217;t change, so they are ideal candidates for incremental backup.</p>
<p>Speaking of the datastore and its immutable files: Because files are only added to the datastore (and not changed), you can optimize the backup. The online backup backups the data based on its knowledge of the directory, where the quickstart is placed in. Everything in that directory and beneath is covered by the backup process. If you move the datastore to a directory outside the directory, where the quickstart.jar resides, <a href="http://dev.day.com/content/docs/en/crx/2-1/administering/backup_and_restore.html#Backing%20Up%20the%20Data%20Store%20Separately">the datastore isn&#8217;t backupped</a>. Why is that good? Because if we always our backup in the same directory, we can use rsync to backup the datastore. Rsync is much better suited for this job, because it works incremental (CRX online backup doesn&#8217;t) and works outside of the CRX/CQ5 java process (which is always good). Remember: Files in the datastore are only added, not changed!</p>
<p>I recommend to change your CQ5 filesystem layout as follows:</p>
<pre>cq5
 - backup
   - datastore
   - cq5
     - cq-wcm-quickstart.jar
     - crx-quickstart
     - ...
     - license.properties
 - datastore
 - cq5
   - cq-wcm-quickstart.jar
   - crx-quickstart
   - ...
   - license.properties</pre>
<p>This layout ensures, that you would be able to start the CQ5 directly from the backup directory (altough you shouldn&#8217;t do it) or simply move it to the &#8220;production&#8221; location, without any configuration changes.</p>
<p>Moving the datastore is easy: Shutdown CQ5/CRX  and replace the line<br />
<code>&lt;DataStore class="com.day.crx.core.data.ClusterDataStore"/&gt;</code></p>
<p>in the repository.xml with the following ones:</p>
<pre>&lt;DataStore class="com.day.crx.core.data.ClusterDataStore"&gt;
&lt;param name="path" value="../../../../backup/datastore" /&gt;
&lt;/DataStore&gt;</pre>
<p>I recommend to use a relative adress here; because it&#8217;s relative to the directory crx-quickstart/repository/repository, you should enter<br />
<code>"../../../../datastore</code>&#8221; here. Adding a symlink won&#8217;t help!</p>
<p>Then create this directory structure and move all the datastore files there (crx-quickstart/repository/repository/datastore/*) and make sure, that the ACLs are set properly. Startup and have fun!</p>
<p>And now the rough skeleton of a backup script to illustrate the process; it requires curl, rsync and a little perl. For the windows-based systems I cannot give much advice; probably there is also some tool like rsync.</p>
<p><code><br />
#!/bin/sh</code></p>
<p><code>HOST=localhost:4502<br />
ADMINPW=admin # must be URL encoded!!</code></p>
<p><code>BACKUP_FILENAME="" # we want CRX to backup to the directory, no zip file!<br />
BACKUP_DIR=/opt/cq5/backup<br />
INSTANCE_DIR=/opt/cq5</code></p>
<p><code>COOKIE=cookie.txt<br />
CURLPARAMETERS="-s -S"</code></p>
<p><code># hacky, using a appropriate perl module would be better<br />
ENCODED_BACKUP_DIR=`echo "${BACKUP_DIR} | perl -pe 's|\/|%2F|g'`<br />
touch ${COOKIE}<br />
chmod 600 ${COOKIE}<br />
echo "Start: `date`"<br />
curl -c ${COOKIE} ${CURLPARAMETERS} "http://${HOST}/crx/login.jsp?UserId=admin&amp;Password=$ADMINPW&amp;Workspace=crx.default" &gt; /dev/null<br />
curl -b ${COOKIE} ${CURLPARAMETERS} -o progress.txt "http://${HOST}/crx/config/backup.jsp?action=add&amp;targetDir=${ENCODED_BACKUP_DIR}&amp;zipFileName=${BACKUP_FILENAME}" &gt; /dev/null<br />
rm progress.txt<br />
rm ${COOKIE}</code></p>
<p><code>echo "Syncing datastore"<br />
DATASTORE_DIR="${INSTANCE_DIR}/datastore/"<br />
DATASTORE_BACKUP_DIR="${BACKUP_DIR}/datastore"<br />
rsync -a ${DATASTORE_DIR} ${DATASTORE_BACKUP_DIR}<br />
echo "Finished: `date`"</code></p>
<p><strong>Update:</strong>Fixed path in the repository.xml snippet. Thanks Thomas.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/392/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=392&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2011/03/23/crx-2-1-improved-backup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>CQ 5.4: New features for sysadmins</title>
		<link>http://cqdump.wordpress.com/2011/02/22/cq-5-4-new-features-for-sysadmins/</link>
		<comments>http://cqdump.wordpress.com/2011/02/22/cq-5-4-new-features-for-sysadmins/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 20:22:33 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=388</guid>
		<description><![CDATA[Today the release announcement of CQ 5.4 has been published. I collected some changes since CQ 5.3, which are intersting to all of you guys, who will be involved in operating it. CRX 2.2 supports the shared-nothing clustering. CRXDE light is no longer a dedicated web application, but is included into the CRX webapp. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=388&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today the release announcement of CQ 5.4 has been published. I collected some changes since CQ 5.3, which are intersting to all of you guys, who will be involved in operating it.</p>
<ul>
<li>CRX 2.2 supports <a href="http://dev.day.com/content/docs/en/crx/current/release_notes/overview.html#Clustering%20Enhancements">the shared-nothing clustering.</a></li>
<li>CRXDE light is no longer a dedicated web application, but is included into the CRX webapp.</li>
<li>The CQSE serverctl script has been cleaned and simplified; so the description in &#8220;<a href="http://cqdump.wordpress.com/2009/12/25/bootstrapping-the-cq-java-process/">Bootstrapping the Java process</a>&#8221; does no longer apply. Most of all the &#8220;serverctl psmon&#8221; process is gone now.</li>
<li>Since CRX 2.1 it is possible to perform a backup to a directory, not only to a ZIP file. This offers some more space for optimization. Expect a follow-up article on this.</li>
<li>The CRX Quickstart requires you to have a &#8220;ulimit -n&#8221; (number of open files) of at least 8192. It will probably affect your unpack run, but neither CQSE nor CQ5 itself does enforce it then &#8230;</li>
<li>It is still possible to <a href="http://cqdump.wordpress.com/2010/10/11/building-custom-cq5-installation-images/">build CQ5 custom images</a></li>
<li>CQ 5.4 offers an enhanced replication: There are these new options to a replication agent (on the &#8220;Trigger&#8221; tab): &#8220;no status update&#8221; and  &#8220;no versioning&#8221;. Let&#8217;s try to build a shadow copy of an author instance!</li>
</ul>
<p>That&#8217;s for the moment. Have fun with CQ 5.4!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/388/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=388&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2011/02/22/cq-5-4-new-features-for-sysadmins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>Maintenance mode</title>
		<link>http://cqdump.wordpress.com/2011/02/02/maintenance-mode/</link>
		<comments>http://cqdump.wordpress.com/2011/02/02/maintenance-mode/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 21:46:57 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[authoring]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=382</guid>
		<description><![CDATA[I just stumbled over my old article on locking out users and felt, that it is a bit outdated. The mechanism described there is only suitable for CQ3 and CQ4, but is not applicable for CQ5, because there is no &#8220;post&#8221; user, and the complete access control mechanism has changed. In CQ5 it is incredibly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=382&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just stumbled over my <a href="http://cqdump.wordpress.com/2009/03/04/tip-lock-out-the-users/">old article on locking out users</a> and felt, that it is a bit outdated. The mechanism described there is  only suitable for CQ3 and CQ4, but is not applicable for CQ5, because  there is no &#8220;post&#8221; user, and the complete access control mechanism has  changed.</p>
<p>In CQ5 it is incredibly easy to install<a href="http://sling.apache.org/site/filters.html"> ServletFilters</a> (thanks OSGI and Declarative Services); so I wrote a small servlet  filter, which blocks requests originating from users, which are not whitelisted. That&#8217;s a nice solution, which does not require any intrusive operation such as changing ACLs or such. You just need to deploy a tiny little bundle, put &#8220;admin&#8221; on the whitelist and enable the maintenance in the Felix webconsole. That&#8217;s it.</p>
<p>I will submit this package (source code plus compiled bundle) to the Day package share, licensed under Apache 2.0 License. It may take a bit, but I will place it to the public area, so you can grab it and study the source (it&#8217;s essentially only the servlet class).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/382/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=382&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2011/02/02/maintenance-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
		<item>
		<title>Building custom CQ5 installation images</title>
		<link>http://cqdump.wordpress.com/2010/10/11/building-custom-cq5-installation-images/</link>
		<comments>http://cqdump.wordpress.com/2010/10/11/building-custom-cq5-installation-images/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 15:07:51 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[Tips&Tricks]]></category>

		<guid isPermaLink="false">http://cqdump.wordpress.com/?p=354</guid>
		<description><![CDATA[Very often one needs to setup a number of CQ5 installations with the same featuresets; e.g if you start with a bunch of new publishing instances or you need to update your development environments with a new set of hotfixes. One way is to provide a detailled list of instructions plus the required files to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=354&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Very often one needs to setup a number of CQ5 installations with the same featuresets; e.g if you start with a bunch of new publishing instances or you need to update your development environments with a new set of hotfixes.</p>
<p>One way is to provide a detailled list of instructions plus the required files to the people responsible for it. It&#8217;s important to be consistent over all affected installations and environments, so you can remedy problems and issues because of missing fixes or wrong installation. But then a lot of manual work is included, which isn&#8217;t the thing IT people want to do.</p>
<p>I needed to provide several CQ5 installations in the last time. Because my standard installation recommendation consists of CQ 5.3 plus CRX 2.1 plus performancepack 30015 (using CQSE and the TarPM) at the moment, just deploying a CQ 5.3 the usual way isn&#8217;t sufficient. But on the other hand I don&#8217;t want to have the work of a manual installation of CRX 2.1 and the performancepack on top of a default CQ 5.3, both including restarts.</p>
<p>So I decided to build an image, which contains all these components, without the need for an restart, without fiddling around with the package manager, just by using some hidden features of CQ5.3 and CRX: the package installer and the flawless upgrade procedure of CRX 2.x (x={0,1}, will probably work also for later versions of CRX). You can find the <a href="http://dev.day.com/docs/en/cq/current/deploying/upgrading_crx.html">documentation of the upgrade process</a> also on the <a href="http://docs.day.com">official documentation site.</a></p>
<p>1.) Unpack a plain CQ 5.3:</p>
<pre>$ cd cq530
$ java -jar cq-wcm-quickstart-author-5.3.0.jar -unpack</pre>
<p>2.) Get CRX 2.1 and unpack it:</p>
<pre>$ cd crx21
$ java -jar crx-2.1.0.20100426-enterprise.jar -unpack</pre>
<p>3.) Copy the CRX webapplication file of CRX 2.1 into the unpacked CQ 5.3 installation:</p>
<pre>$ cp crx21/crx-quickstart/server/webapps/crx-explorer_crx.war cq530/crx-quickstart/server/webapps</pre>
<p>4.) Remove the CRXDE webapplication of CQ 5.3, as it is no longer needed for CRX 2.1</p>
<pre>$ cd cq530/crx-quickstart/server/webapps
$ rm crx-de_crxde.war</pre>
<p>5.) Edit also the server.xml, and remove the crxde webapp</p>
<p>6.) Define an order, in which the packages are deployed to CRX; as the packages are deployed in the order, they are listed by default in a shell, I define an order by explictly naming the files like &#8220;01_cq-content-5.3.jar&#8221;, &#8220;10_cq-documentation-5.3.zip&#8221; and so. The files must be placed in the cq530/crx-quickstart/repository/install folder.</p>
<p>Make sure that the original &#8220;cq_content-5.3.jar&#8221; is deployed as first package, as it contains the WCM code. But then you can place there any CQ package you want: hotfixes, custom application code, initial content etc.</p>
<pre>$ cd cq530/crx-quickstart/repository/install
$ cp cq-content-5.3.jar 01_cq-content-5.3.jar
$ cp cq-documentation-5.3.zip 10_cq-documentation-5.3.zip
$ cp .........../cq-5.3.0-featurepack-30015-1.0.zip 50_cq-5.3.0-featurepack-30015-1.0.zip</pre>
<p>7.) If you want to use the CRXDE, you should download the file cq53-update-crxdesupport-2.1.0.zip from Day PackageShare and copy it also into the install directory:</p>
<pre>$ cp ......../cq53-update-crxdesupport-2.1.0.zip 05_cq530/crx/repository/install</pre>
<p>8.) For convenience you can place now your license.properties file next in the toplevel directory of your installation, the result should be something like this:</p>
<pre>$ ls -la
-rw-r--r--   1 jorghoh  staff  233110810  6 Aug 09:38 cq-wcm-quickstart-author-5.3.0.jar
drwxr-xr-x  10 jorghoh  staff        340  7 Okt 17:55 crx-quickstart
-rw-r--r--   1 jorghoh  staff        217  6 Aug 09:39 license.properties</pre>
<p>If you don&#8217;t want to deliver the license file with that image, you can omitt it; if the instance is started the first time, it is asked then.</p>
<p>9.) Now all parts are in place; so you can create an image file (tar file) and distribute it all over your environments:</p>
<pre>$ cd cq530/..
$ tar -cf cq530-crx21-author-image.tar cq530/*</pre>
<p>(if you rename the cq-wcm-quickstart-author-5.3.0.jar file to cq-wcm-quickstart-publish-5.3.0.jar, you have an image for a publish instance.)</p>
<p>Just unpack it and use your usual startup mechanisms (&#8220;start.bat&#8221; or &#8220;start&#8221;), and the framework will startup as usually, create a repository and also deploy all packages in the install folder directly to it. If you encounter problems, you may check with the Felix console, if all bundles are started.</p>
<p>Now you have an image, which you can copy and uncompress everywhere, even the plattform (Unix, Windows) doesn&#8217;t matter, as all is only dependent on the features of CRX Launchpad and CRX itself. A setup of a new emtpy instance, independent of the number of installed packages and hotfixes, can now be done within 2 minutes and can be fully automated.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cqdump.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cqdump.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cqdump.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cqdump.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cqdump.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cqdump.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cqdump.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cqdump.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cqdump.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cqdump.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cqdump.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cqdump.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cqdump.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cqdump.wordpress.com/354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cqdump.wordpress.com&amp;blog=5932865&amp;post=354&amp;subd=cqdump&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cqdump.wordpress.com/2010/10/11/building-custom-cq5-installation-images/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">jhoh228</media:title>
		</media:content>
	</item>
	</channel>
</rss>
