anandsubbu commented on a change in pull request #1308: METRON-1945: Metron
MPack support for Knox SSO setup
URL: https://github.com/apache/metron/pull/1308#discussion_r243576445
##########
File path:
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py
##########
@@ -51,23 +51,24 @@
metron_group = config['configurations']['metron-env']['metron_group']
metron_log_dir = config['configurations']['metron-env']['metron_log_dir']
metron_pid_dir = config['configurations']['metron-env']['metron_pid_dir']
-
+metron_rest_host = status_params.metron_rest_host
metron_rest_port = status_params.metron_rest_port
metron_management_ui_host = status_params.metron_management_ui_host
metron_management_ui_port = status_params.metron_management_ui_port
+metron_management_ui_path = metron_home + '/web/management-ui/'
metron_alerts_ui_host = status_params.metron_alerts_ui_host
metron_alerts_ui_port = status_params.metron_alerts_ui_port
+metron_alerts_ui_path = metron_home + '/web/alerts-ui/'
metron_jvm_flags =
config['configurations']['metron-rest-env']['metron_jvm_flags']
# Construct the profiles as a temp variable first. Only the first time it's
set will carry through
-metron_spring_profiles_temp =
config['configurations']['metron-rest-env']['metron_spring_profiles_active']
-if config['configurations']['metron-security-env']['metron.ldap.enabled']:
- if metron_spring_profiles_temp:
- metron_spring_profiles_active = metron_spring_profiles_temp + ',ldap'
+metron_spring_profiles_active =
config['configurations']['metron-rest-env']['metron_spring_profiles_active']
+metron_ldap_enabled =
config['configurations']['metron-security-env']['metron.ldap.enabled']
+if metron_ldap_enabled:
+ if not len(metron_spring_profiles_active) == 0:
+ metron_spring_profiles_active += ',ldap'
Review comment:
Yup.. just validated that we add `knox` to the active spring profiles.
Cheers!
Here's the relevant snippet from restarting REST:
```
<snip>
2018-12-21 12:59:36,411 - Execute['export
METRON_JDBC_PASSWORD=[PROTECTED];export
JAVA_HOME=/usr/jdk64/jdk1.8.0_112;export METRON_REST_CLASSPATH=;export
METRON_INDEX_CP=;export METRON_LOG_DIR=/var/log/metron;export
METRON_PID_FILE=/var/run/metron/metron-rest.pid;export
HDP_VERSION=2.6.5.1050-37;export METRON_RA_INDEXING_WRITER=Elasticsearch;export
METRON_LDAP_PASSWORD=[PROTECTED];export
METRON_LDAP_SSL_TRUSTSTORE_PASSWORD=[PROTECTED];/usr/metron/0.7.0/bin/metron-rest.sh;unset
METRON_JDBC_PASSWORD;unset METRON_LDAP_PASSWORD;unset
METRON_LDAP_SSL_TRUSTSTORE_PASSWORD;'] {'logoutput': True, 'not_if': 'ls
/var/run/metron/metron-rest.pid >/dev/null 2>&1 && ps -p >/dev/null 2>&1',
'user': 'metron', 'timeout': 60}
METRON_VERSION=0.7.0
METRON_HOME=/usr/metron/0.7.0
METRON_SYSCONFIG=/etc/default/metron
METRON_SYSCONFIG=/etc/default/metron
Default metron-rest jar is: /usr/metron/0.7.0/lib/metron-rest-0.7.0.jar
METRON_SPRING_PROFILES_ACTIVE=dev,ldap,knox
METRON_CONFIG_LOCATION=
--spring.config.location=/usr/metron/0.7.0/config/rest_application.yml,classpath:/application.yml
METRON_PROFILES_ACTIVE= --spring.profiles.active=dev,ldap,knox
Metron indexing jar is:
/usr/metron/0.7.0/lib/metron-elasticsearch-0.7.0-uber.jar
<snip>
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services