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:41:20 UTC

svn commit: r884950 - in /websites/staging/ace/trunk/content: ./ dev-doc/ace_server_topology.png dev-doc/configuring-relay-servers.html dev-doc/relay_functional_overview.png

Author: buildbot
Date: Thu Oct 31 14:41:19 2013
New Revision: 884950

Log:
Staging update by buildbot for ace

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

Propchange: websites/staging/ace/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Oct 31 14:41:19 2013
@@ -1 +1 @@
-1533440
+1537506

Added: websites/staging/ace/trunk/content/dev-doc/ace_server_topology.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/ace/trunk/content/dev-doc/ace_server_topology.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/ace/trunk/content/dev-doc/configuring-relay-servers.html
==============================================================================
--- websites/staging/ace/trunk/content/dev-doc/configuring-relay-servers.html (added)
+++ websites/staging/ace/trunk/content/dev-doc/configuring-relay-servers.html Thu Oct 31 14:41:19 2013
@@ -0,0 +1,314 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Configuring and using ACE relay servers</title>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+    <link href="/css/bootstrap.min.css" rel="stylesheet" media="screen">
+    <link href="/css/prettify.css" rel="stylesheet" media="screen">
+    <link href="/css/code.css" rel="stylesheet" media="screen">
+    <script src="http://code.jquery.com/jquery.js"></script>
+    <script src="/js/bootstrap.min.js"></script>    
+    <script src="/js/prettify.js"></script>
+    
+    
+    
+    <script>
+    $(function () { prettyPrint() })
+    $().dropdown()
+    </script>
+  </head>
+  <body style="padding-top: 50px;">
+    <div class="navbar navbar-fixed-top navbar-inverse">
+      <div class="navbar-inner">
+        <div class="container">
+          <a class="brand" href="/index.html">Apache ACE&trade;</a>
+          <ul class="nav">
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">News <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/news.html">News</a>
+      </li>
+      <li>
+        <a href="/on-the-web.html">On the web</a>
+      </li>
+    </ul>
+  </li>
+  <li>
+    <a href="/downloads.html">Downloads</a>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Users <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/user-doc/introduction.html">Introduction</a>
+      </li>
+      <li>
+        <a href="/user-doc/getting-started.html">Getting Started</a>
+      </li>
+      <li>
+        <a href="/user-doc/user-guide.html">User Guide</a>
+      </li>
+      <li>
+        <a href="/user-doc/features.html">Features</a>
+      </li>
+	    <li>
+        <a href="/user-doc/restapi.html">Client REST API</a>
+      </li>
+      <li>
+        <a href="/user-doc/useradmin-ui.html">User Management Guide</a>
+      </li>
+      <li>
+        <a href="/user-doc/faq.html">FAQ</a>
+      </li>
+      <li>
+        <a href="/user-doc/support.html">Support</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Developers <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/dev-doc/getting-started.html">Getting Started</a>
+      </li>
+      <li>
+        <a href="/dev-doc/requirements/">Requirements</a>
+      </li>
+      <li>
+        <a href="/dev-doc/architecture.html">Architecture</a>
+      </li>
+      <li>
+        <a href="/dev-doc/analysis/">Analysis</a>
+      </li>
+      <li>
+        <a href="/dev-doc/design/">Design</a>
+      </li>
+      <li>
+        <a href="/dev-doc/coding-standards.html">Coding Standards</a>
+      </li>
+      <li>
+        <a href="/dev-doc/release-guide.html">Release Guide</a>
+      </li>
+      <li>
+        <a href="/dev-doc/writing-tests.html">Writing unit/integration tests</a>
+      </li>
+      <li>
+        <a href="/dev-doc/adding-custom-artifact-types.html">Adding custom artifact types</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Involved <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="/get-involved/mailing-lists.html">Mailing Lists</a>
+      </li>
+      <li>
+        <a href="/get-involved/issue-tracking.html">Issue Tracking</a>
+      </li>
+      <li>
+        <a href="/get-involved/continuous-integration.html">Continuous Integration</a>
+      </li>
+      <li>
+        <a href="/get-involved/source-code.html">Source Code</a>
+      </li>
+      <li>
+        <a href="/get-involved/project-team.html">Project Team</a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Wiki <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="https://cwiki.apache.org/confluence/display/ACE/Board+Reports">Board Reports <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="https://cwiki.apache.org/confluence/display/ACE/Index">Homepage <i class="icon-share-alt"></i></a>
+      </li>
+    </ul>
+  </li>
+  <li class="dropdown">
+    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache <b class="caret"></b></a>
+    <ul class="dropdown-menu">
+      <li>
+        <a href="http://www.apache.org/">Apache Homepage <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/licenses/">Licenses <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/security/">Security <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship <i class="icon-share-alt"></i></a>
+      </li>
+      <li>
+        <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+      </li>
+    </ul>
+  </li>
+</ul>
+
+        </div>
+      </div>
+    </div>
+    <div class="container">
+      <p><a href="/"><i class='icon-home'></i> Home</a>&nbsp;&raquo&nbsp;<a href="/dev-doc/">Dev-doc</a></p>
+      <h1>Configuring and using ACE relay servers</h1>
+      <div class="clear"></div>
+      <div id="content"><p>When using Apache ACE in a large deployment scenario, in which many targets need to be provisioned, it might be necessary to scale the number of servers with additional relay servers. This document explains how to configure such relay servers for ACE. </p>
+<h2 id="overview">Overview</h2>
+<p>In ACE, each target only talks to a single ACE server at a time. From this perspective, an ACE server only serves two major tasks: </p>
+<ol>
+<li>receiving and storing log information from targets, and;</li>
+<li>providing deployment packages containing software updates.</li>
+</ol>
+<p id="fig1">In situations where lots of targets need to be provisioned with software, having only a single ACE server can impose major scalability and availability issues. To solve this, ACE can be set up to act as relay server for an upstream (or master) ACE server. This allows a tree-topology of ACE servers to be created that can distribute the load of many targets evenly, as denoted in the following image:</p>
+<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><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>
+<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>
+<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>
+<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>
+<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">auditlog</span>
+<span class="c"># whether or not to use authentication</span>
+<span class="n">authentication</span><span class="p">.</span><span class="n">enabled</span><span class="p">=</span><span class="nb">false</span>
+</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>
+<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>
+<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>
+<span class="nb">mode</span><span class="p">=</span><span class="n">push</span>
+</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>
+<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>
+</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>
+<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>
+
+
+<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>
+<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>
+<span class="n">customer</span><span class="p">=</span><span class="n">apache</span>
+<span class="c"># indicates that this is a slave/read-only repository</span>
+<span class="n">master</span><span class="p">=</span><span class="nb">false</span>
+</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>
+<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>
+<span class="n">authentication</span><span class="p">.</span><span class="n">enabled</span> <span class="p">=</span> <span class="nb">false</span>
+</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>
+<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>
+<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>
+<span class="n">customer</span> <span class="p">=</span> <span class="n">apache</span>
+</pre></div>
+
+
+<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>
+<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>
+<span class="n">authentication</span><span class="p">.</span><span class="n">enabled</span> <span class="p">=</span> <span class="nb">false</span>
+</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>
+<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>
+<span class="n">authentication</span><span class="p">.</span><span class="n">enabled</span> <span class="p">=</span> <span class="nb">false</span>
+<span class="c">#  the OBR used for retrieving the agent software</span>
+<span class="n">obr</span><span class="p">.</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">obr</span><span class="p">.</span><span class="n">server</span><span class="p">:</span>8080<span class="o">/</span><span class="n">obr</span><span class="o">/</span>
+</pre></div>
+
+
+<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>
+<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>
+<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">repository</span><span class="p">.</span><span class="n">task</span><span class="p">.</span><span class="n">RepositoryReplicationTask</span><span class="p">=</span>5000
+</pre></div>
+
+
+<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>
+<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>
+<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>
+</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>
+</li>
+<li id="fn:3">
+<p>the property-implementation of the ACE discovery service uses a simple preconfigured property to "discover" the upstream server. The discovery service allows other, more sophisticated, implementations to be used instead;&#160;<a class="footnote-backref" href="#fnref:3" rev="footnote" title="Jump back to footnote 3 in the text">&#8617;</a></p>
+</li>
+<li id="fn:4">
+<p>the deployment repository contains all information about the different deployment packages. Each deployment package is a set of artefacts that can be installed on a target;&#160;<a class="footnote-backref" href="#fnref:4" rev="footnote" title="Jump back to footnote 4 in the text">&#8617;</a></p>
+</li>
+<li id="fn:5">
+<p>a slave repository is a repository that is not allowed to be changed and receives its content from another (master) repository.&#160;<a class="footnote-backref" href="#fnref:5" rev="footnote" title="Jump back to footnote 5 in the text">&#8617;</a></p>
+</li>
+</ol>
+</div></div>
+      <hr>
+      <footer>
+        <p>Copyright &#169; 2012-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache ACE, the Apache ACE logo, Apache and the Apache feather logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
+      </footer>
+    </div>
+  </body>
+</html>

Added: websites/staging/ace/trunk/content/dev-doc/relay_functional_overview.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/ace/trunk/content/dev-doc/relay_functional_overview.png
------------------------------------------------------------------------------
    svn:mime-type = image/png