Skip to content

Commit

Permalink
Expose flower and redis ports in breeze (apache#11624)
Browse files Browse the repository at this point in the history
  • Loading branch information
turbaszek authored Oct 18, 2020
1 parent 620d3a6 commit e74b861
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -960,14 +960,18 @@ Port Forwarding
When you run Airflow Breeze, the following ports are automatically forwarded:

* 28080 -> forwarded to Airflow webserver -> airflow:8080
* 25555 -> forwarded to Flower dashboard -> airflow:5555
* 25433 -> forwarded to Postgres database -> postgres:5432
* 23306 -> forwarded to MySQL database -> mysql:3306
* 26379 -> forwarded to Redis broker -> redis:6379

You can connect to these ports/databases using:

* Webserver: ``http://127.0.0.1:28080``
* Flower: ``http://127.0.0.1:25555``
* Postgres: ``jdbc:postgresql://127.0.0.1:25433/airflow?user=postgres&password=airflow``
* Mysql: ``jdbc:mysql://localhost:23306/airflow?user=root``
* Mysql: ``jdbc:mysql://127.0.0.1:23306/airflow?user=root``
* Redis: ``redis://127.0.0.1:26379/0```

Start the webserver manually with the ``airflow webserver`` command if you want to connect
to the webserver. You can use ``tmux`` to multiply terminals. You may need to create a user prior to
Expand Down
11 changes: 7 additions & 4 deletions breeze
Original file line number Diff line number Diff line change
Expand Up @@ -2816,14 +2816,17 @@ function breeze::print_cheatsheet() {
echo
echo " Ports are forwarded to the running docker containers for webserver and database"
echo " * ${WEBSERVER_HOST_PORT} -> forwarded to Airflow webserver -> airflow:8080"
echo " * ${FLOWER_HOST_PORT} -> forwarded to Flower dashboard -> airflow:5555"
echo " * ${POSTGRES_HOST_PORT} -> forwarded to Postgres database -> postgres:5432"
echo " * ${MYSQL_HOST_PORT} -> forwarded to MySQL database -> mysql:3306"
echo " * ${REDIS_HOST_PORT} -> forwarded to Redis broker -> redis:6379"
echo
echo " Here are links to those services that you can use on host:"
echo " * Webserver: http://127.0.0.1:28080"
echo " * Postgres: jdbc:postgresql://127.0.0.1:25433/airflow?user=postgres&password=airflow"
echo " * Mysql: jdbc:mysql://localhost:23306/airflow?user=root"
echo
echo " * Webserver: http://127.0.0.1:${WEBSERVER_HOST_PORT}"
echo " * Flower: http://127.0.0.1:${FLOWER_HOST_PORT}"
echo " * Postgres: jdbc:postgresql://127.0.0.1:${POSTGRES_HOST_PORT}/airflow?user=postgres&password=airflow"
echo " * Mysql: jdbc:mysql://127.0.0.1:${MYSQL_HOST_PORT}/airflow?user=root"
echo " * Redis: redis://127.0.0.1:${REDIS_HOST_PORT}/0"
else
echo
fi
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/docker-compose/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ services:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
ports:
- "${WEBSERVER_HOST_PORT}:8080"
- "${FLOWER_HOST_PORT}:5555"
2 changes: 2 additions & 0 deletions scripts/ci/docker-compose/integration-redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ services:
image: redis:5.0.1
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
ports:
- "${REDIS_HOST_PORT}:6379"
airflow:
environment:
- INTEGRATION_REDIS=true
Expand Down
2 changes: 2 additions & 0 deletions scripts/ci/libraries/_initialization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ function initialization::initialize_base_variables() {
export WEBSERVER_HOST_PORT=${WEBSERVER_HOST_PORT:="28080"}
export POSTGRES_HOST_PORT=${POSTGRES_HOST_PORT:="25433"}
export MYSQL_HOST_PORT=${MYSQL_HOST_PORT:="23306"}
export FLOWER_HOST_PORT=${FLOWER_HOST_PORT:="25555"}
export REDIS_HOST_PORT=${REDIS_HOST_PORT:="26379"}

# The SQLite URL used for sqlite runs
export SQLITE_URL="sqlite:////root/airflow/airflow.db"
Expand Down

0 comments on commit e74b861

Please sign in to comment.