Repository: ambari Updated Branches: refs/heads/trunk e72d9b0b6 -> 2c5de15b3
AMBARI-15758: Add shiro.ini in Ambari Zeppelin service config (Renjith Kamath via jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2c5de15b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2c5de15b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2c5de15b Branch: refs/heads/trunk Commit: 2c5de15b3dd18453f67a11194d9ef7d3dab46e45 Parents: e72d9b0 Author: Jayush Luniya <[email protected]> Authored: Tue May 3 17:53:56 2016 -0700 Committer: Jayush Luniya <[email protected]> Committed: Tue May 3 17:53:56 2016 -0700 ---------------------------------------------------------------------- .../0.6.0.2.5/configuration/zeppelin-config.xml | 11 +++++++ .../0.6.0.2.5/configuration/zeppelin-env.xml | 32 +++++++++++++++++++- .../0.6.0.2.5/package/scripts/master.py | 7 ++++- .../0.6.0.2.5/package/scripts/params.py | 5 ++- .../ZEPPELIN/configuration/zeppelin-env.xml | 2 +- 5 files changed, 53 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5de15b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml index 7ed70e5..7b74f7e 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml @@ -175,5 +175,16 @@ </description> </property> + <property> + <name>zeppelin.anonymous.allowed</name> + <value>true</value> + <description>Anonymous user allowed by default</description> + </property> + + <property> + <name>zeppelin.websocket.max.text.message.size</name> + <value>1024000</value> + <description>Size in characters of the maximum text message to be received by websocket. Defaults to 1024000</description> + </property> </configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5de15b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml index 3126cda..268f5d6 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml @@ -47,7 +47,7 @@ </property> <property> - <name>content</name> + <name>zeppelin_env_content</name> <description>This is the jinja template for zeppelin-env.sh file</description> <value> # Spark master url. eg. spark://master_addr:7077. Leave empty if you want to use local mode @@ -141,6 +141,36 @@ export SPARK_YARN_USER_ENV="PYTHONPATH=${PYTHONPATH}" </property> <property> + <name>shiro_ini_content</name> + <description>This is the jinja template for shiro.ini file</description> + <value> +[users] +# List of users with their password allowed to access Zeppelin. +# To use a different strategy (LDAP / Database / ...) check the shiro doc at http://shiro.apache.org/configuration.html#Configuration-INISections +#admin = password1 +#user1 = password2, role1, role2 +#user2 = password3, role3 +#user3 = password4, role2 + +# Sample LDAP configuration, for user Authentication, currently tested for single Realm +[main] +#ldapRealm = org.apache.shiro.realm.ldap.JndiLdapRealm +#ldapRealm.userDnTemplate = uid={0},cn=users,cn=accounts,dc=hortonworks,dc=com +#ldapRealm.contextFactory.url = ldap://ldaphost:389 +#ldapRealm.contextFactory.authenticationMechanism = SIMPLE +shiro.loginUrl = /api/login + +[urls] +# anon means the access is anonymous. +# authcBasic means Basic Auth Security +# To enfore security, comment the line below and uncomment the next one +/api/version = anon +/** = anon +#/** = authc + </value> + </property> + + <property> <name>zeppelin.executor.mem</name> <value>512m</value> <description>Executor memory to use (e.g. 512m or 1g)</description> http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5de15b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py index 9b35c70..d079096 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py @@ -140,7 +140,12 @@ class Master(Script): # write out zeppelin-env.sh env_content = InlineTemplate(params.zeppelin_env_content) File(format("{params.conf_dir}/zeppelin-env.sh"), content=env_content, - owner=params.zeppelin_user, group=params.zeppelin_group) # , mode=0777) + owner=params.zeppelin_user, group=params.zeppelin_group) + + # write out shiro.ini + shiro_ini_content = InlineTemplate(params.shiro_ini_content) + File(format("{params.conf_dir}/shiro.ini"), content=shiro_ini_content, + owner=params.zeppelin_user, group=params.zeppelin_group) def stop(self, env): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5de15b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py index 5411eb1..da260c2 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py @@ -81,7 +81,10 @@ conf_dir = os.path.join(*[install_dir, zeppelin_dirname, 'conf']) notebook_dir = os.path.join(*[install_dir, zeppelin_dirname, 'notebook']) # zeppelin-env.sh -zeppelin_env_content = config['configurations']['zeppelin-env']['content'] +zeppelin_env_content = config['configurations']['zeppelin-env']['zeppelin_env_content'] + +# shiro.ini +shiro_ini_content = config['configurations']['zeppelin-env']['shiro_ini_content'] # detect configs master_configs = config['clusterHostInfo'] http://git-wip-us.apache.org/repos/asf/ambari/blob/2c5de15b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/configuration/zeppelin-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/configuration/zeppelin-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/configuration/zeppelin-env.xml index 2cbc38d..cf2b9bc 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/configuration/zeppelin-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/configuration/zeppelin-env.xml @@ -21,7 +21,7 @@ <configuration> <property> - <name>content</name> + <name>zeppelin_env_content</name> <description>This is the jinja template for zeppelin-env.sh file</description> <value> # Spark master url. eg. spark://master_addr:7077. Leave empty if you want to use local mode
