zrhoffman commented on a change in pull request #4972:
URL: https://github.com/apache/trafficcontrol/pull/4972#discussion_r473298605



##########
File path: .github/actions/run-ciab/entrypoint.sh
##########
@@ -0,0 +1,52 @@
+#!/bin/sh -l
+# 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.
+
+set -ex;
+export COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 # use Docker BuildKit for 
better image building performance
+(
+cd dist;
+mv -- */*.rpm .;
+);
+
+docker-compose --version;
+cd infrastructure/cdn-in-a-box;
+make; # All RPMs should have already been built
+
+docker images;
+logged_services='trafficrouter readiness';
+other_services='dns edge enroller mid origin trafficmonitor trafficops 
trafficops-perl trafficstats trafficvault';
+docker_compose='docker-compose -f ./docker-compose.yml -f 
./docker-compose.readiness.yml';
+time $docker_compose build --parallel $logged_services $other_services;
+$docker_compose up -d $logged_services $other_services;
+$docker_compose logs -f $logged_services &

Review comment:
       > also, why are you logging traffic router here? I would guess it's for 
context to see if something's going wrong in Traffic Router, but if you output 
the logs later anyway, then you'll still get that information, so instead you 
could only report about the thing you're actually waiting for and then dump all 
the logs - since it's not more likely for the problem to occur in TR than any 
other necessary component (and most are).
   
   It's not for context to see if something's wrong with Traffic Router. TR's 
logs are pretty nice for seeing how the CDN-in-a-Box startup is going and 
includes more wide-ranging info than any other single service (maybe we want to 
improve `readiness` to have this info?). The TR sequence of events is
   
   1. DNS stuff
   2. SSL cert gen
   3. Waiting for `enroller` to seed the CiaB data
   4. Waiting for TM (which is waiting for SSL keys from TO, which depends on 
TV startup)
   5. TR startup
   And the `readiness` container exits shortly after that. If there's an issue, 
*Waiting for TM* keeps going on, so seeing a full screen of *Waiting for 
Traffic Monitor to start...* is a pretty good indicator that CiaB will not 
finish starting up.
   
   > If I were you I'd consider redirecting the logs output to files and 
reading them at a later time. Just because otherwise it can get hard to find 
the script execution logs in the unstoppable tide of docker-compose logs. 
Having things clearly sectioned makes things easier.
   
   Yeah, including the logs as artifacts is a good idea. I'll add that




----------------------------------------------------------------
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