开源大数据集群部署(十)Ranger usersync部署

作者:櫰木

ranger usersync部署

解压包

powershell 复制代码
[root@hd1.dtstack.com ranger]# pwd
/opt/ranger
[root@hd1.dtstack.com ranger]# tar -zxvf  ranger-2.3.0-usersync.tar.gz -C /opt/
[root@hd1.dtstack.com ranger]# cd ranger-2.3.0-usersync

修改配置install.properties,需要修改内容如下:

powershell 复制代码
POLICY_MGR_URL = http://hd1.dtstack.com:6080
SYNC_INTERVAL = 5
rangerUsersync_password=Ranger@123
usersync_principal=rangerusersync/hd1.dtstack.com@DTSTACK.COM
usersync_keytab=/etc/security/keytab/rangerusersync.keytab
hadoop_conf=/opt/hadoop/etc/hadoop

初始化

powershell 复制代码
[root@hd2.dtstack.com ranger-2.3.0-usersync]# ./setup.sh

启动

powershell 复制代码
[root@hd2.dtstack.com ranger-2.3.0-usersync]# ranger-usersync start

验证

页面验证是否安装成功:在Ranger控制台可以看到users中同步的用户信息。

FQA

问题一

在install.properties中的keytab必须配置以下principal的

powershell 复制代码
usersync_principal=rangerusersync/hd1.dtstack.com@DTSTACK.COM
usersync_keytab=/etc/security/keytab/rangerusersync.keytab

由于这个有两种认证方式。帐号密码和keytab的方式。用户必须为rangerusersync这个特定帐号,其他帐号会出现无法获取json的情况。

问题2

需要注意

rangeradmin的install.properties中的keytab和principal必须一致。不然会出现此错误

集成ldap 使其同步ldap用户到ranger

1、修改配置

powershell 复制代码
cd /opt/ranger-2.3.0-usersync/
SYNC_SOURCE = ldap
SYNC_LDAP_URL = ldap://hd.dtstack.com:389
SYNC_LDAP_BIND_DN = uid=admin,cn=users,cn=accounts,dc=dtstack,dc=com
SYNC_LDAP_BIND_PASSWORD = Admin@123
SYNC_LDAP_DELTASYNC =
SYNC_LDAP_SEARCH_BASE = cn=accounts,dc=dtstack,dc=com
SYNC_LDAP_USER_S EARCH_BASE = cn=users,cn=accounts,dc=dtstack,dc=com
SYNC_LDAP_USER_SEARCH_SCOPE = sub
SYNC_LDAP_USER_OBJECT_CLASS = person
SYNC_LDAP_USER_SEARCH_FILTER =
SYNC_LDAP_USER_NAME_ATTRIBUTE = uid
SYNC_LDAP_USER_GROUP_NAME_ATTRIBUTE = memberof,ismemberof
SYNC_LDAP_USERNAME_CASE_CONVERSION=lower
SYNC_LDAP_GROUPNAME_CASE_CONVERSION=lower
 
SYNC_GROUP_SEARCH_ENABLED= true
powershell 复制代码
SYNC_GROUP_USER_MAP_SYNC_ENABLED= true
SYNC_GROUP_SEARCH_BASE= cn=groups,cn=accounts,dc=dtstack,dc=com

SYNC_LDAP_URL #ldpa地址

SYNC_LDAP_BIND_DN #查询用户

SYNC_LDAP_BIND_PASSWORD #密码

SYNC_LDAP_SEARCH_BASE #搜索域

SYNC_LDAP_USER_SEARCH_BASE #搜索用户的域

SYNC_LDAP_USER_NAME_ATTRIBUTE #用户名属性

SYNC_GROUP_SEARCH_BASE #搜索组的域

通过ldapsearch进行查询

powershell 复制代码
ldapsearch -x -H ldap://hd.dtstack.com:389 -b cn=users,cn=accounts,dc=dtstack,dc=com -D "uid=admin,cn=users,cn=accounts,dc=dtstack,dc=com" -w Admin@123

配置完成后,执行setup.sh生成新的配置

确认ranger.usersync.enabled 为true

cat conf/ranger-ugsync-site.xml

powershell 复制代码
<property>
  <name>ranger.usersync.enabled</name>
  <value>true</value>
</property>

2、重启ranger-usersync

执行ranger-usersync restart

查看ranger页面确认用户是否同步上来

更多技术信息请查看云掣官网https://yunche.pro/?t=yrgw

相关推荐
藦卡机器人6 小时前
中国工业机器人发展现状
大数据·人工智能·机器人
Simon_lca6 小时前
突破合规瓶颈:ZDHC Supplier to Zero(工厂零排放 - 进阶型)体系全攻略
大数据·网络·人工智能·分类·数据挖掘·数据分析·零售
黄焖鸡能干四碗8 小时前
网络安全建设实施方案(Word文件参考下载)
大数据·网络·人工智能·安全·web安全·制造
云境筑桃源哇9 小时前
马踏春风 为爱启航 | 瑞派宠物医院(南部新城旗舰店)盛大开业!打造宠物医疗新标杆!
大数据·宠物
xixixi7777710 小时前
2026 年 03 月 20 日 AI+通信+安全行业日报(来更新啦)
大数据·人工智能·安全·ai·大模型·通信
F36_9_10 小时前
大数据治理平台选型避坑:2026 年 8 大主流系统实测
大数据·数据治理
成长之路51410 小时前
【实证分析】A股上市公司企业劳动力需求数据集(2000-2023年)
大数据
奔跑的呱呱牛10 小时前
GeoJSON 在大数据场景下为什么不够用?替代方案分析
java·大数据·servlet·gis·geojson
Lab_AI10 小时前
电池材料行业数据管理新突破:AI4S驱动的科学数据平台正在重塑电池材料开发范式
大数据·人工智能·ai4s·电池材料开发·电池材料研发·电池材料创新·ai材料研发
FindAI发现力量11 小时前
智能工牌:线下销售场景的数字化赋能解决方案
大数据·人工智能·销售管理·ai销售·ai销冠·销售智能体