시작하기 전에, Docker를 활용하여 Airflow, Superset 컨테이너를 이미 빌드했다고 가정한다.
아래 게시글 참고
https://millersplanet.tistory.com/28
윈도우에서 Superset을 Docker로 설치하기
바로 시작. 나 보려고 올리는 거라 불친절합니다. 1. 도커 홈페이지에서 윈도우용 도커 데스크탑을 설치한다. 2. WSL2 설치하기전에!! 해줄 설정들이 있다.Windows PowerShell을 관리자로 실행한다. 2.1
millersplanet.tistory.com
https://millersplanet.tistory.com/29
윈도우에서 Docker로 Airflow 시작하기
도커 데스크탑이 설치되어 있다고 생각하고 시작합니다. 1. C 드라이브 Users 폴더 안에 user(님 이름) 폴더 안에 airflow 폴더를 만든다.(위치나 이름은 달라도 괜찮은데, 어쨌든 폴더를 만들어야 한
millersplanet.tistory.com
Airflow 실행할 때 자동으로 Postgresql DB가 생성되는데, 이걸 superset과 연동시켜줘야 한다.
docker network로 연결시켜주면 된다.
docker network create airflow-superset
docker network connect airflow-superset superset
docker network connect airflow-superset airflow-postgres-1
이게 상관있는건지는 모르겠지만 내 폴더 구조는 현재 dashboard 안에 airflow와 superset이 있는 상태고 dashboard 폴더로 cd한 상태에서 위 명령들을 실행시켰다.
다시 superset에 접속하여 오른쪽의 Settings > Data > Database Connections
오른쪽의 + Database를 눌러 PostgreSQL 선택
HOST: airflow-postgres-1
PORT: 5432
DATABASE NAME: airflow
PASSWORD: airflow
DISPLAY NAME: PostgreSQL
로 설정해주고 connect
다음으로 airflow 인터페이스 접속하여 위쪽의 Admin > Connections
+ 버튼을 누르고
Connection Id: aiflow-superset(원하는 이름)
Connection Type: Postgres
Host: postgres
Schema: airflow
Login: airflow
Password: airflow
Port: 5432
로 설정해주고 Test, Save
여기까지 환경 구축은 마무리되었다.
'개발' 카테고리의 다른 글
Web Accessibility (0) | 2024.07.04 |
---|---|
상태(state)와 속성(props) (1) | 2024.06.07 |
10 React Hooks (0) | 2024.05.26 |
윈도우에서 Docker로 Airflow 시작하기 (1) | 2024.04.24 |
윈도우에서 Superset을 Docker로 설치하기 (0) | 2024.04.23 |