基於docker安裝superset

li木水發表於2018-08-19

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

設定中文介面

1.png


相關文章