Docker redash安装

目录

  • 导语
  • 建立存储路径
  • 安装docker-compose
  • 安装redash

导语

本文是在已有docker环境的基础上进行搭建

建立存储路径

mkdir /opt/redash
cd /opt/redash
vim docker-compose.yml

version: "2"
x-redash-service: &redash-service
  image: redash/redash:8.0.0.b32245
  depends_on:
    - postgres
    - redis
  env_file: /opt/redash/env
  restart: always
services:
  server:
    <<: *redash-service
    command: server
    ports:
      - "7800:5000"
    environment:
      REDASH_WEB_WORKERS: 4
  scheduler:
    <<: *redash-service
    command: scheduler
    environment:
      QUEUES: "celery"
      WORKERS_COUNT: 1
  scheduled_worker:
    <<: *redash-service
    command: worker
    environment:
      QUEUES: "scheduled_queries,schemas"
      WORKERS_COUNT: 1
  adhoc_worker:
    <<: *redash-service
    command: worker
    environment:
      QUEUES: "queries"
      WORKERS_COUNT: 2
  redis:
    image: redis:5.0-alpine
    restart: always
  postgres:
    image: postgres:9.6-alpine
    env_file: /opt/redash/env
    volumes:
      - /opt/redash/postgres-data:/var/lib/postgresql/data
    restart: always
  nginx:
    image: redash/nginx:latest
    ports:
      - "1080:80"
    depends_on:
      - server
    links:
      - server:redash
    restart: always

vim env

PYTHONUNBUFFERED=0
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
POSTGRES_PASSWORD=eZXOkZwyinUifaXiDySv7t6U0h81spNX
REDASH_COOKIE_SECRET=8VfcqGkWWcmLqDddO8m9zJtspu0b1tob
REDASH_DATABASE_URL=postgresql://postgres:eZXOkZwyinUifaXiDySv7t6U0h81spNX@postgres/postgres

安装docker-compose

curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version

安装redash

docker-compose -f docker-compose.yml run --rm server create_db
nohup docker-compose -f docker-compose.yml up &

使用浏览器访问7800端口
Docker redash安装_第1张图片

后注:
开启hive权限管理功能

<property>
  <name>hive.security.authorization.enabled</name>
  <value>true</value>
</property>
<property>
  <name>hive.users.in.admin.role</name>
  <value>root</value>
</property>

你可能感兴趣的:(大数据)