安装
下载了最新源码包
wget https://github.com/apache/superset/archive/refs/tags/4.0.2.tar.gz
解压进入目录,这里有两个docker-compose文件
docker-compose-non-dev.yml 少很多功能,不会拷贝superset目录到容器中,不会对config.py复写
docker-compose.yml 文件中会将包内文件挂载到容器中,包括config.py
x-superset-volumes: &superset-volumes
# /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
- ./docker:/app/docker
- ./superset:/app/superset
- ./superset-frontend:/app/superset-frontend
- superset_home:/app/superset_home
- ./tests:/app/tests
启动的容器
superset-websocket:这个容器通常用于处理 Superset 的实时功能,如实时数据更新和 websocket 通信。
superset-init:用于初始化 Superset 的设置,这可能包括数据库迁移、管理员账户的创建等初始化任务。
superset-node:可能用于处理前端资源的构建和编译,例如处理 JavaScript 或 CSS 文件。
superset-worker:处理后台任务,如发送邮件、执行长时间运行的报告生成等。
superset-worker-beat:定时任务的调度器。它负责定时触发如数据刷新、周期性报告等任务。
superset-tests-worker:可能用于执行自动化测试,确保在开发过程中或部署前后台服务的质量和稳定性。
worker容器应该是对ldap做验证的
root@ip-10-192-0-240:/data/superset/superset-4.0.2# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
025e1dcb9410 apachesuperset.docker.scarf.sh/apache/superset:latest-dev "/app/docker/docker-…" 25 minutes ago Up 25 minutes (healthy) 8088/tcp superset_worker
75153450188a apachesuperset.docker.scarf.sh/apache/superset:latest-dev "/app/docker/docker-…" 25 minutes ago Up 25 minutes (healthy) 0.0.0.0:8088->8088/tcp, :::8088->8088/tcp superset_app
2ce967d4554c apachesuperset.docker.scarf.sh/apache/superset:latest-dev "/app/docker/docker-…" 25 minutes ago Up 25 minutes 8088/tcp superset_worker_beat
2b2b9733ecfa node:16 "docker-entrypoint.s…" 25 minutes ago Up 25 minutes superset_node
c330abceb4e7 redis:7 "docker-entrypoint.s…" 25 minutes ago Up 25 minutes 127.0.0.1:6379->6379/tcp superset_cache
5eb0d7e9366c nginx:latest "/docker-entrypoint.…" 25 minutes ago Up 25 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp superset_nginx
0596a883f6da postgres:15 "docker-entrypoint.s…" 25 minutes ago Up 25 minutes 127.0.0.1:5432->5432/tcp superset_db
容器中的config.py
已经挂载到了容器中,但是配置不好使
root@025e1dcb9410:/app# cat superset/config.py -n| grep LDAP -C2
309 # AUTH_OID : Is for OpenID
310 # AUTH_DB : Is for database (username/password)
311 # AUTH_LDAP : Is for LDAP
312 # AUTH_REMOTE_USER : Is for using REMOTE_USER from web server
313 #AUTH_TYPE = AUTH_DB
--
325 # AUTH_USER_REGISTRATION_ROLE = "Public"
326
327 # When using LDAP Auth, setup the LDAP server
328 # AUTH_LDAP_SERVER = "ldap://ldapserver.new"
329 from flask_appbuilder.security.manager import AUTH_DB,AUTH_LDAP
330 AUTH_TYPE = AUTH_LDAP
331 AUTH_USER_REGISTRATION = True
332 AUTH_USER_REGISTRATION_ROLE = "Public"
333 AUTH_LDAP_SERVER = "ldap://10.198.224.89:389"
334 AUTH_LDAP_USE_TLS = False
335 AUTH_LDAP_BIND_USER = 'cn=admin,dc=peekaboo,dc=group'
336 AUTH_LDAP_BIND_PASSWORD = "BAH5vnd_dtv8avz5bxp"
337 AUTH_LDAP_SEARCH = "dc=peekaboo,dc=group"
338 AUTH_LDAP_UID_FIELD = "sAMAccountName"
339 AUTH_LDAP_ALLOW_SELF_SIGNED=True
340 AUTH_LDAP_APPEND_DOMAIN=False
341 AUTH_LDAP_FIRSTNAME_FIELD="givenName"
342 AUTH_LDAP_LASTNAME_FIELD="sn"
343 AUTH_LDAP_USE_TLS=False
344 AUTH_USER_REGISTRATION=True
标签:25,配置,AUTH,LDAP,docker,superset,minutes
From: https://www.cnblogs.com/Jarvansi/p/18357560