版权声明:大宝鱼 https://blog.csdn.net/diantun00/article/details/80968604
在使用redash之前,用了传统的BI套件,十分臃肿。 redash由两部分构成: a.查询编辑器:通过共享数据集和生成数据集的查询,以开放的方式在组织内中共享数据。 b.可视化和仪表板:一旦有了数据集,就可以从中创建不同的可视化,然后组合到一个仪表板。 目前redash支持的数据源有很多,具体请参考: github地址为:
1.安装,通过docker方式可以很快部署redash 1. git clone https://github.com/getredash/redash.git | 2. cd redash/ |
编辑docker-compose.production.yml文件,将数据目录映射出来以及更改密码 - postgres:
- image: postgres:9.5.6-alpine
- volumes:
- - /opt/postgres-data:/var/lib/postgresql/data
- restart: always
- nginx:
- image: redash/nginx:latest
- ports:
- - "80:80" #80(映射到容器外):80(容器内)
- depends_on:
- - server
- links:
- - server:redash
- restart: always
- ...
REDASH_COOKIE_SECRET: youPassword
|
运行命令已完成数据哭初始化操作 docker-compose -f docker-compose.production.yml run --rm server create_db |
利用docker-compose启动docker
docker-compose -f docker-compose.production.yml up |
通过访问http://youipaddress:port 填写用户及邮箱已完成用户设置操作 2.遇到添加用户后无法删除问题 进入数据库删除用户表中相关数据 [root@openstack redash]# docker ps- CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
- c3e12be05bd3 redash/nginx:latest "nginx -g 'daemon ..." 4 hours ago Up 4 hours 0.0.0.0:80->80/tcp, 443/tcp redash_nginx_1
- ef2caba3e543 redash/redash:latest "/app/bin/docker-e..." 4 hours ago Up 4 hours 0.0.0.0:5000->5000/tcp redash_server_1
- 7d215d47c2c9 redash/redash:latest "/app/bin/docker-e..." 4 hours ago Up 4 hours 5000/tcp redash_worker_1
- 9dd851b22ecb redis:3.0-alpine "docker-entrypoint..." 4 hours ago Up 4 hours 6379/tcp redash_redis_1
- c9def3889285 postgres:9.5.6-alpine "docker-entrypoint..." 4 hours ago Up 4 hours 5432/tcp redash_postgres_1
|
[root@openstack redash]# docker exec -it c9def3889285 /bin/bash Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+------------+------------+----------------------- postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 | template0 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | =c/postgres + | | | | | postgres=CTc/postgres
You are now connected to database "postgres" as user "postgres". Schema | Name | Type | Owner --------+---------------------------+-------+---------- public | access_permissions | table | postgres public | alembic_version | table | postgres public | alert_subscriptions | table | postgres public | alerts | table | postgres public | api_keys | table | postgres public | changes | table | postgres public | dashboards | table | postgres public | data_source_groups | table | postgres public | data_sources | table | postgres public | events | table | postgres public | groups | table | postgres public | notification_destinations | table | postgres public | organizations | table | postgres public | queries | table | postgres public | query_results | table | postgres public | query_snippets | table | postgres public | users | table | postgres public | visualizations | table | postgres public | widgets | table | postgres
postgres=# SELECT name FROM users;
利用sql语句删除相关行即可,我这里无多余用户就不演示了 3.WEB页面很简单,增加data_source、query、dashboard
|