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

作者:櫰木

ranger usersync部署

解压包

powershell 复制代码
[[email protected] ranger]# pwd
/opt/ranger
[[email protected] ranger]# tar -zxvf  ranger-2.3.0-usersync.tar.gz -C /opt/
[[email protected] 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/[email protected]
usersync_keytab=/etc/security/keytab/rangerusersync.keytab
hadoop_conf=/opt/hadoop/etc/hadoop

初始化

powershell 复制代码
[[email protected] ranger-2.3.0-usersync]# ./setup.sh

启动

powershell 复制代码
[[email protected] ranger-2.3.0-usersync]# ranger-usersync start

验证

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

FQA

问题一

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

powershell 复制代码
usersync_principal=rangerusersync/[email protected]
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

相关推荐
caihuayuan5几秒前
IOS 国际化词条 Python3 脚本
java·大数据·spring boot·后端·课程设计
哲讯智能科技29 分钟前
无锡哲讯科技:SAP财务系统——赋能企业智慧财务管理
大数据·人工智能
boring_1111 小时前
全局id生成器生产方案
大数据·分布式·后端
yangmf20402 小时前
私有知识库 Coco AI 实战(四):打造 ES 索引参数小助手
大数据·人工智能·elasticsearch·coco ai
今天我又学废了5 小时前
Spark,集群搭建-Standalone
大数据·分布式·spark
Json_181790144806 小时前
Alibaba国际站商品详情AP接口概述,json数据示例返回参考
大数据·数据库
timi先生8 小时前
在大数据环境下,使用spingboot为Android APP推送数据方案
android·大数据
viperrrrrrrrrr78 小时前
大数据学习(115)-hive与impala
大数据·hive·学习·impala
麻芝汤圆8 小时前
在 IDEA 中写 Spark 程序:从入门到实践
java·大数据·hadoop·分布式·安全·spark·intellij-idea
maomi_95269 小时前
MySQL 在 CentOS 7 环境下的安装教程
大数据·数据库·mysql