You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/10/24 23:12:25 UTC
git commit: Revert "AMBARI-7933. Knox configuration changes for
topology label and users.ldif file. (sumit gupta via jaimin jetly)"
Repository: ambari
Updated Branches:
refs/heads/trunk 17b05b236 -> 6697e6b05
Revert "AMBARI-7933. Knox configuration changes for topology label and users.ldif file. (sumit gupta via jaimin jetly)"
This reverts commit 1e7607b892f01bed811e3092a208a29c87d61bb3.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6697e6b0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6697e6b0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6697e6b0
Branch: refs/heads/trunk
Commit: 6697e6b05c81e56da229dde055869edd6a4174db
Parents: 17b05b2
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Fri Oct 24 14:07:43 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Fri Oct 24 14:12:06 2014 -0700
----------------------------------------------------------------------
.../KNOX/configuration/ambari-topology.xml | 116 +++++++++++++++++++
.../services/KNOX/configuration/topology.xml | 116 -------------------
.../stacks/HDP/2.2/services/KNOX/metainfo.xml | 2 +-
.../2.2/services/KNOX/package/scripts/ldap.py | 2 +-
.../2.2/services/KNOX/package/scripts/params.py | 2 +-
.../python/stacks/2.2/KNOX/test_knox_gateway.py | 2 +-
.../test/python/stacks/2.2/configs/default.json | 4 +-
ambari-web/app/data/HDP2/site_properties.js | 4 +-
ambari-web/app/models/stack_service.js | 2 +-
9 files changed, 125 insertions(+), 125 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/ambari-topology.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/ambari-topology.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/ambari-topology.xml
new file mode 100644
index 0000000..46a9e42
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/ambari-topology.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+/**
+ * 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 supports_final="false" supports_adding_forbidden="true">
+ <!-- topology file -->
+
+ <property>
+ <name>content</name>
+ <value>
+ <topology>
+
+ <gateway>
+
+ <provider>
+ <role>authentication</role>
+ <name>ShiroProvider</name>
+ <enabled>true</enabled>
+ <param>
+ <name>sessionTimeout</name>
+ <value>30</value>
+ </param>
+ <param>
+ <name>main.ldapRealm</name>
+ <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.userDnTemplate</name>
+ <value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.url</name>
+ <value>ldap://{{knox_host_name}}:33389</value>
+ </param>
+ <param>
+ <name>main.ldapRealm.contextFactory.authenticationMechanism</name>
+ <value>simple</value>
+ </param>
+ <param>
+ <name>urls./**</name>
+ <value>authcBasic</value>
+ </param>
+ </provider>
+
+ <provider>
+ <role>identity-assertion</role>
+ <name>Default</name>
+ <enabled>true</enabled>
+ </provider>
+
+ </gateway>
+
+ <service>
+ <role>NAMENODE</role>
+ <url>hdfs://{{namenode_host}}:{{namenode_rpc_port}}</url>
+ </service>
+
+ <service>
+ <role>JOBTRACKER</role>
+ <url>rpc://{{rm_host}}:{{jt_rpc_port}}</url>
+ </service>
+
+ <service>
+ <role>WEBHDFS</role>
+ <url>http://{{namenode_host}}:{{namenode_http_port}}/webhdfs</url>
+ </service>
+
+ <service>
+ <role>WEBHCAT</role>
+ <url>http://{{webhcat_server_host}}:{{templeton_port}}/templeton</url>
+ </service>
+
+ <service>
+ <role>OOZIE</role>
+ <url>http://{{oozie_server_host}}:{{oozie_server_port}}/oozie</url>
+ </service>
+
+ <service>
+ <role>WEBHBASE</role>
+ <url>http://{{hbase_master_host}}:{{hbase_master_port}}</url>
+ </service>
+
+ <service>
+ <role>HIVE</role>
+ <url>http://{{hive_server_host}}:{{hive_http_port}}/{{hive_http_path}}</url>
+ </service>
+
+ <service>
+ <role>RESOURCEMANAGER</role>
+ <url>http://{{rm_host}}:{{rm_port}}/ws</url>
+ </service>
+ </topology>
+ </value>
+ <description>
+ content for topology file for Knox.
+ </description>
+ </property>
+</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/topology.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/topology.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/topology.xml
deleted file mode 100644
index db16a21..0000000
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/topology.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-<!--
-/**
- * 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 supports_final="false" supports_adding_forbidden="true">
- <!-- topology file -->
-
- <property>
- <name>content</name>
- <value>
- <topology>
-
- <gateway>
-
- <provider>
- <role>authentication</role>
- <name>ShiroProvider</name>
- <enabled>true</enabled>
- <param>
- <name>sessionTimeout</name>
- <value>30</value>
- </param>
- <param>
- <name>main.ldapRealm</name>
- <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>
- </param>
- <param>
- <name>main.ldapRealm.userDnTemplate</name>
- <value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>
- </param>
- <param>
- <name>main.ldapRealm.contextFactory.url</name>
- <value>ldap://{{knox_host_name}}:33389</value>
- </param>
- <param>
- <name>main.ldapRealm.contextFactory.authenticationMechanism</name>
- <value>simple</value>
- </param>
- <param>
- <name>urls./**</name>
- <value>authcBasic</value>
- </param>
- </provider>
-
- <provider>
- <role>identity-assertion</role>
- <name>Default</name>
- <enabled>true</enabled>
- </provider>
-
- </gateway>
-
- <service>
- <role>NAMENODE</role>
- <url>hdfs://{{namenode_host}}:{{namenode_rpc_port}}</url>
- </service>
-
- <service>
- <role>JOBTRACKER</role>
- <url>rpc://{{rm_host}}:{{jt_rpc_port}}</url>
- </service>
-
- <service>
- <role>WEBHDFS</role>
- <url>http://{{namenode_host}}:{{namenode_http_port}}/webhdfs</url>
- </service>
-
- <service>
- <role>WEBHCAT</role>
- <url>http://{{webhcat_server_host}}:{{templeton_port}}/templeton</url>
- </service>
-
- <service>
- <role>OOZIE</role>
- <url>http://{{oozie_server_host}}:{{oozie_server_port}}/oozie</url>
- </service>
-
- <service>
- <role>WEBHBASE</role>
- <url>http://{{hbase_master_host}}:{{hbase_master_port}}</url>
- </service>
-
- <service>
- <role>HIVE</role>
- <url>http://{{hive_server_host}}:{{hive_http_port}}/{{hive_http_path}}</url>
- </service>
-
- <service>
- <role>RESOURCEMANAGER</role>
- <url>http://{{rm_host}}:{{rm_port}}/ws</url>
- </service>
- </topology>
- </value>
- <description>
- The configuration specifies the Hadoop cluster services Knox will provide access to.
- </description>
- </property>
-</configuration>
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/metainfo.xml
index 89605a6..ffa3578 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/metainfo.xml
@@ -79,7 +79,7 @@
<configuration-dependencies>
<config-type>gateway-site</config-type>
<config-type>gateway-log4j</config-type>
- <config-type>topology</config-type>
+ <config-type>ambari-topology</config-type>
</configuration-dependencies>
</service>
</services>
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/ldap.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/ldap.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/ldap.py
index 2ff8297..5061b27 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/ldap.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/ldap.py
@@ -30,7 +30,7 @@ def ldap():
content=params.ldap_log4j
)
- File(format("{params.knox_conf_dir}/users.ldif"),
+ File(format("{params.knox_conf_dir}/users-ldif"),
mode=0644,
group=params.knox_group,
owner=params.knox_user,
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
index 5442329..8eb7fd5 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/package/scripts/params.py
@@ -116,7 +116,7 @@ knox_master_secret = config['configurations']['knox-env']['knox_master_secret']
knox_master_secret_path = '/var/lib/knox/data/security/master'
knox_host_name = config['clusterHostInfo']['knox_gateway_hosts'][0]
knox_host_port = config['configurations']['gateway-site']['gateway.port']
-topology_template = config['configurations']['topology']['content']
+topology_template = config['configurations']['ambari-topology']['content']
gateway_log4j = config['configurations']['gateway-log4j']['content']
ldap_log4j = config['configurations']['ldap-log4j']['content']
users_ldif = config['configurations']['users-ldif']['content']
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
index b0f21f2..55dfefd 100644
--- a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
+++ b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
@@ -51,7 +51,7 @@ class TestKnoxGateway(RMFTestCase):
self.assertResourceCalled('File', '/etc/knox/conf/topologies/default.xml',
group='knox',
owner = 'knox',
- content = InlineTemplate(self.getConfig()['configurations']['topology']['content'])
+ content = InlineTemplate(self.getConfig()['configurations']['ambari-topology']['content'])
)
self.assertResourceCalled('Execute', '/usr/lib/knox/bin/knoxcli.sh create-master --master sa',
user='knox',
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-server/src/test/python/stacks/2.2/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/configs/default.json b/ambari-server/src/test/python/stacks/2.2/configs/default.json
index 888b0ca..1c20f9d 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/default.json
@@ -78,7 +78,7 @@
"content": "\n # Licensed to the Apache Software Foundation (ASF) under one\n # or more contributor license agreements. See the NOTICE file\n # distributed with this work for additional information\n # regarding copyright ownership. The ASF licenses this file\n # to you under the Apache License, Version 2.0 (the\n # \"License\"); you may not use this file except in compliance\n # with the License. You may obtain a copy of the License at\n #\n # http://www.apache.org/licenses/LICENSE-2.0\n #\n # Unless required by applicable law or agreed to in writing, software\n # distributed under the License is distributed on an \"AS IS\" BASIS,\n # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n # See the License for the specific language governing permissions and\n # limitations under the Li
cense.\n\n version: 1\n\n # Please replace with site specific values\n dn: dc=hadoop,dc=apache,dc=org\n objectclass: organization\n objectclass: dcObject\n o: Hadoop\n dc: hadoop\n\n # Entry for a sample people container\n # Please replace with site specific values\n dn: ou=people,dc=hadoop,dc=apache,dc=org\n objectclass:top\n objectclass:organizationalUnit\n ou: people\n\n # Entry for a sample end user\n # Please replace with site specific values\n dn: uid=guest,ou=people,dc=hadoop,dc=apache,dc=org\n objectclass:top\n objectclass:person\n objectclass:organizationalPerson\n objectclass:inetOrgPerson\n cn: Guest\n sn: User\n uid: guest\n userPassword:guest-password\n\n # entry for sample user admin\n dn
: uid=admin,ou=people,dc=hadoop,dc=apache,dc=org\n objectclass:top\n objectclass:person\n objectclass:organizationalPerson\n objectclass:inetOrgPerson\n cn: Admin\n sn: Admin\n uid: admin\n userPassword:admin-password\n\n # entry for sample user sam\n dn: uid=sam,ou=people,dc=hadoop,dc=apache,dc=org\n objectclass:top\n objectclass:person\n objectclass:organizationalPerson\n objectclass:inetOrgPerson\n cn: sam\n sn: sam\n uid: sam\n userPassword:sam-password\n\n # entry for sample user tom\n dn: uid=tom,ou=people,dc=hadoop,dc=apache,dc=org\n objectclass:top\n objectclass:person\n objectclass:organizationalPerson\n objectclass:inetOrgPerson\n cn: tom\n sn: tom\n uid: tom\n userPassw
ord:tom-password\n\n # create FIRST Level groups branch\n dn: ou=groups,dc=hadoop,dc=apache,dc=org\n objectclass:top\n objectclass:organizationalUnit\n ou: groups\n description: generic groups branch\n\n # create the analyst group under groups\n dn: cn=analyst,ou=groups,dc=hadoop,dc=apache,dc=org\n objectclass:top\n objectclass: groupofnames\n cn: analyst\n description:analyst group\n member: uid=sam,ou=people,dc=hadoop,dc=apache,dc=org\n member: uid=tom,ou=people,dc=hadoop,dc=apache,dc=org\n\n\n # create the scientist group under groups\n dn: cn=scientist,ou=groups,dc=hadoop,dc=apache,dc=org\n objectclass:top\n objectclass: groupofnames\n cn: scientist\n description: scientist group\n member: uid=sam,ou=people,dc=hadoop,dc=apache,dc=org"
},
- "topology": {
+ "ambari-topology": {
"content": "\n <topology>\n\n <gateway>\n\n <provider>\n <role>authentication</role>\n <name>ShiroProvider</name>\n <enabled>true</enabled>\n <param>\n <name>sessionTimeout</name>\n <value>30</value>\n </param>\n <param>\n <name>main.ldapRealm</name>\n <value>org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm</value>\n </param>\n <param>\n <name>main.ldapRealm.userDnTemplate</name>\n <value>uid={0},ou=people,dc=hadoop,dc=apache,dc=org</value>\n </param>\n <param>\n <name>main.ldapRealm.contextFactory.url</name>\n <value>ldap://{{knox_host_name}}:33389</value>\n
</param>\n <param>\n <name>main.ldapRealm.contextFactory.authenticationMechanism</name>\n <value>simple</value>\n </param>\n <param>\n <name>urls./**</name>\n <value>authcBasic</value>\n </param>\n </provider>\n\n <provider>\n <role>identity-assertion</role>\n <name>Default</name>\n <enabled>true</enabled>\n </provider>\n\n </gateway>\n\n <service>\n <role>NAMENODE</role>\n <url>hdfs://{{namenode_host}}:{{namenode_rpc_port}}</url>\n </service>\n\n <service>\n <role>JOBTRACKER</role>\n <url>rpc://{{rm_host}}:{{jt_rpc_port}}</url>\n </service>\n\n <service>\n <role>WEBHDFS</ro
le>\n <url>http://{{namenode_host}}:{{namenode_http_port}}/webhdfs</url>\n </service>\n\n <service>\n <role>WEBHCAT</role>\n <url>http://{{webhcat_server_host}}:{{templeton_port}}/templeton</url>\n </service>\n\n <service>\n <role>OOZIE</role>\n <url>http://{{oozie_server_host}}:{{oozie_server_port}}/oozie</url>\n </service>\n\n <service>\n <role>WEBHBASE</role>\n <url>http://{{hbase_master_host}}:{{hbase_master_port}}</url>\n </service>\n\n <service>\n <role>HIVE</role>\n <url>http://{{hive_server_host}}:{{hive_http_port}}/{{hive_http_path}}</url>\n </service>\n\n <service>\n <role>RESOURCEMANAGER</role>\n <url>http://{{rm_host}}:{{rm_port}}/ws</url>\n </service>\n </topology>"
},
@@ -205,7 +205,7 @@
"gateway-site": {
"tag": "version1"
},
- "topology": {
+ "ambari-topology": {
"tag": "version1"
},
"users-ldif": {
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index b96324a..c298924 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1642,8 +1642,8 @@ module.exports =
"isRequired": false,
"showLabel": false,
"serviceName": "KNOX",
- "filename": "topology.xml",
- "category": "Advanced topology"
+ "filename": "ambari-topology.xml",
+ "category": "Advanced ambari-topology"
},
{
http://git-wip-us.apache.org/repos/asf/ambari/blob/6697e6b0/ambari-web/app/models/stack_service.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/stack_service.js b/ambari-web/app/models/stack_service.js
index 0f817db..4c86b20 100644
--- a/ambari-web/app/models/stack_service.js
+++ b/ambari-web/app/models/stack_service.js
@@ -352,7 +352,7 @@ App.StackService.configCategories = function () {
// Add custom section for every configType to all the services
configTypes.forEach(function (type) {
- var configTypesWithNoCustomSection = ['capacity-scheduler','mapred-queue-acls','flume-conf', 'pig-properties','topology','users-ldif'];
+ var configTypesWithNoCustomSection = ['capacity-scheduler','mapred-queue-acls','flume-conf', 'pig-properties','ambari-topology','users-ldif'];
if (type.endsWith('-env') || type.endsWith('-log4j') || configTypesWithNoCustomSection.contains(type)) {
return;
}