blob: 7046e7ce657530fe4f60f55c824bbcc9fb84c9be [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="Apache Forrest" name="Generator">
<meta name="Forrest-version" content="0.9-dev">
<meta name="Forrest-skin-name" content="pelt">
<title>Updating the Lenya Website</title>
<link type="text/css" href="../skin/basic.css" rel="stylesheet">
<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
<link type="text/css" href="../skin/profile.css" rel="stylesheet">
<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
<link rel="shortcut icon" href="../favicon.ico">
</head>
<body onload="init()">
<script type="text/javascript">ndeSetTextSize();</script>
<div id="top">
<!--+
|breadtrail
+-->
<div class="breadtrail">
<a href="http://www.apache.org/">apache</a> &gt; <a href="http://lenya.apache.org/">lenya</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
</div>
<!--+
|header
+-->
<div class="header">
<!--+
|start group logo
+-->
<div class="grouplogo">
<a href=""><img class="logoImage" alt="Lenya" src="../images/apache-lenya-light.png" title=""></a>
</div>
<!--+
|end group logo
+-->
<!--+
|start Project Logo
+-->
<div class="projectlogo">
<a href=""></a>
</div>
<!--+
|end Project Logo
+-->
<!--+
|start Search
+-->
<div class="searchbox">
<form action="http://www.google.com/search" method="get" class="roundtopsmall">
<input value="lenya.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with ');" size="25" name="q" id="query" type="text" value="Search the site with ">&nbsp;
<input name="Search" value="Search" type="submit">
</form>
</div>
<!--+
|end search
+-->
<!--+
|start Tabs
+-->
<ul id="tabs">
<li>
<a class="unselected" href="../index.html">Project</a>
</li>
<li class="current">
<a class="selected" href="../docs/index.html">Developer</a>
</li>
<li>
<a class="unselected" href="../community/index.html">Community</a>
</li>
<li>
<a class="unselected" href="../docs/2_0_x/index.html">Version 2.0</a>
</li>
<li>
<a class="unselected" href="../docs/1_2_x/index.html">Version 1.2</a>
</li>
</ul>
<!--+
|end Tabs
+-->
</div>
</div>
<div id="main">
<div id="publishedStrip">
<!--+
|start Subtabs
+-->
<div id="level2tabs"></div>
<!--+
|end Endtabs
+-->
<script type="text/javascript"><!--
document.write("Last Published: " + document.lastModified);
// --></script>
</div>
<!--+
|breadtrail
+-->
<div class="breadtrail">
&nbsp;
</div>
<!--+
|start Menu, mainarea
+-->
<!--+
|start Menu
+-->
<div id="menu">
<div onclick="SwitchMenu('menu_selected_1.1', '../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Developer</div>
<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
<div class="menuitem">
<a href="../docs/index.html">Index</a>
</div>
<div class="menuitem">
<a href="http://svn.apache.org/viewcvs.cgi/lenya/#dirlist">SVN Web</a>
</div>
<div class="menuitem">
<a href="../docs/coding-guidelines.html">Coding Guidelines</a>
</div>
<div class="menupage">
<div class="menupagetitle">Website Update</div>
</div>
<div class="menuitem">
<a href="../docs/release.html">Release Management</a>
</div>
<div class="menuitem">
<a href="../docs/zone.html">Zone notes</a>
</div>
<div class="menuitem">
<a href="../docs/resolution.html">Resolution</a>
</div>
<div class="menuitem">
<a href="../docs/charter.html">Charter</a>
</div>
<div class="menuitem">
<a href="../docs/guidelines.html">Project guidelines</a>
</div>
</div>
<div id="credit"></div>
<div id="roundbottom">
<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
<!--+
|alternative credits
+-->
<div id="credit2">
<a href="http://wiki.apache.org/lenya/MeetingFreiburg2008"><img border="0" title="Meeting Freiburg 2008" alt="Meeting Freiburg 2008 - logo" src="../images/apache-lenya-meeting-freiburg-2008.png" style="width: 160px;height: 40px;"></a>
</div>
</div>
<!--+
|end Menu
+-->
<!--+
|start content
+-->
<div id="content">
<div title="Portable Document Format" class="pdflink">
<a class="dida" href="website-update.pdf"><img alt="PDF -icon" src="../skin/images/pdfdoc.gif" class="skin"><br>
PDF</a>
</div>
<h1>Updating the Lenya Website</h1>
<div id="front-matter">
<div id="minitoc-area">
<ul class="minitoc">
<li>
<a href="#Prerequisites">Prerequisites</a>
</li>
<li>
<a href="#First+time+checkout">First time checkout</a>
</li>
<li>
<a href="#Generating+changes+based+on+svn">Generating changes based on svn</a>
</li>
<li>
<a href="#Understanding+the+Apache+infrastructure">Understanding the Apache infrastructure</a>
</li>
<li>
<a href="#trip">Roundtrip website update</a>
</li>
<li>
<a href="#Let+forrestbot+help+you">Let forrestbot help you</a>
</li>
<li>
<a href="#Update+of+the+Apache+httpd+server+on+people.apache.org">Update of the Apache httpd server on people.apache.org</a>
</li>
</ul>
</div>
</div>
<a name="N1000E"></a><a name="Prerequisites"></a>
<h2 class="h3">Prerequisites</h2>
<div class="section">
<p>Before you try to update the Lenya website, make sure you meet the following requirements:</p>
<ul>
<li>You have <a href="http://forrest.apache.org/">Apache Forrest</a> installed on your machine (v 0.8-dev). This means you have your environment set up
in a way that you can call <span class="codefrag">forrest</span> in any directory.</li>
<li>You have enabled <a href="http://forrest.apache.org">Apache
Forrest</a> to handle all image types natively. (see <a href="http://forrest.apache.org/docs_0_80/faq.html#pdf_images">note</a>)</li>
<li>You are an active Lenya committer with write access to SVN.</li>
<li>Your subversion is configured correctly (see <a href="http://www.apache.org/dev/version-control.html#https-svn">note</a>) </li>
</ul>
<p>If you are not a committer but like to contribute to the documentation, you're most welcome as well. If you
want to make additions or corrections to the lenya documentation/website, please keep on reading.</p>
<p> Instead of committing please make an <span class="codefrag">svn diff</span> of <span class="codefrag">lenya.docu</span> (see above) and contribute the patch via our <a href="http://issues.apache.org/bugzilla/enter_bug.cgi?reporter=&product=Lenya&version=Current+CVS&component=core&rep_platform=Other&op_sys=other&priority=Other&bug_severity=Enhancement&bug_status=NEW&assigned_to=&cc=&bug_file_loc=&short_desc=%5BPatch%5D&comment=&maketemplate=Remember+values+as+bookmarkable+template&form_name=enter_bug">bug tracker</a>.
Let us know about it on the developer's mailing list. A committer will happily pick your patch up from the bug tracker and apply it.</p>
</div>
<a name="N1004A"></a><a name="First+time+checkout"></a>
<h2 class="h3">First time checkout</h2>
<div class="section">
<p>You will have to do this only the first time when doing the website.</p>
<ul>
<li>
<span class="codefrag">svn co https://svn.apache.org/repos/asf/lenya/docu/ lenya.docu</span>
<br>
<br>
<span class="codefrag">lenya.docu</span>-&gt;This is our documentation and website source tree. Here you will edit the site.</li>
<li>
<span class="codefrag">svn co https://svn.apache.org/repos/asf/lenya/site/ lenya.apache.org</span>
<br>
<br>
<span class="codefrag">lenya.apache.org</span>-&gt;This is our website live tree. Here you will have to copy the build of lenya.docu.</li>
</ul>
</div>
<a name="N1006B"></a><a name="Generating+changes+based+on+svn"></a>
<h2 class="h3">Generating changes based on svn</h2>
<div class="section">
<p>The multiple changes files can be directly generated from the SVN commit logs with the following procedure:</p>
<ul>
<li>run <span class="codefrag">svn log -v -r $LAST:HEAD --xml
http://svn.apache.org/repos/asf/lenya &gt;
src/documentation/content/svn-log/tlp-HEAD.svn.xml</span> in the root
of the docu branch. Where $LAST is the revision number of the last commit from the last month.</li>
<li>Each month somebody need to create a new log file for the last month and link it to the changes section. Do <span class="codefrag">forrest run</span>
</li>
</ul>
<p>You can find out the first and last revision (till it was updated) of
the current HEAD by requesting <a href="../tlp-HEAD.svn-revision.xml">http://localhost:8888/tlp-HEAD.svn-revision.xml</a>
numbers. If this file contains more then one month then you can request
<a href="../tlp-HEAD.svn-sh.xml">http://localhost:8888/tlp-HEAD.svn-sh.xml</a> to generate
shell commands, which you can execute in the
src/documentation/content/svn-log dir (you need to edit them before execute).</p>
</div>
<a name="N10090"></a><a name="Understanding+the+Apache+infrastructure"></a>
<h2 class="h3">Understanding the Apache infrastructure</h2>
<div class="section">
<p>The Website at <span class="codefrag">http://lenya.apache.org/</span> is a static site, which is served from the checkout dir <span class="codefrag">lenya.apache.org</span> on the server based on
<span class="codefrag">http://svn.apache.org/repos/asf/lenya/site/</span> by an Apache httpd server.</p>
<p>The content of <span class="codefrag">lenya.apache.org</span> has to be generated by forrest based on the <span class="codefrag">lenya.docu</span>.
This has to be done on your local machine because forrest is <strong>not</strong> installed on the server. </p>
<p>Copy the deloyed files to your <span class="codefrag">lenya.apache.org</span>.
Commit the changes in <span class="codefrag">lenya.apache.org</span>. A cron job updates the static files in <span class="codefrag">lenya.apache.org</span>
of the server every 24 hours via a simple <span class="codefrag">svn up</span>.
</p>
</div>
<a name="N100BE"></a><a name="trip"></a>
<h2 class="h3">Roundtrip website update</h2>
<div class="section">
<p>The typical roundtrip process to update the website has the following steps.</p>
<p>1) edit the documentation src -&gt; lenya.docu</p>
<ul>
<li>
<span class="codefrag">cd $lenya.docu; svn up</span> - change to your local checkout of the docu and update it.</li>
<li>Follow "Generating changes based on svn"!</li>
<li>Run <span class="codefrag">forrest run</span> locally on your machine. You can now browse the website at
<span class="codefrag">http://localhost:8888/</span>.</li>
<li>Edit the content using your favourite editor. Refer to the forrest documentation if necessary.
Hit the Reload button in your browser and test your changes locally on your machine until they work the way you
intended.</li>
</ul>
<p>2) deploy and commit your changes to the documentation src -&gt; lenya.docu</p>
<ul>
<li>Run <span class="codefrag">forrest</span> -&gt; This will create the site in <span class="codefrag">lenya.docu/build/site</span>
<br>(Note that Forrest sometimes claims that the build failed, please see the broken-links.xml.
Here you can find the pages that have errors and which pages refer to them.)</li>
<li>Check in your changes (if you are a committer) <span class="codefrag">svn ci -m "my changes message"</span> or prepare a patch (if you aren't) <span class="codefrag">svn diff &gt; patch.txt</span> of <span class="codefrag">lenya.docu</span>
</li>
</ul>
<p>3) copy deployed changes from the documentation src to the website checkout-&gt; lenya.apache.org</p>
<ul>
<li>
<span class="codefrag">cd $lenya.apache.org; svn up</span> - change to your local checkout of the website and update it.</li>
<li>
<span class="codefrag">cp -r $lenya.docu/build/site/* .</span> - copy the deployed site from step 2.</li>
<li>Create and copy the Javadoc for both branches (<span class="codefrag">build javadocs</span>, Copy from <span class="codefrag">build/webapp/site/apidocs</span> to <span class="codefrag">lenya/site/apidocs/1.2</span> and
<span class="codefrag">lenya/site/apidocs/2.0</span>)</li>
<li>Commit your changes to lenya.apache.org <span class="codefrag">svn ci -m "my changes message"</span>.</li>
</ul>
</div>
<a name="N10122"></a><a name="Let+forrestbot+help+you"></a>
<h2 class="h3">Let forrestbot help you</h2>
<div class="section">
<p>If you are looking into a way to short the steps described in the <a href="#trip">Roundtrip website update</a>, then do the following
(please still test your changes first). </p>
<p>Do once, create $lenya.docu/deploy.svn.settings file. These
credentials are needed by forrestbot so that it can do your 'svn add'
and 'svn commit' etc. to the lenya/site/ repository. The
deploy.svn.settings file looks like:</p>
<pre class="code">&lt;?xml version="1.0"?&gt;
&lt;project&gt;
&lt;property name="deploy.svn.user" value="myApacheUsername"/&gt;
&lt;property name="deploy.svn.password" value="myPassword"/&gt;
&lt;/project&gt; </pre>
<p>Generating and publishing the main docs is very easy using a local forrestbot:
</p>
<pre class="code">cd $lenya.docu
forrest -f publish.xml build
forrest -f publish.xml deploy</pre>
<p>This builds the documentation locally then deploys it by committing
it to the <a href="https://svn.apache.org/repos/asf/lenya/site">lenya/site SVN</a>.
Then a cronjob on the server will automatically publish it (see next section).
</p>
<p>You can use a similar script we are using on the zones server in $lenya.docu.</p>
<pre class="code">#!/bin/bash
svn up
source SVN-HEAD-REV.txt
svn log -r $LAST:HEAD -v --xml http://svn.apache.org/repos/asf/lenya &gt; src/documentation/content/svn-log/tlp-HEAD.svn.xml
forrest -f publish.xml build
forrest -f publish.xml deploy</pre>
</div>
<a name="N1014C"></a><a name="Update+of+the+Apache+httpd+server+on+people.apache.org"></a>
<h2 class="h3">Update of the Apache httpd server on people.apache.org</h2>
<div class="section">
<p>There is a cron job on people which will do 'svn update' in the server <span class="codefrag">lenya.apache.org</span> dir
every 24 hours (see /x1/home/thorsten/thorsten.ct). If you want to invoke the script manually then ...</p>
<pre class="code">ssh people.apache.org
/x1/home/thorsten/bin/lenya-update.sh</pre>
<p>Alternatively you can do the following (this is basicly what the script does).</p>
<pre class="code">ssh people.apache.org
cd /www/lenya.apache.org
umask 0002
svn update</pre>
</div>
</div>
<!--+
|end content
+-->
<div class="clearboth">&nbsp;</div>
</div>
<div id="footer">
<!--+
|start bottomstrip
+-->
<div class="lastmodified">
<script type="text/javascript"><!--
document.write("Last Published: " + document.lastModified);
// --></script>
</div>
<div class="copyright">
Copyright &copy;
2002-2007 <a href="http://www.apache.org/licenses/LICENSE-2.0">The Apache Software Foundation.</a>
</div>
<div id="feedback">
Send feedback about the website to:
<a id="feedbackto" href="mailto:dev@lenya.apache.org?subject=Feedback%C2%A0for%C2%A0docs/website-update.html">dev@lenya.apache.org</a>
</div>
<!--+
|end bottomstrip
+-->
</div>
</body>
</html>