zrhoffman commented on a change in pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710#discussion_r614456071
##########
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:
`-f` added in e7bd6e0c18.
##########
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:
`-f` added in e7bd6e0c18.
##########
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:
`-f` added in e7bd6e0c18.
##########
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:
`-f` added in e7bd6e0c18.
##########
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:
Changed to `Enroller` in c63d9b81bc.
##########
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:
Added an *r* in 6d607a415c.
--
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]