You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by gi...@apache.org on 2017/12/13 16:37:24 UTC

[2/2] incubator-trafficcontrol-website git commit: Update docs from commit 1fb18e58f09eb17173c4130ecb8d803184b1730f

Update docs from commit 1fb18e58f09eb17173c4130ecb8d803184b1730f


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/commit/ef7e3476
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/tree/ef7e3476
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/diff/ef7e3476

Branch: refs/heads/asf-site
Commit: ef7e3476d22a73c806e06dab7c57dcd7c0cc966d
Parents: 3437ecf
Author: jenkins <bu...@apache.org>
Authored: Wed Dec 13 16:37:20 2017 +0000
Committer: jenkins <bu...@apache.org>
Committed: Wed Dec 13 16:37:20 2017 +0000

----------------------------------------------------------------------
 .../_sources/development/traffic_router.rst.txt | 61 +++++++-------
 docs/master/development/index.html              |  1 +
 docs/master/development/traffic_router.html     | 83 ++++++++------------
 docs/master/index.html                          |  1 +
 docs/master/searchindex.js                      |  2 +-
 5 files changed, 67 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/ef7e3476/docs/master/_sources/development/traffic_router.rst.txt
----------------------------------------------------------------------
diff --git a/docs/master/_sources/development/traffic_router.rst.txt b/docs/master/_sources/development/traffic_router.rst.txt
index 55059d4..0923f61 100644
--- a/docs/master/_sources/development/traffic_router.rst.txt
+++ b/docs/master/_sources/development/traffic_router.rst.txt
@@ -17,14 +17,15 @@ Traffic Router
 **************
 Introduction
 ============
-Traffic Router is a Java Tomcat application that routes clients to the closest available cache on the CDN using both HTTP and DNS.  Cache availability is determined by Traffic Monitor; consequently Traffic Router polls Traffic Monitor for its configuration and cache health state information, and uses this data to make routing decisions.  HTTP routing is performed by localizing the client based on the request's source IP address (IPv4 or IPv6), and issues an HTTP 302 redirect to the nearest cache.  HTTP routing utilizes consistent hashing on request URLs to optimize cache performance and request distribution.  DNS routing is performed by localizing clients, resolvers in most cases, requesting ``A`` and ``AAAA`` records for a configurable name such as ``foo.deliveryservice.somecdn.net``. Traffic Router is comprised of four separate Maven modules:
+Traffic Router is a Java Tomcat application that routes clients to the closest available cache on the CDN using both HTTP and DNS.  Cache availability is determined by Traffic Monitor; consequently Traffic Router polls Traffic Monitor for its configuration and cache health state information, and uses this data to make routing decisions.  HTTP routing is performed by localizing the client based on the request's source IP address (IPv4 or IPv6), and issues an HTTP 302 redirect to the nearest cache.  HTTP routing utilizes consistent hashing on request URLs to optimize cache performance and request distribution.  DNS routing is performed by localizing clients, resolvers in most cases, requesting ``A`` and ``AAAA`` records for a configurable name such as ``foo.deliveryservice.somecdn.net``. Traffic Router is comprised of seven separate Maven modules:
 	
-	* api - Provides a simple JSON interface into certain aspects of core and is deployed as a WAR to a Service (read: connector/listen port) within Tomcat which is separate from core
-	* connector - A JAR that overrides Tomcat's standard Http11Protocol Connector class and allows Traffic Router to delay opening listen sockets until it is in a state suitable for routing traffic
-	* geolocation - Submodule for defining geolocation services
-	* testServer - A convenience server for easier manual testing of the API portion of Traffic Router on a development machine
-	* core - Services DNS and HTTP requests, performs localization on routing requests, and is deployed as a WAR to a Service (read: connector/listen port) within Tomcat which is separate from api
-	* rpm - A simple Maven project which gathers the artifacts from the prior three modules and builds an RPM
+* shared - A reusable utility JAR for defining Delivery Service Certificates
+* configuration - A resuable JAR defining the ConfigurationListener interface
+* connector - A JAR that overrides Tomcat's standard Http11Protocol Connector class and allows Traffic Router to delay opening listen sockets until it is in a state suitable for routing traffic
+* geolocation - Submodule for defining geolocation services
+* neustar - A Jar that provides a bean "neustarGeolocationService" that implements the GeolocationService interface defined in the geolocation maven submodule, which can optionally be added to the build of Traffic Router
+* core - Services DNS and HTTP requests, performs localization on routing requests, and is deployed as a WAR to a Service (read: connector/listen port) within Tomcat which is separate from api
+* build - A simple Maven project which gathers the artifacts from the modules and builds an RPM
 
 Software Requirements
 =====================
@@ -32,26 +33,13 @@ To work on Traffic Router you need a \*nix (MacOS and Linux are most commonly us
 
 * Eclipse >= Kepler SR2 (or another Java IDE)
 * Maven >= 3.3.1
-* JDK >= 6.0
+* JDK >= 8.0
 
 Traffic Router Project Tree Overview
-=====================================
+====================================
 * ``traffic_control/traffic_traffic_router/`` - base directory for Traffic Router
 
-	* ``api/`` - Source code for Traffic Router API, which is built as its own deployable WAR file and communicates with Traffic Router Core using JMX
-
-		* ``src/main`` - Main source directory for Traffic Router API
-
-			* ``java/`` - Java source code for Traffic Router API
-			* ``resources/`` - Spring resources pulled in during an RPM build
-			* ``webapp/`` - Java webapp resources
-
-		* ``src/test`` - Test source directory for Traffic Router API
-
-			* ``java/`` - JUnit based unit tests for Traffic Router API
-			* ``resources/`` - Resources pulled in by unit tests
-
-	* ``connector/`` - Source code for Traffic Router Connector; 
+	* ``connector/`` - Source code for Traffic Router Connector;
 
 		* ``src/main/java`` - Java source directory for Traffic Router Connector
 
@@ -88,12 +76,15 @@ To install the Traffic Router Developer environment:
 2. Change directories into ``traffic_control/traffic_router``.
 3. Follow the instructions in "README.DNSSEC" for DNSSEC support.
 4. Set the environment variable TRAFFIC_MONITOR_HOSTS to be a semicolon delimited list of Traffic Monitors that can be accessed during integration tests
-5. Additional configuration is set using the below files: 
-	* core/src/test/resources no longer exists
-	* core/src/test/conf/traffic_ops.properties file holds the credentials for accessing Traffic Ops.
-	* Default configuration values now reside in core/src/main/webapp/WEB-INF/applicationContext.xml
-	* The above values may be overridden by creating and/or modifying the property files listed in core/src/main/resources/applicationProperties.xml
-	* Pre-existing properties files are still honored by Traffic Router. For example traffic_monitor.properties:
+5. Additional configuration is set using the below files:
+  * core/src/test/conf/dns.properties              - copy from core/src/main/conf
+  * core/src/test/conf/http.properties             - copy from core/src/main/conf
+  * core/src/test/conf/log4j.properties            - copy from core/src/main/conf
+  * core/src/test/conf/traffic_monitor.properties  - copy from core/src/main/conf
+  * core/src/test/conf/traffic_ops.properties file holds the credentials for accessing Traffic Ops.              - copy from core/src/main/conf
+  * Default configuration values now reside in core/src/main/webapp/WEB-INF/applicationContext.xml
+  * The above values may be overridden by creating and/or modifying the property files listed in core/src/main/resources/applicationProperties.xml
+  * Pre-existing properties files are still honored by Traffic Router. For example traffic_monitor.properties:
 
 	  +-------------------------------------+------------------------------------------------------------------------------------------------------------------+
 	  |              Parameter              |                                                      Value                                                       |
@@ -101,6 +92,7 @@ To install the Traffic Router Developer environment:
 	  | ``traffic_monitor.bootstrap.hosts`` | FQDN and port of the Traffic Monitor instance(s), separated by semicolons as necessary (do not include http://). |
 	  +-------------------------------------+------------------------------------------------------------------------------------------------------------------+
 
+
 6. Import the existing git repo into Eclipse:
 
 	a. File -> Import -> Git -> Projects from Git; Next
@@ -113,7 +105,7 @@ To install the Traffic Router Developer environment:
 
 7. From the terminal, run ``mvn clean verify`` from the ``traffic_router`` directory
 
-8. Start the embedded Jetty instance for Core from within Eclipse
+8. Start the embedded Tomcat instance for Core from within your IDE by following these steps:
 
 	a. In the package explorer, expand ``traffic_router_core``
 	b. Expand ``src/test/java``
@@ -122,7 +114,14 @@ To install the Traffic Router Developer environment:
 
 		..  Note:: If an error is displayed in the Console, run ``mvn clean verify`` from the ``traffic_router`` directory
 
-9. Traffic Router Core should now be running; the HTTP routing interface is available on http://localhost:8081, while HTTPS is available on http://localhost:8443. The DNS server and routing interface is available on localhost:1053 via TCP and UDP.
+9. Traffic Router Core should now be running; the Traffic Router API is available at http://localhost:3333, the HTTP routing interface is available on http://localhost:8888 and HTTPS is available on http://localhost:8443.
+The DNS server and routing interface is available on localhost:1053 via TCP and UDP.
+
+Manual Testing
+==============
+Look up the URL for your test 'http' Delivery Service in Traffic Ops and then:
+
+curl -vs -H “Host: <Delivery Service URL>” http://localhost:8888/x
 
 Test Cases
 ==========

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/ef7e3476/docs/master/development/index.html
----------------------------------------------------------------------
diff --git a/docs/master/development/index.html b/docs/master/development/index.html
index e213e9f..d849ef5 100644
--- a/docs/master/development/index.html
+++ b/docs/master/development/index.html
@@ -227,6 +227,7 @@
 <li class="toctree-l2"><a class="reference internal" href="traffic_router.html#traffic-router-project-tree-overview">Traffic Router Project Tree Overview</a></li>
 <li class="toctree-l2"><a class="reference internal" href="traffic_router.html#java-formatting-conventions">Java Formatting Conventions</a></li>
 <li class="toctree-l2"><a class="reference internal" href="traffic_router.html#installing-the-developer-environment">Installing The Developer Environment</a></li>
+<li class="toctree-l2"><a class="reference internal" href="traffic_router.html#manual-testing">Manual Testing</a></li>
 <li class="toctree-l2"><a class="reference internal" href="traffic_router.html#test-cases">Test Cases</a></li>
 <li class="toctree-l2"><a class="reference internal" href="traffic_router.html#rpm-packaging">RPM Packaging</a></li>
 <li class="toctree-l2"><a class="reference internal" href="traffic_router.html#api">API</a></li>

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/ef7e3476/docs/master/development/traffic_router.html
----------------------------------------------------------------------
diff --git a/docs/master/development/traffic_router.html b/docs/master/development/traffic_router.html
index 7f65f85..7f2cf2b 100644
--- a/docs/master/development/traffic_router.html
+++ b/docs/master/development/traffic_router.html
@@ -198,17 +198,16 @@
 <h1>Traffic Router<a class="headerlink" href="#traffic-router" title="Permalink to this headline">¶</a></h1>
 <div class="section" id="introduction">
 <h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
-<p>Traffic Router is a Java Tomcat application that routes clients to the closest available cache on the CDN using both HTTP and DNS.  Cache availability is determined by Traffic Monitor; consequently Traffic Router polls Traffic Monitor for its configuration and cache health state information, and uses this data to make routing decisions.  HTTP routing is performed by localizing the client based on the request&#8217;s source IP address (IPv4 or IPv6), and issues an HTTP 302 redirect to the nearest cache.  HTTP routing utilizes consistent hashing on request URLs to optimize cache performance and request distribution.  DNS routing is performed by localizing clients, resolvers in most cases, requesting <code class="docutils literal"><span class="pre">A</span></code> and <code class="docutils literal"><span class="pre">AAAA</span></code> records for a configurable name such as <code class="docutils literal"><span class="pre">foo.deliveryservice.somecdn.net</span></code>. Traffic Router
  is comprised of four separate Maven modules:</p>
-<blockquote>
-<div><ul class="simple">
-<li>api - Provides a simple JSON interface into certain aspects of core and is deployed as a WAR to a Service (read: connector/listen port) within Tomcat which is separate from core</li>
+<p>Traffic Router is a Java Tomcat application that routes clients to the closest available cache on the CDN using both HTTP and DNS.  Cache availability is determined by Traffic Monitor; consequently Traffic Router polls Traffic Monitor for its configuration and cache health state information, and uses this data to make routing decisions.  HTTP routing is performed by localizing the client based on the request&#8217;s source IP address (IPv4 or IPv6), and issues an HTTP 302 redirect to the nearest cache.  HTTP routing utilizes consistent hashing on request URLs to optimize cache performance and request distribution.  DNS routing is performed by localizing clients, resolvers in most cases, requesting <code class="docutils literal"><span class="pre">A</span></code> and <code class="docutils literal"><span class="pre">AAAA</span></code> records for a configurable name such as <code class="docutils literal"><span class="pre">foo.deliveryservice.somecdn.net</span></code>. Traffic Router
  is comprised of seven separate Maven modules:</p>
+<ul class="simple">
+<li>shared - A reusable utility JAR for defining Delivery Service Certificates</li>
+<li>configuration - A resuable JAR defining the ConfigurationListener interface</li>
 <li>connector - A JAR that overrides Tomcat&#8217;s standard Http11Protocol Connector class and allows Traffic Router to delay opening listen sockets until it is in a state suitable for routing traffic</li>
 <li>geolocation - Submodule for defining geolocation services</li>
-<li>testServer - A convenience server for easier manual testing of the API portion of Traffic Router on a development machine</li>
+<li>neustar - A Jar that provides a bean &#8220;neustarGeolocationService&#8221; that implements the GeolocationService interface defined in the geolocation maven submodule, which can optionally be added to the build of Traffic Router</li>
 <li>core - Services DNS and HTTP requests, performs localization on routing requests, and is deployed as a WAR to a Service (read: connector/listen port) within Tomcat which is separate from api</li>
-<li>rpm - A simple Maven project which gathers the artifacts from the prior three modules and builds an RPM</li>
+<li>build - A simple Maven project which gathers the artifacts from the modules and builds an RPM</li>
 </ul>
-</div></blockquote>
 </div>
 <div class="section" id="software-requirements">
 <h2>Software Requirements<a class="headerlink" href="#software-requirements" title="Permalink to this headline">¶</a></h2>
@@ -216,7 +215,7 @@
 <ul class="simple">
 <li>Eclipse &gt;= Kepler SR2 (or another Java IDE)</li>
 <li>Maven &gt;= 3.3.1</li>
-<li>JDK &gt;= 6.0</li>
+<li>JDK &gt;= 8.0</li>
 </ul>
 </div>
 <div class="section" id="traffic-router-project-tree-overview">
@@ -225,29 +224,6 @@
 <li><p class="first"><code class="docutils literal"><span class="pre">traffic_control/traffic_traffic_router/</span></code> - base directory for Traffic Router</p>
 <blockquote>
 <div><ul>
-<li><p class="first"><code class="docutils literal"><span class="pre">api/</span></code> - Source code for Traffic Router API, which is built as its own deployable WAR file and communicates with Traffic Router Core using JMX</p>
-<blockquote>
-<div><ul>
-<li><p class="first"><code class="docutils literal"><span class="pre">src/main</span></code> - Main source directory for Traffic Router API</p>
-<blockquote>
-<div><ul class="simple">
-<li><code class="docutils literal"><span class="pre">java/</span></code> - Java source code for Traffic Router API</li>
-<li><code class="docutils literal"><span class="pre">resources/</span></code> - Spring resources pulled in during an RPM build</li>
-<li><code class="docutils literal"><span class="pre">webapp/</span></code> - Java webapp resources</li>
-</ul>
-</div></blockquote>
-</li>
-<li><p class="first"><code class="docutils literal"><span class="pre">src/test</span></code> - Test source directory for Traffic Router API</p>
-<blockquote>
-<div><ul class="simple">
-<li><code class="docutils literal"><span class="pre">java/</span></code> - JUnit based unit tests for Traffic Router API</li>
-<li><code class="docutils literal"><span class="pre">resources/</span></code> - Resources pulled in by unit tests</li>
-</ul>
-</div></blockquote>
-</li>
-</ul>
-</div></blockquote>
-</li>
 <li><p class="first"><code class="docutils literal"><span class="pre">connector/</span></code> - Source code for Traffic Router Connector;</p>
 <blockquote>
 <div><ul class="simple">
@@ -305,28 +281,32 @@
 <div class="section" id="installing-the-developer-environment">
 <h2>Installing The Developer Environment<a class="headerlink" href="#installing-the-developer-environment" title="Permalink to this headline">¶</a></h2>
 <p>To install the Traffic Router Developer environment:</p>
-<ol class="arabic">
-<li><p class="first">Clone the traffic_control repository using Git.</p>
-</li>
-<li><p class="first">Change directories into <code class="docutils literal"><span class="pre">traffic_control/traffic_router</span></code>.</p>
+<ol class="arabic simple">
+<li>Clone the traffic_control repository using Git.</li>
+<li>Change directories into <code class="docutils literal"><span class="pre">traffic_control/traffic_router</span></code>.</li>
+<li>Follow the instructions in &#8220;README.DNSSEC&#8221; for DNSSEC support.</li>
+<li>Set the environment variable TRAFFIC_MONITOR_HOSTS to be a semicolon delimited list of Traffic Monitors that can be accessed during integration tests</li>
+<li>Additional configuration is set using the below files:</li>
+</ol>
+<blockquote>
+<div><ul>
+<li><p class="first">core/src/test/conf/dns.properties              - copy from core/src/main/conf</p>
 </li>
-<li><p class="first">Follow the instructions in &#8220;README.DNSSEC&#8221; for DNSSEC support.</p>
+<li><p class="first">core/src/test/conf/http.properties             - copy from core/src/main/conf</p>
 </li>
-<li><p class="first">Set the environment variable TRAFFIC_MONITOR_HOSTS to be a semicolon delimited list of Traffic Monitors that can be accessed during integration tests</p>
+<li><p class="first">core/src/test/conf/log4j.properties            - copy from core/src/main/conf</p>
 </li>
-<li><dl class="first docutils">
-<dt>Additional configuration is set using the below files:</dt>
-<dd><ul class="first last">
-<li><p class="first">core/src/test/resources no longer exists</p>
+<li><p class="first">core/src/test/conf/traffic_monitor.properties  - copy from core/src/main/conf</p>
 </li>
-<li><p class="first">core/src/test/conf/traffic_ops.properties file holds the credentials for accessing Traffic Ops.</p>
+<li><p class="first">core/src/test/conf/traffic_ops.properties file holds the credentials for accessing Traffic Ops.              - copy from core/src/main/conf</p>
 </li>
 <li><p class="first">Default configuration values now reside in core/src/main/webapp/WEB-INF/applicationContext.xml</p>
 </li>
 <li><p class="first">The above values may be overridden by creating and/or modifying the property files listed in core/src/main/resources/applicationProperties.xml</p>
 </li>
 <li><p class="first">Pre-existing properties files are still honored by Traffic Router. For example traffic_monitor.properties:</p>
-<table border="1" class="docutils">
+<blockquote>
+<div><table border="1" class="docutils">
 <colgroup>
 <col width="25%" />
 <col width="75%" />
@@ -342,11 +322,11 @@
 </tr>
 </tbody>
 </table>
+</div></blockquote>
 </li>
 </ul>
-</dd>
-</dl>
-</li>
+</div></blockquote>
+<ol class="arabic" start="6">
 <li><p class="first">Import the existing git repo into Eclipse:</p>
 <blockquote>
 <div><ol class="loweralpha simple">
@@ -362,7 +342,7 @@
 </li>
 <li><p class="first">From the terminal, run <code class="docutils literal"><span class="pre">mvn</span> <span class="pre">clean</span> <span class="pre">verify</span></code> from the <code class="docutils literal"><span class="pre">traffic_router</span></code> directory</p>
 </li>
-<li><p class="first">Start the embedded Jetty instance for Core from within Eclipse</p>
+<li><p class="first">Start the embedded Tomcat instance for Core from within your IDE by following these steps:</p>
 <blockquote>
 <div><ol class="loweralpha">
 <li><p class="first">In the package explorer, expand <code class="docutils literal"><span class="pre">traffic_router_core</span></code></p>
@@ -382,9 +362,14 @@
 </ol>
 </div></blockquote>
 </li>
-<li><p class="first">Traffic Router Core should now be running; the HTTP routing interface is available on <a class="reference external" href="http://localhost:8081">http://localhost:8081</a>, while HTTPS is available on <a class="reference external" href="http://localhost:8443">http://localhost:8443</a>. The DNS server and routing interface is available on localhost:1053 via TCP and UDP.</p>
-</li>
 </ol>
+<p>9. Traffic Router Core should now be running; the Traffic Router API is available at <a class="reference external" href="http://localhost:3333">http://localhost:3333</a>, the HTTP routing interface is available on <a class="reference external" href="http://localhost:8888">http://localhost:8888</a> and HTTPS is available on <a class="reference external" href="http://localhost:8443">http://localhost:8443</a>.
+The DNS server and routing interface is available on localhost:1053 via TCP and UDP.</p>
+</div>
+<div class="section" id="manual-testing">
+<h2>Manual Testing<a class="headerlink" href="#manual-testing" title="Permalink to this headline">¶</a></h2>
+<p>Look up the URL for your test &#8216;http&#8217; Delivery Service in Traffic Ops and then:</p>
+<p>curl -vs -H “Host: &lt;Delivery Service URL&gt;” <a class="reference external" href="http://localhost:8888/x">http://localhost:8888/x</a></p>
 </div>
 <div class="section" id="test-cases">
 <h2>Test Cases<a class="headerlink" href="#test-cases" title="Permalink to this headline">¶</a></h2>

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol-website/blob/ef7e3476/docs/master/index.html
----------------------------------------------------------------------
diff --git a/docs/master/index.html b/docs/master/index.html
index aca40e6..6bcf04f 100644
--- a/docs/master/index.html
+++ b/docs/master/index.html
@@ -383,6 +383,7 @@
 <li class="toctree-l3"><a class="reference internal" href="development/traffic_router.html#traffic-router-project-tree-overview">Traffic Router Project Tree Overview</a></li>
 <li class="toctree-l3"><a class="reference internal" href="development/traffic_router.html#java-formatting-conventions">Java Formatting Conventions</a></li>
 <li class="toctree-l3"><a class="reference internal" href="development/traffic_router.html#installing-the-developer-environment">Installing The Developer Environment</a></li>
+<li class="toctree-l3"><a class="reference internal" href="development/traffic_router.html#manual-testing">Manual Testing</a></li>
 <li class="toctree-l3"><a class="reference internal" href="development/traffic_router.html#test-cases">Test Cases</a></li>
 <li class="toctree-l3"><a class="reference internal" href="development/traffic_router.html#rpm-packaging">RPM Packaging</a></li>
 <li class="toctree-l3"><a class="reference internal" href="development/traffic_router.html#api">API</a></li>