Traffic Server Administration¶
Installing Traffic Server¶
- Select Servers in the Traffic Ops web interface.
- Scroll to the bottom of the page and click Add Server.
- Complete the Required Info: section.
- Click Submit.
- Click Save.
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 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 Thu May 26 15:52:11 UTC 2016 ====-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==== Usage: ./traffic_ops_ort.pl <Mode> <Log_Level> <Traffic_Ops_URL> <Traffic_Ops_Login> [optional flags] <Mode> = interactive - asks questions during config process. <Mode> = report - prints config differences and exits. <Mode> = badass - attempts to fix all config differences that it can. <Mode> = syncds - syncs delivery services with what is configured in Traffic Ops. <Log_Level> => ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, NONE <Traffic_Ops_URL> = URL to Traffic Ops host. Example: https://trafficops.company.net <Traffic_Ops_Login> => Example: 'username:password' [optional flags]: dispersion=<time> => wait a random number between 0 and <time> before starting. Default = 300. retries=<number> => retry connection to Traffic Ops URL <number> times. Default = 3. wait_for_parents=<0|1> => do not update if parent_pending = 1 in the update json. Default = 1, wait for parents. ====-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==== $
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:
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:
*/15 * * * * /opt/ort/traffic_ops_ort.pl syncds warn https://traffops.kabletown.net admin:password > /tmp/ort/syncds.log 2>&1
<disclaimer on what is “hot changeable” here>