You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2021/01/27 17:33:23 UTC

[lucene-solr] branch reference_impl_dev updated (5619dc6 -> 33f72e1)

This is an automated email from the ASF dual-hosted git repository.

houston pushed a change to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


    from 5619dc6  wip
     new 579f2f3  SOLR-14947: Print out image info after gradle docker task. (#2007)
     new 2a113fd  SOLR-14957: Add Prometheus Exporter to docker PATH. Fix classpath issues. (#2017)
     new 0b8fed4  SOLR-14955: Add env var options to Prometheus Export scripts. (#2038)
     new a6c7bf3  SOLR-14972: Change default port of prometheus exporter to 8989 (#2046)
     new e5392a0  SOLR-14949: Ability to customize Solr Docker build (#2020)
     new c657bcb  SOLR-14949: Adding githubUrl option for docker build. (#2074)
     new 70c21f0  SOLR-15001 Docker: require init_var_solr.sh (#2083)
     new eb4202f  SOLR: Remove CHANGES.md; use solr/CHANGES.txt
     new 241994f  SOLR-15075: Solr docker gradle improvements (#2197)
     new 33f72e1  SOLR-15075: Remove docker gradle artifact

The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/docker-test.yml                  |  46 +++++
 build.gradle                                       |   2 +-
 dev-tools/scripts/addVersion.py                    |   1 +
 gradle/help.gradle                                 |   1 +
 settings.gradle                                    |   2 -
 solr/CHANGES.txt                                   |  76 ++++++++
 solr/contrib/prometheus-exporter/bin/solr-exporter |  36 +++-
 .../prometheus-exporter/bin/solr-exporter.cmd      |  14 +-
 .../solr/prometheus/exporter/SolrExporter.java     |   4 +-
 solr/docker/Dockerfile                             |  46 ++---
 solr/docker/README.md                              |   2 +-
 solr/docker/build.gradle                           | 201 ++++++++++++++++-----
 solr/docker/gradle-help.txt                        |  80 ++++++++
 solr/docker/package/Dockerfile.local-package       |   3 -
 solr/docker/package/Dockerfile.release-package     |  74 --------
 solr/docker/package/build.gradle                   |  36 ----
 .../{include => }/scripts/docker-entrypoint.sh     |   3 +
 solr/docker/{include => }/scripts/init-var-solr    |  16 +-
 solr/docker/{include => }/scripts/oom_solr.sh      |   0
 solr/docker/{include => }/scripts/precreate-core   |   0
 solr/docker/{include => }/scripts/run-initdb       |   0
 solr/docker/{include => }/scripts/solr-create      |   3 -
 solr/docker/{include => }/scripts/solr-demo        |   0
 solr/docker/{include => }/scripts/solr-fg          |   0
 solr/docker/{include => }/scripts/solr-foreground  |   3 -
 solr/docker/{include => }/scripts/solr-precreate   |   3 -
 solr/docker/{include => }/scripts/start-local-solr |   0
 solr/docker/{include => }/scripts/stop-local-solr  |   0
 solr/docker/{include => }/scripts/wait-for-solr.sh |   0
 .../{include => }/scripts/wait-for-zookeeper.sh    |   0
 .../cases/empty-varsolr-vol-solr-nocopy/test.sh    |   1 +
 solr/docker/tests/cases/gosu/test.sh               |   2 +-
 solr/docker/tests/cases/version/test.sh            |  45 -----
 .../src/major-changes-in-solr-9.adoc               |   2 +
 ...onitoring-solr-with-prometheus-and-grafana.adoc |  47 +++--
 35 files changed, 480 insertions(+), 269 deletions(-)
 create mode 100644 .github/workflows/docker-test.yml
 create mode 100644 solr/docker/gradle-help.txt
 delete mode 100644 solr/docker/package/Dockerfile.local-package
 delete mode 100644 solr/docker/package/Dockerfile.release-package
 delete mode 100644 solr/docker/package/build.gradle
 rename solr/docker/{include => }/scripts/docker-entrypoint.sh (92%)
 rename solr/docker/{include => }/scripts/init-var-solr (81%)
 rename solr/docker/{include => }/scripts/oom_solr.sh (100%)
 rename solr/docker/{include => }/scripts/precreate-core (100%)
 rename solr/docker/{include => }/scripts/run-initdb (100%)
 rename solr/docker/{include => }/scripts/solr-create (94%)
 rename solr/docker/{include => }/scripts/solr-demo (100%)
 rename solr/docker/{include => }/scripts/solr-fg (100%)
 rename solr/docker/{include => }/scripts/solr-foreground (67%)
 rename solr/docker/{include => }/scripts/solr-precreate (88%)
 rename solr/docker/{include => }/scripts/start-local-solr (100%)
 rename solr/docker/{include => }/scripts/stop-local-solr (100%)
 rename solr/docker/{include => }/scripts/wait-for-solr.sh (100%)
 rename solr/docker/{include => }/scripts/wait-for-zookeeper.sh (100%)
 delete mode 100755 solr/docker/tests/cases/version/test.sh


[lucene-solr] 08/10: SOLR: Remove CHANGES.md; use solr/CHANGES.txt

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit eb4202f8fb3ef8b6bbde9f4556040be3e44ba700
Author: David Smiley <ds...@salesforce.com>
AuthorDate: Fri Dec 4 17:59:07 2020 -0500

    SOLR: Remove CHANGES.md; use solr/CHANGES.txt
    
    For now, any way.  See dev list discussion.
---
 solr/CHANGES.txt       | 27 +++++++++++++++++++++++++++
 solr/docker/CHANGES.md | 28 ----------------------------
 2 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 3f8f7a4..c74d85b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -44,6 +44,22 @@ Improvements
 
 * SOLR-14972: Change default port of prometheus exporter to 8989 because it clashed with default embedded zookeeper port (janhoy)
 
+* SOLR-14972: Prometheus: Change default port of prometheus exporter to 8989
+  because it clashed with default embedded zookeeper port (janhoy)
+
+* SOLR-14001: Docker: Removed /var/solr initialization from the Dockerfile; depend on init_var_solr.sh instead.
+  This leads to more consistent behavior no matter how /var/solr is mounted.
+  * init_var_solr.sh is now invoked by docker-entrypoint.sh; not in a bunch of other places.
+  * as before, you can set NO_INIT_VAR_SOLR=1 to short-circuit this.
+  * init_var_solr.sh no longer echo's anything.  For verbosity, set VERBOSE=yes.
+  (David Smiley)
+
+* SOLR-14957: Docker, Prometheus: Add Prometheus Exporter to docker PATH. Fix classpath issues.
+  (Houston Putman)
+
+* SOLR-14949: Docker: Ability to customize the FROM image when building.
+  (Houston Putman)
+
 Other Changes
 ----------------------
 * SOLR-14656: Autoscaling framework removed (Ishan Chattopadhyaya, noble, Ilan Ginzburg)
@@ -150,6 +166,17 @@ Other Changes
 * SOLR-14035: Remove deprecated preferLocalShards=true support in favour of the shards.preference=replica.location:local alternative.
   (Alex Bulygin via Christine Poerschke)
 
+* SOLR-14934: Remove redundent deprecated "solr.solr.home" logic (hossman)
+
+* SOLR-14915: Prometheus: Reduced dependencies from Solr server down to just SolrJ.  Don't add WEB-INF/lib.
+  * Can run via gradle, "gradlew run"
+  * Has own log4j2.xml now
+  * Was missing some dependencies in lib/; now has all except SolrJ & logging.
+  (David Smiley, Houston Putman)
+
+* SOLR-14789: Docker: Migrate docker image creation from docker-solr repo to solr/docker.
+  (Houston Putman, Martijn Koster, Tim Potter, David Smiley, janhoy, Mike Drob)
+
 Bug Fixes
 ---------------------
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/docker/CHANGES.md b/solr/docker/CHANGES.md
deleted file mode 100644
index 04a767c..0000000
--- a/solr/docker/CHANGES.md
+++ /dev/null
@@ -1,28 +0,0 @@
-This file lists release notes for this module.
-Prior to version 9, the module existed in another repository and changes were not tracked in this manner.
-You could browse the commit history here instead:
-https://github.com/docker-solr/docker-solr
- 
-9.0.0
-==================
-
-Improvements
-----------------------
-* SOLR-14001: Removed /var/solr initialization from the Dockerfile; depend on init_var_solr.sh instead.
-  This leads to more consistent behavior no matter how /var/solr is mounted.
-  * init_var_solr.sh is now invoked by docker-entrypoint.sh; not in a bunch of other places.
-  * as before, you can set NO_INIT_VAR_SOLR=1 to short-circuit this.
-  * init_var_solr.sh no longer echo's anything.  For verbosity, set VERBOSE=yes.
-  (David Smiley)
-
-* SOLR-14957: Add Prometheus Exporter to docker PATH. Fix classpath issues.
-  (Houston Putman)
-  
-* SOLR-14949: Ability to customize the FROM image when building.
-  (Houston Putman)
-
-Other Changes
-------------------
-* SOLR-14789: Migrate docker image creation from docker-solr repo to solr/docker. 
-  (Houston Putman, Martijn Koster, Tim Potter, David Smiley, janhoy, Mike Drob)
-


[lucene-solr] 04/10: SOLR-14972: Change default port of prometheus exporter to 8989 (#2046)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit a6c7bf300c4f7c785a81e1cbe6d09fffede4bbd9
Author: Jan Høydahl <ja...@users.noreply.github.com>
AuthorDate: Mon Nov 2 14:06:34 2020 +0100

    SOLR-14972: Change default port of prometheus exporter to 8989 (#2046)
---
 solr/CHANGES.txt                                                        | 2 ++
 .../src/java/org/apache/solr/prometheus/exporter/SolrExporter.java      | 2 +-
 solr/solr-ref-guide/src/major-changes-in-solr-9.adoc                    | 2 ++
 .../solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc | 2 +-
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index be0ef3a..ad0c1f6 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -41,6 +41,8 @@ Improvements
 
 * SOLR-14880: Support coreRootDirectory setting when create new cores from command line, in standalone mode (Alexandre Rafalovitch)
 
+* SOLR-14972: Change default port of prometheus exporter to 8989 because it clashed with default embedded zookeeper port (janhoy)
+
 Other Changes
 ----------------------
 * SOLR-14656: Autoscaling framework removed (Ishan Chattopadhyaya, noble, Ilan Ginzburg)
diff --git a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java
index 50ba20d..df5092c 100644
--- a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java
+++ b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java
@@ -50,7 +50,7 @@ public class SolrExporter {
   private static final String[] ARG_PORT_FLAGS = {"-p", "--port"};
   private static final String ARG_PORT_METAVAR = "PORT";
   private static final String ARG_PORT_DEST = "port";
-  private static final int ARG_PORT_DEFAULT = 9983;
+  private static final int ARG_PORT_DEFAULT = 8989;
   private static final String ARG_PORT_HELP = "Specify the solr-exporter HTTP listen port; default is " + ARG_PORT_DEFAULT + ".";
 
   private static final String[] ARG_BASE_URL_FLAGS = {"-b", "--baseurl"};
diff --git a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
index b989126..f0dcac5 100644
--- a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
+++ b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
@@ -139,6 +139,8 @@ _(raw; not yet edited)_
 
 * SOLR-14654: plugins cannot be loaded using "runtimeLib=true" option. Use the package manager to use and load plugins
 
+* SOLR-14972: The default port of prometheus exporter has changed from 9983 to 8989, so you may need to adjust your configuration after upgrade.
+
 === Upgrade Prerequisites in Solr 9
 
 * Upgrade all collections in stateFormat=1 to stateFormat=2 *before* upgrading to Solr 9, as Solr 9 does not support the
diff --git a/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc b/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
index 98e104f..17fafd3 100644
--- a/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
+++ b/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
@@ -91,7 +91,7 @@ Displays command line help and usage.
 
 `-p`, `--port`, `$PORT`::
 The port where Prometheus will listen for new data. This port will be used to configure Prometheus.
-It can be any port not already in use on your server. The default is `9983`.
+It can be any port not already in use on your server. The default is `8989`.
 
 `-b`, `--baseurl`, `$SOLR_URL`::
 The Solr base URL (such as `\http://localhost:8983/solr`) when Solr is running in Standalone mode.


[lucene-solr] 09/10: SOLR-15075: Solr docker gradle improvements (#2197)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 241994f4d07858fa509f76437e328d89dfe51c49
Author: Houston Putman <ho...@apache.org>
AuthorDate: Tue Jan 26 10:22:50 2021 -0500

    SOLR-15075: Solr docker gradle improvements (#2197)
    
    * Removed docker plugin from gradle builds.
    * Removed package docker image.
    * Tasks now have correct inputs/outputs/dependencies.
    * Move gradle help text to docker folder.
    * Reduce duplicated Docker layer by doing file removal and chmod in another stage.
    
    Co-authored-by: David Smiley <ds...@apache.org>
---
 .github/workflows/docker-test.yml                  |   2 +
 build.gradle                                       |   2 +-
 gradle/help.gradle                                 |   2 +-
 help/docker.txt                                    |  58 ------
 settings.gradle                                    |   2 -
 solr/docker/Dockerfile                             |  38 ++--
 solr/docker/README.md                              |   2 +-
 solr/docker/build.gradle                           | 210 +++++++++++++++------
 solr/docker/gradle-help.txt                        |  80 ++++++++
 solr/docker/package/Dockerfile.local-package       |   3 -
 solr/docker/package/Dockerfile.release-package     |  74 --------
 solr/docker/package/build.gradle                   |  36 ----
 .../{include => }/scripts/docker-entrypoint.sh     |   0
 solr/docker/{include => }/scripts/init-var-solr    |   0
 solr/docker/{include => }/scripts/oom_solr.sh      |   0
 solr/docker/{include => }/scripts/precreate-core   |   0
 solr/docker/{include => }/scripts/run-initdb       |   0
 solr/docker/{include => }/scripts/solr-create      |   0
 solr/docker/{include => }/scripts/solr-demo        |   0
 solr/docker/{include => }/scripts/solr-fg          |   0
 solr/docker/{include => }/scripts/solr-foreground  |   0
 solr/docker/{include => }/scripts/solr-precreate   |   0
 solr/docker/{include => }/scripts/start-local-solr |   0
 solr/docker/{include => }/scripts/stop-local-solr  |   0
 solr/docker/{include => }/scripts/wait-for-solr.sh |   0
 .../{include => }/scripts/wait-for-zookeeper.sh    |   0
 solr/docker/tests/cases/gosu/test.sh               |   2 +-
 27 files changed, 256 insertions(+), 255 deletions(-)

diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml
index 76fa714..d331df9 100644
--- a/.github/workflows/docker-test.yml
+++ b/.github/workflows/docker-test.yml
@@ -38,6 +38,8 @@ jobs:
         restore-keys: |
           ${{ runner.os }}-gradle-docker-
           ${{ runner.os }}-gradle-
+    - name: Initialize gradle settings
+      run: ./gradlew localSettings
     - name: Build Docker image with Gradle
       run: ./gradlew solr:docker:docker
     - name: Run tests on Docker image
diff --git a/build.gradle b/build.gradle
index 9efac5b..ada78df 100644
--- a/build.gradle
+++ b/build.gradle
@@ -25,7 +25,7 @@ plugins {
   id 'de.thetaphi.forbiddenapis' version '3.0.1' apply false
   id "de.undercouch.download" version "4.0.2" apply false
   id "net.ltgt.errorprone" version "1.2.1" apply false
-  id "com.palantir.docker" version "0.25.0" apply false
+  id 'com.diffplug.spotless' version "5.8.2" apply false
 }
 
 apply from: file('gradle/defaults.gradle')
diff --git a/gradle/help.gradle b/gradle/help.gradle
index 4c1bf7e..6be1ae7 100644
--- a/gradle/help.gradle
+++ b/gradle/help.gradle
@@ -29,7 +29,7 @@ configure(rootProject) {
       ["Git", "help/git.txt", "Git assistance and guides."],
       ["ValidateLogCalls", "help/validateLogCalls.txt", "How to use logging calls efficiently."],
       ["IDEs", "help/IDEs.txt", "IDE support."],
-      ["Docker", "help/docker.txt", "Building Solr Docker images."],
+      ["Docker", "solr/docker/gradle-help.txt", "Building Solr Docker images."],
   ]
 
   helpFiles.each { section, path, sectionInfo ->
diff --git a/help/docker.txt b/help/docker.txt
deleted file mode 100644
index c86572c..0000000
--- a/help/docker.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-Docker Images for Solr
-======================
-
-Solr docker images are built using Palantir's Docker Gradle plugin, https://github.com/palantir/gradle-docker.
-
-Common Inputs
--------------
-
-The docker image and its tag can be customized via the following options, all accepted via both Environment Variables and Gradle Properties.
-
-Docker Image Repository:
-   Default: "apache/solr"
-   EnvVar: SOLR_DOCKER_IMAGE_REPO
-   Gradle Property: -Psolr.docker.imageRepo
-
-Docker Image Tag:
-   Default: the Solr version, e.g. "9.0.0-SNAPSHOT"
-   EnvVar: SOLR_DOCKER_IMAGE_TAG
-   Gradle Property: -Psolr.docker.imageTag
-
-Docker Image Name: (Use this to explicitly set a whole image name. If given, the image repo and image version options above are ignored.)
-   Default: {image_repo}/{image_tag} (both options provided above, with defaults)
-   EnvVar: SOLR_DOCKER_IMAGE_NAME
-   Gradle Property: -Psolr.docker.imageName
-
-Building
---------
-
-In order to build the Solr Docker image, run:
-
-gradlew docker
-
-The docker build task accepts the following inputs, in addition to the common inputs listed above:
-
-Base Docker Image: (The docker image used for the "FROM" in the Solr Dockerfile)
-   Default: "openjdk:11-jre-slim"
-   EnvVar: SOLR_DOCKER_BASE_IMAGE
-   Gradle Property: -Psolr.docker.baseImage
-
-Github URL or Mirror: (The URL of github or a mirror of github releases. This is of use when building the docker image behind a firewall that does not have access to external Github.)
-   Default: "github.com"
-   EnvVar: SOLR_DOCKER_GITHUB_URL
-   Gradle Property: -Psolr.docker.githubUrl
-
-Testing
--------
-
-To test the docker image, run:
-
-gradlew dockerTest
-
-If a custom docker image name was used, via one of the common inputs described above, then the same input must be used while testing.
-
-You can also specify an explicit list of tests to run, or an explicit list of tests to ignore.
-Both inputs are optional, and by default all tests will be run.
-
-gradlew testDocker --tests create_core,demo
-gradlew testDocker --ignore demo-tini,initdb
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 069d126..28b0868 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -73,7 +73,6 @@ include "solr:example"
 
 include "solr:packaging"
 include "solr:docker"
-include "solr:docker:package"
 
 include "solr:benchmark"
 
@@ -91,4 +90,3 @@ include "solr:benchmark"
 
 
 include "solr:benchmark"
-
diff --git a/solr/docker/Dockerfile b/solr/docker/Dockerfile
index 0e7157e..d1a0db1 100644
--- a/solr/docker/Dockerfile
+++ b/solr/docker/Dockerfile
@@ -1,9 +1,21 @@
-ARG SOLR_PACKAGE_IMAGE
 ARG BASE_IMAGE=openjdk:11-jre-slim
 
-FROM $SOLR_PACKAGE_IMAGE as solr_package
+FROM $BASE_IMAGE as input
+ARG SOLR_VERSION
+
+# ADD extracts tgz !
+ADD /releases/solr-$SOLR_VERSION.tgz /opt/
+COPY /scripts /scripts
 
-FROM $BASE_IMAGE as runtime
+# remove what we don't want; ensure permissions are right
+#  TODO; arguably these permissions should have been set correctly previously in the TAR
+RUN set -ex; \
+  rm -Rf /opt/solr-$SOLR_VERSION/docs /opt/solr-$SOLR_VERSION/dist/{solr-solrj-$SOLR_VERSION.jar,solrj-lib,solr-test-framework-$SOLR_VERSION.jar,test-framework}; \
+  find "/opt/solr-$SOLR_VERSION" -type d -print0 | xargs -0 chmod 0755; \
+  find "/opt/solr-$SOLR_VERSION" -type f -print0 | xargs -0 chmod 0644; \
+  chmod -R 0755 /scripts "/opt/solr-$SOLR_VERSION/bin" "/opt/solr-$SOLR_VERSION/contrib/prometheus-exporter/bin/solr-exporter" "/opt/solr-$SOLR_VERSION/server/scripts/cloud-scripts"
+
+FROM $BASE_IMAGE
 
 LABEL maintainer="The Apache Lucene/Solr Project"
 LABEL repository="https://github.com/apache/lucene-solr"
@@ -13,7 +25,7 @@ ARG GITHUB_URL=github.com
 
 RUN set -ex; \
     apt-get update; \
-    apt-get -y install acl dirmngr gpg lsof procps wget netcat gosu tini; \
+    apt-get -y install acl dirmngr lsof procps wget netcat gosu tini; \
     rm -rf /var/lib/apt/lists/*; \
     cd /usr/local/bin; wget -nv https://${GITHUB_URL}/apangin/jattach/releases/download/v1.5/jattach; chmod 755 jattach; \
     echo >jattach.sha512 "d8eedbb3e192a8596c08efedff99b9acf1075331e1747107c07cdb1718db2abe259ef168109e46bd4cf80d47d43028ff469f95e6ddcbdda4d7ffa73a20e852f9  jattach"; \
@@ -35,31 +47,25 @@ RUN set -ex; \
   groupadd -r --gid "$SOLR_GID" "$SOLR_GROUP"; \
   useradd -r --uid "$SOLR_UID" --gid "$SOLR_GID" "$SOLR_USER"
 
-COPY --chown=0:0 scripts /opt/docker-solr/scripts
+COPY --from=input scripts /opt/docker-solr/scripts
 
 ARG SOLR_VERSION
 
-COPY --from=solr_package "/opt/solr-$SOLR_VERSION.tgz" "/opt/solr-$SOLR_VERSION.tgz"
+# Used by solr-fg
+ENV SOLR_VERSION $SOLR_VERSION
+
+COPY --from=input /opt/solr-$SOLR_VERSION /opt/solr-$SOLR_VERSION
 
 RUN set -ex; \
-  tar -C /opt --extract --file "/opt/solr-$SOLR_VERSION.tgz" && \
-  rm "/opt/solr-$SOLR_VERSION.tgz"; \
   (cd /opt; ln -s "solr-$SOLR_VERSION" solr); \
-  rm -Rf /opt/solr/docs/ /opt/solr/dist/{solr-solrj-$SOLR_VERSION.jar,solrj-lib,solr-test-framework-$SOLR_VERSION.jar,test-framework}; \
-  mkdir -p /opt/solr/server/solr/lib /docker-entrypoint-initdb.d /opt/docker-solr; \
-  chown -R 0:0 "/opt/solr-$SOLR_VERSION"; \
-  find "/opt/solr-$SOLR_VERSION" -type d -print0 | xargs -0 chmod 0755; \
-  find "/opt/solr-$SOLR_VERSION" -type f -print0 | xargs -0 chmod 0644; \
-  chmod -R 0755 "/opt/solr-$SOLR_VERSION/bin" "/opt/solr-$SOLR_VERSION/contrib/prometheus-exporter/bin/solr-exporter" /opt/solr-$SOLR_VERSION/server/scripts/cloud-scripts; \
+  mkdir -p /opt/solr/server/solr/lib /docker-entrypoint-initdb.d; \
   cp /opt/solr/bin/solr.in.sh /etc/default/solr.in.sh; \
   mv /opt/solr/bin/solr.in.sh /opt/solr/bin/solr.in.sh.orig; \
   mv /opt/solr/bin/solr.in.cmd /opt/solr/bin/solr.in.cmd.orig; \
-  chown root:0 /etc/default/solr.in.sh; \
   chmod 0664 /etc/default/solr.in.sh; \
   mkdir -p -m0770 /var/solr; \
   sed -i -e "s/\"\$(whoami)\" == \"root\"/\$(id -u) == 0/" /opt/solr/bin/solr; \
   sed -i -e 's/lsof -PniTCP:/lsof -t -PniTCP:/' /opt/solr/bin/solr; \
-  chown -R "0:0" /opt/solr-$SOLR_VERSION /docker-entrypoint-initdb.d /opt/docker-solr; \
   chown -R "$SOLR_USER:0" /var/solr;
 
 VOLUME /var/solr
diff --git a/solr/docker/README.md b/solr/docker/README.md
index 3356419..abd155e 100644
--- a/solr/docker/README.md
+++ b/solr/docker/README.md
@@ -76,7 +76,7 @@ If you want to persist the data, mount a volume or directory on `/var/solr`.
 Solr expects some files and directories in `/var/solr`; if you use your own directory or volume you can either pre-populate them, or let Solr docker copy them for you. See [init-var-solr](scripts/init-var-solr).
 If you want to use custom configuration, mount it in the appropriate place. See below for examples.
 
-The Solr docker distribution adds [scripts](include/scripts) in `/opt/docker-solr/scripts` to make it easier to use under Docker, for example to create cores on container startup.
+The Solr docker distribution adds [scripts](scripts) in `/opt/docker-solr/scripts` to make it easier to use under Docker, for example to create cores on container startup.
 
 ## Creating cores
 
diff --git a/solr/docker/build.gradle b/solr/docker/build.gradle
index d6e80ac..723f664 100644
--- a/solr/docker/build.gradle
+++ b/solr/docker/build.gradle
@@ -18,106 +18,192 @@
 import com.google.common.base.Preconditions
 import com.google.common.base.Strings
 
-apply plugin: 'base'
-apply plugin: 'com.palantir.docker'
-
-subprojects {
-  apply plugin: 'base'
-  apply plugin: 'com.palantir.docker'
-}
-
 description = 'Solr Docker image'
 
-def dockerPackage = project(':solr:docker:package')
-
-dependencies {
-  docker dockerPackage
-}
+apply plugin: 'base'
 
+// Solr Docker inputs
 def dockerImageRepo = propertyOrEnvOrDefault("solr.docker.imageRepo", "SOLR_DOCKER_IMAGE_REPO", "apache/solr")
 def dockerImageTag = propertyOrEnvOrDefault("solr.docker.imageTag", "SOLR_DOCKER_IMAGE_TAG", "${version}")
 def dockerImageName = propertyOrEnvOrDefault("solr.docker.imageName", "SOLR_DOCKER_IMAGE_NAME", "${dockerImageRepo}:${dockerImageTag}")
 def baseDockerImage = propertyOrEnvOrDefault("solr.docker.baseImage", "SOLR_DOCKER_BASE_IMAGE", 'openjdk:11-jre-slim')
 def githubUrlOrMirror = propertyOrEnvOrDefault("solr.docker.githubUrl", "SOLR_DOCKER_GITHUB_URL", 'github.com')
 
-docker {
-  name = dockerImageName
-  files file('include')
-  buildArgs(['BASE_IMAGE' : baseDockerImage, 'SOLR_PACKAGE_IMAGE' : 'apache/solr-build:local-package', 'SOLR_VERSION': "${version}", 'GITHUB_URL': githubUrlOrMirror])
+// Build directory locations
+def dockerBuildDistribution = "$buildDir/distributions"
+def imageIdFile = "$buildDir/image-id"
+
+configurations {
+  packaging {
+    canBeResolved = true
+  }
+  dockerImage {
+    canBeResolved = true
+  }
+}
+
+dependencies {
+  packaging project(path: ":solr:packaging", configuration: 'archives')
+
+  dockerImage files(imageIdFile) {
+    builtBy 'dockerBuild'
+  }
 }
 
-tasks.docker {
-  // In order to create the solr docker image, the solr package image must be created first.
-  dependsOn(dockerPackage.tasks.docker)
+task dockerTar(type: Tar) {
+  group = 'Docker'
+  description = 'Package docker context to prepare for docker build'
+
+  dependsOn configurations.packaging
+  into('scripts') {
+    from file('scripts')
+    fileMode 755
+  }
+  into('releases') {
+    from configurations.packaging
+    include '*.tgz'
+  }
+  from file('Dockerfile')
+  destinationDirectory = file(dockerBuildDistribution)
+  extension 'tgz'
+  compression = Compression.GZIP
+}
+
+task dockerBuild(dependsOn: tasks.dockerTar) {
+  group = 'Docker'
+  description = 'Build Solr docker image'
+
+  // Ensure that the docker image is rebuilt on build-arg changes or changes in the docker context
+  inputs.properties([
+          baseDockerImage: baseDockerImage,
+          githubUrlOrMirror: githubUrlOrMirror,
+          version: version
+  ])
+  inputs.dir(dockerBuildDistribution)
+
+  doLast {
+    exec {
+      standardInput = tasks.dockerTar.outputs.files.singleFile.newDataInputStream()
+      commandLine "docker", "build",
+              "--iidfile", imageIdFile,
+              "--build-arg", "BASE_IMAGE=${inputs.properties.baseDockerImage}",
+              "--build-arg", "SOLR_VERSION=${version}",
+              "--build-arg", "GITHUB_URL=${inputs.properties.githubUrlOrMirror}",
+              "-"
+    }
+  }
 
   // Print information on the image after it has been created
   doLast {
+    def dockerImageId = file(imageIdFile).text
     project.logger.lifecycle("Solr Docker Image Created")
-    project.logger.lifecycle("\tName: $dockerImageName")
-    project.logger.lifecycle("\tBase Image: $baseDockerImage")
+    project.logger.lifecycle("\tID: \t$dockerImageId")
+    project.logger.lifecycle("\tBase Image: \t$baseDockerImage")
+    project.logger.lifecycle("\tSolr Version: \t$version")
   }
+
+  outputs.files(imageIdFile)
 }
 
-abstract class DockerTestSuite extends DefaultTask {
-  private String solrImageName = null;
-  private List<String> tests = new ArrayList<>();
-  private List<String> ignore = new ArrayList<>();
+task dockerTag(dependsOn: tasks.dockerBuild) {
+  group = 'Docker'
+  description = 'Tag Solr docker image'
 
-  @OutputDirectory
-  abstract DirectoryProperty getOutputDir()
+  def dockerImageIdFile = file(imageIdFile)
+  // Ensure that the docker image is re-tagged if the image ID or desired tag changes
+  inputs.properties([
+          dockerImageName: dockerImageName,
+  ])
+  inputs.file(dockerImageIdFile)
 
-  public void setSolrImageName(String solrImageName) {
-    this.solrImageName = solrImageName
-  }
+  doLast {
+    def dockerImageId = dockerImageIdFile.text
 
-  public String getSolrImageName() {
-    Preconditions.checkArgument(!Strings.isNullOrEmpty(solrImageName), "solrImageName is a required dockerTests configuration item.")
-    return solrImageName
-  }
+    exec {
+      commandLine "docker", "tag", dockerImageId, inputs.properties.dockerImageName
+    }
 
-  @Option(option = "tests", description = "Only run these specified tests, comma separated.")
-  public void setTests(List<String> tests) {
-    this.tests = tests;
+    // Print information on the image after it has been created
+    project.logger.lifecycle("Solr Docker Image Tagged")
+    project.logger.lifecycle("\tID: \t$dockerImageId")
+    project.logger.lifecycle("\tTag: \t$dockerImageName")
   }
+}
 
-  @Input
-  public List<String> getTests() {
-    return tests;
-  }
+task testDocker(dependsOn: tasks.dockerBuild) {
+  group = 'Docker'
+  description = 'Test Solr docker image'
 
-  @Option(option = "ignore", description = "Ignore these tests, comma separated.")
-  public void setIgnore(List<String> ignore) {
-    this.ignore = ignore;
-  }
+  def inputDir = "tests/cases"
+  def outputDir = "$buildDir/tmp/tests"
 
-  @Input
-  public List<String> getIgnore() {
-    return ignore;
-  }
+  // Ensure that the docker image is re-tested if the image ID changes or the test files change
+  inputs.properties([
+          includeTests: new HashSet(Arrays.asList(propertyOrEnvOrDefault("solr.docker.tests.include", "SOLR_DOCKER_TESTS_INCLUDE", ",").split(","))),
+          excludeTests: new HashSet(Arrays.asList(propertyOrEnvOrDefault("solr.docker.tests.exclude", "SOLR_DOCKER_TESTS_EXCLUDE", ",").split(",")))
+  ])
+  inputs.file(imageIdFile)
+  inputs.dir(inputDir)
+
+  doLast {
+    def solrImageId = tasks.dockerBuild.outputs.files.singleFile.text
+    def solrImageName = solrImageId.substring(7, 14)
 
-  @TaskAction
-  void execute() {
     // Print information on the image before it is tested
-    project.logger.lifecycle("Testing Solr Image: $solrImageName\n")
-    def sourceDir = project.file("tests/cases")
+    logger.lifecycle("Testing Solr Image:")
+    logger.lifecycle("\tID: $solrImageId\n")
+
+    // Run the tests
+    def sourceDir = file(inputDir)
     sourceDir.eachFile  { file ->
       def testName = file.getName()
-      def testCaseBuildDir = outputDir.dir(testName).get().toString()
+      def testCaseBuildDir = "${outputDir}/${testName}"
 
       // If specific tests are specified, only run those. Otherwise run all that are not ignored.
-      def runTest = !this.tests.isEmpty() ? tests.contains(testName) : !ignore.contains(testName)
+      def runTest = !inputs.properties.includeTests.isEmpty() ? inputs.properties.includeTests.contains(testName) : !inputs.properties.excludeTests.contains(testName)
       if (runTest) {
-        project.exec {
-          environment "TEST_DIR", "$file"
-          environment "BUILD_DIR", "$testCaseBuildDir"
+        exec {
+          environment "TEST_DIR", file
+          environment "BUILD_DIR", testCaseBuildDir
           commandLine "bash", "$file/test.sh", solrImageName
         }
       }
     }
   }
+
+  outputs.dir(outputDir)
 }
 
-task testDocker(type: DockerTestSuite) {
-  outputDir = project.file("$buildDir/tmp/tests")
-  solrImageName = dockerImageName
+task dockerPush(dependsOn: tasks.dockerTag) {
+  group = 'Docker'
+  description = 'Push Solr docker image'
+
+  // Ensure that the docker image is re-pushed if the image ID or tag changes
+  inputs.properties([
+          dockerImageName: dockerImageName,
+  ])
+  inputs.file(imageIdFile)
+
+  // We don't want to push a docker image unless the tests have passed
+  mustRunAfter tasks.testDocker
+
+  doLast {
+    exec {
+      commandLine "docker", "push", dockerImageName
+    }
+
+    // Print information on the image after it has been created
+    project.logger.lifecycle("Solr Docker Image Pushed: \t$dockerImageName")
+  }
+}
+
+// One task to build and tag a Solr docker image
+task docker {
+  dependsOn tasks.dockerBuild, tasks.dockerTag
+}
+
+artifacts {
+  dockerImage(tasks.dockerBuild.outputs.files.singleFile) {
+    builtBy(tasks.dockerBuild)
+  }
 }
\ No newline at end of file
diff --git a/solr/docker/gradle-help.txt b/solr/docker/gradle-help.txt
new file mode 100644
index 0000000..63ad735
--- /dev/null
+++ b/solr/docker/gradle-help.txt
@@ -0,0 +1,80 @@
+Docker Images for Solr
+======================
+
+In order to build and tag a Solr docker image, merely run the following command:
+
+gradlew docker
+
+This calls the dockerBuild and dockerTag tasks, which have inputs that are described below.
+
+Building
+--------
+
+In order to build the Solr Docker image, run:
+
+gradlew dockerBuild
+
+The docker build task accepts the following inputs, all accepted via both Environment Variables and Gradle Properties.
+
+Base Docker Image: (The docker image used for the "FROM" in the Solr Dockerfile)
+   Default: "openjdk:11-jre-slim"
+   EnvVar: SOLR_DOCKER_BASE_IMAGE
+   Gradle Property: -Psolr.docker.baseImage
+
+Github URL or Mirror: (The URL of github or a mirror of github releases. This is of use when building the docker image behind a firewall that does not have access to external Github.)
+   Default: "github.com"
+   EnvVar: SOLR_DOCKER_GITHUB_URL
+   Gradle Property: -Psolr.docker.githubUrl
+
+Tagging and Pushing
+-------
+
+To tag the docker image, run the following command.
+This will also ensure that the docker image has been built as per the inputs detailed above.
+
+gradlew dockerTag
+
+And to push the image with the given tag, run the following command.
+Gradle will ensure that the docker image is built and tagged as the inputs describe before being pushed.
+
+gradlew dockerPush
+
+The docker image tag can be customized via the following options, all accepted via both Environment Variables and Gradle Properties.
+
+Docker Image Repository:
+   Default: "apache/solr"
+   EnvVar: SOLR_DOCKER_IMAGE_REPO
+   Gradle Property: -Psolr.docker.imageRepo
+
+Docker Image Tag:
+   Default: the Solr version, e.g. "9.0.0-SNAPSHOT"
+   EnvVar: SOLR_DOCKER_IMAGE_TAG
+   Gradle Property: -Psolr.docker.imageTag
+
+Docker Image Name: (Use this to explicitly set a whole image name. If given, the image repo and image version options above are ignored.)
+   Default: {image_repo}/{image_tag} (both options provided above, with defaults)
+   EnvVar: SOLR_DOCKER_IMAGE_NAME
+   Gradle Property: -Psolr.docker.imageName
+
+Testing
+-------
+
+To test the docker image, run the following command.
+This will also ensure that the docker image has been built as per the inputs detailed above in the "Building" section.
+
+gradlew testDocker
+
+If a docker image build parameters were used during building, then the same inputs must be used while testing.
+Otherwise a new docker image will be built for the tests to run with.
+
+You can also specify an explicit list of tests to run, or an explicit list of tests to ignore.
+Both inputs are optional, and by default all tests will be run.
+Each input tasks a comma separated list of test names.
+
+Run specific tests:
+   EnvVar: SOLR_DOCKER_TESTS_INCLUDE
+   Gradle Property: -Psolr.docker.tests.include
+
+Exclude specific tests:
+   EnvVar: SOLR_DOCKER_TESTS_EXCLUDE
+   Gradle Property: -Psolr.docker.tests.exclude
diff --git a/solr/docker/package/Dockerfile.local-package b/solr/docker/package/Dockerfile.local-package
deleted file mode 100644
index e37d67f..0000000
--- a/solr/docker/package/Dockerfile.local-package
+++ /dev/null
@@ -1,3 +0,0 @@
-FROM scratch
-
-COPY releases/ /opt/
\ No newline at end of file
diff --git a/solr/docker/package/Dockerfile.release-package b/solr/docker/package/Dockerfile.release-package
deleted file mode 100644
index 85947c9..0000000
--- a/solr/docker/package/Dockerfile.release-package
+++ /dev/null
@@ -1,74 +0,0 @@
-ARG BASE_IMAGE=openjdk:11-jre
-
-FROM $BASE_IMAGE as downloader
-
-ARG SOLR_VERSION
-ARG SOLR_SHA512
-ARG SOLR_KEYS
-# If specified, this will override SOLR_DOWNLOAD_SERVER and all ASF mirrors. Typically used downstream for custom builds
-ARG SOLR_DOWNLOAD_URL
-
-# Override the solr download location with e.g.:
-#   docker build -t mine --build-arg SOLR_DOWNLOAD_SERVER=http://www-eu.apache.org/dist/lucene/solr .
-ARG SOLR_DOWNLOAD_SERVER
-# This is only applicable when SOLR_DOWNLOAD_URL is not provided. Skips the GPG check for Solr downloads.
-ARG SKIP_GPG_CHECK="true"
-
-ENV SOLR_CLOSER_URL="http://www.apache.org/dyn/closer.lua?filename=lucene/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz&action=download" \
-    SOLR_DIST_URL="https://www.apache.org/dist/lucene/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz" \
-    SOLR_ARCHIVE_URL="https://archive.apache.org/dist/lucene/solr/$SOLR_VERSION/solr-$SOLR_VERSION.tgz"
-
-RUN set -ex; \
-    apt-get update; \
-    apt-get -y install dirmngr gpg wget; \
-    rm -rf /var/lib/apt/lists/*;
-
-RUN set -ex; \
-  export GNUPGHOME="/tmp/gnupg_home"; \
-  mkdir -p "$GNUPGHOME"; \
-  chmod 700 "$GNUPGHOME"; \
-  echo "disable-ipv6" >> "$GNUPGHOME/dirmngr.conf"; \
-  for key in $SOLR_KEYS; do \
-    found=''; \
-    for server in \
-      ha.pool.sks-keyservers.net \
-      hkp://keyserver.ubuntu.com:80 \
-      hkp://p80.pool.sks-keyservers.net:80 \
-      pgp.mit.edu \
-    ; do \
-      echo "  trying $server for $key"; \
-      gpg --batch --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$key" && found=yes && break; \
-      gpg --batch --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$key" && found=yes && break; \
-    done; \
-    test -z "$found" && echo >&2 "error: failed to fetch $key from several disparate servers -- network issues?" && exit 1; \
-  done; \
-  exit 0
-
-RUN set -ex; \
-  export GNUPGHOME="/tmp/gnupg_home"; \
-  MAX_REDIRECTS=1; \
-  if [ -n "$SOLR_DOWNLOAD_URL" ]; then \
-    # If a custom URL is defined, we download from non-ASF mirror URL and allow more redirects and skip GPG step
-    # This takes effect only if the SOLR_DOWNLOAD_URL build-arg is specified, typically in downstream Dockerfiles
-    MAX_REDIRECTS=4; \
-    SKIP_GPG_CHECK="true"; \
-  elif [ -n "$SOLR_DOWNLOAD_SERVER" ]; then \
-    SOLR_DOWNLOAD_URL="$SOLR_DOWNLOAD_SERVER/$SOLR_VERSION/solr-$SOLR_VERSION.tgz"; \
-  fi; \
-  for url in $SOLR_DOWNLOAD_URL $SOLR_CLOSER_URL $SOLR_DIST_URL $SOLR_ARCHIVE_URL; do \
-    if [ -f "/opt/solr-$SOLR_VERSION.tgz" ]; then break; fi; \
-    echo "downloading $url"; \
-    if wget -t 10 --max-redirect $MAX_REDIRECTS --retry-connrefused -nv "$url" -O "/opt/solr-$SOLR_VERSION.tgz"; then break; else rm -f "/opt/solr-$SOLR_VERSION.tgz"; fi; \
-  done; \
-  if [ ! -f "/opt/solr-$SOLR_VERSION.tgz" ]; then echo "failed all download attempts for solr-$SOLR_VERSION.tgz"; exit 1; fi; \
-  if [ "$SKIP_GPG_CHECK" != "true" ]; then \
-    echo "downloading $SOLR_ARCHIVE_URL.asc"; \
-    wget -nv "$SOLR_ARCHIVE_URL.asc" -O "/opt/solr-$SOLR_VERSION.tgz.asc"; \
-    echo "$SOLR_SHA512 */opt/solr-$SOLR_VERSION.tgz" | sha512sum -c -; \
-    (>&2 ls -l "/opt/solr-$SOLR_VERSION.tgz" "/opt/solr-$SOLR_VERSION.tgz.asc"); \
-    gpg --batch --verify "/opt/solr-$SOLR_VERSION.tgz.asc" "/opt/solr-$SOLR_VERSION.tgz"; \
-  else \
-    echo "Skipping GPG validation due to non-Apache build"; \
-  fi; \
-  { command -v gpgconf; gpgconf --kill all || :; }; \
-  rm -r "$GNUPGHOME";
diff --git a/solr/docker/package/build.gradle b/solr/docker/package/build.gradle
deleted file mode 100644
index 94cbfdb..0000000
--- a/solr/docker/package/build.gradle
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-
-description = 'Solr Docker Package image'
-
-// The solr package docker image relies on the output of the solr:packaging project.
-Project solrPackaging = project(':solr:packaging')
-
-dependencies {
-  docker solrPackaging
-}
-
-docker {
-  name = 'apache/solr-build:local-package'
-  dockerfile file('Dockerfile.local-package')
-  files(solrPackaging.tasks.distTar.outputs)
-  getCopySpec().into('releases')
-}
-
-// Only allow the following docker tasks
-def availableDockerTasks = ["docker", "dockerClean", "dockerPrepare", "dockerfileZip"]
-project.tasks.configureEach { t -> t.enabled = t.getGroup() != "Docker" || availableDockerTasks.contains(t.getName()) }
diff --git a/solr/docker/include/scripts/docker-entrypoint.sh b/solr/docker/scripts/docker-entrypoint.sh
similarity index 100%
rename from solr/docker/include/scripts/docker-entrypoint.sh
rename to solr/docker/scripts/docker-entrypoint.sh
diff --git a/solr/docker/include/scripts/init-var-solr b/solr/docker/scripts/init-var-solr
similarity index 100%
rename from solr/docker/include/scripts/init-var-solr
rename to solr/docker/scripts/init-var-solr
diff --git a/solr/docker/include/scripts/oom_solr.sh b/solr/docker/scripts/oom_solr.sh
similarity index 100%
rename from solr/docker/include/scripts/oom_solr.sh
rename to solr/docker/scripts/oom_solr.sh
diff --git a/solr/docker/include/scripts/precreate-core b/solr/docker/scripts/precreate-core
similarity index 100%
rename from solr/docker/include/scripts/precreate-core
rename to solr/docker/scripts/precreate-core
diff --git a/solr/docker/include/scripts/run-initdb b/solr/docker/scripts/run-initdb
similarity index 100%
rename from solr/docker/include/scripts/run-initdb
rename to solr/docker/scripts/run-initdb
diff --git a/solr/docker/include/scripts/solr-create b/solr/docker/scripts/solr-create
similarity index 100%
rename from solr/docker/include/scripts/solr-create
rename to solr/docker/scripts/solr-create
diff --git a/solr/docker/include/scripts/solr-demo b/solr/docker/scripts/solr-demo
similarity index 100%
rename from solr/docker/include/scripts/solr-demo
rename to solr/docker/scripts/solr-demo
diff --git a/solr/docker/include/scripts/solr-fg b/solr/docker/scripts/solr-fg
similarity index 100%
rename from solr/docker/include/scripts/solr-fg
rename to solr/docker/scripts/solr-fg
diff --git a/solr/docker/include/scripts/solr-foreground b/solr/docker/scripts/solr-foreground
similarity index 100%
rename from solr/docker/include/scripts/solr-foreground
rename to solr/docker/scripts/solr-foreground
diff --git a/solr/docker/include/scripts/solr-precreate b/solr/docker/scripts/solr-precreate
similarity index 100%
rename from solr/docker/include/scripts/solr-precreate
rename to solr/docker/scripts/solr-precreate
diff --git a/solr/docker/include/scripts/start-local-solr b/solr/docker/scripts/start-local-solr
similarity index 100%
rename from solr/docker/include/scripts/start-local-solr
rename to solr/docker/scripts/start-local-solr
diff --git a/solr/docker/include/scripts/stop-local-solr b/solr/docker/scripts/stop-local-solr
similarity index 100%
rename from solr/docker/include/scripts/stop-local-solr
rename to solr/docker/scripts/stop-local-solr
diff --git a/solr/docker/include/scripts/wait-for-solr.sh b/solr/docker/scripts/wait-for-solr.sh
similarity index 100%
rename from solr/docker/include/scripts/wait-for-solr.sh
rename to solr/docker/scripts/wait-for-solr.sh
diff --git a/solr/docker/include/scripts/wait-for-zookeeper.sh b/solr/docker/scripts/wait-for-zookeeper.sh
similarity index 100%
rename from solr/docker/include/scripts/wait-for-zookeeper.sh
rename to solr/docker/scripts/wait-for-zookeeper.sh
diff --git a/solr/docker/tests/cases/gosu/test.sh b/solr/docker/tests/cases/gosu/test.sh
index ad9444e..29e411f 100755
--- a/solr/docker/tests/cases/gosu/test.sh
+++ b/solr/docker/tests/cases/gosu/test.sh
@@ -59,7 +59,7 @@ fi
 container_cleanup "$container_name"
 
 # chown it back
-docker run --rm --user 0:0 -d -e VERBOSE=yes \
+docker run --rm --user 0:0 -e VERBOSE=yes \
   -v "$myvarsolr:/myvarsolr" "$tag" \
   bash -c "chown -R $(id -u):$(id -g) /myvarsolr; ls -ld /myvarsolr"
 


[lucene-solr] 07/10: SOLR-15001 Docker: require init_var_solr.sh (#2083)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 70c21f066efca4239ef64ddefa52438e2caad6d0
Author: David Smiley <ds...@apache.org>
AuthorDate: Fri Nov 27 14:59:54 2020 -0500

    SOLR-15001 Docker: require init_var_solr.sh (#2083)
    
    The Dockerfile should not initialize /var/solr's contents because this is confusing and redundant with init_var_solr.sh.
    No need for init_var_solr.sh to echo what it does; VERBOSE can be used to accomplish that.
    
    Separate CHANGES.md for Docker and contrib modules.
---
 dev-tools/scripts/addVersion.py                    |  1 +
 solr/CHANGES.txt                                   |  7 ++++++
 solr/docker/CHANGES.md                             | 28 ++++++++++++++++++++++
 solr/docker/Dockerfile                             |  6 +----
 solr/docker/include/scripts/docker-entrypoint.sh   |  3 +++
 solr/docker/include/scripts/init-var-solr          | 16 ++++++-------
 solr/docker/include/scripts/solr-create            |  3 ---
 solr/docker/include/scripts/solr-foreground        |  3 ---
 solr/docker/include/scripts/solr-precreate         |  3 ---
 .../cases/empty-varsolr-vol-solr-nocopy/test.sh    |  1 +
 10 files changed, 48 insertions(+), 23 deletions(-)

diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 9fb9182..a520140 100755
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -199,6 +199,7 @@ def parse_properties_file(filename):
 def get_solr_init_changes():
   return dedent('''
     Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+    Docker and contrib modules have separate CHANGES.md files.
 
     ''')
   
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f09e496..3f8f7a4 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -7,6 +7,7 @@ https://github.com/apache/lucene-solr/blob/master/solr/solr-ref-guide/src/solr-u
 ==================  9.0.0 ==================
 
 Consult the lucene/CHANGES.txt file for additional, low level, changes in this release.
+Docker and contrib modules have separate CHANGES.md files.
 
 New Features
 ---------------------
@@ -136,6 +137,9 @@ Other Changes
 
 * SOLR-14957: Add Prometheus Exporter to docker PATH. Fix classpath issues. (Houston Putman)
 
+* SOLR-14944: Remove the "spins" metrics - support for detection of spinning disks has been
+  removed in LUCENE-9576. (ab)
+
 * SOLR-14912: Clean up solr-extraction contrib to produce solr-extraction-* jar
   (instead of solr-cell-*). (Dawid Weiss)
 
@@ -143,6 +147,9 @@ Other Changes
 
 * SOLR-14949: Ability to customize docker image name/base image (Houston Putman)
 
+* SOLR-14035: Remove deprecated preferLocalShards=true support in favour of the shards.preference=replica.location:local alternative.
+  (Alex Bulygin via Christine Poerschke)
+
 Bug Fixes
 ---------------------
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/docker/CHANGES.md b/solr/docker/CHANGES.md
new file mode 100644
index 0000000..04a767c
--- /dev/null
+++ b/solr/docker/CHANGES.md
@@ -0,0 +1,28 @@
+This file lists release notes for this module.
+Prior to version 9, the module existed in another repository and changes were not tracked in this manner.
+You could browse the commit history here instead:
+https://github.com/docker-solr/docker-solr
+ 
+9.0.0
+==================
+
+Improvements
+----------------------
+* SOLR-14001: Removed /var/solr initialization from the Dockerfile; depend on init_var_solr.sh instead.
+  This leads to more consistent behavior no matter how /var/solr is mounted.
+  * init_var_solr.sh is now invoked by docker-entrypoint.sh; not in a bunch of other places.
+  * as before, you can set NO_INIT_VAR_SOLR=1 to short-circuit this.
+  * init_var_solr.sh no longer echo's anything.  For verbosity, set VERBOSE=yes.
+  (David Smiley)
+
+* SOLR-14957: Add Prometheus Exporter to docker PATH. Fix classpath issues.
+  (Houston Putman)
+  
+* SOLR-14949: Ability to customize the FROM image when building.
+  (Houston Putman)
+
+Other Changes
+------------------
+* SOLR-14789: Migrate docker image creation from docker-solr repo to solr/docker. 
+  (Houston Putman, Martijn Koster, Tim Potter, David Smiley, janhoy, Mike Drob)
+
diff --git a/solr/docker/Dockerfile b/solr/docker/Dockerfile
index aef0800..0e7157e 100644
--- a/solr/docker/Dockerfile
+++ b/solr/docker/Dockerfile
@@ -56,11 +56,7 @@ RUN set -ex; \
   mv /opt/solr/bin/solr.in.cmd /opt/solr/bin/solr.in.cmd.orig; \
   chown root:0 /etc/default/solr.in.sh; \
   chmod 0664 /etc/default/solr.in.sh; \
-  mkdir -p /var/solr/data /var/solr/logs; \
-  (cd /opt/solr/server/solr; cp solr.xml zoo.cfg /var/solr/data/); \
-  cp /opt/solr/server/resources/log4j2.xml /var/solr/log4j2.xml; \
-  find /var/solr -type d -print0 | xargs -0 chmod 0770; \
-  find /var/solr -type f -print0 | xargs -0 chmod 0660; \
+  mkdir -p -m0770 /var/solr; \
   sed -i -e "s/\"\$(whoami)\" == \"root\"/\$(id -u) == 0/" /opt/solr/bin/solr; \
   sed -i -e 's/lsof -PniTCP:/lsof -t -PniTCP:/' /opt/solr/bin/solr; \
   chown -R "0:0" /opt/solr-$SOLR_VERSION /docker-entrypoint-initdb.d /opt/docker-solr; \
diff --git a/solr/docker/include/scripts/docker-entrypoint.sh b/solr/docker/include/scripts/docker-entrypoint.sh
index 38e7c1c..69738a9 100755
--- a/solr/docker/include/scripts/docker-entrypoint.sh
+++ b/solr/docker/include/scripts/docker-entrypoint.sh
@@ -17,6 +17,9 @@ if ! [[ ${SOLR_PORT:-} =~ ^[0-9]+$ ]]; then
   export SOLR_PORT
 fi
 
+# Essential for running Solr
+/opt/docker-solr/scripts/init-var-solr
+
 # when invoked with e.g.: docker run solr -help
 if [ "${1:0:1}" == '-' ]; then
     set -- solr-foreground "$@"
diff --git a/solr/docker/include/scripts/init-var-solr b/solr/docker/include/scripts/init-var-solr
index 8a29de1..d1d6325 100755
--- a/solr/docker/include/scripts/init-var-solr
+++ b/solr/docker/include/scripts/init-var-solr
@@ -31,31 +31,29 @@ function check_dir_writability {
 }
 
 if [ ! -d "$DIR/data" ]; then
-    echo "Creating $DIR/data"
+    #echo "Creating $DIR/data"
     check_dir_writability "$DIR"
-    mkdir "$DIR/data"
-    chmod 0770 "$DIR/data"
+    mkdir -m0770 "$DIR/data"
 fi
 
 if [ ! -d "$DIR/logs" ]; then
-    echo "Creating $DIR/logs"
+    #echo "Creating $DIR/logs"
     check_dir_writability "$DIR"
-    mkdir "$DIR/logs"
-    chmod 0770 "$DIR/logs"
+    mkdir -m0770 "$DIR/logs"
 fi
 
 if [ ! -f "$DIR/data/solr.xml" ]; then
-    echo "Copying solr.xml"
+    #echo "Copying solr.xml"
     cp -a /opt/solr/server/solr/solr.xml "$DIR/data/solr.xml"
 fi
 
 if [ ! -f "$DIR/data/zoo.cfg" ]; then
-    echo "Copying zoo.cfg"
+    #echo "Copying zoo.cfg"
     cp -a /opt/solr/server/solr/zoo.cfg "$DIR/data/zoo.cfg"
 fi
 
 if [ ! -f "$DIR/log4j2.xml" ]; then
-    echo "Copying log4j2.xml"
+    #echo "Copying log4j2.xml"
     cp -a /opt/solr/server/resources/log4j2.xml "$DIR/log4j2.xml"
 fi
 
diff --git a/solr/docker/include/scripts/solr-create b/solr/docker/include/scripts/solr-create
index e2054a1..d523ce6 100755
--- a/solr/docker/include/scripts/solr-create
+++ b/solr/docker/include/scripts/solr-create
@@ -15,9 +15,6 @@ if [[ "${VERBOSE:-}" == "yes" ]]; then
     set -x
 fi
 
-# init script for handling an empty /var/solr
-/opt/docker-solr/scripts/init-var-solr
-
 . /opt/docker-solr/scripts/run-initdb
 
 # solr uses "-c corename". Parse the arguments to determine the core name.
diff --git a/solr/docker/include/scripts/solr-foreground b/solr/docker/include/scripts/solr-foreground
index 336104b..aa9fa68 100755
--- a/solr/docker/include/scripts/solr-foreground
+++ b/solr/docker/include/scripts/solr-foreground
@@ -7,9 +7,6 @@ if [[ "$VERBOSE" == "yes" ]]; then
     set -x
 fi
 
-# init script for handling an empty /var/solr
-/opt/docker-solr/scripts/init-var-solr
-
 . /opt/docker-solr/scripts/run-initdb
 
 exec solr-fg "$@"
diff --git a/solr/docker/include/scripts/solr-precreate b/solr/docker/include/scripts/solr-precreate
index 5248203..91d0a3d 100755
--- a/solr/docker/include/scripts/solr-precreate
+++ b/solr/docker/include/scripts/solr-precreate
@@ -17,9 +17,6 @@ if [[ "${VERBOSE:-}" == "yes" ]]; then
     set -x
 fi
 
-# init script for handling an empty /var/solr
-/opt/docker-solr/scripts/init-var-solr
-
 . /opt/docker-solr/scripts/run-initdb
 
 /opt/docker-solr/scripts/precreate-core "$@"
diff --git a/solr/docker/tests/cases/empty-varsolr-vol-solr-nocopy/test.sh b/solr/docker/tests/cases/empty-varsolr-vol-solr-nocopy/test.sh
index eaa39ac..0b3bc2f 100755
--- a/solr/docker/tests/cases/empty-varsolr-vol-solr-nocopy/test.sh
+++ b/solr/docker/tests/cases/empty-varsolr-vol-solr-nocopy/test.sh
@@ -17,6 +17,7 @@ docker volume create "$myvarsolr"
 docker run \
   -v "$myvarsolr:/var/solr:nocopy" \
   --rm \
+  -e NO_INIT_VAR_SOLR=yes \
   -u "0:0" \
   "$tag" bash -c "chown 8983:8983 /var/solr"
 


[lucene-solr] 05/10: SOLR-14949: Ability to customize Solr Docker build (#2020)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit e5392a0af6846e5b225a0eba5fe59ac8700686cc
Author: Houston Putman <ho...@apache.org>
AuthorDate: Tue Nov 10 10:42:38 2020 -0500

    SOLR-14949: Ability to customize Solr Docker build (#2020)
    
    Also added a gradlew helpDocker page.
---
 .github/workflows/docker-test.yml       | 44 +++++++++++++++++++++++++++
 gradle/help.gradle                      |  1 +
 help/docker.txt                         | 53 +++++++++++++++++++++++++++++++++
 solr/CHANGES.txt                        |  7 +++++
 solr/docker/build.gradle                | 24 +++++++++++++--
 solr/docker/tests/cases/version/test.sh | 45 ----------------------------
 6 files changed, 126 insertions(+), 48 deletions(-)

diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml
new file mode 100644
index 0000000..76fa714
--- /dev/null
+++ b/.github/workflows/docker-test.yml
@@ -0,0 +1,44 @@
+name: Docker Build & Test
+
+on:
+  pull_request:
+    branches:
+      - 'master'
+    paths:
+      - '.github/workflows/docker-test.yml'
+      - 'solr/bin/**'
+      - 'solr/contrib/prometheus-exporter/bin/**'
+      - 'solr/docker/**'
+      - 'solr/packaging/**'
+
+jobs:
+  test:
+    name: Build and test Docker image
+
+    runs-on: ubuntu-latest
+
+    env:
+      SOLR_DOCKER_IMAGE_REPO: github-pr/solr
+      SOLR_DOCKER_IMAGE_TAG: ${{github.event.number}}
+
+    steps:
+    # Setup
+    - uses: actions/checkout@v2
+    - name: Set up JDK 11
+      uses: actions/setup-java@v1
+      with:
+        java-version: 11
+    - name: Grant execute permission for gradlew
+      run: chmod +x gradlew
+    - uses: actions/cache@v2
+      with:
+        path: |
+          ~/.gradle/caches
+        key: ${{ runner.os }}-gradle-docker-${{ hashFiles('versions.lock') }}
+        restore-keys: |
+          ${{ runner.os }}-gradle-docker-
+          ${{ runner.os }}-gradle-
+    - name: Build Docker image with Gradle
+      run: ./gradlew solr:docker:docker
+    - name: Run tests on Docker image
+      run: ./gradlew solr:docker:testDocker
diff --git a/gradle/help.gradle b/gradle/help.gradle
index e03d724..4c1bf7e 100644
--- a/gradle/help.gradle
+++ b/gradle/help.gradle
@@ -29,6 +29,7 @@ configure(rootProject) {
       ["Git", "help/git.txt", "Git assistance and guides."],
       ["ValidateLogCalls", "help/validateLogCalls.txt", "How to use logging calls efficiently."],
       ["IDEs", "help/IDEs.txt", "IDE support."],
+      ["Docker", "help/docker.txt", "Building Solr Docker images."],
   ]
 
   helpFiles.each { section, path, sectionInfo ->
diff --git a/help/docker.txt b/help/docker.txt
new file mode 100644
index 0000000..8438713
--- /dev/null
+++ b/help/docker.txt
@@ -0,0 +1,53 @@
+Docker Images for Solr
+======================
+
+Solr docker images are built using Palantir's Docker Gradle plugin, https://github.com/palantir/gradle-docker.
+
+Common Inputs
+-------------
+
+The docker image and its tag can be customized via the following options, all accepted via both Environment Variables and Gradle Properties.
+
+Docker Image Repository:
+   Default: "apache/solr"
+   EnvVar: SOLR_DOCKER_IMAGE_REPO
+   Gradle Property: -Psolr.docker.imageRepo
+
+Docker Image Tag:
+   Default: the Solr version, e.g. "9.0.0-SNAPSHOT"
+   EnvVar: SOLR_DOCKER_IMAGE_TAG
+   Gradle Property: -Psolr.docker.imageTag
+
+Docker Image Name: (Use this to explicitly set a whole image name. If given, the image repo and image version options above are ignored.)
+   Default: {image_repo}/{image_tag} (both options provided above, with defaults)
+   EnvVar: SOLR_DOCKER_IMAGE_NAME
+   Gradle Property: -Psolr.docker.imageName
+
+Building
+--------
+
+In order to build the Solr Docker image, run:
+
+gradlew docker
+
+The docker build task accepts the following inputs, in addition to the common inputs listed above:
+
+Base Docker Image: (The docker image used for the "FROM" in the Solr Dockerfile)
+   Default: "openjdk:11-jre-slim"
+   EnvVar: SOLR_DOCKER_BASE_IMAGE
+   Gradle Property: -Psolr.docker.baseImage
+
+Testing
+-------
+
+To test the docker image, run:
+
+gradlew dockerTest
+
+If a custom docker image name was used, via one of the common inputs described above, then the same input must be used while testing.
+
+You can also specify an explicit list of tests to run, or an explicit list of tests to ignore.
+Both inputs are optional, and by default all tests will be run.
+
+gradlew testDocker --tests create_core,demo
+gradlew testDocker --ignore demo-tini,initdb
\ No newline at end of file
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ad0c1f6..f09e496 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -136,6 +136,13 @@ Other Changes
 
 * SOLR-14957: Add Prometheus Exporter to docker PATH. Fix classpath issues. (Houston Putman)
 
+* SOLR-14912: Clean up solr-extraction contrib to produce solr-extraction-* jar
+  (instead of solr-cell-*). (Dawid Weiss)
+
+* SOLR-14978: Enable OOM Killer Script in Solr Foreground. Simplify getting heap dumps on OOM. (Mike Drob, Houston Putman)
+
+* SOLR-14949: Ability to customize docker image name/base image (Houston Putman)
+
 Bug Fixes
 ---------------------
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/docker/build.gradle b/solr/docker/build.gradle
index a4cdeea..0aaefff 100644
--- a/solr/docker/build.gradle
+++ b/solr/docker/build.gradle
@@ -15,6 +15,9 @@
  * limitations under the License.
  */
 
+import com.google.common.base.Preconditions
+import com.google.common.base.Strings
+
 apply plugin: 'base'
 apply plugin: 'com.palantir.docker'
 
@@ -31,8 +34,10 @@ dependencies {
   docker dockerPackage
 }
 
-def dockerImageName = "apache/solr:${version}"
-def baseDockerImage = 'openjdk:11-jre-slim'
+def dockerImageRepo = propertyOrEnvOrDefault("solr.docker.imageRepo", "SOLR_DOCKER_IMAGE_REPO", "apache/solr")
+def dockerImageTag = propertyOrEnvOrDefault("solr.docker.imageTag", "SOLR_DOCKER_IMAGE_TAG", "${version}")
+def dockerImageName = propertyOrEnvOrDefault("solr.docker.imageName", "SOLR_DOCKER_IMAGE_NAME", "${dockerImageRepo}:${dockerImageTag}")
+def baseDockerImage = propertyOrEnvOrDefault("solr.docker.baseImage", "SOLR_DOCKER_BASE_IMAGE", 'openjdk:11-jre-slim')
 
 docker {
   name = dockerImageName
@@ -53,12 +58,22 @@ tasks.docker {
 }
 
 abstract class DockerTestSuite extends DefaultTask {
+  private String solrImageName = null;
   private List<String> tests = new ArrayList<>();
   private List<String> ignore = new ArrayList<>();
 
   @OutputDirectory
   abstract DirectoryProperty getOutputDir()
 
+  public void setSolrImageName(String solrImageName) {
+    this.solrImageName = solrImageName
+  }
+
+  public String getSolrImageName() {
+    Preconditions.checkArgument(!Strings.isNullOrEmpty(solrImageName), "solrImageName is a required dockerTests configuration item.")
+    return solrImageName
+  }
+
   @Option(option = "tests", description = "Only run these specified tests, comma separated.")
   public void setTests(List<String> tests) {
     this.tests = tests;
@@ -81,6 +96,8 @@ abstract class DockerTestSuite extends DefaultTask {
 
   @TaskAction
   void execute() {
+    // Print information on the image before it is tested
+    project.logger.lifecycle("Testing Solr Image: $solrImageName\n")
     def sourceDir = project.file("tests/cases")
     sourceDir.eachFile  { file ->
       def testName = file.getName()
@@ -92,7 +109,7 @@ abstract class DockerTestSuite extends DefaultTask {
         project.exec {
           environment "TEST_DIR", "$file"
           environment "BUILD_DIR", "$testCaseBuildDir"
-          commandLine "bash", "$file/test.sh", "apache/solr:${project.version}"
+          commandLine "bash", "$file/test.sh", solrImageName
         }
       }
     }
@@ -101,4 +118,5 @@ abstract class DockerTestSuite extends DefaultTask {
 
 task testDocker(type: DockerTestSuite) {
   outputDir = project.file("$buildDir/tmp/tests")
+  solrImageName = dockerImageName
 }
\ No newline at end of file
diff --git a/solr/docker/tests/cases/version/test.sh b/solr/docker/tests/cases/version/test.sh
deleted file mode 100755
index 0f8c7ee..0000000
--- a/solr/docker/tests/cases/version/test.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-#
-set -euo pipefail
-
-TEST_DIR="${TEST_DIR:-$(dirname -- "${BASH_SOURCE[0]}")}"
-source "${TEST_DIR}/../../shared.sh"
-
-echo "Running $container_name"
-docker run --name "$container_name" -d "$tag"
-
-wait_for_server_started "$container_name"
-
-echo "Checking that the OS matches the tag '$tag'"
-if echo "$tag" | grep -q -- -alpine; then
-  alpine_version=$(docker exec --user=solr "$container_name" cat /etc/alpine-release || true)
-  if [[ -z $alpine_version ]]; then
-    echo "Could not get alpine version from container $container_name"
-    container_cleanup "$container_name"
-    exit 1
-  fi
-  echo "Alpine $alpine_version"
-else
-  debian_version=$(docker exec --user=solr "$container_name" cat /etc/debian_version || true)
-  if [[ -z $debian_version ]]; then
-    echo "Could not get debian version from container $container_name"
-    container_cleanup "$container_name"
-    exit 1
-  fi
-  echo "Debian $debian_version"
-fi
-
-# check that the version of Solr matches the tag
-changelog_version=$(docker exec --user=solr "$container_name" bash -c "grep -E '^==========* ' /opt/solr/CHANGES.txt | head -n 1 | tr -d '= '")
-echo "Solr version $changelog_version"
-solr_version_from_tag=$(echo "$tag" | sed -e 's/^.*://' -e 's/-.*//')
-
-if [[ $changelog_version != "$solr_version_from_tag" ]]; then
-  echo "Solr version mismatch"
-  container_cleanup "$container_name"
-  exit 1
-fi
-
-container_cleanup "$container_name"
-
-echo "Test $TEST_NAME $tag succeeded"


[lucene-solr] 01/10: SOLR-14947: Print out image info after gradle docker task. (#2007)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 579f2f3dcaea1fe339586fba2ea4fbbbcf7dce87
Author: Houston Putman <ho...@apache.org>
AuthorDate: Thu Oct 22 11:30:43 2020 -0400

    SOLR-14947: Print out image info after gradle docker task. (#2007)
---
 solr/docker/build.gradle | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/solr/docker/build.gradle b/solr/docker/build.gradle
index 2557d6c..a4cdeea 100644
--- a/solr/docker/build.gradle
+++ b/solr/docker/build.gradle
@@ -31,14 +31,26 @@ dependencies {
   docker dockerPackage
 }
 
+def dockerImageName = "apache/solr:${version}"
+def baseDockerImage = 'openjdk:11-jre-slim'
+
 docker {
-  name = "apache/solr:${version}"
+  name = dockerImageName
   files file('include')
-  buildArgs(['BASE_IMAGE' : 'openjdk:11-jre-slim', 'SOLR_PACKAGE_IMAGE' : 'apache/solr-build:local-package', 'SOLR_VERSION': "${version}"])
+  buildArgs(['BASE_IMAGE' : baseDockerImage, 'SOLR_PACKAGE_IMAGE' : 'apache/solr-build:local-package', 'SOLR_VERSION': "${version}"])
 }
 
-// In order to create the solr docker image, the solr package image must be created first.
-tasks.docker.dependsOn(dockerPackage.tasks.docker)
+tasks.docker {
+  // In order to create the solr docker image, the solr package image must be created first.
+  dependsOn(dockerPackage.tasks.docker)
+
+  // Print information on the image after it has been created
+  doLast {
+    project.logger.lifecycle("Solr Docker Image Created")
+    project.logger.lifecycle("\tName: $dockerImageName")
+    project.logger.lifecycle("\tBase Image: $baseDockerImage")
+  }
+}
 
 abstract class DockerTestSuite extends DefaultTask {
   private List<String> tests = new ArrayList<>();


[lucene-solr] 06/10: SOLR-14949: Adding githubUrl option for docker build. (#2074)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit c657bcb3436d99affc1e4592b4947b6b52e20670
Author: Houston Putman <ho...@apache.org>
AuthorDate: Tue Nov 10 13:31:33 2020 -0500

    SOLR-14949: Adding githubUrl option for docker build. (#2074)
---
 help/docker.txt          | 5 +++++
 solr/docker/build.gradle | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/help/docker.txt b/help/docker.txt
index 8438713..c86572c 100644
--- a/help/docker.txt
+++ b/help/docker.txt
@@ -37,6 +37,11 @@ Base Docker Image: (The docker image used for the "FROM" in the Solr Dockerfile)
    EnvVar: SOLR_DOCKER_BASE_IMAGE
    Gradle Property: -Psolr.docker.baseImage
 
+Github URL or Mirror: (The URL of github or a mirror of github releases. This is of use when building the docker image behind a firewall that does not have access to external Github.)
+   Default: "github.com"
+   EnvVar: SOLR_DOCKER_GITHUB_URL
+   Gradle Property: -Psolr.docker.githubUrl
+
 Testing
 -------
 
diff --git a/solr/docker/build.gradle b/solr/docker/build.gradle
index 0aaefff..d6e80ac 100644
--- a/solr/docker/build.gradle
+++ b/solr/docker/build.gradle
@@ -38,11 +38,12 @@ def dockerImageRepo = propertyOrEnvOrDefault("solr.docker.imageRepo", "SOLR_DOCK
 def dockerImageTag = propertyOrEnvOrDefault("solr.docker.imageTag", "SOLR_DOCKER_IMAGE_TAG", "${version}")
 def dockerImageName = propertyOrEnvOrDefault("solr.docker.imageName", "SOLR_DOCKER_IMAGE_NAME", "${dockerImageRepo}:${dockerImageTag}")
 def baseDockerImage = propertyOrEnvOrDefault("solr.docker.baseImage", "SOLR_DOCKER_BASE_IMAGE", 'openjdk:11-jre-slim')
+def githubUrlOrMirror = propertyOrEnvOrDefault("solr.docker.githubUrl", "SOLR_DOCKER_GITHUB_URL", 'github.com')
 
 docker {
   name = dockerImageName
   files file('include')
-  buildArgs(['BASE_IMAGE' : baseDockerImage, 'SOLR_PACKAGE_IMAGE' : 'apache/solr-build:local-package', 'SOLR_VERSION': "${version}"])
+  buildArgs(['BASE_IMAGE' : baseDockerImage, 'SOLR_PACKAGE_IMAGE' : 'apache/solr-build:local-package', 'SOLR_VERSION': "${version}", 'GITHUB_URL': githubUrlOrMirror])
 }
 
 tasks.docker {


[lucene-solr] 02/10: SOLR-14957: Add Prometheus Exporter to docker PATH. Fix classpath issues. (#2017)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 2a113fdf3856097e8ca298d37f59e6f98e620c06
Author: Houston Putman <ho...@apache.org>
AuthorDate: Mon Oct 26 14:15:30 2020 -0400

    SOLR-14957: Add Prometheus Exporter to docker PATH. Fix classpath issues. (#2017)
---
 solr/CHANGES.txt                                                    | 2 ++
 solr/contrib/prometheus-exporter/bin/solr-exporter                  | 6 +++++-
 solr/contrib/prometheus-exporter/bin/solr-exporter.cmd              | 2 +-
 .../src/java/org/apache/solr/prometheus/exporter/SolrExporter.java  | 2 +-
 solr/docker/Dockerfile                                              | 2 +-
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9544163..89eb930 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -132,6 +132,8 @@ Other Changes
 
 * SOLR-14930: Removed rule based replica placement (noble)
 
+* SOLR-14957: Add Prometheus Exporter to docker PATH. Fix classpath issues. (Houston Putman)
+
 Bug Fixes
 ---------------------
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/contrib/prometheus-exporter/bin/solr-exporter b/solr/contrib/prometheus-exporter/bin/solr-exporter
index 9dc717e..5eb8ef8 100755
--- a/solr/contrib/prometheus-exporter/bin/solr-exporter
+++ b/solr/contrib/prometheus-exporter/bin/solr-exporter
@@ -74,7 +74,7 @@ then
   REPO="$BASEDIR"/lib
 fi
 
-CLASSPATH=$CLASSPATH_PREFIX
+CLASSPATH=$CLASSPATH_PREFIX:$BASEDIR/conf
 for JAR in $(find "$REPO" -name '*.jar')
 do
   CLASSPATH="$CLASSPATH":"$JAR"
@@ -103,6 +103,10 @@ for JAR in $(find "$BASEDIR"/../../server/solr-webapp/webapp/WEB-INF/lib -name '
 do
   CLASSPATH="$CLASSPATH":"$JAR"
 done
+for JAR in $(find "$BASEDIR"/../../server/lib/ext -name '*.jar')
+do
+  CLASSPATH="$CLASSPATH":"$JAR"
+done
 
 # Memory settings
 JAVA_MEM_OPTS=
diff --git a/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd b/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
index e5bd65e..84ccce9 100644
--- a/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
+++ b/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
@@ -71,7 +71,7 @@ if "%JAVACMD%"=="" set JAVACMD=java
 
 if "%REPO%"=="" set REPO=%BASEDIR%\lib
 
-set CLASSPATH=%REPO%\*;%BASEDIR%\..\..\dist\solrj-lib\*;%BASEDIR%\..\..\dist\*;%BASEDIR%\lucene-libs\*;%BASEDIR%\..\..\server\solr-webapp\webapp\WEB-INF\lib\*
+set CLASSPATH=%REPO%\*;%BASEDIR%\conf;%BASEDIR%\..\..\dist\solrj-lib\*;%BASEDIR%\..\..\dist\*;%BASEDIR%\lucene-libs\*;%BASEDIR%\..\..\server\solr-webapp\webapp\WEB-INF\lib\*;%BASEDIR%\..\..\server\lib\ext\*
 set EXTRA_JVM_ARGUMENTS=-Dlog4j.configurationFile=file:///%BASEDIR%\..\..\server\resources\log4j2-console.xml
 goto endInit
 
diff --git a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java
index b0dd198..50ba20d 100644
--- a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java
+++ b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/SolrExporter.java
@@ -68,7 +68,7 @@ public class SolrExporter {
   private static final String[] ARG_CONFIG_FLAGS = {"-f", "--config-file"};
   private static final String ARG_CONFIG_METAVAR = "CONFIG";
   private static final String ARG_CONFIG_DEST = "configFile";
-  private static final String ARG_CONFIG_DEFAULT = "./conf/solr-exporter-config.xml";
+  private static final String ARG_CONFIG_DEFAULT = "solr-exporter-config.xml";
   private static final String ARG_CONFIG_HELP = "Specify the configuration file; the default is " + ARG_CONFIG_DEFAULT + ".";
 
   private static final String[] ARG_SCRAPE_INTERVAL_FLAGS = {"-s", "--scrape-interval"};
diff --git a/solr/docker/Dockerfile b/solr/docker/Dockerfile
index 26bbfdd..aef0800 100644
--- a/solr/docker/Dockerfile
+++ b/solr/docker/Dockerfile
@@ -23,7 +23,7 @@ ENV SOLR_USER="solr" \
     SOLR_UID="8983" \
     SOLR_GROUP="solr" \
     SOLR_GID="8983" \
-    PATH="/opt/solr/bin:/opt/docker-solr/scripts:$PATH" \
+    PATH="/opt/solr/bin:/opt/docker-solr/scripts:/opt/solr/contrib/prometheus-exporter/bin:$PATH" \
     SOLR_INCLUDE=/etc/default/solr.in.sh \
     SOLR_HOME=/var/solr/data \
     SOLR_PID_DIR=/var/solr \


[lucene-solr] 03/10: SOLR-14955: Add env var options to Prometheus Export scripts. (#2038)

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 0b8fed4a4da1486e28f1c899d9bbee564d6f4b0f
Author: Houston Putman <ho...@apache.org>
AuthorDate: Fri Oct 30 11:15:33 2020 -0400

    SOLR-14955: Add env var options to Prometheus Export scripts. (#2038)
---
 solr/CHANGES.txt                                   | 31 ++++++++++++++
 solr/contrib/prometheus-exporter/bin/solr-exporter | 30 +++++++++++++-
 .../prometheus-exporter/bin/solr-exporter.cmd      | 12 +++++-
 ...onitoring-solr-with-prometheus-and-grafana.adoc | 47 +++++++++++++++-------
 4 files changed, 103 insertions(+), 17 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 89eb930..be0ef3a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -139,6 +139,37 @@ Bug Fixes
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
   of Collection API tasks competing for a lock (Ilan Ginzburg).
 
+==================  8.8.0 ==================
+
+Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
+
+New Features
+---------------------
+(No changes)
+
+Improvements
+---------------------
+* SOLR-14942: Reduce leader election time on node shutdown by removing election nodes before closing cores.
+  (Cao Manh Dat, Mike Drob, hossman, shalin)
+
+* SOLR-14955: Add env var options for the Prometheus Exporter bin scripts (Houston Putman)
+
+Optimizations
+---------------------
+(No changes)
+
+Bug Fixes
+---------------------
+* SOLR-14946: Fix responseHeader being returned in response when omitHeader=true and EmbeddedSolrServer is used
+  as the client (Munendra S N)
+
+* SOLR-14940: ReplicationHandler memory leak through SolrCore.closeHooks with unstable ZK connection. (Anver Sotnikov, Mike Drob)
+
+Other Changes
+---------------------
+
+* SOLR-14954: Heavily edit reindexing.adoc (Sameul García Martínez and Erick Erickson)
+
 ==================  8.7.0 ==================
 
 Consult the lucene/CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/contrib/prometheus-exporter/bin/solr-exporter b/solr/contrib/prometheus-exporter/bin/solr-exporter
index 5eb8ef8..b601a78 100755
--- a/solr/contrib/prometheus-exporter/bin/solr-exporter
+++ b/solr/contrib/prometheus-exporter/bin/solr-exporter
@@ -1,5 +1,4 @@
-#!/bin/sh
-
+#!/usr/bin/env bash
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -135,15 +134,42 @@ if $cygwin; then
   [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
 fi
 
+# Convert Environment Variables to Command Line Options
+EXPORTER_ARGS=()
+
+if [[ -n "$CONFIG_FILE" ]]; then
+  EXPORTER_ARGS+=(-f "$CONFIG_FILE")
+fi
+
+if [[ -n "$PORT" ]]; then
+  EXPORTER_ARGS+=(-p "$PORT")
+fi
+
+if [[ -n "$SCRAPE_INTERVAL" ]]; then
+  EXPORTER_ARGS+=(-s "$SCRAPE_INTERVAL")
+fi
+
+if [[ -n "$NUM_THREADS" ]]; then
+  EXPORTER_ARGS+=(-n "$NUM_THREADS")
+fi
+
+if [[ -n "$ZK_HOST" ]]; then
+  EXPORTER_ARGS+=(-z "$ZK_HOST")
+elif [[ -n "$SOLR_URL" ]]; then
+  EXPORTER_ARGS+=(-b "$SOLR_URL")
+fi
+
 exec "$JAVACMD" \
   $JAVA_MEM_OPTS \
   $GC_TUNE \
   $JAVA_OPTS \
   $EXTRA_JVM_ARGUMENTS \
+  $ZK_CREDS_AND_ACLS \
   -classpath "$CLASSPATH" \
   -Dapp.name="solr-exporter" \
   -Dapp.pid="$$" \
   -Dapp.repo="$REPO" \
   -Dbasedir="$BASEDIR" \
   org.apache.solr.prometheus.exporter.SolrExporter \
+  "${EXPORTER_ARGS[@]}" \
   "$@"
diff --git a/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd b/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
index 84ccce9..efa92a1 100644
--- a/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
+++ b/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
@@ -73,12 +73,22 @@ if "%REPO%"=="" set REPO=%BASEDIR%\lib
 
 set CLASSPATH=%REPO%\*;%BASEDIR%\conf;%BASEDIR%\..\..\dist\solrj-lib\*;%BASEDIR%\..\..\dist\*;%BASEDIR%\lucene-libs\*;%BASEDIR%\..\..\server\solr-webapp\webapp\WEB-INF\lib\*;%BASEDIR%\..\..\server\lib\ext\*
 set EXTRA_JVM_ARGUMENTS=-Dlog4j.configurationFile=file:///%BASEDIR%\..\..\server\resources\log4j2-console.xml
+
+@REM Convert Environment Variables to Command Line Options
+set EXPORTER_ARGS=
+
+IF NOT "%CONFIG_FILE%"=="" set EXPORTER_ARGS=%EXPORTER_ARGS% -f %CONFIG_FILE%
+IF NOT "%PORT%"=="" set EXPORTER_ARGS=%EXPORTER_ARGS% -p %PORT%
+IF NOT "%SCRAPE_INTERVAL%"=="" set EXPORTER_ARGS=%EXPORTER_ARGS% -s %SCRAPE_INTERVAL%
+IF NOT "%NUM_THREADS%"=="" set EXPORTER_ARGS=%EXPORTER_ARGS% -n %NUM_THREADS%
+IF NOT "%ZK_HOST%"=="" set EXPORTER_ARGS=%EXPORTER_ARGS% -z %ZK_HOST%
+IF NOT "%SOLR_URL%"=="" set EXPORTER_ARGS=%EXPORTER_ARGS% -b %SOLR_URL%
 goto endInit
 
 @REM Reaching here means variables are defined and arguments have been captured
 :endInit
 
-%JAVACMD% %JAVA_MEM% %GC_TUNE% %JAVA_OPTS% %EXTRA_JVM_ARGUMENTS% -classpath "%CLASSPATH_PREFIX%;%CLASSPATH%" -Dapp.name="solr-exporter" -Dapp.repo="%REPO%" -Dbasedir="%BASEDIR%" org.apache.solr.prometheus.exporter.SolrExporter %CMD_LINE_ARGS%
+%JAVACMD% %JAVA_MEM% %GC_TUNE% %JAVA_OPTS% %EXTRA_JVM_ARGUMENTS% %ZK_CREDS_AND_ACLS% -classpath "%CLASSPATH_PREFIX%;%CLASSPATH%" -Dapp.name="solr-exporter" -Dapp.repo="%REPO%" -Dbasedir="%BASEDIR%" org.apache.solr.prometheus.exporter.SolrExporter %EXPORTER_ARGS% %CMD_LINE_ARGS%
 if ERRORLEVEL 1 goto error
 goto end
 
diff --git a/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc b/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
index 9fa01ae..98e104f 100644
--- a/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
+++ b/solr/solr-ref-guide/src/monitoring-solr-with-prometheus-and-grafana.adoc
@@ -83,34 +83,44 @@ $ ./bin/solr-exporter -p 9854 -z localhost:2181/solr -f ./conf/solr-exporter-con
 
 === Command Line Parameters
 
-The parameters in the example start commands shown above:
+The list of available parameters for the Prometheus Exporter.
+All parameters can be provided via an environment variable, instead of through the command line.
 
 `h`, `--help`::
 Displays command line help and usage.
 
-`-p`, `--port`::
-The port where Prometheus will listen for new data. This port will be used to configure Prometheus. It can be any port not already in use on your server. The default is `9983`.
+`-p`, `--port`, `$PORT`::
+The port where Prometheus will listen for new data. This port will be used to configure Prometheus.
+It can be any port not already in use on your server. The default is `9983`.
 
-`-b`, `--baseurl`::
-The Solr base URL (such as `\http://localhost:8983/solr`) when Solr is running in Standalone mode. If you are running Solr in SolrCloud mode, do not specify this parameter. If neither the `-b` parameter nor the `-z` parameter are defined, the default is `-b \http://localhost:8983/solr`.
+`-b`, `--baseurl`, `$SOLR_URL`::
+The Solr base URL (such as `\http://localhost:8983/solr`) when Solr is running in Standalone mode.
+If you are running Solr in SolrCloud mode, do not specify this parameter.
+If neither the `-b` parameter nor the `-z` parameter are defined, the default is `-b \http://localhost:8983/solr`.
 
-`-z`, `--zkhost`::
-The ZooKeeper connect string (such as `localhost:8983`, or `localhost:2181/solr`) when Solr is running in SolrCloud mode. If you are running Solr in Standalone mode, do not specify this parameter. If neither the `-b` parameter nor the `-z` parameter are defined, the `-b` parameter default is used.
+`-z`, `--zkhost`, `$ZK_HOST`::
+The ZooKeeper connect string (such as `localhost:9983`, or `localhost:2181/solr`) when Solr is running in SolrCloud mode.
+If you are running Solr in Standalone mode, do not specify this parameter.
+If neither the `-b` parameter nor the `-z` parameter are defined, the `-b` parameter default is used.
 
-`-f`, `--config-file`::
+`-f`, `--config-file`, `$CONFIG_FILE`::
 The path to the configuration file that defines the Solr metrics to read. The default is `contrib/prometheus-exporter/conf/solr-exporter-config.xml`.
 
-`-n`, `--num-threads`::
+`-n`, `--num-threads`, `$NUM_THREADS`::
 The number of threads. The `solr-exporter` creates thread pools for requests to Solr. Request latency can be improved by increasing the number of threads. The default is `1`.
 
-`-s`, `--scrape-interval`::
-The number of seconds between collecting metrics from Solr. The `solr-exporter` collects metrics from Solr every few seconds controlled by this setting. These metrics are cached and returned regardless of how frequently prometheus is configured to pull metrics from this tool. The freshness of the metrics can be improved by reducing the scrape interval but do not set it to a very low value because metrics collection can be expensive and can execute arbitrary searches to ping Solr. The def [...]
+`-s`, `--scrape-interval`, `$SCRAPE_INTERVAL`::
+The number of seconds between collecting metrics from Solr.
+The `solr-exporter` collects metrics from Solr every few seconds controlled by this setting.
+These metrics are cached and returned regardless of how frequently prometheus is configured to pull metrics from this tool.
+The freshness of the metrics can be improved by reducing the scrape interval but do not set it to a very low value because metrics collection can be expensive and can execute arbitrary searches to ping Solr.
+The default value is 60 seconds.
 
 The Solr's metrics exposed by `solr-exporter` can be seen at: `\http://localhost:9983/solr/admin/metrics`.
 
 === Environment Variable Options
 
-The start commands provided with the Prometheus Exporter support the use of custom java options through the following environment variables:
+The bin scripts provided with the Prometheus Exporter support the use of custom java options through the following environment variables:
 
 `JAVA_HEAP`::
 Sets the initial (`Xms`) and max (`Xmx`) Java heap size. The default is `512m`.
@@ -124,12 +134,20 @@ Custom Java garbage collection settings. The default is `-XX:+UseG1GC`.
 `JAVA_OPTS`::
 Extra JVM options.
 
+`ZK_CREDS_AND_ACLS`::
+Credentials for connecting to a ZK Host that is protected with ACLs.
+For more information on what to include in this variable, refer to the <<zookeeper-access-control.adoc#zookeeper-acls-in-solr-scripts,Solr ZK ACL docs>> or the <<#getting-metrics-from-a-secured-solrcloud,example below>>.
+
 `CLASSPATH_PREFIX`::
 Location of extra libraries to load when starting the `solr-exporter`.
 
+All <<#command-line-parameters,command line parameters>> are able to be provided via environment variables when using the bin scripts.
+
 === Getting Metrics from a Secured SolrCloud
 
-Your SolrCloud might be secured by measures described in <<securing-solr.adoc#securing-solr,Securing Solr>>. The security configuration can be injected into `solr-exporter` using environment variables in a fashion similar to other clients using <<using-solrj.adoc#using-solrj,SolrJ>>. This is possible because the main script picks up <<Environment Variable Options>>  and passes them on to the Java process.
+Your SolrCloud might be secured by measures described in <<securing-solr.adoc#securing-solr,Securing Solr>>.
+The security configuration can be injected into `solr-exporter` using environment variables in a fashion similar to other clients using <<using-solrj.adoc#using-solrj,SolrJ>>.
+This is possible because the main script picks up <<Environment Variable Options>>  and passes them on to the Java process.
 
 Example for a SolrCloud instance secured by <<basic-authentication-plugin.adoc#basic-authentication-plugin,Basic Authentication>>, <<enabling-ssl.adoc#enabling-ssl,SSL>> and <<zookeeper-access-control.adoc#zookeeper-access-control,ZooKeeper Access Control>>:
 
@@ -145,7 +163,8 @@ Then you can start the Exporter as follows (Linux).
 [source,bash]
 ----
 $ cd contrib/prometheus-exporter
-$ export JAVA_OPTS="-Djavax.net.ssl.trustStore=truststore.p12 -Djavax.net.ssl.trustStorePassword=truststorePassword -Dsolr.httpclient.builder.factory=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory -Dsolr.httpclient.config=basicauth.properties -DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider -DzkDigestUsername=readonly-user -DzkDigestPassword=zkUserPassword"
+$ export JAVA_OPTS="-Djavax.net.ssl.trustStore=truststore.p12 -Djavax.net.ssl.trustStorePassword=truststorePassword -Dsolr.httpclient.builder.factory=org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory -Dsolr.httpclient.config=basicauth.properties"
+$ export ZK_CREDS_AND_ACLS="-DzkCredentialsProvider=org.apache.solr.common.cloud.VMParamsSingleSetCredentialsDigestZkCredentialsProvider -DzkDigestUsername=readonly-user -DzkDigestPassword=zkUserPassword"
 $ export CLASSPATH_PREFIX="../../server/solr-webapp/webapp/WEB-INF/lib/commons-codec-1.11.jar"
 $ ./bin/solr-exporter -p 9854 -z zk1:2181,zk2:2181,zk3:2181 -f ./conf/solr-exporter-config.xml -n 16
 ----


[lucene-solr] 10/10: SOLR-15075: Remove docker gradle artifact

Posted by ho...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 33f72e1350bd23c14660302b8bf352937cb32515
Author: Houston Putman <ho...@apache.org>
AuthorDate: Tue Jan 26 13:33:32 2021 -0500

    SOLR-15075: Remove docker gradle artifact
    
    Gradle is currently picking up the dockerBuild task in "assemble",
    because of the build artifact.
---
 solr/docker/build.gradle | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/solr/docker/build.gradle b/solr/docker/build.gradle
index 723f664..6b7e214 100644
--- a/solr/docker/build.gradle
+++ b/solr/docker/build.gradle
@@ -200,10 +200,4 @@ task dockerPush(dependsOn: tasks.dockerTag) {
 // One task to build and tag a Solr docker image
 task docker {
   dependsOn tasks.dockerBuild, tasks.dockerTag
-}
-
-artifacts {
-  dockerImage(tasks.dockerBuild.outputs.files.singleFile) {
-    builtBy(tasks.dockerBuild)
-  }
 }
\ No newline at end of file