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



##########
File path: dev/traffic_router/run.sh
##########
@@ -0,0 +1,39 @@
+#!/bin/sh
+# 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 -o errexit
+
+cd "$TC/traffic_router"
+
+mvn -Dmaven.test.skip=true compile -P \!rpm-build
+mvn -Dmaven.test.skip=true package -P \!rpm-build

Review comment:
       No need for `mvn package` now that db89b273d2 makes `webapps/ROOT` 
symlink to the build directory

##########
File path: dev/traffic_ops/seed.psql
##########
@@ -94,6 +99,10 @@ INSERT INTO parameter (
        'rascal.properties',
        'health.polling.format',
        'stats_over_http'
+), (
+       'CRConfig.json',
+       'geolocation.polling.url',

Review comment:
       Still need `coveragezone.polling.url` in order for TR to accept and save 
the CRConfig

##########
File path: dev/traffic_router/Dockerfile
##########
@@ -15,12 +15,17 @@ FROM alpine:latest AS trafficrouter-dev
 
 ENV TC=/root/go/src/github.com/apache/trafficcontrol
 VOLUME /root/go/src/github.com/apache/trafficcontrol
-ENV 
JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n"
 JAVA_HOME=/usr/lib/jvm/java-11-openjdk 
M2_HOME=/root/go/src/github.com/apache/trafficcontrol/.m2 
CATALINA_BASE=/opt/traffic_router
+ENV 
JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n"
 JAVA_HOME=/usr/lib/jvm/java-11-openjdk 
M2_HOME=/root/go/src/github.com/apache/trafficcontrol/.m2 
CATALINA_BASE=/opt/traffic_router TRAFFIC_MONITOR_HOSTS=trafficmonitor
 EXPOSE 3053:53/tcp 3053:53/udp 3080:80 3443:443 3333:3333 2222:3443 5005:5005
 
-RUN apk add --no-cache openjdk11 inotify-tools maven && ln -s 
/usr/lib/jvm/java-11-openjdk/bin/jdb /bin/jdb
+RUN apk add --no-cache openjdk11 inotify-tools maven tomcat-native openssl && 
ln -s /usr/lib/jvm/java-11-openjdk/bin/jdb /bin/jdb
 
 ADD 
https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.43/bin/apache-tomcat-9.0.43.tar.gz
 /opt/tomcat.tgz
+
+ARG USER
+RUN adduser -H -D ${USER}
+RUN chown -R ${USER} /opt /usr/share/java/ /root
+USER ${USER}

Review comment:
       Oh wow, I didn't know setting `USER` and not `UID` would fix permissions

##########
File path: dev/traffic_router/conf/startup.properties
##########
@@ -1,30 +0,0 @@
-#
-# Licensed 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.
-
-# Any environment variables you define here will become part of the startup
-# environment for the 'traffic_router' service. It is a good place to set
-# command line arguments for the Java command line or any environment specific
-# setting you want available to the traffic_router process.
-# This file is not replaced by the update process when a new version of traffic
-# router is installed.
-CATALINA_OPTS="\
-       -server -Xms2g -Xmx8g \
-       -Dlog4j.configuration=file:///opt/tomcat/conf/log4j2.xml \
-       -Djava.library.path=/usr/lib \
-       
-Dorg.apache.catalina.connector.Response.ENFORCE_ENCODING_IN_GET_WRITER=false \
-       -XX:+UseG1GC \
-       -XX:+UnlockExperimentalVMOptions \
-       -XX:InitiatingHeapOccupancyPercent=30"
-JAVA_OPTS="\
-       -Djava.awt.headless=true \
-       -Djava.security.egd=file:/dev/./urandom"

Review comment:
       Are `CATALINA_OPTS` and `JAVA_OPTS` still set somewhere?

##########
File path: dev/traffic_ops/seed.psql
##########
@@ -45,7 +45,7 @@ INSERT INTO snapshot (
        monitoring
 ) VALUES (
        'dev',
-       
'{"config":{"dnssec.enabled":"false","domain_name":"ciab.test"},"contentServers":{"edge":{"cacheGroup":"dev","fqdn":"edge.dev.ciab.test","hashCount":999,"hashId":"edge","httpsPort":443,"interfaceName":"eth0","ip":"129.0.0.2","ip6":"","locationId":"dev","port":80,"profile":"EDGE_dev","status":"REPORTED","type":"EDGE","routingDisabled":0}},"deliveryServices":{"dev":{"anonymousBlockingEnabled":"false","coverageZoneOnly":"false","deepCachingType":"NEVER","dispersion":{"limit":1,"shuffled":"true"},"domains":["dev.ciab.test"],"ecsEnabled":"false","geolocationProvider":"maxmindGeolocationService","ip6RoutingEnabled":"false","matchsets":[{"protocol":"HTTP","matchlist":[{"regex":".*\\\\.dev\\\\..*","match-type":"HOST"}]}],"protocol":{"acceptHttps":"false","redirectToHttps":"false"},"regionalGeoBlocking":"false","routingName":"cdn","soa":{"admin":"traffic_ops","expire":"604800","minimum":"30","refresh":"28800","retry":"7200"},"sslEnabled":"false","ttls":{"A":"","AAAA":"","NS":"3600","SOA":"8
 
6400"}}},"edgeLocations":{"dev":{"latitude":0,"longitude":0,"backupLocations":{"fallbackToClosest":"true"},"localizationMethods":["GEO","CZ","DEEP_CZ"]}},"monitors":{"trafficmonitor":{"fqdn":"trafficmonitor.dev.ciab.test","httpsPort":null,"ip":"129.0.0.1","ip6":"","location":"dev","port":80,"profile":"RASCAL_TM_dev","status":"ONLINE"}},"stats":{"CDN_name":"dev","date":1643833749,"tm_host":"","tm_user":"admin","tm_version":"development"}}',
+       
'{"config":{"dnssec.enabled":"false","domain_name":"ciab.test"},"contentServers":{"edge":{"cacheGroup":"dev","fqdn":"edge.dev.ciab.test","hashCount":999,"hashId":"edge","httpsPort":443,"interfaceName":"eth0","ip":"129.0.0.2","ip6":"","locationId":"dev","port":80,"profile":"EDGE_dev","status":"REPORTED","type":"EDGE","routingDisabled":0}},"deliveryServices":{"dev":{"anonymousBlockingEnabled":"false","coverageZoneOnly":"false","deepCachingType":"NEVER","dispersion":{"limit":1,"shuffled":"true"},"domains":["dev.ciab.test"],"ecsEnabled":"false","geolocationProvider":"maxmindGeolocationService","ip6RoutingEnabled":"false","matchsets":[{"protocol":"HTTP","matchlist":[{"regex":".*\\\\.dev\\\\..*","match-type":"HOST"}]}],"protocol":{"acceptHttps":"false","redirectToHttps":"false"},"regionalGeoBlocking":"false","routingName":"cdn","soa":{"admin":"traffic_ops","expire":"604800","minimum":"30","refresh":"28800","retry":"7200"},"sslEnabled":"false","ttls":{"A":"","AAAA":"","NS":"3600","SOA":"8
 
6400"}}},"edgeLocations":{"dev":{"latitude":0,"longitude":0,"backupLocations":{"fallbackToClosest":"true"},"localizationMethods":["GEO","CZ","DEEP_CZ"]}},"monitors":{"trafficmonitor":{"fqdn":"trafficmonitor.dev.ciab.test","httpsPort":null,"ip":"129.0.0.1","ip6":"","location":"dev","port":80,"profile":"RASCAL_TM_dev","status":"ONLINE"}},"stats":{"CDN_name":"dev","date":1643833749,"tm_host":"trafficops","tm_user":"admin","tm_version":"development"}}',

Review comment:
       The `tm_host` value is derived from the `tm.url` parameter in the global 
profile, setting it here does not do anything




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

To unsubscribe, e-mail: [email protected]

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


Reply via email to