Repository: ambari Updated Branches: refs/heads/trunk ad9b02b15 -> 0fe10a04e
AMBARI-7933. Knox configuration changes for topology label and users.ldif file. (sumit gupta via jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0fe10a04 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0fe10a04 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0fe10a04 Branch: refs/heads/trunk Commit: 0fe10a04eef68d6152835ddb6134feae409e7c31 Parents: ad9b02b Author: Jaimin Jetly <[email protected]> Authored: Fri Oct 24 19:21:39 2014 -0700 Committer: Jaimin Jetly <[email protected]> Committed: Fri Oct 24 19:24:37 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 | 4 +- .../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, 126 insertions(+), 126 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe10a04/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 deleted file mode 100644 index 46a9e42..0000000 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/ambari-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> - content for topology file for Knox. - </description> - </property> -</configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe10a04/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 new file mode 100644 index 0000000..db16a21 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KNOX/configuration/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> + 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/0fe10a04/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 ffa3578..89605a6 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>ambari-topology</config-type> + <config-type>topology</config-type> </configuration-dependencies> </service> </services> http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe10a04/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 5061b27..2ff8297 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/0fe10a04/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 8eb7fd5..5442329 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']['ambari-topology']['content'] +topology_template = config['configurations']['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/0fe10a04/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 55dfefd..da6d5b1 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']['ambari-topology']['content']) + content = InlineTemplate(self.getConfig()['configurations']['topology']['content']) ) self.assertResourceCalled('Execute', '/usr/lib/knox/bin/knoxcli.sh create-master --master sa', user='knox', @@ -64,7 +64,7 @@ class TestKnoxGateway(RMFTestCase): owner = 'knox', content = self.getConfig()['configurations']['ldap-log4j']['content'] ) - self.assertResourceCalled('File', '/etc/knox/conf/users-ldif', + self.assertResourceCalled('File', '/etc/knox/conf/users.ldif', mode=0644, group='knox', owner = 'knox', http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe10a04/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 1c20f9d..888b0ca 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" }, - "ambari-topology": { + "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" }, - "ambari-topology": { + "topology": { "tag": "version1" }, "users-ldif": { http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe10a04/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 bf2ed7a..0a08218 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": "ambari-topology.xml", - "category": "Advanced ambari-topology" + "filename": "topology.xml", + "category": "Advanced topology" }, { http://git-wip-us.apache.org/repos/asf/ambari/blob/0fe10a04/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 6d7b61d..423d0f1 100644 --- a/ambari-web/app/models/stack_service.js +++ b/ambari-web/app/models/stack_service.js @@ -351,7 +351,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','ambari-topology','users-ldif']; + var configTypesWithNoCustomSection = ['capacity-scheduler','mapred-queue-acls','flume-conf', 'pig-properties','topology','users-ldif']; if (type.endsWith('-env') || type.endsWith('-log4j') || configTypesWithNoCustomSection.contains(type)) { return; }
