Skip to content

Commit

Permalink
[AIRFLOW-6972] Shorter frequently used commands in Breeze (#7608)
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-laj authored Mar 4, 2020
1 parent c0e5da5 commit a6e5bcd
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
20 changes: 10 additions & 10 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Breeze script allows performing the following tasks:
* Enter interactive environment when no command are specified (default behaviour)
* Start integrations if specified as extra flags
* Start Kind Kubernetes cluster for Kubernetes tests if specified
* Stop the interactive environment with "breeze stop-environment" command
* Stop the interactive environment with "breeze stop" command
* Run static checks - either for currently staged change or for all files with
"breeze static-check" or "breeze static-check-all-files" command
* Build documentation with "breeze build-docs" command
Expand Down Expand Up @@ -253,7 +253,7 @@ You can always stop it via:

.. code-block:: bash
./breeze stop-environment
./breeze stop
Restarting Breeze
-----------------
Expand All @@ -262,7 +262,7 @@ You can also restart the environment and enter it via:

.. code-block:: bash
./breeze restart-environment
./breeze restart
Choosing a Breeze Environment
-----------------------------
Expand Down Expand Up @@ -300,7 +300,7 @@ to start more than one integration at a time.
Finally you can specify ``--integration all`` to start all integrations.

Once integration is started, it will continue to run until the environment is stopped with
``breeze stop-environment`` command. or restarted via ``breeze restart-environment`` command
``breeze stop`` command. or restarted via ``breeze restart`` command

Note that running integrations uses significant resources - CPU and memory.

Expand All @@ -313,7 +313,7 @@ them, you may end up with some unused image data.

To clean up the Docker environment:

1. `Stop Breeze <#stopping-breeze>`_ with ``./breeze stop-environment``.
1. `Stop Breeze <#stopping-breeze>`_ with ``./breeze stop``.

2. Run the ``docker system prune`` command.

Expand Down Expand Up @@ -621,8 +621,8 @@ This is the current syntax for `./breeze <./breeze>`_:
cleanup-images Cleans up the container images created
initialize-local-virtualenv Initializes local virtualenv
setup-autocomplete Sets up autocomplete for breeze
stop-environment Stops the docker-compose evironment
restart-environment Stops the docker-compose evironment including DB cleanup
stop Stops the docker-compose evironment
restart Stops the docker-compose evironment including DB cleanup
toggle-suppress-cheatsheet Toggles on/off cheatsheet
toggle-suppress-asciiart Toggles on/off asciiart
Expand Down Expand Up @@ -696,13 +696,13 @@ This is the current syntax for `./breeze <./breeze>`_:
shell and when typing breeze command <TAB> will provide autocomplete for
parameters and values.
****************************************************************************************************
breeze [FLAGS] stop-environment -- <EXTRA_ARGS>
breeze [FLAGS] stop -- <EXTRA_ARGS>
Brings down running docker compose environment. When you start the environment, the docker
containers will continue running so that startup time is shorter. But they take quite a lot of
memory and CPU. This command stops all running containers from the environment.
****************************************************************************************************
breeze [FLAGS] restart-environment -- <EXTRA_ARGS>
breeze [FLAGS] restart -- <EXTRA_ARGS>
Restarts running docker compose environment. When you restart the environment, the docker
containers will be restarted. That includes cleaning up the databases. This is
Expand Down Expand Up @@ -987,7 +987,7 @@ If you are having problems with the Breeze environment, try the steps below. Aft
can check whether your problem is fixed.

1. If you are on macOS, check if you have enough disk space for Docker.
2. Restart Breeze with ``./breeze restart-environment``.
2. Restart Breeze with ``./breeze restart``.
3. Delete the ``.build`` directory and run ``./breeze build-only --force-pull-images``.
4. `Clean up Docker images <#cleaning-up-the-images>`_.
5. Restart your Docker Engine and try again.
Expand Down
8 changes: 4 additions & 4 deletions TESTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ or by using the ``--integration all`` switch that enables all integrations.

NOTE: Every integration requires a separate container with the corresponding integration image.
They take precious resources on your PC, mainly the memory. The started integrations are not stopped
until you stop the Breeze environment with the ``stop-environment`` command and restart it
via ``restart-environment`` command.
until you stop the Breeze environment with the ``stop`` command and restart it
via ``restart`` command.

The following integrations are available:

Expand Down Expand Up @@ -644,9 +644,9 @@ To run the tests for Airflow 1.10.* series, you need to run Breeze with
If ``current`` is specified (default), then the current version of Airflow is used.
Otherwise, the released version of Airflow is installed.

You should also consider running it with ``restart-environment`` command when you change installed version.
You should also consider running it with ``restart`` command when you change installed version.
This will clean-up the database so that you start with a clean DB and not DB installed in a previous version.
So typically you'd run it like ``breeze --install-ariflow-version=1.10.9 restart-environment``.
So typically you'd run it like ``breeze --install-ariflow-version=1.10.9 restart``.

BASH Unit Testing (BATS)
========================
Expand Down
12 changes: 6 additions & 6 deletions breeze
Original file line number Diff line number Diff line change
Expand Up @@ -746,13 +746,13 @@ function parse_arguments() {
export STATIC_CHECK_ALL_FILES="true"
EXTRA_STATIC_CHECK_OPTIONS+=("--all-files" "--show-diff-on-failure")
shift 2 ;;
stop-environment)
stop)
LAST_SUBCOMMAND="${1}"
COMMAND_TO_RUN="run_docker_compose"
DOCKER_COMPOSE_COMMAND="down"
EXTRA_DC_OPTIONS+=("--remove-orphans")
shift ;;
restart-environment)
restart)
LAST_SUBCOMMAND="${1}"
COMMAND_TO_RUN="run_docker_compose"
DOCKER_COMPOSE_COMMAND="down"
Expand Down Expand Up @@ -856,8 +856,8 @@ prepare_usage() {
export USAGE_FLAGS="Shows all breeze's flags"
export USAGE_INITIALIZE_LOCAL_VIRTUALENV="Initializes local virtualenv"
export USAGE_SETUP_AUTOCOMPLETE="Sets up autocomplete for breeze"
export USAGE_STOP_ENVIRONMENT="Stops the docker-compose evironment"
export USAGE_RESTART_ENVIRONMENT="Stops the docker-compose evironment including DB cleanup"
export USAGE_STOP="Stops the docker-compose evironment"
export USAGE_RESTART="Stops the docker-compose evironment including DB cleanup"
export USAGE_STATIC_CHECK="Performs selected static check for changed files"
export USAGE_STATIC_CHECK_ALL_FILES="Performs selected static check for all files"
export USAGE_TOGGLE_SUPPRESS_CHEATSHEET="Toggles on/off cheatsheet"
Expand Down Expand Up @@ -930,12 +930,12 @@ prepare_usage() {
shell and when typing breeze command <TAB> will provide autocomplete for
parameters and values.
"
export DETAILED_USAGE_STOP_ENVIRONMENT="
export DETAILED_USAGE_STOP="
Brings down running docker compose environment. When you start the environment, the docker
containers will continue running so that startup time is shorter. But they take quite a lot of
memory and CPU. This command stops all running containers from the environment.
"
export DETAILED_USAGE_RESTART_ENVIRONMENT="
export DETAILED_USAGE_RESTART="
Restarts running docker compose environment. When you restart the environment, the docker
containers will be restarted. That includes cleaning up the databases. This is
especially useful if you switch between different versions of airflow.
Expand Down
4 changes: 2 additions & 2 deletions breeze-complete
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ build-only
cleanup-images
initialize-local-virtualenv
setup-autocomplete
stop-environment
restart-environment
stop
restart
toggle-suppress-cheatsheet
toggle-suppress-asciiart"

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/in_container/entrypoint_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ if [[ ${INTEGRATION_KERBEROS:="false"} == "true" ]]; then
echo
echo "ERROR !!!!Kerberos initialisation requested, but failed"
echo
echo "I will exit now, and you need to run 'breeze --integration kerberos restart-environment'"
echo "I will exit now, and you need to run 'breeze --integration kerberos restart'"
echo "to re-enter breeze and restart kerberos."
echo
exit 1
Expand Down

0 comments on commit a6e5bcd

Please sign in to comment.