zrhoffman commented on a change in pull request #6532: URL: https://github.com/apache/trafficcontrol/pull/6532#discussion_r801148658
########## File path: dev/traffic_router/Dockerfile ########## @@ -0,0 +1,31 @@ +# +# 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. +# +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/.m2/ +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 Review comment: Need to get `tomcat-native` and `openssl` in order for SSL to work. Once added, you should see these lines in `/opt/tomcat/logs/catalina.2022-02-07.log`: ```java 07-Feb-2022 23:46:54.401 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0]. ``` and ```java 07-Feb-2022 23:46:54.403 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1l 24 Aug 2021] ``` ########## File path: dev/traffic_router/conf/startup.properties ########## @@ -0,0 +1,30 @@ +# +# 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="\ Review comment: There is no mechanism with Java or Tomcat that automatically reads these variables from `startup.properties`. It's an ATC-specific thing, used as the `EnvironmentFile` for systemd: https://github.com/apache/trafficcontrol/blob/36829433dabcd7a169d7aaedc41b78b1d004ff7e/traffic_router/core/src/main/lib/systemd/system/traffic_router.service#L27 CDN in a Box handles this by defining them in the shell script (and exporting them later): https://github.com/apache/trafficcontrol/blob/36829433dabcd7a169d7aaedc41b78b1d004ff7e/infrastructure/cdn-in-a-box/traffic_router/run.sh#L42 https://github.com/apache/trafficcontrol/blob/36829433dabcd7a169d7aaedc41b78b1d004ff7e/infrastructure/cdn-in-a-box/traffic_router/run.sh#L57-L61 -- 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]
