Paras created RANGER-5680:
-----------------------------
Summary: Make Solr optional and add audit-store selection for
Ranger docker (bring up Ranger without Solr)
Key: RANGER-5680
URL: https://issues.apache.org/jira/browse/RANGER-5680
Project: Ranger
Issue Type: Improvement
Components: audit
Reporter: Paras
Background
In the Ranger docker dev environment, the database flavor is cleanly selected
via the RANGER_DB_TYPE environment variable, which drives three points: the
Dockerfile.ranger multi-stage build (FROM ranger_${RANGER_DB_TYPE}), the
install.properties volume mount, and the compose extends: service:
${RANGER_DB_TYPE}. There is no equivalent mechanism for the audit store.
As a result, Solr is effectively mandatory: ranger-solr is defined inside
docker-compose.ranger.yml and is a hard depends_on of the ranger service, and
is also hard-depended-on by ranger-pdp and ozone-om. Choosing OpenSearch
instead requires hand-editing install.properties, and Solr still starts
regardless.
Scope
- Introduce a RANGER_AUDIT_STORE environment variable (e.g. solr | opensearch),
mirroring the RANGER_DB_TYPE pattern, to select the active audit destination
without editing property files by hand.
- Extract the ranger-solr service definition out of docker-compose.ranger.yml
into its own docker-compose.ranger-solr.yml (mirroring the existing
docker-compose.ranger-opensearch.yml pattern).
- Remove the hard depends_on: ranger-solr from the ranger, ranger-pdp, and
ozone-om service definitions so Ranger can start without Solr.
- Ensure the selected audit-store env var drives which install.properties
block/mount is active, so the docker stack comes up with the correct audit
backend end-to-end.
- Update the docker README to document export RANGER_AUDIT_STORE=opensearch
alongside export RANGER_DB_TYPE=....
Acceptance criteria
- Ranger admin, PDP, and Ozone stacks come up successfully with
RANGER_AUDIT_STORE=opensearch and no Solr container running.
- Existing Solr-based flows continue to work unchanged (RANGER_AUDIT_STORE=solr
remains the default).
- Regression-verified across DB flavors (postgres/mysql/oracle/sqlserver) and
dependent stacks (pdp, ozone, kms, audit-server).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)