美文网首页
docker安装superset

docker安装superset

作者: xiaosl | 来源:发表于2018-04-17 23:50 被阅读0次

简介

曾用名Caravel, Panoramix, 是由Airbnb(知名在线房屋短租公司)开源的数据分析与可视化平台, 该工具主要特点是可自助分析, 自定义仪表盘, 分析结果可视化(导出), 用户/角色权限控制, 还集成了一个SQL编辑器, 可以进行SQL编辑查询等。

安装

  1. 新建配置文件目录(例子:/etc/superset)
mkdir /etc/superset
  1. 编辑配置文件superset_config.py
vim /etc/superset/superset_config.py

## 内容
#---------------------------------------------------------
# Superset specific config
#---------------------------------------------------------
ROW_LIMIT = 5000
SUPERSET_WORKERS = 4

SUPERSET_WEBSERVER_PORT = 8088
#---------------------------------------------------------

#---------------------------------------------------------
# Flask App Builder configuration
#---------------------------------------------------------
# Your App secret key
SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h'

# The SQLAlchemy connection string to your database backend
# This connection defines the path to the database that stores your
# superset metadata (slices, connections, tables, dashboards, ...).
# Note that the connection information to connect to the datasources
# you want to explore are managed directly in the web UI
SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db'

# Flask-WTF flag for CSRF
WTF_CSRF_ENABLED = True
# Add endpoints that need to be exempt from CSRF protection
WTF_CSRF_EXEMPT_LIST = []

# Set this API key to enable Mapbox visualizations
MAPBOX_API_KEY = ''
  1. 下载镜像并启动
docker run --detach -p 8088:8088 -v /etc/superset/:/etc/superset --name superset amancevice/superset

-p 8080:8080是把主机的8088端口影射到容器的8088端口,这样通过主机的http://ip:8088可以访问容器的superset服务。
-v 是影射配置文件的目录

  1. 初始化数据远
docker exec -it superset superset-init

访问

http://ip:8088

阿里云服务器需要开通8088端口的访问权限

参考:
https://hub.docker.com/r/amancevice/superset/
https://www.jianshu.com/p/a6fe79d0b1b3
https://superset.incubator.apache.org/installation.html#configuration

相关文章

网友评论

      本文标题:docker安装superset

      本文链接:https://www.haomeiwen.com/subject/kqsmkftx.html