0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M1 Mac で Airflow Breeze を動かす

Last updated at Posted at 2022-05-25

環境

  • M1 MacBook Pro
  • macOS Montery

インストールとセットアップ

必要なものを brew install

  • breeze が pix を使っているので必要
$ brew install gnu-getopt coreutils pipx

必要なPATHを通しておく( ~/.zshrc などに)

export PATH="$(brew --prefix)/opt/gnu-getopt/bin:$PATH"
export PAHT="$HOME/.local/bin:$PATH"

airflow を git clone して、breeze をセットアップ

$ git clone https://github.com/apache/airflow.git
$ cd airflow
$ ./breeze

breeze コマンドが使えるとおもうので、ターミナルで起動してみる

$ breeze

コンテナが立ち上がっている

$ docker ps
CONTAINER ID   IMAGE                                             COMMAND                  CREATED          STATUS          PORTS                                                                     NAMES
f86600f6a60b   ghcr.io/apache/airflow/main/ci/python3.7:latest   "/usr/bin/dumb-init …"   45 minutes ago   Up 44 minutes   0.0.0.0:12322->22/tcp, 0.0.0.0:25555->5555/tcp, 0.0.0.0:28080->8080/tcp   docker-compose_airflow_run_caf3858cbf2f

Web UI 含めて起動してみる

  • 初回は時間がかかるよ
$ breeze start-airflow

127.0.0.1:28080 でブラウザアクセスできる

スクリーンショット 2022-05-25 12.53.01.png

デフォルトは admin/admin でログイン可能

スクリーンショット 2022-05-25 12.54.05.png

DAG の配置

git clone した airflow の files/dags 配下に置くと良い
(自分の場合は ~/git/airflow/files/dags/ )

余談

  • start-airflow すると、tmux で4つセッションが立ち上がるんだけど、ぼくは普段からtmux使っているので nested tmux になってしまいちょっとうざい...が、まぁいったんそのままつかっている

参考にしました

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?