-
Notifications
You must be signed in to change notification settings - Fork 1.1k
RANGER-5554: Refactor Ranger Admin bootstrap to use runtime XML config only #920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kumaab
wants to merge
10
commits into
apache:master
Choose a base branch
from
kumaab:ranger_5554
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ecf5fee
RANGER-5554: Refactor Ranger Admin bootstrap to use runtime XML confi…
kumaab f567589
Add kerberos related properties in XML
kumaab c3a5ea6
Enable Kerberos, fix solr plugin downloads
kumaab 7bd4c10
Move remaining db utils to dba.py and refactor to use f strings
kumaab 231024d
Move static configs into Dockerfile and refactor to simplify for k8s …
kumaab eefaca5
Add Apache License
kumaab 704a4c1
Add support for MySQL and Oracle - tested changes in docker
kumaab cfd2d05
Remove mysql and oracle properties file and refactor readme
kumaab b7f9cee
refactor to use f strings in all python scripts
kumaab df15591
Bake DB connector jars in image and configure the apt one at runtime …
kumaab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,15 @@ Use Dockerfiles in this directory to create docker images and run them to build | |
| # valid values for RANGER_DB_TYPE: mysql/postgres/oracle | ||
| ~~~ | ||
|
|
||
| - The Ranger Admin container uses `scripts/admin/ranger-admin-site.xml` for all database flavors. The file defaults to PostgreSQL and includes commented MySQL and Oracle blocks; uncomment the matching block and comment the other database flavor settings before starting the stack. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of requiring the deployer to update |
||
| ~~~ | ||
| export RANGER_DB_TYPE=mysql | ||
| # In scripts/admin/ranger-admin-site.xml, enable the commented MySQL block and comment others. | ||
|
|
||
| export RANGER_DB_TYPE=oracle | ||
| # In scripts/admin/ranger-admin-site.xml, enable the commented Oracle block and comment others. | ||
| ~~~ | ||
|
|
||
| ### Apache Ranger Build | ||
|
|
||
| #### In containers using docker compose | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
dev-support/ranger-docker/scripts/admin/configs/logback.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| 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. | ||
| --> | ||
|
|
||
| <configuration> | ||
| <appender name="xa_log_appender" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
| <!--See http://logback.qos.ch/manual/appenders.html#RollingFileAppender--> | ||
| <!--and http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy--> | ||
| <!--for further documentation--> | ||
| <file>${logdir}/ranger-admin-${hostname}-${user}.log</file> | ||
| <append>true</append> | ||
| <encoder> | ||
| <pattern>%date [%thread] %level{5} [%file:%line] %msg%n</pattern> | ||
| </encoder> | ||
| <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
| <fileNamePattern>${logdir}/ranger-admin-${hostname}-${user}.log.%d{yyyy-MM-dd}</fileNamePattern> | ||
| <maxHistory>15</maxHistory> | ||
| <cleanHistoryOnStart>true</cleanHistoryOnStart> | ||
| </rollingPolicy> | ||
| </appender> | ||
| <appender name="sql_appender" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
| <!--See http://logback.qos.ch/manual/appenders.html#RollingFileAppender--> | ||
| <!--and http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy--> | ||
| <!--for further documentation--> | ||
| <file>${logdir}/ranger_admin_sql.log</file> | ||
| <append>true</append> | ||
| <encoder> | ||
| <pattern>%d [%t] %-5p %C{6} \(%F:%L\) %msg%n</pattern> | ||
| </encoder> | ||
| <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
| <fileNamePattern>${logdir}/ranger_admin_sql.log.%d{yyyy-MM-dd}</fileNamePattern> | ||
| <maxHistory>15</maxHistory> | ||
| <cleanHistoryOnStart>true</cleanHistoryOnStart> | ||
| </rollingPolicy> | ||
| </appender> | ||
| <appender name="perf_appender" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
| <!--See http://logback.qos.ch/manual/appenders.html#RollingFileAppender--> | ||
| <!--and http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy--> | ||
| <!--for further documentation--> | ||
| <file>${logdir}/ranger_admin_perf.log</file> | ||
| <append>true</append> | ||
| <encoder> | ||
| <pattern>%d [%t] %msg%n</pattern> | ||
| </encoder> | ||
| <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
| <fileNamePattern>${logdir}/ranger_admin_perf.log.%d{yyyy-MM-dd}</fileNamePattern> | ||
| <maxHistory>15</maxHistory> | ||
| <cleanHistoryOnStart>true</cleanHistoryOnStart> | ||
| </rollingPolicy> | ||
| </appender> | ||
| <appender name="patch_logger" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
| <!--See http://logback.qos.ch/manual/appenders.html#RollingFileAppender--> | ||
| <!--and http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy--> | ||
| <!--for further documentation--> | ||
| <append>true</append> | ||
| <file>${logdir}/ranger_db_patch.log</file> | ||
| <encoder> | ||
| <pattern>%d [%t] %-5p %C{6} \(%F:%L\) %msg%n</pattern> | ||
| </encoder> | ||
| <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
| <fileNamePattern>${logdir}/ranger_db_patch.log.%d{yyyy-MM-dd}</fileNamePattern> | ||
| <maxHistory>15</maxHistory> | ||
| <cleanHistoryOnStart>true</cleanHistoryOnStart> | ||
| </rollingPolicy> | ||
| </appender> | ||
| <logger name="xa" additivity="false" level="info"> | ||
| <appender-ref ref="xa_log_appender"/> | ||
| </logger> | ||
| <logger name="jdbc.connection" additivity="false" level="error"> | ||
| <appender-ref ref="sql_appender"/> | ||
| </logger> | ||
| <logger name="com.mchange" additivity="false" level="warn" /> | ||
| <logger name="org.apache.ranger.perf" additivity="false" level="info"> | ||
| <appender-ref ref="perf_appender"/> | ||
| </logger> | ||
| <logger name="jdbc.audit" additivity="false" level="error"> | ||
| <appender-ref ref="sql_appender"/> | ||
| </logger> | ||
| <logger name="org.apache.ranger.patch" additivity="false" level="info"> | ||
| <appender-ref ref="patch_logger"/> | ||
| </logger> | ||
| <logger name="jdbc.resultset" additivity="false" level="error"> | ||
| <appender-ref ref="sql_appender"/> | ||
| </logger> | ||
| <logger name="org.springframework" additivity="false" level="warn"> | ||
| <appender-ref ref="patch_logger"/> | ||
| </logger> | ||
| <logger name="jdbc.sqltiming" additivity="false" level="warn"> | ||
| <appender-ref ref="sql_appender"/> | ||
| </logger> | ||
| <logger name="org.hibernate.SQL" additivity="false" level="warn"> | ||
| <appender-ref ref="sql_appender"/> | ||
| </logger> | ||
| <logger name="org.apache.ranger" additivity="false" level="info"> | ||
| <appender-ref ref="xa_log_appender"/> | ||
| </logger> | ||
| <logger name="jdbc.sqlonly" additivity="false" level="error"> | ||
| <appender-ref ref="sql_appender"/> | ||
| </logger> | ||
| <root level="warn"> | ||
| <appender-ref ref="xa_log_appender"/> | ||
| </root> | ||
| </configuration> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.