-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Airflow Docker Compose 이미지 및 README 수정
- Loading branch information
Showing
3 changed files
with
342 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,59 @@ | |
- Docker 환경을 설정하는 방법은 [Docker README](https://github.com/zzsza/Boostcamp-AI-Tech-Product-Serving/blob/main/01-batch-serving(airflow)/docker-readme.md)에 작성해두었습니다 | ||
- Docker 환경에선 VS Code Server를 활용하는 것도 추가했으니, 이 부분도 꼭 보시는 것을 추천드립니다 | ||
|
||
## 설치 | ||
- 가상 환경 설정 | ||
|
||
``` | ||
python -m venv .venv | ||
source .venv/bin/activate | ||
``` | ||
- Apache Airflow 설치 | ||
``` | ||
pip3 install pip --upgrade | ||
AIRFLOW_VERSION=2.6.3 | ||
PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)" | ||
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt" | ||
pip3 install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}" | ||
``` | ||
- Airflow DB init | ||
``` | ||
export AIRFLOW_HOME=`pwd` | ||
echo $AIRFLOW_HOME | ||
airflow db init | ||
``` | ||
- Airflow Admin 생성 | ||
``` | ||
airflow users create \ | ||
--username admin \ | ||
--password '!boostcamp-aitech!' \ | ||
--firstname kyle \ | ||
--lastname byeon \ | ||
--role Admin \ | ||
--email [email protected] | ||
``` | ||
- Airflow Webserver 실행 | ||
``` | ||
airflow webserver --port 8080 | ||
``` | ||
- Airflow Scheduler 실행 | ||
``` | ||
airflow scheduler | ||
``` | ||
--- | ||
|
@@ -34,6 +87,12 @@ | |
- 배우는 내용 | ||
- DAG의 Task가 실패할 때 슬랙 메세지를 전송합니다 | ||
### 06-simpe_elt.py | ||
- 배우는 내용 | ||
- 간단한 ELT 파이프라인을 만들고, 데이터 엔지니어링에 대해 연습합니다 | ||
- 이 코드는 Google Cloud Composer에서 실행합니다 | ||
### 추가 학습 자료 | ||
- Local에서 위 실습을 모두 완료했다면, Docker 환경에서 실행해보는 것을 추천합니다(강의에서는 따로 다루진 않지만 꼭 실행해보세요) - [Docker README](https://github.com/zzsza/Boostcamp-AI-Tech-Product-Serving/blob/main/01-batch-serving(airflow)/docker-readme.md) | ||
- 그 이후엔 멘토 전시흠님이 만드신 [Apache Airflow Tutorials for Beginner](https://heumsi.github.io/apache-airflow-tutorials-for-beginner/)을 처음부터 보면서 따라가시면 Airflow를 더 잘 이해할 수 있을거에요 :) | ||
|
Oops, something went wrong.