epugh commented on code in PR #3983:
URL: https://github.com/apache/solr/pull/3983#discussion_r2649272270


##########
solr/bin/solr:
##########
@@ -1210,12 +1101,8 @@ function start_solr() {
   fi
 
 
-  # If SSL-related system props are set, add them to SCRIPT_SOLR_OPTS
-  if [ "$SOLR_SSL_ENABLED" == "true" ]; then
-    # If using SSL and solr.jetty.https.port not set explicitly, use the 
solr.port.listen
-    SSL_PORT_PROP="-Dsolr.jetty.https.port=$SOLR_PORT_LISTEN"
-    SCRIPT_SOLR_OPTS+=($SOLR_SSL_OPTS "$SSL_PORT_PROP")
-  fi
+  # SIP-6: SSL configuration is now handled by ServerConfiguration and 
ConnectorFactory in Java
+  # No need to pass SSL properties explicitly - they're read from environment 
variables

Review Comment:
   I suppose eventually we can remove these comments, but nice to see now in 
draft mode!



##########
solr/bootstrap/README.md:
##########
@@ -0,0 +1,370 @@
+<!--
+ 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.
+-->
+
+# Solr Bootstrap Module
+
+## Overview
+
+The Bootstrap module is the foundation of **SIP-6 Phase 1**, which modernizes 
Solr's server startup process by replacing Jetty's traditional `start.jar` 
launcher with native Solr code that programmatically controls the entire 
bootstrap process. This gives Solr full ownership of server initialization, 
configuration, and lifecycle management.
+
+## SIP-6 Context and Roadmap
+
+### What is SIP-6?
+
+SIP-6 (Solr Improvement Proposal 6) is a multi-phase initiative to modernize 
Solr's architecture and startup process. The Bootstrap module represents 
**Phase 1: Jetty Bootstrap Ownership**.
+
+### Current Status: Phase 1
+
+This module replaces Jetty's `start.jar` with native Solr bootstrap code, 
providing:
+- Programmatic control over Jetty server initialization
+- Java-based configuration instead of XML files
+- Modern protocol support (HTTP/2, ALPN)
+- Enhanced security features
+- Automatic SSL certificate generation for development/testing
+
+### Future Phases
+
+While Phase 1 focuses on bootstrap ownership, future SIP-6 phases will 
continue modernizing Solr's architecture. This bootstrap module provides the 
foundation for those enhancements.
+
+### Migration Path
+
+The bootstrap module maintains backward compatibility with existing SSL 
configurations and system properties. Existing deployments can gradually adopt 
the new startup mechanism without breaking changes.
+
+## What This Module Does
+
+The Bootstrap module provides a complete Jetty server bootstrap implementation:
+
+- **Replaces start.jar**: No longer dependent on Jetty's launcher; Solr 
controls the entire startup
+- **Programmatic configuration**: All Jetty configuration via Java objects 
instead of XML files
+- **Auto-SSL generation**: Automatically generates self-signed certificates 
for development and testing
+- **Modern protocols**: HTTP/2, HTTP/2 Cleartext (h2c), and ALPN support
+- **Security hardening**: Built-in security headers (CSP, X-Frame-Options, 
etc.)
+- **Flexible configuration**: 80+ properties configurable via environment 
variables

Review Comment:
   I like this...    And maybe this gives me a place to push the "we ship 
dev.yml, prod.yml and prod-with-security.yml"?



##########
solr/bin/solr:
##########
@@ -1024,9 +912,12 @@ fi
 # so that we can write logs for examples to $SOLR_HOME/../logs
 : "${SOLR_LOGS_DIR:="$SOLR_SERVER_DIR/logs"}"
 EXAMPLE_DIR="$SOLR_TIP/example"
+
+# Set default log4j configuration
+LOG4J_PROPS="$DEFAULT_SERVER_DIR/resources/log4j2.xml"

Review Comment:
   I guess this is still one of those "chicken/egg" things that you can't 
configure in the bootstrap?



##########
solr/bin/solr:
##########
@@ -1304,7 +1191,7 @@ function start_solr() {
     # '+CrashOnOutOfMemoryError' ensures that Solr crashes whenever
     # OOME is thrown. Program operation after OOME is unpredictable.
     "-XX:+CrashOnOutOfMemoryError" 
"-XX:ErrorFile=${SOLR_LOGS_DIR}/jvm_crash_%p.log" \
-    "-Djetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" 
"-Dsolr.install.dir=$SOLR_TIP" "-Dsolr.install.symDir=$SOLR_TIP_SYM" \
+    "-Dsolr.jetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" 
"-Dsolr.install.dir=$SOLR_TIP" "-Dsolr.install.symDir=$SOLR_TIP_SYM" \

Review Comment:
   Any chance that this is an opportunity to rethink all these various flavours 
of path?   Could we just have a single value, and derive everything esle?  Do 
we really need control over these?   Also, if we kept them as env variables, 
couldn't you just read them IN as part of the java code?     I find all these 
various settings quite confusing to keep straight.    Last thought in my long 
run-opn thought...   I would love to have the `production.properties` or 
`production.yml` type file define all these, and just pass that into 
`solr-start.jar`.    



##########
solr/bin/solr:
##########
@@ -1283,8 +1170,8 @@ function start_solr() {
   # need to launch solr from the server dir
   cd "$SOLR_SERVER_DIR" || (echo -e "\nCd to SOLR_SERVER_DIR failed" && exit 1)
 
-  if [ ! -e "$SOLR_SERVER_DIR/start.jar" ]; then
-    echo -e "\nERROR: start.jar file not found in $SOLR_SERVER_DIR!\nPlease 
check your --server-dir parameter to set the correct Solr server directory.\n"
+  if [ ! -e "$SOLR_SERVER_DIR/solr-start.jar" ]; then

Review Comment:
   `solr.jar` ???   versus `solr-start.jar`??



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to