TaylorCFrey commented on a change in pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710#discussion_r614419369



##########
File path: docs/source/development/debugging.rst
##########
@@ -44,14 +82,14 @@ Traffic Monitor
 
 * Still in ``infrastructure/cdn-in-a-box``, open ``variables.env`` and set 
``TM_DEBUG_ENABLE`` to ``true``.
 
-* Stop CDN-in-a-Box if it is running and remove any existing volumes. Rebuild 
the ``trafficmonitor`` image to make sure it uses our fresh 
``traffic_monitor.rpm``. Then, start CDN-in-a-Box.
+* Stop CDN-in-a-Box if it is running and remove any existing volumes. Build 
the ``trafficmonitor-debug`` image to make sure it uses our fresh 
``traffic_monitor.rpm``. Then, start CDN-in-a-Box:
 
 .. code-block:: shell
        :caption: docker-compose command for debugging Traffic Monitor
 
        alias mydc='docker-compose -f docker-compose.yml -f 
docker-compose.expose-ports.yml optional/docker-compose.debugging.yml'

Review comment:
       I believe there needs to be an additional `-f` flag in front of the 
optional/docker-compose.debugging.yml

##########
File path: docs/source/development/debugging.rst
##########
@@ -24,11 +24,49 @@ Debugging inside CDN-in-a-Box
 
 Some CDN-in-a-Box components can be used with a debugger to step through lines 
of code, set breakpoints, see the state of all variables in each scope, etc. at 
runtime. Components that support debugging:
 
+* `Enroller`_
 * `Traffic Monitor`_
 * `Traffic Ops`_
 * `Traffic Router`_
 * `Traffic Stats`_
 
+Enroller
+========
+
+* Stop CDN-in-a-Box if it is running and remove any existing volumes. 
Build/rebuild the ``enroller-debug`` image each time you have changed 
:atc-file:`infrastructure/cdn-in-a-box/enroller/enroller.go`. Then, start 
CDN-in-a-Box.
+
+.. code-block:: shell
+       :caption: docker-compose command for debugging the CDN in a Box Enroller
+
+       alias mydc='docker-compose -f docker-compose.yml -f 
docker-compose.expose-ports.yml optional/docker-compose.debugging.yml'

Review comment:
       I believe there needs to be an additional `-f` flag in front of the 
optional/docker-compose.debugging.yml

##########
File path: traffic_ops/testing/api/conf/traffic-ops-test.conf
##########
@@ -8,13 +8,13 @@
             "warning": "stdout"
         },
         "session": {
-            "timeoutInSecs": 60
+            "timeoutInSecs": 9999999
         },
         "includeSystemTests": false
     },
     "use_ims": true,
     "trafficOps": {
-        "URL": "https://localhost:8443";,
+        "URL": "https://localhost:6443";,

Review comment:
       I thought 8443 was specified as the default in the cdn.conf. Does this 
have any impact?

##########
File path: docs/source/development/debugging.rst
##########
@@ -241,14 +279,14 @@ Traffic Stats
 
 * Still in ``infrastructure/cdn-in-a-box``, open ``variables.env`` and set 
``TS_DEBUG_ENABLE`` to ``true``.
 
-* Stop CDN-in-a-Box if it is running and remove any existing volumes. Rebuild 
the ``trafficstats`` image to make sure it uses our fresh 
``traffic_stats.rpm``. Then, start CDN-in-a-Box.
+* Stop CDN-in-a-Box if it is running and remove any existing volumes. Build 
the ``trafficstats-debug`` image to make sure it uses our fresh 
``traffic_stats.rpm``. Then, start CDN-in-a-Box:
 
 .. code-block:: shell
        :caption: docker-compose command for debugging Traffic Stats
 
        alias mydc='docker-compose -f docker-compose.yml -f 
docker-compose.expose-ports.yml optional/docker-compose.debugging.yml'

Review comment:
       I believe there needs to be an additional `-f` flag in front of the 
optional/docker-compose.debugging.yml

##########
File path: docs/source/development/debugging.rst
##########
@@ -24,11 +24,49 @@ Debugging inside CDN-in-a-Box
 
 Some CDN-in-a-Box components can be used with a debugger to step through lines 
of code, set breakpoints, see the state of all variables in each scope, etc. at 
runtime. Components that support debugging:
 
+* `Enroller`_
 * `Traffic Monitor`_
 * `Traffic Ops`_
 * `Traffic Router`_
 * `Traffic Stats`_
 
+Enroller
+========
+
+* Stop CDN-in-a-Box if it is running and remove any existing volumes. 
Build/rebuild the ``enroller-debug`` image each time you have changed 
:atc-file:`infrastructure/cdn-in-a-box/enroller/enroller.go`. Then, start 
CDN-in-a-Box.
+
+.. code-block:: shell
+       :caption: docker-compose command for debugging the CDN in a Box Enroller
+
+       alias mydc='docker-compose -f docker-compose.yml -f 
docker-compose.expose-ports.yml optional/docker-compose.debugging.yml'
+       mydc down -v
+       mydc build enroller
+       mydc up
+
+* Install `an IDE that supports delve 
<https://github.com/go-delve/delve/blob/master/Documentation/EditorIntegration.md>`_
 and create a debugging configuration over port 2343. If you are using VS Code, 
the configuration should look like this:
+
+.. code-block:: json
+       :caption: VS Code launch.json for debugging the CDN in a Box Enrolle

Review comment:
       Missing an 'r' on Enroller

##########
File path: traffic_ops/testing/api/conf/traffic-ops-test.conf
##########
@@ -8,13 +8,13 @@
             "warning": "stdout"
         },
         "session": {
-            "timeoutInSecs": 60
+            "timeoutInSecs": 9999999

Review comment:
       This does seem a little high. Do we want to cap it at something like 10 
minutes or even 90 minutes (5400)?

##########
File path: docs/source/development/debugging.rst
##########
@@ -24,11 +24,49 @@ Debugging inside CDN-in-a-Box
 
 Some CDN-in-a-Box components can be used with a debugger to step through lines 
of code, set breakpoints, see the state of all variables in each scope, etc. at 
runtime. Components that support debugging:
 
+* `Enroller`_
 * `Traffic Monitor`_
 * `Traffic Ops`_
 * `Traffic Router`_
 * `Traffic Stats`_
 
+Enroller
+========
+
+* Stop CDN-in-a-Box if it is running and remove any existing volumes. 
Build/rebuild the ``enroller-debug`` image each time you have changed 
:atc-file:`infrastructure/cdn-in-a-box/enroller/enroller.go`. Then, start 
CDN-in-a-Box.
+

Review comment:
       De we need the varible line?
   ```
   * Still in ``infrastructure/cdn-in-a-box``, open ``variables.env`` and set 
``ENROLLER_DEBUG_ENABLE`` to ``true``.
   ```

##########
File path: docs/source/development/debugging.rst
##########
@@ -24,11 +24,49 @@ Debugging inside CDN-in-a-Box
 
 Some CDN-in-a-Box components can be used with a debugger to step through lines 
of code, set breakpoints, see the state of all variables in each scope, etc. at 
runtime. Components that support debugging:
 
+* `Enroller`_
 * `Traffic Monitor`_
 * `Traffic Ops`_
 * `Traffic Router`_
 * `Traffic Stats`_
 
+Enroller
+========
+
+* Stop CDN-in-a-Box if it is running and remove any existing volumes. 
Build/rebuild the ``enroller-debug`` image each time you have changed 
:atc-file:`infrastructure/cdn-in-a-box/enroller/enroller.go`. Then, start 
CDN-in-a-Box.
+
+.. code-block:: shell
+       :caption: docker-compose command for debugging the CDN in a Box Enroller
+
+       alias mydc='docker-compose -f docker-compose.yml -f 
docker-compose.expose-ports.yml optional/docker-compose.debugging.yml'
+       mydc down -v
+       mydc build enroller
+       mydc up
+
+* Install `an IDE that supports delve 
<https://github.com/go-delve/delve/blob/master/Documentation/EditorIntegration.md>`_
 and create a debugging configuration over port 2343. If you are using VS Code, 
the configuration should look like this:
+
+.. code-block:: json
+       :caption: VS Code launch.json for debugging the CDN in a Box Enrolle
+
+       {
+               "version": "0.2.0",
+               "configurations": [
+                       {
+                               "name": "Enroller",
+                               "type": "go",
+                               "request": "attach",
+                               "mode": "remote",
+                               "port": 2343,
+                               "cwd": "${workspaceRoot}/",
+                               "remotePath": 
"/tmp/go/src/github.com/apache/trafficcontrol/",
+                       }
+               ]
+       }
+
+* Use the debugging configuration you created to start debugging Traffic 
Monitor. It should connect without first breaking at any line.

Review comment:
       Change `Traffic Monitor` to `Enroller`

##########
File path: docs/source/development/debugging.rst
##########
@@ -93,14 +131,14 @@ Traffic Ops
 
 * Still in ``infrastructure/cdn-in-a-box``, open ``variables.env`` and set 
``TO_DEBUG_ENABLE`` to ``true``.
 
-* Stop CDN-in-a-Box if it is running and remove any existing volumes. Rebuild 
the ``trafficops-go`` image to make sure it uses our fresh ``traffic_ops.rpm``. 
Then, start CDN-in-a-Box.
+* Stop CDN-in-a-Box if it is running and remove any existing volumes. Build 
the ``trafficops-debug`` image to make sure it uses our fresh 
``traffic_ops.rpm``. Then, start CDN-in-a-Box:
 
 .. code-block:: shell
        :caption: docker-compose command for debugging Traffic Ops
 
        alias mydc='docker-compose -f docker-compose.yml -f 
docker-compose.expose-ports.yml optional/docker-compose.debugging.yml'

Review comment:
       I believe there needs to be an additional `-f` flag in front of the 
optional/docker-compose.debugging.yml

##########
File path: traffic_ops/testing/api/conf/traffic-ops-test.conf
##########
@@ -27,7 +27,7 @@
         }
     },
     "trafficOpsDB": {
-        "dbname": "to_test",
+        "dbname": "traffic_ops",

Review comment:
       I also thought this was required to remain `to_test` unless we want to 
change the testing confs, docs, and such too. Is that correct?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to