|
| 1 | + |
| 2 | +Tegu |
| 3 | +==== |
| 4 | + |
| 5 | +Tegu is a reservation manager which provides the ability to create and manage: |
| 6 | + * quality of service bandwidth reservations between network endpoints |
| 7 | + * flow steering reservations |
| 8 | + * wide area network stitching |
| 9 | + * port mirroring reservations |
| 10 | + |
| 11 | +Tegu uses an underlying agent, also included in this repository, to directly manage the |
| 12 | +physical components (Open vSwitch or physical switches) as is needed to implement the |
| 13 | +reservations. |
| 14 | +The underlying agent scripts are contained in the agent directory and the tegu_agent |
| 15 | +binary is in the main directory. |
| 16 | + |
| 17 | +Directory Overview |
| 18 | +------------------ |
| 19 | + |
| 20 | +The Tegu source is divided into the following subdirectories/packages: |
| 21 | + |
| 22 | +#### agent/bandwidth |
| 23 | +This directory contains various direct interfaces (shell scripts) to things like OVS, |
| 24 | +Arista switches, Floodlight (skoogie), etc. |
| 25 | + |
| 26 | +#### agent/mirror |
| 27 | +This directory contains shell scripts used to create and remove mirrors to ports in an |
| 28 | +OpenStack environment. |
| 29 | + |
| 30 | +#### doc |
| 31 | +The manual pages for the executables *rjprt*, *tegu*, *tegu_req* and a manual page |
| 32 | +describing the Tegu API. |
| 33 | + |
| 34 | +#### gizmos |
| 35 | +Source files which implement objects, interfaces and the functions that operate directly |
| 36 | +on them (link, host, switch, pledge, etc.). |
| 37 | + |
| 38 | +#### main |
| 39 | +Entry point functions (*tegu*, *tegu_agent*, and *rjprt*). |
| 40 | + |
| 41 | +#### managers |
| 42 | +Functions that are driven as goroutines and thus implement major components of the |
| 43 | +application (reservation manager, fq manager, etc.). |
| 44 | + |
| 45 | +#### support |
| 46 | +Regressions tests. |
| 47 | + |
| 48 | +#### system |
| 49 | +Scripts used to start, stop, and manage Tegu in a Linux environment, as well as the |
| 50 | +*tegu_ha* Python script. |
| 51 | + |
| 52 | +File Overview |
| 53 | +------------- |
| 54 | + |
| 55 | +Here is an overview of the purpose of some of the .go files in this repository. |
| 56 | + |
| 57 | +#### gizmos directory |
| 58 | + |
| 59 | +__fence.go__ - Implements a user limit fence mechanism. |
| 60 | +__flight_if.go__ - A floodlight interface providing methods that allow queries to |
| 61 | +the controller for gathering link and host information. |
| 62 | +__host.go__ - Represents a single host in the network graph and in a path. |
| 63 | +__init.go__ - Package level initialization. |
| 64 | +__link.go__ - Represents a link between switches in the network graph and in a path. |
| 65 | +__lite.go__ - Functions that were implemented quickly to support tegu-lite. |
| 66 | +These probably should be moved to separate files, or likely into tools, but during the |
| 67 | +hasty implementation of -lite it was easier to keep them bunched here. |
| 68 | +__mbox.go__ - Middlebox representation for steering reservations. |
| 69 | +__obligation.go__ - Used to manage an obligation of something over time; |
| 70 | +references many time slices. |
| 71 | +__path.go__ - Manages a path that has been created with a given amount of bandwith. |
| 72 | +__pledge.go__ - An interface representing a reservation tracked by resmgr. |
| 73 | +Implemented by the various pledge types in the pledge_* files. |
| 74 | +__pledge_window.go__ - Manages a time window for pledges and provides basic |
| 75 | +*is_active*, *is_expired* functions. |
| 76 | +__queue.go__ - Manages information needed to set individual queues for a reservation. |
| 77 | +__spq.go__ - A very simple object which allows the return of queue information to |
| 78 | +a caller in a single bundle (presently, just the struct, no functions exist). |
| 79 | +switch.go__ - Represents a switch in the network graph. |
| 80 | +__time_slice.go__ - A single range of time for which a given amount of bandwith |
| 81 | +has been allocated. |
| 82 | +__tools.go__ - Some generic tools but not generic enough to put in *gopkgs*. |
| 83 | + |
| 84 | +#### managers directory |
| 85 | + |
| 86 | +__fq_mgr.go__ - Flowmod/queue manager. |
| 87 | +__fq_mgr_steer.go__ - Steering based FQ-mgr support. |
| 88 | +__fq_req.go__ - Fqmgr request structure and related functions. |
| 89 | +__globals.go__ - Constants and a few globals shared by \*.go in this directory. |
| 90 | +This module also contains the initialisation function that sets all globals up. |
| 91 | +__http_api.go__ - Provides the HTTP server, and code to serve URL's under */tegu/api*. |
| 92 | +__http_mirror_api.go__ - The HTTP interface for mirroring. |
| 93 | +__network.go__ - Manages the network graph. |
| 94 | +__net_req.go__ - Network manager request struct and related functions. |
| 95 | +__res_mgr.go__ - Provides the reservation management logic, supplemented by three support modules: |
| 96 | +*res_mgr_bw.go*, *res_mgr_mirror.go*, and *res_mgr_steer.go*. |
| 97 | +__osif.go__ - OpenStack interface manager. |
| 98 | +__osif_proj.go__ - Project specific OpenStack interface functions. |
| 99 | + |
| 100 | + |
| 101 | +Building Tegu |
| 102 | +------------- |
| 103 | + |
| 104 | +The Tegu source depends on a set of Go packages that were developed along with Tegu, |
| 105 | +but are general enough to warrant their not being included here. |
| 106 | +They are all a part of the `github.com/att/gopkgs` package library. |
| 107 | +To use them, clone the git project as described below. |
| 108 | +They will be referenced as needed during the build process (unlike C, there is no need |
| 109 | +to build a library to link against). |
| 110 | +You should be able to do `go get github.com/att/gopkgs` to pull them down. |
| 111 | + |
| 112 | +### Go Environment |
| 113 | +The GOPATH variable must be set to the top level directory in your source tree. |
| 114 | +Within that directory there should be src, bin, and pkg directories. |
| 115 | +Under src there should be a github.com directory which will hold all of your |
| 116 | +Go related repositories that are checked out of github. |
| 117 | + |
| 118 | +For example: |
| 119 | + |
| 120 | + export GOPATH=$HOME/godev |
| 121 | + cd $GOPATH |
| 122 | + mkdir github.com |
| 123 | + cd github.com |
| 124 | + |
| 125 | + # fork a copy of the tegu and gopkgs first!!! |
| 126 | + |
| 127 | + # replace XXXXX with your user id, then clone your forks |
| 128 | + git clone https://XXXXXX@github.com/~XXXXXX/tegu.git |
| 129 | + git clone https://XXXXXX@github.com/~XXXXXX/gopkgs.git |
| 130 | + |
| 131 | + cd tegu |
| 132 | + git checkout master |
| 133 | + |
| 134 | +Build Tegu by: |
| 135 | + |
| 136 | + go build main/rjprt.go # builds the rjprt binary |
| 137 | + go build main/tegu.go # builds the tegu binary |
| 138 | + go build main/tegu_agent.go # builds the tegu agent binary |
| 139 | + |
| 140 | +What is a Tegu? |
| 141 | +--------------- |
| 142 | + |
| 143 | +A type of lizard (https://en.wikipedia.org/wiki/Tegu). |
0 commit comments