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



##########
File path: dev/traffic_router/run.sh
##########
@@ -0,0 +1,41 @@
+#!/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
+
+cp core/target/ROOT.war /opt/tomcat/webapps/
+ln -s $TC/dev/traffic_router/conf/* /opt/tomcat/conf/
+
+/opt/tomcat/bin/catalina.sh jpda run

Review comment:
       > <pre>Using CATALINA_BASE:   /opt/tomcat
   > Using CATALINA_HOME:   /opt/tomcat
   > Using CATALINA_TMPDIR: /opt/tomcat/temp
   > Using JRE_HOME:        /usr/lib/jvm/java-11-openjdk
   > Using CLASSPATH:       
/opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
   > Using CATALINA_OPTS:</pre></quote>
   
   The way Traffic Router is set up, `CATALINA_BASE` is supposed to be 
`/opt/traffic_router`: 
https://github.com/apache/trafficcontrol/blob/abfbb3483afbb3deedb488e872d21d8c0ba6c94a/traffic_router/core/src/main/lib/systemd/system/traffic_router.service#L24-L25
   
   `CATALINA_BASE` should be equal to the `deploy.dir` system property. It is 
defined here: 
https://github.com/apache/trafficcontrol/blob/abfbb3483afbb3deedb488e872d21d8c0ba6c94a/traffic_router/pom.xml#L34
   
   Among other things, `deploy.dir` is used to find the property files. 
https://github.com/apache/trafficcontrol/blob/abfbb3483afbb3deedb488e872d21d8c0ba6c94a/traffic_router/core/src/main/resources/applicationProperties.xml#L28-L32
   If you can find a way to change `deploy.dir` to `${TC}/dev/traffic_router`, 
that would be ideal. Otherwise, `CATALINA_BASE` should be set to 
`/opt/traffic_router`, with `/opt/traffic_router` being a symlink to 
`${TC}/dev/traffic_router`.




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