You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2019/01/29 01:39:45 UTC

[zeppelin] branch branch-0.8 updated: [ZEPPELIN-3646] Add note for updating user permissions

This is an automated email from the ASF dual-hosted git repository.

zjffdu pushed a commit to branch branch-0.8
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.8 by this push:
     new 56502dd  [ZEPPELIN-3646] Add note for updating user permissions
56502dd is described below

commit 56502dd6f4b02be43271a8a37beb199a4e27f30b
Author: Egor Klimov <kl...@gmail.com>
AuthorDate: Mon Aug 20 13:16:34 2018 +0300

    [ZEPPELIN-3646] Add note for updating user permissions
    
    ### What is this PR for?
    
    This is mebelousov workaround to maziyarpanahi [problem](https://issues.apache.org/jira/browse/ZEPPELIN-3646) refactored with REST API. It will be helpful for everyone who is upgrading from any version less than 0.8.x
    
    ### What type of PR is it?
    Improvement
    
    ### What is the Jira issue?
    issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN-3646
    
    ### How should this be tested?
    * Tested manually
    
    ### Screenshots (if appropriate)
    * Note in report view:
    
    ![screenshot_2018-08-06 migrate from 0 7 - zeppelin 1](https://user-images.githubusercontent.com/6136993/43728805-dce8de10-99ae-11e8-9436-5a5abc515e29.png)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? Yes, docs updated
    
    Author: Egor Klimov <kl...@gmail.com>
    Author: egorklimov <kl...@gmail.com>
    Author: Egor Klimov <kl...@yandex.ru>
    
    Closes #3107 from egorklimov/ZEPPELIN-3646 and squashes the following commits:
    
    e1a44fbee [egorklimov] pom updated
    472e86542 [Egor Klimov] Rat excludes updated
    a77414051 [Egor Klimov] typo fixed
    71dd4ed44 [Egor Klimov] Upgrading scenario updated
    ed0de8e7d [Egor Klimov] move note to docs
    c5e0737d4 [Egor Klimov] NoteId updated
    8ac1026d1 [Egor Klimov] Owner info updated
    57238e5dc [egorklimov] Docs updated
    76e239aff [Egor Klimov] Note updated
    84f36d0a3 [egorklimov] Docs updated
    5c65c4509 [Egor Klimov] Add `Migrate from 0.7`
---
 .../themes/zeppelin/note/FixReaders/note.json      | 210 +++++++++++++++++++++
 docs/setup/operation/upgrading.md                  |  13 +-
 pom.xml                                            |   3 +
 3 files changed, 225 insertions(+), 1 deletion(-)

diff --git a/docs/assets/themes/zeppelin/note/FixReaders/note.json b/docs/assets/themes/zeppelin/note/FixReaders/note.json
new file mode 100644
index 0000000..49630b4
--- /dev/null
+++ b/docs/assets/themes/zeppelin/note/FixReaders/note.json
@@ -0,0 +1,210 @@
+{
+  "paragraphs": [
+    {
+      "text": "%md\n### Description\nNew type of permission appeared in version 0.8 - [Runners](http://zeppelin.apache.org/docs/0.8.0/setup/security/notebook_authorization.html#authorization-setting)\nRunners are between Writers and Readers.\nAs Runners list is empty in note so everybody can view note although Readers list is not empty.\n\nThe code below will fill Runners as Writes for each note.\n\n**You must be owner of all notes or have role `zeppelin.notebook.default.owner.username`  [...]
+      "user": "admin",
+      "dateUpdated": "2018-08-06 19:19:29.675",
+      "config": {
+        "colWidth": 12.0,
+        "fontSize": 9.0,
+        "enabled": true,
+        "results": {},
+        "editorSetting": {
+          "language": "markdown",
+          "editOnDblClick": true,
+          "completionKey": "TAB",
+          "completionSupport": false
+        },
+        "editorMode": "ace/mode/markdown",
+        "editorHide": true,
+        "tableHide": false
+      },
+      "settings": {
+        "params": {},
+        "forms": {}
+      },
+      "results": {
+        "code": "SUCCESS",
+        "msg": [
+          {
+            "type": "HTML",
+            "data": "\u003cdiv class\u003d\"markdown-body\"\u003e\n\u003ch3\u003eDescription\u003c/h3\u003e\n\u003cp\u003eNew type of permission appeared in version 0.8 - \u003ca href\u003d\"http://zeppelin.apache.org/docs/0.8.0/setup/security/notebook_authorization.html#authorization-setting\"\u003eRunners\u003c/a\u003e\u003cbr/\u003eRunners are between Writers and Readers.\u003cbr/\u003eAs Runners list is empty in note so everybody can view note although Readers list is not empty.\u003 [...]
+          }
+        ]
+      },
+      "apps": [],
+      "jobName": "paragraph_1533132991280_-82433086",
+      "id": "20180801-171631_359485954",
+      "dateCreated": "2018-08-01 17:16:31.280",
+      "dateStarted": "2018-08-06 19:19:29.678",
+      "dateFinished": "2018-08-06 19:19:32.163",
+      "status": "FINISHED",
+      "progressUpdateIntervalMs": 500
+    },
+    {
+      "title": "Zeppelin Config",
+      "text": "%spark.pyspark\n\nzeppelin_host \u003d z.input(\"Zeppelin host\", \"localhost\")\nzeppelin_port \u003d z.input(\"Zeppelin port\", \"8080\")\nzeppelin_user \u003d z.input(\"User\", \"admin\")\nzeppelin_password \u003d z.input(\"Password\", \"\")",
+      "user": "admin",
+      "dateUpdated": "2018-08-01 19:31:26.954",
+      "config": {
+        "colWidth": 12.0,
+        "fontSize": 9.0,
+        "enabled": true,
+        "results": {},
+        "editorSetting": {
+          "language": "python",
+          "editOnDblClick": false,
+          "completionKey": "TAB",
+          "completionSupport": true
+        },
+        "editorMode": "ace/mode/python",
+        "editorHide": true,
+        "tableHide": false,
+        "runOnSelectionChange": true,
+        "title": true
+      },
+      "settings": {
+        "params": {
+          "Zeppelin host": "localhost",
+          "Zeppelin port": "8080",
+          "User": "admin",
+          "Password": "password1",
+          "Zeppelin host\n": "localhost",
+          "Zeppelin host\n\n": "localhost",
+          "Zeppelin port\n": "8080",
+          "\nZeppelin host\n\n": "localhost",
+          "\nZeppelin port\n": "8080",
+          "\tZeppelin host\n\n": "localhost",
+          "formName": "option1"
+        },
+        "forms": {
+          "Zeppelin host": {
+            "type": "TextBox",
+            "name": "Zeppelin host",
+            "displayName": "Zeppelin host",
+            "defaultValue": "localhost",
+            "hidden": false
+          },
+          "Zeppelin port": {
+            "type": "TextBox",
+            "name": "Zeppelin port",
+            "displayName": "Zeppelin port",
+            "defaultValue": "8080",
+            "hidden": false
+          },
+          "User": {
+            "type": "TextBox",
+            "name": "User",
+            "displayName": "User",
+            "defaultValue": "admin",
+            "hidden": false
+          },
+          "Password": {
+            "type": "TextBox",
+            "name": "Password",
+            "displayName": "Password",
+            "defaultValue": "",
+            "hidden": false
+          }
+        }
+      },
+      "results": {
+        "code": "SUCCESS",
+        "msg": []
+      },
+      "apps": [],
+      "jobName": "paragraph_1533118971566_949439379",
+      "id": "20180801-132251_306203866",
+      "dateCreated": "2018-08-01 13:22:51.566",
+      "dateStarted": "2018-08-01 19:31:27.023",
+      "dateFinished": "2018-08-01 19:32:11.266",
+      "status": "FINISHED",
+      "progressUpdateIntervalMs": 500
+    },
+    {
+      "title": "Update permissions",
+      "text": "%spark.pyspark\n\nimport requests\nimport json\n\n\nclass Izpepelin:\n    def __init__(self):\n        self.session \u003d requests.Session()\n        self.session.auth \u003d (zeppelin_user, zeppelin_password)\n        self.base_url \u003d \u0027http://\u0027 + zeppelin_host + \u0027:\u0027 + str(zeppelin_port)\n\n    def get_notes(self):\n        url \u003d self.base_url + \u0027/api/notebook\u0027\n        response \u003d self.session.get(url).json()\n        if \u0027e [...]
+      "user": "admin",
+      "dateUpdated": "2018-08-01 19:32:11.281",
+      "config": {
+        "colWidth": 12.0,
+        "fontSize": 9.0,
+        "enabled": true,
+        "results": {},
+        "editorSetting": {
+          "language": "python",
+          "editOnDblClick": false,
+          "completionKey": "TAB",
+          "completionSupport": true
+        },
+        "editorMode": "ace/mode/python",
+        "title": true,
+        "lineNumbers": true
+      },
+      "settings": {
+        "params": {},
+        "forms": {}
+      },
+      "results": {
+        "code": "SUCCESS",
+        "msg": [
+          {
+            "type": "TEXT",
+            "data": "Processing note: name - 2DKAF1WNV, id - 2DKAF1WNV\nBefore:\n{\u0027readers\u0027: [\u0027user1\u0027], \u0027owners\u0027: [\u0027user1\u0027], \u0027writers\u0027: [\u0027user1\u0027], \u0027runners\u0027: []}\nAfter:\n{\u0027readers\u0027: [\u0027user1\u0027], \u0027owners\u0027: [\u0027user1\u0027], \u0027writers\u0027: [\u0027user1\u0027], \u0027runners\u0027: [\u0027user1\u0027]}\n------------\nProcessing note: name - 2DKUA35W5, id - 2DKUA35W5\nBefore:\n{\u0027r [...]
+          }
+        ]
+      },
+      "apps": [],
+      "jobName": "paragraph_1533118760432_702537472",
+      "id": "20180801-131920_952360200",
+      "dateCreated": "2018-08-01 13:19:20.432",
+      "dateStarted": "2018-08-01 19:32:11.316",
+      "dateFinished": "2018-08-01 19:32:11.875",
+      "status": "FINISHED",
+      "progressUpdateIntervalMs": 500
+    },
+    {
+      "text": "%spark.pyspark\n",
+      "user": "admin",
+      "dateUpdated": "2018-08-01 19:32:11.916",
+      "config": {
+        "colWidth": 12.0,
+        "fontSize": 9.0,
+        "enabled": true,
+        "results": {},
+        "editorSetting": {
+          "language": "python",
+          "editOnDblClick": false,
+          "completionKey": "TAB",
+          "completionSupport": true
+        },
+        "editorMode": "ace/mode/python"
+      },
+      "settings": {
+        "params": {},
+        "forms": {}
+      },
+      "apps": [],
+      "jobName": "paragraph_1533132839581_1307691002",
+      "id": "20180801-171359_89710812",
+      "dateCreated": "2018-08-01 17:13:59.581",
+      "status": "FINISHED",
+      "progressUpdateIntervalMs": 500
+    }
+  ],
+  "name": "System/Migrate from 0.7",
+  "id": "FixReaders",
+  "noteParams": {},
+  "noteForms": {},
+  "angularObjects": {
+    "md:shared_process": [],
+    "python:shared_process": [],
+    "spark:shared_process": []
+  },
+  "config": {
+    "isZeppelinNotebookCronEnable": true,
+    "looknfeel": "default",
+    "personalizedMode": "false"
+  },
+  "info": {}
+}
diff --git a/docs/setup/operation/upgrading.md b/docs/setup/operation/upgrading.md
index 20be7ac..8ea3697 100644
--- a/docs/setup/operation/upgrading.md
+++ b/docs/setup/operation/upgrading.md
@@ -35,11 +35,22 @@ So, copying `notebook` and `conf` directory should be enough.
 
 ## Migration Guide
 
+### Breaking changes in 0.8.x
+
+From 0.8, Zeppelin has a new type of permission - [Runners](http://zeppelin.apache.org/docs/0.8.0/setup/security/notebook_authorization.html#authorization-setting)
+
+As Runners list is empty in note so everybody can view note although Readers list is not empty. 
+To set all your "writers" to "runners":
+1. Copy `notebook` and `conf` directories to 0.8.0,
+2. Move directory **docs/assets/themes/zeppelin/note/FixReaders** to new `notebook` directory,
+3. Start the new Zeppelin and run note **System/Migrate from 0.7**.
+
+
 ### Upgrading from Zeppelin 0.7 to 0.8
 
  - From 0.8, we recommend to use `PYSPARK_PYTHON` and `PYSPARK_DRIVER_PYTHON` instead of `zeppelin.pyspark.python` as `zeppelin.pyspark.python` only effects driver. You can use `PYSPARK_PYTHON` and `PYSPARK_DRIVER_PYTHON` as using them in spark.
  - From 0.8, depending on your device, the keyboard shortcut `Ctrl-L` or `Command-L` which goes to the line somewhere user wants is not supported. 
-
+ 
 ### Upgrading from Zeppelin 0.6 to 0.7
 
  - From 0.7, we don't use `ZEPPELIN_JAVA_OPTS` as default value of `ZEPPELIN_INTP_JAVA_OPTS` and also the same for `ZEPPELIN_MEM`/`ZEPPELIN_INTP_MEM`. If user want to configure the jvm opts of interpreter process, please set `ZEPPELIN_INTP_JAVA_OPTS` and `ZEPPELIN_INTP_MEM` explicitly. If you don't set `ZEPPELIN_INTP_MEM`, Zeppelin will set it to `-Xms1024m -Xmx1024m -XX:MaxPermSize=512m` by default.
diff --git a/pom.xml b/pom.xml
index f708fa0..68d5bbd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1085,6 +1085,9 @@
               <exclude>**/R/rzeppelin/NAMESPACE</exclude>
 
               <exclude>python/src/main/resources/grpc/**/*</exclude>
+
+              <!--Manual migration script in a notebook-->
+              <exclude>docs/assets/themes/zeppelin/note/**/note.json</exclude>
             </excludes>
           </configuration>