Superset 구축

hansung.dev·2022년 9월 21일
1

Data Engineer

목록 보기
2/3
post-thumbnail

Superset 란?

Apache Superset은 페타바이트 규모의 데이터를 처리할 수 있는 데이터 탐색 및 데이터 시각화를 위한 오픈 소스 소프트웨어 애플리케이션입니다. 위키백과(영어)

Docker-Compose를 사용하여 Apache Superset 서버를 구성합니다.

Apache Superset 공식사이트에 docker 가이드를 참고했습니다.

https://superset.apache.org/docs/installation/installing-superset-using-docker-compose

Getting Started

실습 환경 정보는 아래와 같습니다.

OS : macOS Monter Ver 12.5
Docker : 20.10.2
Apache Superset : 2.0

Installing Superset Locally Using Docker Compose

git clone https://github.com/apache/superset.git

base ❯ du -sh superset
558M	superset

docker-compose-non-dev.yml

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
x-superset-image: &superset-image apache/superset:${TAG:-latest-dev}
x-superset-depends-on: &superset-depends-on
  - db
  - redis
x-superset-volumes: &superset-volumes
  # /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
  - ./docker:/app/docker
  - superset_home:/app/superset_home

version: "3.7"
services:
  redis:
    image: redis:latest
    container_name: superset_cache
    restart: unless-stopped
    volumes:
      - redis:/data

  db:
    env_file: docker/.env-non-dev
    image: postgres:10
    container_name: superset_db
    restart: unless-stopped
    volumes:
      - db_home:/var/lib/postgresql/data

  superset:
    env_file: docker/.env-non-dev
    image: *superset-image
    container_name: superset_app
    command: ["/app/docker/docker-bootstrap.sh", "app-gunicorn"]
    user: "root"
    restart: unless-stopped
    ports:
      - 8088:8088
    depends_on: *superset-depends-on
    volumes: *superset-volumes

  superset-init:
    image: *superset-image
    container_name: superset_init
    command: ["/app/docker/docker-init.sh"]
    env_file: docker/.env-non-dev
    depends_on: *superset-depends-on
    user: "root"
    volumes: *superset-volumes

  superset-worker:
    image: *superset-image
    container_name: superset_worker
    command: ["/app/docker/docker-bootstrap.sh", "worker"]
    env_file: docker/.env-non-dev
    restart: unless-stopped
    depends_on: *superset-depends-on
    user: "root"
    volumes: *superset-volumes

  superset-worker-beat:
    image: *superset-image
    container_name: superset_worker_beat
    command: ["/app/docker/docker-bootstrap.sh", "beat"]
    env_file: docker/.env-non-dev
    restart: unless-stopped
    depends_on: *superset-depends-on
    user: "root"
    volumes: *superset-volumes

volumes:
  superset_home:
    external: false
  db_home:
    external: false
  redis:
    external: false

Setting up and running

Docker-Compos Run, Stop

docker-compose -f docker-compose-non-dev.yml pull

docker-compose -f docker-compose-non-dev.yml up

Superset 접속하기

http://localhost:8088 로 접근합니다.
접근 정보는 admin / admin 입니다.

Superset 접근화면 입니다.

다음장에서는 다양한 데이터소스에 접근하여 대시보드를 생성해보도록 하겠습니다.

Superset 공식 페이지 : https://superset.apache.org/
Superset GitHub : https://github.com/apache/superset

profile
Data Engineer

0개의 댓글