superset简介
曾用名Caravel, Panoramix, 是由Airbnb(知名在线房屋短租公司)开源的数据分析与可视化平台, 该工具主要特点是可自助分析, 自定义仪表盘, 分析结果可视化(导出), 用户/角色权限控制, 还集成了一个SQL编辑器, 可以进行SQL编辑查询等。
superset安装
查看已安装docker版本
[root@Ieat2 ~]# docker version
Client:
Version: 17.03.2-ce
API version: 1.27
Go version: go1.7.5
Git commit: f5ec1e2
Built: Tue Jun 27 02:21:36 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.2-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.7.5
Git commit: f5ec1e2
Built: Tue Jun 27 02:21:36 2017
OS/Arch: linux/amd64
Experimental: false
拉取镜像superset镜像
docker pull amancevice/superset
创建superset容器(让容器中的superset挂载本地机的配置文件)
docker run -d -p 8088:8088 -v /opt/docker/superset:/home/superset --name superset amancevice/superset
查看容器
[root@Ieat2 ~]# docker ps |grep superset
a27705e43255 amancevice/superset "gunicorn superset..." 3 hours ago Up 3 hours (healthy) 0.0.0.0:8088->8088/tcp superset
配置superset容器
设置用户名和密码(docker exec -it 容器ID fabmanager create-admin –app superset)
初始化数据库(docker exec -it 容器ID superset db upgrade)
superset初始化(docker exec -it 容器ID superset init)
开启superset服务(docker exec -it 容器ID superset runserver)
[root@Ieat2 ~]# docker exec -it superset fabmanager create-admin --app superset
Username [admin]: test
User first name [admin]: test
User last name [user]: test
Email [admin@fab.org]: xxx@qq.com
Password:
Repeat for confirmation:
Recognized Database Authentications.
Admin User makai created.
[root@Ieat2 ~]# docker exec -it superset superset db upgrade
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 4e6a06bad7a8, Init
...
......
[root@Ieat2 ~]# docker exec -it superset superset init
2018-08-19 16:21:55,189:INFO:root:Syncing role definition
2018-08-19 16:21:55,190:INFO:root:Creating database reference
2018-08-19 16:21:55,256:INFO:root:Syncing Admin perms
2018-08-19 16:21:55,358:INFO:root:Syncing Alpha perms
2018-08-19 16:21:55,833:INFO:root:Syncing Gamma perms
2018-08-19 16:21:56,204:INFO:root:Syncing granter perms
2018-08-19 16:21:56,594:INFO:root:Syncing sql_lab perms
2018-08-19 16:21:57,072:INFO:root:Fetching a set of all perms to lookup which ones are missing
2018-08-19 16:21:57,167:INFO:root:Creating missing datasource permissions.
2018-08-19 16:21:57,177:INFO:root:Creating missing database permissions.
2018-08-19 16:21:57,198:INFO:root:Creating missing metrics permissions
[root@Ieat2 ~]# docker exec -it superset superset runserver
访问superset http://localhost:8088
设置中文界面