You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2017/04/03 18:22:23 UTC

[2/4] incubator-trafficcontrol git commit: Minor improvements to Traffic Server administrator manual Changed order of servers in sample installation procedure: Traffic monitor before Traffic Servers

Minor improvements to Traffic Server administrator manual
Changed order of servers in sample installation procedure: Traffic monitor before Traffic Servers


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

Branch: refs/heads/master
Commit: 5e499e613174e71a89d41cd630581fd60bd7c39e
Parents: 278c01a
Author: Oren Shemesh <or...@qwilt.com>
Authored: Mon Jan 30 17:12:24 2017 +0200
Committer: Dave Neuman <ne...@apache.org>
Committed: Mon Apr 3 12:22:34 2017 -0600

----------------------------------------------------------------------
 docs/source/admin/index.rst           | 16 +++---
 docs/source/admin/traffic_monitor.rst |  9 ++-
 docs/source/admin/traffic_server.rst  | 88 ++++++++++++++++++++++++------
 3 files changed, 86 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5e499e61/docs/source/admin/index.rst
----------------------------------------------------------------------
diff --git a/docs/source/admin/index.rst b/docs/source/admin/index.rst
index e92f5e2..1bb8555 100644
--- a/docs/source/admin/index.rst
+++ b/docs/source/admin/index.rst
@@ -20,14 +20,14 @@ Traffic Control is distributed in source form for the developer, but also as a b
 
 When installing a complete CDN from scratch, a sample recommended order is:
 
-1. Traffic Ops
-2. Traffic Vault (Riak)
-3. Apache Traffic Server Mid-Tier Caches
-4. Apache Traffic Server Edge Caches
-5. Traffic Monitor
-6. Traffic Router
-7. Traffic Stats
-8. Traffic Portal
+#. Traffic Ops
+#. Traffic Vault (Riak)
+#. Traffic Monitor
+#. Apache Traffic Server Mid-Tier Caches
+#. Apache Traffic Server Edge Caches
+#. Traffic Router
+#. Traffic Stats
+#. Traffic Portal
 
 Once everything is installed, you will need to configure the servers to talk to each other. You will also need Origin server(s), which the Mid-Tier Cache(s) get content from. An Origin server is simply an HTTP(S) server which serves the content you wish to cache on the CDN.
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5e499e61/docs/source/admin/traffic_monitor.rst
----------------------------------------------------------------------
diff --git a/docs/source/admin/traffic_monitor.rst b/docs/source/admin/traffic_monitor.rst
index 4b3d205..10354cd 100644
--- a/docs/source/admin/traffic_monitor.rst
+++ b/docs/source/admin/traffic_monitor.rst
@@ -30,7 +30,7 @@ The following are requirements to ensure an accurate set up:
 * perl-JSON
 * perl-WWW-Curl
 
-#. Enter the Traffic Monitor server into Traffic Ops. Set the 'Type' field to 'RASCAL'.
+#. Add the Traffic Monitor server into Traffic Ops using 'Servers' -> 'Add Server'. Set the 'Type' field to 'RASCAL'.
 
 #. Make sure the FQDN of the Traffic Monitor is resolvable in DNS.
 
@@ -133,7 +133,7 @@ The following are requirements to ensure an accurate set up:
    with the address of the traffic monitor being installed, so that the traffic servers will allow this Traffic Monitor
    to access the astats plugin.
    For details see :ref:`rl-param-prof` in the *Configuring Traffic Ops* section.
-   
+
 #. Start Tomcat: ``sudo service tomcat start`` ::
 
     Using CATALINA_BASE: /opt/tomcat
@@ -146,7 +146,10 @@ The following are requirements to ensure an accurate set up:
 
 #. Configure tomcat to start automatically: ``sudo chkconfig tomcat on``
 
-#. Verify Traffic Monitor is running by pointing your browser to port 80 on the Traffic Monitor host.
+#. Verify Traffic Monitor is running by pointing your browser to port 80 on the Traffic Monitor host:
+
+   * The 'Cache States' tab should display all Mid and Edge caches configured in Traffic Ops.
+   * The 'DeliveryService States' tab should display all delivery services configured in Traffic Ops.
 
 #. In Traffic Ops servers table, click 'Edit' for this server, then click 'Online'.
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5e499e61/docs/source/admin/traffic_server.rst
----------------------------------------------------------------------
diff --git a/docs/source/admin/traffic_server.rst b/docs/source/admin/traffic_server.rst
index 1b99ce0..41a5b9e 100644
--- a/docs/source/admin/traffic_server.rst
+++ b/docs/source/admin/traffic_server.rst
@@ -18,26 +18,56 @@ Traffic Server Administration
 *****************************
 Installing Traffic Server
 =========================
-1. Select **Servers** in the Traffic Ops web interface.
-2. Scroll to the bottom of the page and click **Add Server**.
-3. Complete the *Required Info*: section.
-4. Click **Submit**.
-5. Click **Save**.
 
-.. 6. Click **Online Server**.
-.. 7. From the Set status of this machine to ONLINE? screen, click **OK**.
+#. Get the Traffic Server RPM and the astats RPM.
+
+   Sample command: ::
+
+      wget http://traffic-control-cdn.net/downloads/1.7.0/RELEASE-1.7.0/trafficserver-5.3.2-759.ee14bbe.el6.x86_64.rpm
+      wget http://traffic-control-cdn.net/downloads/1.6.1/RELEASE-1.6.1/astats_over_http-1.2-8.el6.x86_64.rpm
+
+   (astats was not released as part of 1.7, so in this examples 1.6.1 was used)
+#. Install Traffic Server and astats: ::
+
+    sudo yum -y install trafficserver-*.rpm astats_over_http*.rpm
+
+#. Add the server using the Traffic Ops web interface:
+
+   #. Select **Servers**.
+   #. Scroll to the bottom of the page and click **Add Server**.
+   #. Complete the *Required Info:* section:
+      * Set 'Interface Name' to the name of the interface from which traffic server delivers content. 
+      * Set 'Type' to 'MID' or 'EDGE'.
+
+   #. Click **Submit**.
+   #. Click **Save**.
+   #. Click **Online Server**.
+
+#. Install the ORT script and run it in 'badass' mode to create the initial configuration, see :ref:`reference-traffic-ops-ort` 
+
+#. Start the service: ``sudo service trafficserver start``
+
+#. Configure traffic server to start automatically: ``sudo chkconfig trafficserver on``
+
+#. Verify that the installation is good:
+
+   #. Make sure that the service is running: ``sudo service trafficserver status``
+
+   #. Assuming a traffic monitor is already installed, login to the traffic monitor, and run the command from it: ::
+
+        curl <traffic-server-name>/_astats
+
+      Make sure you get a json full of values, and not an error.
+
 
 .. _reference-traffic-ops-ort:
 
 Configuring Traffic Server
 ==========================
 All of the Traffic Server application configuration files are generated by Traffic Ops and installed by way of the traffic_ops_ort.pl script. 
+The traffic_ops_ort.pl should be installed on all caches (by puppet or other non Traffic Ops means), usually in /opt/ort. It is used to do the initial install of the config files when the cache is being deployed, and to keep the config files up to date when the cache is already in service.  The usage message of the script is shown below: ::
 
-
-**traffic_ops_ort.pl**
-  The traffic_ops_ort.pl should be installed on all caches (by puppet or other non Traffic Ops means), usually in /opt/ort. It is used to do initial install of the config files when the cache is being deployed, and to keep the config files up to date when the cache is already in service.  The usage message of the script is shown below: ::
-
-    $ sudo ./traffic_ops_ort.pl syncds warn https://to.cdn.kabletown.net
+    $ sudo /opt/ort/traffic_ops_ort.pl
     Thu May 26 15:52:11 UTC 2016
     ====-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-====
     Usage: ./traffic_ops_ort.pl <Mode> <Log_Level> <Traffic_Ops_URL> <Traffic_Ops_Login> [optional flags]
@@ -59,13 +89,39 @@ All of the Traffic Server application configuration files are generated by Traff
     ====-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-====
     $
 
+Installing the ORT script
+--------------------------
+
+#. The ORT script is not a part of the traffic server distribution. You need to get and install in manually. In this sample session, we get it from github: ::
 
-  For initial configuration or when major changes (like a Profile change) need to be made, run the script in "badass mode". All required rpm packages will be installed, all Traffic Server config files will be fetched and installed, and (if needed) the Traffic Server application will be restarted.  Example run below: ::
+     sudo mkdir /opt/ort
+     sudo wget -P /opt/ort https://raw.githubusercontent.com/apache/incubator-trafficcontrol/1.7.x/traffic_ops/bin/traffic_ops_ort.pl
+     sudo chmod +x /opt/ort/traffic_ops_ort.pl
 
-    run here 
+#. Install modules required by ORT: ``sudo yum -y install perl-JSON perl-Crypt-SSLeay``
 
-  For "every day changes" such as adding deliveryservices or changing records.config parameters caches should run the script in "syncds" mode out of cron. Example crontab entry: :: 
+#. For initial configuration or when major changes (like a Profile change) need to be made, run the script in "badass mode". All required rpm packages 
+   will be installed, all Traffic Server config files will be fetched and installed, and (if needed) the Traffic Server application will be restarted.  
+   
+   Example run below: ::
+
+      $ sudo /opt/ort/traffic_ops_ort.pl --dispersion=0 badass warn https://ops.$tcDomain admin:admin123
+
+   .. Note:: First run gives a lot of state errors that are expected. The "badass" mode fixes these issues. Run it a second time, this should be cleaner.  
+   .. Note:: Many ERROR messages emitted by ORT are actually information messages. Do not panic.
+
+#. Create a cron entry for running ort in 'syncds' mode every 15 minutes. 
+   This makes traffic control check periodically if 'Queue Updates' was run on Traffic Ops, and it so, get the updated configuration.
+
+   Run ``sudo crontab -e`` and add the following line ::
 
   		*/15 * * * * /opt/ort/traffic_ops_ort.pl syncds warn https://traffops.kabletown.net admin:password > /tmp/ort/syncds.log 2>&1
 
-  .. Note:: <disclaimer on what is "hot changeable" here>
+   .. Note:: In 'syncds' mode, the ort script updates only configurations that might be changed as part of normal operations, such as:
+
+      * Delivery Services
+      * SSL certificates
+      * Traffic Monitor IP addresses
+      * Logging configuration
+      * More stuff <To be completed>
+