Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Traffic Ops into a Service Oriented architecture(SOA) product #6754

Merged
merged 19 commits into from
May 10, 2022

Conversation

srijeet0406
Copy link
Contributor

@srijeet0406 srijeet0406 commented Apr 13, 2022

This PR is not related to any issue.
It adds the ability in Traffic Ops, so that it can be run in conjunction with other backend services, wherein TO would just act as a reverse proxy and forward the requests coming in on the specified paths to the specified backends.


Which Traffic Control components are affected by this PR?

  • Documentation
  • Traffic Ops

What is the best way to verify this PR?

Set up a simple backend service that servers a couple of endpoints (say foo and foos) and run it on a couple of different ports(say, 8444 and 8445). Now, run Traffic Ops with the new config option and make sure that any request to Traffic Ops on the specified endpoints (in the new config) gets forwarded to the backend service. Also make sure that the user sees the response from the backend service.
The new config option should be provided to traffic ops like this:
-backendcfg <File name>
The new config file should look something like this:

{
 "routes": [
   {
     "path": "^/api/4.0/foo/?$",
     "method": "GET",
     "hosts": [
       "localhost:8444"
     ],
     "insecure": true,
     "permissions": [
       "CDN:READ"
     ],
     "routeId": 123456,
     "opts": {
       "alg": "roundrobin"
     }
   },
   {
     "path": "^/api/4.0/foos/?$",
     "method": "GET",
     "hosts": [
       "localhost:8444"
     ],
     "insecure": true,
     "permissions": [
       "CDN:READ"
     ],
     "routeId": 123457,
     "opts": {
       "alg": "roundrobin"
     }
   }
 ]
}

Make sure all the tests pass.

If this is a bugfix, which Traffic Control versions contained the bug?

  • master

PR submission checklist

@zrhoffman zrhoffman added new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops needs more info more information or a better description is needed to proceed labels Apr 13, 2022
@srijeet0406 srijeet0406 removed the needs more info more information or a better description is needed to proceed label Apr 13, 2022
@srijeet0406 srijeet0406 marked this pull request as ready for review April 19, 2022 19:19
CHANGELOG.md Outdated Show resolved Hide resolved
traffic_ops/app/conf/backends.conf Outdated Show resolved Hide resolved
docs/source/admin/traffic_ops.rst Outdated Show resolved Hide resolved
docs/source/admin/traffic_ops.rst Outdated Show resolved Hide resolved
docs/source/admin/traffic_ops.rst Outdated Show resolved Hide resolved
traffic_ops/traffic_ops_golang/traffic_ops_golang.go Outdated Show resolved Hide resolved
traffic_ops/traffic_ops_golang/routing/routing.go Outdated Show resolved Hide resolved
traffic_ops/traffic_ops_golang/routing/routing.go Outdated Show resolved Hide resolved
traffic_ops/traffic_ops_golang/routing/routing.go Outdated Show resolved Hide resolved
traffic_ops/traffic_ops_golang/routing/routing.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean to look at anything but the docs, but then I looked at the configuration that it was including, then the related production configuration file that was based on it and wound up glancing at most everything. I'm not looking too hard at any of the logic though - I'm not trying to make a hostile takeover of the review.

docs/source/admin/traffic_ops.rst Outdated Show resolved Hide resolved
docs/source/admin/traffic_ops.rst Outdated Show resolved Hide resolved
docs/source/admin/traffic_ops.rst Outdated Show resolved Hide resolved
docs/source/admin/traffic_ops.rst Outdated Show resolved Hide resolved
docs/source/admin/traffic_ops.rst Outdated Show resolved Hide resolved
traffic_ops/app/conf/production/backends.conf Outdated Show resolved Hide resolved
traffic_ops/traffic_ops_golang/config/config.go Outdated Show resolved Hide resolved
@rawlinp rawlinp merged commit 000c1b9 into apache:master May 10, 2022
zrhoffman pushed a commit to zrhoffman/trafficcontrol that referenced this pull request Oct 2, 2022
…apache#6754)

* initial changes

* working changes

* formatting and cleanup

* cleanup

* adding log handlers

* add dcos, cleanup

* add todos

* add todos

* cleanup config

* add insecure option to backend config

* Adding proper log handlers

* remove priv level from backend config

* code review first pass

* code review fixes final

* change log call

* change mutex type

* addressing code review comments

* change regex handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants