ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject ambari git commit: AMBARI-17247. Populate audit to solr / hdfs properties for Atlas (Gautam Borad via srimanth)
Date Wed, 15 Jun 2016 22:31:47 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 21c50a03f -> 8b21bbe86


AMBARI-17247. Populate audit to solr / hdfs properties for Atlas (Gautam Borad via srimanth)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8b21bbe8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b21bbe8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b21bbe8

Branch: refs/heads/branch-2.4
Commit: 8b21bbe862faab77efa8705b8ed7072cae6b0e07
Parents: 21c50a0
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Wed Jun 15 15:30:58 2016 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Wed Jun 15 15:31:29 2016 -0700

----------------------------------------------------------------------
 .../ranger-atlas-plugin-properties.xml          |  2 +-
 .../stacks/HDP/2.5/services/stack_advisor.py    | 25 ++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8b21bbe8/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/ranger-atlas-plugin-properties.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/ranger-atlas-plugin-properties.xml
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/ranger-atlas-plugin-properties.xml
index f3bdc2a..2f1cd9e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/ranger-atlas-plugin-properties.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ATLAS/configuration/ranger-atlas-plugin-properties.xml
@@ -22,7 +22,7 @@
 
   <property>
     <name>policy_user</name>
-    <value>ambari-qa</value>
+    <value>atlas</value>
     <display-name>Policy user for Atlas</display-name>
     <description>This user must be system user and also present at Ranger
       admin portal</description>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8b21bbe8/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index b896a6a..35ad34b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -1448,6 +1448,31 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
           service_user = services["configurations"][file_name]["properties"][config_name]
           putRangerAdminProperty(target_configname, service_user)
 
+    if "ATLAS" in servicesList:
+      if "ranger-env" in services["configurations"]:
+        putAtlasRangerAuditProperty = self.putProperty(configurations, 'ranger-atlas-audit',
services)
+        xasecure_audit_destination_hdfs = ''
+        xasecure_audit_destination_hdfs_dir = ''
+        xasecure_audit_destination_solr = ''
+        if 'xasecure.audit.destination.hdfs' in configurations['ranger-env']['properties']:
+          xasecure_audit_destination_hdfs = configurations['ranger-env']['properties']['xasecure.audit.destination.hdfs']
+        else:
+          xasecure_audit_destination_hdfs = services['configurations']['ranger-env']['properties']['xasecure.audit.destination.hdfs']
+
+        if 'xasecure.audit.destination.hdfs.dir' in configurations['ranger-env']['properties']:
+          xasecure_audit_destination_hdfs_dir = configurations['ranger-env']['properties']['xasecure.audit.destination.hdfs.dir']
+        else:
+          xasecure_audit_destination_hdfs_dir = services['configurations']['ranger-env']['properties']['xasecure.audit.destination.hdfs.dir']
+
+        if 'xasecure.audit.destination.solr' in configurations['ranger-env']['properties']:
+          xasecure_audit_destination_solr = configurations['ranger-env']['properties']['xasecure.audit.destination.solr']
+        else:
+          xasecure_audit_destination_solr = services['configurations']['ranger-env']['properties']['xasecure.audit.destination.solr']
+
+        putAtlasRangerAuditProperty('xasecure.audit.destination.hdfs',xasecure_audit_destination_hdfs)
+        putAtlasRangerAuditProperty('xasecure.audit.destination.hdfs.dir',xasecure_audit_destination_hdfs_dir)
+        putAtlasRangerAuditProperty('xasecure.audit.destination.solr',xasecure_audit_destination_solr)
+
   def validateRangerTagsyncConfigurations(self, properties, recommendedDefaults, configurations,
services, hosts):
     ranger_tagsync_properties = getSiteProperties(configurations, "ranger-tagsync-site")
     validationItems = []


Mime
View raw message