merrimanr 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_r243663444
##########
File path:
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py
##########
@@ -588,3 +589,35 @@ def check_indexer_parameters():
if len(missing) > 0:
raise Fail("Missing required indexing parameters(s): indexer={0},
missing={1}".format(indexer, missing))
+
+def install_metron_knox(params):
+ if os.path.exists(params.knox_home):
+ template = """export KNOX_HOME={0}; \
+ export KNOX_USER={1}; \
+ export KNOX_GROUP={2}; \
+ {3}/bin/install_metron_knox.sh; \
+ unset KNOX_USER; \
+ unset KNOX_GROUP; \
+ unset KNOX_HOME;"""
+ cmd = template.format(params.knox_home, params.knox_user,
params.knox_group, params.metron_home)
+
+ Execute(cmd)
+
+def is_metron_knox_installed(params):
+ return os.path.isfile(params.metron_knox_installed_flag_file)
+
+def set_metron_knox_installed(params):
Review comment:
Thanks @anandsubbu. The latest commit creates this directory if it doesn't
already exist.
----------------------------------------------------------------
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