You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/04/02 18:44:59 UTC

[GitHub] [trafficcontrol] zrhoffman opened a new pull request #5710: Combine CDN in a Box Dockerfiles using building stage targets where possible

zrhoffman opened a new pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710


   <!--
   ************ STOP!! ************
   If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
   -->
   ## What does this PR (Pull Request) do?
   <!-- Explain the changes you made here. If this fixes an Issue, identify it by
   replacing the text in the checkbox item with the Issue number e.g.
   
   - [x] This PR fixes #9001 OR is not related to any Issue
   
   ^ This will automatically close Issue number 9001 when the Pull Request is
   merged (The '#' is important).
   
   Be sure you check the box properly, see the "The following criteria are ALL
   met by this PR" section for details.
   -->
   Currently, if you try to build the `trafficmonitor-debug`, `trafficops-debug`, and `trafficstatis-debug` images without the `trafficmonitor`, `trafficops`, and `trafficstats` existing,
   ```shell
   docker-compose -f docker-compose.yml -f optional/docker-compose.debugging.yml build --parallel trafficops
   ```
   it will fail to build with an error like
   ```dockerfile
    ---> 82cad2818884
   Step 5/6 : FROM trafficops
   pull access denied for trafficops, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
   Service 'trafficops' failed to build
   ```
   because you need to build those images first. You can get around that by simply attempting to build everything twice:
   ```
   docker-compose -f docker-compose.yml -f optional/docker-compose.debugging.yml build --parallel
   docker-compose -f docker-compose.yml -f optional/docker-compose.debugging.yml build --parallel
   ```
   But updating RPMs in the debug images is still annoying because it requires building everything twice in this way. This PR fixes that behavior.
   
   This PR
   - Makes the Traffic Monitor, Traffic Ops, and Traffic Ops debug images building stage targets within the non-debug Dockerfiles
   - Removes the `trafficmonitor-nondebug`, `trafficops-nondebug`, and `trafficstatis-nondebug` services from the `docker-compose.debugging.yml` compose file
   - Makes `edge` build the `edge` target of `cache/Dockerfile` and makes `mid-01` and `mid-02` build the `mid` target of `cache/Dockerfile`
   
   - [x] This PR is not related to any Issue <!-- You can check for an issue here: https://github.com/apache/trafficcontrol/issues -->
   
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this
   Pull Request. Also, feel free to add the name of a tool or script that is
   affected but not on the list.
   
   Additionally, if this Pull Request does NOT affect documentation, please
   explain why documentation is not required. -->
   
   - CDN in a Box
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your Pull Request. If
   it includes tests (and most should), outline here the steps needed to run the
   tests. If not, lay out the manual testing procedure and please explain why
   tests are unnecessary for this Pull Request. -->
   Untag the `trafficmonitor`, `trafficops`, and `trafficstats` and then verify that running
   ```shell
   docker-compose -f docker-compose.yml -f optional/docker-compose.debugging.yml build --parallel
   ```
   succeeds
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   <!-- If this PR fixes a bug, please list here all of the affected versions - to
   the best of your knowledge. It's also pretty helpful to include a commit hash
   of where 'master' is at the time this PR is opened (if it affects master),
   because what 'master' means will change over time. For example, if this PR
   fixes a bug that's present in master (at commit hash '1df853c8'), in v4.0.0,
   and in the current 4.0.1 Release candidate (e.g. RC1), then this list would
   look like:
   
   - master (1df853c8)
   - 4.0.0
   - 4.0.1 (RC1)
   
   If you don't know what other versions might have this bug, AND don't know how
   to find the commit hash of 'master', then feel free to leave this section
   blank (or, preferably, delete it entirely).
    -->
   
   
   ## The following criteria are ALL met by this PR
   <!-- Check the boxes to signify that the associated statement is true. To
   "check a box", replace the space inside of the square brackets with an 'x'.
   e.g.
   
   - [ x] <- Wrong
   - [x ] <- Wrong
   - [] <- Wrong
   - [*] <- Wrong
   - [x] <- Correct!
   
   -->
   
   - [x] CiaB changed only, tests unnecessary
   - [x] Bugfix, documentation unnecessary
   - [x] An update to CHANGELOG.md is unnecessary
   - [x] This PR includes any and all required license headers
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->


-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5710: Combine CDN in a Box Dockerfiles using build stage targets where possible

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5710: Combine CDN in a Box Dockerfiles using build stage targets where possible

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710#discussion_r614450999



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

Review comment:
       Didn't mean to commit this, either, reverted in 27c7bd3c26.




-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5710: Combine CDN in a Box Dockerfiles using build stage targets where possible

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710#discussion_r614457325



##########
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:
       *Variable* line added in 7ef06ae388.




-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] TaylorCFrey commented on pull request #5710: Combine CDN in a Box Dockerfiles using build stage targets where possible

Posted by GitBox <gi...@apache.org>.
TaylorCFrey commented on pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710#issuecomment-821311347


   Confirmed debugging possible in Goland and VSCode.


-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5710: Combine CDN in a Box Dockerfiles using build stage targets where possible

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710#discussion_r614451244



##########
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:
       Also didn't mean to commit this, reverted in 27c7bd3c26.




-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] rawlinp merged pull request #5710: Combine CDN in a Box Dockerfiles using build stage targets where possible

Posted by GitBox <gi...@apache.org>.
rawlinp merged pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710


   


-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5710: Combine CDN in a Box Dockerfiles using build stage targets where possible

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5710:
URL: https://github.com/apache/trafficcontrol/pull/5710#discussion_r614450894



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

Review comment:
       Didn't mean to commit this, reverted in 27c7bd3c26.




-- 
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:
users@infra.apache.org



[GitHub] [trafficcontrol] TaylorCFrey commented on a change in pull request #5710: Combine CDN in a Box Dockerfiles using build stage targets where possible

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org