You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by bu...@apache.org on 2013/10/31 15:49:12 UTC

svn commit: r884953 - in /websites/staging/ace/trunk/content: ./ dev-doc/configuring-relay-servers.html

Author: buildbot
Date: Thu Oct 31 14:49:12 2013
New Revision: 884953

Log:
Staging update by buildbot for ace

Modified:
    websites/staging/ace/trunk/content/   (props changed)
    websites/staging/ace/trunk/content/dev-doc/configuring-relay-servers.html

Propchange: websites/staging/ace/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Oct 31 14:49:12 2013
@@ -1 +1 @@
-1537509
+1537513

Modified: websites/staging/ace/trunk/content/dev-doc/configuring-relay-servers.html
==============================================================================
--- websites/staging/ace/trunk/content/dev-doc/configuring-relay-servers.html (original)
+++ websites/staging/ace/trunk/content/dev-doc/configuring-relay-servers.html Thu Oct 31 14:49:12 2013
@@ -173,20 +173,20 @@
 <p><img alt="Figure 1: ACE server topology" src="ace_server_topology.png" title="Figure 1: An example server topology, showing multiple servers relaying information from an upstream server." /><br />
 <strong>Figure 1</strong>: An example server topology, showing multiple servers relaying information from an upstream server. Many other topologies are possible as well.</p>
 <p>Note that target logs need to be propagated to the main ACE server in order to make this information available for further inspection. For example, a target operator might want to know the current status of a target, even if this target is not directly served by the main ACE server. </p>
-<p id="fig2">An ACE relay server is a stripped down ACE server that only includes the bare minimum functionality to serve its targets. In addition to accepting log-updates from targets and provisioning software updates to its targets, it relays log information it received from its targets to the upstream ACE server and replicates (at least) the <code>deployment</code> repository from the upstream ACE server for its own use. A schematic overview of the functional blocks in a relay server is shown in figure 2:</p>
+<p id="fig2">An ACE relay server is a stripped down ACE server that only includes the bare minimum functionality to serve its targets. In addition to accepting log-updates from targets and provisioning software updates to its targets, it relays log information it received from its targets to the upstream ACE server and replicates (at least) the <tt>deployment</tt> repository from the upstream ACE server for its own use. A schematic overview of the functional blocks in a relay server is shown in figure 2:</p>
 <p><img alt="Figure 2: Functional overview relay server" src="relay_functional_overview.png" title="Figure 2: A functional overview of how a relay server functions." /><br />
 <strong>Figure 2</strong>: A functional overview of how a relay server functions.</p>
-<p>In the following sections, each of these functional blocks will be explained in more depth along with how to configure them. The configuration examples are shown as simple key-value pairs separated with an equals (<code>=</code>) sign. Lines starting with a hash (<code>#</code>) are considered comments. </p>
+<p>In the following sections, each of these functional blocks will be explained in more depth along with how to configure them. The configuration examples are shown as simple key-value pairs separated with an equals (<tt>=</tt>) sign. Lines starting with a hash (<tt>#</tt>) are considered comments. </p>
 <h2 id="log-synchronisation-between-target-and-relay">Log synchronisation between target and relay</h2>
 <p>Like in a single-server scenario, the relay must allow a target to upload its log before it can be synchronised with the main ACE server.</p>
-<p>To configure the storage of logs from targets on the relay server, we need to instantiate a log store by supplying the following configuration to the <code>org.apache.ace.log.server.store.factory</code> managed service factory:</p>
+<p>To configure the storage of logs from targets on the relay server, we need to instantiate a log store by supplying the following configuration to the <tt>org.apache.ace.log.server.store.factory</tt> managed service factory:</p>
 <div class="codehilite"><pre><span class="c"># a symbolic name used to reference to this store from other services</span>
 <span class="n">name</span><span class="p">=</span><span class="n">auditlog</span>
 </pre></div>
 
 
-<p>This will instantiate a new log store service named <code>auditlog</code><sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup> that can be used to store the log information of targets.</p>
-<p>To allow targets to upload their logs to the relay server, a log-servlet needs to be instantiated. This is done by supplying the following configuration to the <code>org.apache.ace.log.server.servlet.factory</code> managed service factory:</p>
+<p>This will instantiate a new log store service named <tt>auditlog</tt><sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup> that can be used to store the log information of targets.</p>
+<p>To allow targets to upload their logs to the relay server, a log-servlet needs to be instantiated. This is done by supplying the following configuration to the <tt>org.apache.ace.log.server.servlet.factory</tt> managed service factory:</p>
 <div class="codehilite"><pre><span class="c"># the symbolic name of the actual log store to store the uploaded logs in</span>
 <span class="n">name</span><span class="p">=</span><span class="n">auditlog</span>
 <span class="c"># the alias/endpoint at which the servlet is registered</span>
@@ -196,9 +196,9 @@
 </pre></div>
 
 
-<p>This will instantiate a servlet that listens on the <code>/auditlog</code><sup id="fnref:2"><a class="footnote-ref" href="#fn:2" rel="footnote">2</a></sup> endpoint (for example, <code>http://my.relay.server:8080/auditlog</code>). The given <code>name</code> configuration key is used to lookup the actual log store we've created previously.</p>
+<p>This will instantiate a servlet that listens on the <tt>/auditlog</tt><sup id="fnref:2"><a class="footnote-ref" href="#fn:2" rel="footnote">2</a></sup> endpoint (for example, <tt>http://my.relay.server:8080/auditlog</tt>). The given <tt>name</tt> configuration key is used to lookup the actual log store we've created previously.</p>
 <h2 id="log-synchronisation-between-relay-and-main-server">Log synchronisation between relay and main server</h2>
-<p>With the log store and servlet configured and in place, a target is now able to synchronise its logs with the relay server. However, once uploaded to the relay server, the logs will not propagate automatically to the main ACE server. A separate log-synchronisation task is responsible for this. To enable this task, we need to supply the following configuration to the <code>org.apache.ace.log.server.task.factory</code> managed service factory:</p>
+<p>With the log store and servlet configured and in place, a target is now able to synchronise its logs with the relay server. However, once uploaded to the relay server, the logs will not propagate automatically to the main ACE server. A separate log-synchronisation task is responsible for this. To enable this task, we need to supply the following configuration to the <tt>org.apache.ace.log.server.task.factory</tt> managed service factory:</p>
 <div class="codehilite"><pre><span class="c"># the symbolic name of the actual log store to synchronise</span>
 <span class="n">name</span><span class="p">=</span><span class="n">auditlog</span>
 <span class="c"># how to synchronise logs, can be &#39;pull&#39;, &#39;push&#39; or &#39;pushpull&#39;</span>
@@ -206,13 +206,13 @@
 </pre></div>
 
 
-<p>This will create a "task" service that will push all log information from the <code>auditlog</code><sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup> store to the main server. The <code>mode</code> configuration key denotes how to synchronise with the main server:</p>
+<p>This will create a "task" service that will push all log information from the <tt>auditlog</tt><sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup> store to the main server. The <tt>mode</tt> configuration key denotes how to synchronise with the main server:</p>
 <ul>
-<li><code>push</code> synchronises (or "pushes") the logs from the relay server to the main server and is typically used in a relaying situation as described in this document;</li>
-<li><code>pull</code> synchronises (or "pulls") the logs from the main server to the relay server and is typically used to create secondary backup servers and is not further discussed in this document;</li>
-<li><code>pushpull</code> will perform a two-way synchronisation between relay and main server and can be used to support fail-over situations.</li>
+<li><tt>push</tt> synchronises (or "pushes") the logs from the relay server to the main server and is typically used in a relaying situation as described in this document;</li>
+<li><tt>pull</tt> synchronises (or "pulls") the logs from the main server to the relay server and is typically used to create secondary backup servers and is not further discussed in this document;</li>
+<li><tt>pushpull</tt> will perform a two-way synchronisation between relay and main server and can be used to support fail-over situations.</li>
 </ul>
-<p>In addition, the log synchronisation task (and other tasks as well, see below) needs to know what upstream server it should synchronise with. For this information, it uses the ACE discovery service, which is configured by supplying, for example, the following configuration to the <code>org.apache.discovery.property</code><sup id="fnref:3"><a class="footnote-ref" href="#fn:3" rel="footnote">3</a></sup> managed service:</p>
+<p>In addition, the log synchronisation task (and other tasks as well, see below) needs to know what upstream server it should synchronise with. For this information, it uses the ACE discovery service, which is configured by supplying, for example, the following configuration to the <tt>org.apache.discovery.property</tt><sup id="fnref:3"><a class="footnote-ref" href="#fn:3" rel="footnote">3</a></sup> managed service:</p>
 <div class="codehilite"><pre><span class="c"># what is the URL to the *main* ACE server</span>
 <span class="n">serverURL</span> <span class="p">=</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">my</span><span class="p">.</span><span class="n">main</span><span class="p">.</span><span class="n">server</span><span class="p">:</span>8080
 </pre></div>
@@ -220,7 +220,7 @@
 
 <h2 id="deployment-provider">Deployment provider</h2>
 <p>The relay needs to have at least a deployment repository<sup id="fnref:4"><a class="footnote-ref" href="#fn:4" rel="footnote">4</a></sup>. This repository is a verbatim copy of the deployment repository on the master server and as such needs to be replicated periodically. The configuration of the deployment provider consists of three parts: a repository store, the repository servlet, and a repository provider.</p>
-<p>To create a "slave" deployment repository<sup id="fnref:5"><a class="footnote-ref" href="#fn:5" rel="footnote">5</a></sup> store, the following configuration needs to be supplied to the <code>org.apache.ace.server.repository.factory</code> managed service factory:</p>
+<p>To create a "slave" deployment repository<sup id="fnref:5"><a class="footnote-ref" href="#fn:5" rel="footnote">5</a></sup> store, the following configuration needs to be supplied to the <tt>org.apache.ace.server.repository.factory</tt> managed service factory:</p>
 <div class="codehilite"><pre><span class="c"># the symbolic name of the repository, should be &quot;deployment&quot;</span>
 <span class="n">name</span><span class="p">=</span><span class="n">deployment</span>
 <span class="c"># the customer name, should be equal to the customer name used on the master server</span>
@@ -230,7 +230,7 @@
 </pre></div>
 
 
-<p>To make the repository store accessible through a servlet, we need to supply the following configuration to the <code>org.apache.ace.repository.servlet.RepositoryServlet</code> managed service:</p>
+<p>To make the repository store accessible through a servlet, we need to supply the following configuration to the <tt>org.apache.ace.repository.servlet.RepositoryServlet</tt> managed service:</p>
 <div class="codehilite"><pre><span class="c"># the endpoint on which the deployment repository store is accessible</span>
 <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">ace</span><span class="p">.</span><span class="n">server</span><span class="p">.</span><span class="n">servlet</span><span class="p">.</span><span class="n">endpoint</span><span class="p">=</span><span class="o">/</span><span class="n">repository</span>
 <span class="c"># whether or not to enable authentication for this endpoint</span>
@@ -238,8 +238,8 @@
 </pre></div>
 
 
-<p>This will instantiate a servlet that listens on the <code>/repository</code> endpoint (for example, <code>http://my.relay.server:8080/repository</code>).</p>
-<p>With the repository store and servlet configured, we can configure the deployment repository provider, which is used to collect information about deployment artefacts that should be deployed on a target. The deployment repository provider is configured by supplying the following configuration to the <code>org.apache.ace.deployment.provider.repositorybased</code> managed service:</p>
+<p>This will instantiate a servlet that listens on the <tt>/repository</tt> endpoint (for example, <tt>http://my.relay.server:8080/repository</tt>).</p>
+<p>With the repository store and servlet configured, we can configure the deployment repository provider, which is used to collect information about deployment artefacts that should be deployed on a target. The deployment repository provider is configured by supplying the following configuration to the <tt>org.apache.ace.deployment.provider.repositorybased</tt> managed service:</p>
 <div class="codehilite"><pre><span class="c"># the URL on which the deployment repository store can be accessed</span>
 <span class="n">url</span> <span class="p">=</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">my</span><span class="p">.</span><span class="n">relay</span><span class="p">.</span><span class="n">server</span><span class="p">:</span>8080<span class="o">/</span><span class="n">repository</span>
 <span class="c"># the symbolic name of the repository, should be &quot;deployment&quot;</span>
@@ -251,7 +251,7 @@
 
 <h2 id="deployment-servlet">Deployment servlet</h2>
 <p>The target is only interested in downloading deployment packages containing the updates for its software and/or its management agent. To support this, two servlets need to be instantiated, one for accessing the deployment packages of the target software, and one for accessing the deployment packages for the management agent.</p>
-<p>To configure the servlet responsible for providing deployment packages of the target software, we need to supply the following configuration to the <code>org.apache.ace.deployment.servlet</code> managed service:</p>
+<p>To configure the servlet responsible for providing deployment packages of the target software, we need to supply the following configuration to the <tt>org.apache.ace.deployment.servlet</tt> managed service:</p>
 <div class="codehilite"><pre><span class="c"># the endpoint on which the deployment servlet for software-updates is accessible</span>
 <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">ace</span><span class="p">.</span><span class="n">server</span><span class="p">.</span><span class="n">servlet</span><span class="p">.</span><span class="n">endpoint</span><span class="p">=</span><span class="o">/</span><span class="n">deployment</span>
 <span class="c"># whether or not to enable authentication for this endpoint</span>
@@ -259,7 +259,7 @@
 </pre></div>
 
 
-<p>To configure the servlet responsible for providing agent updates, we need to supply the following configuration to the <code>org.apache.ace.deployment.servlet.agent</code> managed service:</p>
+<p>To configure the servlet responsible for providing agent updates, we need to supply the following configuration to the <tt>org.apache.ace.deployment.servlet.agent</tt> managed service:</p>
 <div class="codehilite"><pre><span class="c"># the endpoint on which the deployment servlet for agent-updates is accessible</span>
 <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">ace</span><span class="p">.</span><span class="n">server</span><span class="p">.</span><span class="n">servlet</span><span class="p">.</span><span class="n">endpoint</span><span class="p">=</span><span class="o">/</span><span class="n">agent</span>
 <span class="c"># whether or not to enable authentication for this endpoint</span>
@@ -270,7 +270,7 @@
 
 
 <h2 id="task-scheduler">Task scheduler</h2>
-<p>With the synchronisation and repository replication tasks in place, we need to tell the ACE scheduler to periodically execute these tasks. This is done by supplying the following configuration to the <code>org.apache.ace.scheduler.cfg</code> managed service:</p>
+<p>With the synchronisation and repository replication tasks in place, we need to tell the ACE scheduler to periodically execute these tasks. This is done by supplying the following configuration to the <tt>org.apache.ace.scheduler.cfg</tt> managed service:</p>
 <div class="codehilite"><pre><span class="c"># execute all LogSyncTasks once every 2 seconds...</span>
 <span class="n">org</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">ace</span><span class="p">.</span><span class="nb">log</span><span class="p">.</span><span class="n">server</span><span class="p">.</span><span class="n">task</span><span class="p">.</span><span class="n">LogSyncTask</span><span class="p">=</span>2000
 <span class="c"># Synchronise with the master repository every 5 seconds...  </span>
@@ -279,20 +279,20 @@
 
 
 <p>The relay server is now completely configured and ready to serve its targets. </p>
-<p>A complete runnable example can be found in the <code>run-relay</code> project of the ACE source repository. This example project starts a relay server on <code>localhost:8282</code> and expects its upstream server to run at <code>localhost:8080</code>. A list of all required bundles to run a relay server can be found in the <code>relay.bndrun</code> file.</p>
+<p>A complete runnable example can be found in the <tt>run-relay</tt> project of the ACE source repository. This example project starts a relay server on <tt>localhost:8282</tt> and expects its upstream server to run at <tt>localhost:8080</tt> A list of all required bundles to run a relay server can be found in the <tt>relay.bndrun</tt> file.</p>
 <h2 id="target-configuration">Target configuration</h2>
 <p>To only thing that a target needs to know about the relay server is its (base) URL. This can be supplied when starting the management agent on the target by adding the following argument to its command line:</p>
 <div class="codehilite"><pre><span class="o">-</span><span class="n">Dagent</span><span class="p">.</span><span class="n">discovery</span><span class="p">.</span><span class="n">serverurls</span><span class="p">=</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">my</span><span class="p">.</span><span class="n">relay</span><span class="p">.</span><span class="n">server</span><span class="p">:</span>8080<span class="o">/</span>
 </pre></div>
 
 
-<p>In fact, the <code>agent.discovery.serverurls</code> can take multiple server URLs (separated by commas) to support a simple form of fail-over, like <code>http://first.relay.server:8080/,http://second.relay.server:8080</code>.</p>
+<p>In fact, the <tt>agent.discovery.serverurls</tt> can take multiple server URLs (separated by commas) to support a simple form of fail-over, like <tt>http://first.relay.server:8080/,http://second.relay.server:8080</tt>.</p>
 <h2 id="notes">Notes</h2>
 <div class="footnote">
 <hr />
 <ol>
 <li id="fn:1">
-<p>this symbolic name <em>must</em> be equal to the name used on the upstream server. By default, the name <code>auditlog</code> is used;&#160;<a class="footnote-backref" href="#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p>
+<p>this symbolic name <em>must</em> be equal to the name used on the upstream server. By default, the name <tt>auditlog</tt> is used;&#160;<a class="footnote-backref" href="#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p>
 </li>
 <li id="fn:2">
 <p>by convention, use the same name for the endpoint as is used for log store;&#160;<a class="footnote-backref" href="#fnref:2" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p>