Skip to content

Commit 65f8375

Browse files
author
Sreekanth Iyer (Ushta Te Consultancy Services)
committed
New page Ranger 5.1 Migration
1 parent 3757327 commit 65f8375

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: Upgrade to Apache Ranger in Azure HDInsight
3+
description: Learn how to upgrade to Apache Ranger in Azure HDInsight
4+
ms.service: azure-hdinsight
5+
ms.topic: how-to
6+
ms.date: 08/27/2024
7+
---
8+
9+
# Upgrade to Apache Ranger in Azure HDInsight
10+
11+
HDInsight 5.1 has Apache Ranger version 2.3.0, which is major version upgrade from 1.2.0 HDI 4.1. [Ranger 2.3.0](https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+2.3.0+-+Release+Notes) has multiple improvements, features, and DB schema changes.
12+
13+
## Behavioral changes
14+
15+
Hive Ranger permissions - In 5.1 stack for hive, default hive ranger policies have been added which allow all users to 
16+
17+
1. Create a database.
18+
1. All privileges on default database tables and columns.  
19+
20+
This is different from 4.0 stack where these default policies aren't present.  
21+
This change has been introduced in OSS (open-source software) ranger: Create Default Policies for Hive Databases -default, Information_schema (https://issues.apache.org/jira/browse/RANGER-2539).
22+
23+
Ranger User Interface in HDInsight 4.0 and earlier versions:
24+
![Ranger_40_1](https://github.com/user-attachments/assets/7d51493c-9d86-41ed-830a-05c96c63ae4e)
25+
26+
Ranger User Interface in HDInsight 5.1:
27+
![Ranger_51_1](https://github.com/user-attachments/assets/9ab95212-a41d-46de-a7a7-b863f4eb9218)
28+
29+
> [!NOTE]
30+
> The default policy **all databases** have public group access enabled by default from HDInsight 5.1.
31+
32+
### What does this mean for customers onboarding to 5.1
33+
34+
They'll start seeing that new users added to the cluster via LDAP sync via AADS or internal users to the cluster have privileges to create a new database and read write privileges on default database tables and columns.  
35+
36+
This behavior Is different from 4.0 clusters. Hence if they need to disallow this behavior and have the default permissions same as 4.0, it's required to:
37+
38+
1. Disable the **all-databases** policy on ranger UI or edit **all-database** policy to remove **public** group from policy. 
39+
1. Remove **public** group from **default database tables columns** policy on ranger UI.  
40+
41+
42+
Ranger UI is available by clicking on navigating to ranger component and clicking on ranger UI on right side.
43+
44+
### User Interface differences
45+
46+
Ranger admin URL has new UI and looks & feel. There's option to switch to the classic Ranger 1.2.0 UI as well:
47+
48+
<img width="449" alt="Ranger_51_3" src="https://github.com/user-attachments/assets/f3747e6b-abab-4a24-bceb-ab38cf9028da">
49+
50+
Root Service of Hive renamed to Hadoop SQL:
51+
52+
<img width="452" alt="Ranger_51_4" src="https://github.com/user-attachments/assets/7ec4444f-ef57-4a4d-aed9-77c9eac2d2db">
53+
54+
Hive/Hadoop SQL also has new capabilities of adding roles under Ranger:
55+
56+
<img width="452" alt="Ranger_51_10" src="https://github.com/user-attachments/assets/ba6ddc18-39d7-4359-bb75-d618899bf40c">
57+
58+
59+
## Migration method recommendations
60+
61+
As migration path to HDInsight 5.1, the Ranger policies migration between the clusters is recommended only through Ranger import/export options.
62+
63+
> [!NOTE]
64+
> Reuse of HDInsight 4.1 Ranger database in HDInsight 5.1 Ranger service configurations isn't recommended. Ranger service would fail to restart with following exception due to differences in db schema:
65+
66+
```
67+
2023-11-01 12:47:20,295 [JISQL] /usr/lib/jvm/lib/mssql-jdbc-7.4.1.jre8.jar:/usr/hdp/current/ranger-admin/jisql/lib/\* org.apache.util.sql.Jisql -user ranger -p '\*\*\*\*\*\*\*\*' -driver mssql -cstring jdbc:sqlserver://xxx\;databaseName=ranger -noheader -trim -c \; -query "delete from x\_db\_version\_h where version = '040' and active = 'N' and updated\_by=xxx.com';"
68+
2023-11-01 12:47:21,095 [E] 040-modify-unique-constraint-on-policy-table.sql import failed!
69+
```
70+
71+
## Migration Steps
72+
73+
Steps to import/export.
74+
75+
1. Go to the older adults 4.0 clusters ranger page and select on export.
76+
77+
<img width="452" alt="Ranger_51_5" src="https://github.com/user-attachments/assets/ed26fb84-721d-44e8-bed5-406bd2aa1496">
78+
79+
1. Save the file.
80+
81+
<img width="452" alt="Ranger_51_6" src="https://github.com/user-attachments/assets/c6e8b60f-92a3-4adf-8418-be15797aa6d7">
82+
83+
1. On new 5.1 cluster, open ranger and import the same file created in step 2.
84+
85+
<img width="452" alt="Ranger_51_7" src="https://github.com/user-attachments/assets/d9a0b17c-f7a2-4189-8f9e-9ac5600efda4">
86+
87+
<img width="452" alt="Ranger_51_8" src="https://github.com/user-attachments/assets/dae0e9ad-ae81-4881-8d4f-0c4fb3726ca4">
88+
89+
1. Map the services appropriately and set the override flag.
90+
91+
<img width="452" alt="Ranger_51_9" src="https://github.com/user-attachments/assets/b22d34bc-5f8c-458d-9f44-459fb448eb59">
258 KB
Loading
208 KB
Loading

0 commit comments

Comments
 (0)