Skip to content

Commit

Permalink
docs: tutor uses docker compose now, not docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick authored and regisb committed Aug 28, 2023
1 parent 758b7d0 commit 97b999b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Tutor simplifies the deployment of Open edX by:
:width: 500px
:align: center

Because Docker containers are becoming an industry-wide standard, that means that with Tutor it becomes possible to run Open edX anywhere: for now, Tutor supports deploying on a local server, with `docker-compose <https://docs.docker.com/compose/overview/>`_, and in a large cluster, with `Kubernetes <http://kubernetes.io/>`_. But in the future, Tutor may support other deployment platforms.
Because Docker containers are becoming an industry-wide standard, that means that with Tutor it becomes possible to run Open edX anywhere: for now, Tutor supports deploying on a local server, with `docker compose <https://docs.docker.com/compose/overview/>`_, and in a large cluster, with `Kubernetes <http://kubernetes.io/>`_. But in the future, Tutor may support other deployment platforms.

Where can I try Open edX and Tutor?
-----------------------------------
Expand Down Expand Up @@ -101,7 +101,7 @@ You can now take advantage of the Tutor-powered CLI (item #3) to bootstrap your

tutor local launch

Under the hood, Tutor simply runs ``docker-compose`` and ``docker`` commands to launch your platform. These commands are printed in the standard output, such that you are free to replicate the same behaviour by simply copying/pasting the same commands.
Under the hood, Tutor simply runs ``docker compose`` and ``docker`` commands to launch your platform. These commands are printed in the standard output, such that you are free to replicate the same behaviour by simply copying/pasting the same commands.

How do I navigate Tutor's command-line interface?
-------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/k8s.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Common tasks
Executing commands inside service pods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Tutor and plugin documentation usually often instructions to execute some ``tutor local run ...`` commands. These commands are only valid when running Tutor locally with docker-compose, and will not work on Kubernetes. Instead, you should run ``tutor k8s exec ...`` commands. Arguments and options should be identical.
The Tutor and plugin documentation usually often instructions to execute some ``tutor local run ...`` commands. These commands are only valid when running Tutor locally with docker compose, and will not work on Kubernetes. Instead, you should run ``tutor k8s exec ...`` commands. Arguments and options should be identical.

For instance, to run a Python shell in the lms container, run::

Expand Down
2 changes: 1 addition & 1 deletion docs/local.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Local deployment
This method is for deploying Open edX locally on a single server, where docker images are orchestrated with `docker-compose <https://docs.docker.com/compose/overview/>`_.

.. note::
Tutor is compatible with the ``docker compose`` subcommand. However, this support is still in beta and we're not sure it will behave the same as the previous ``docker-compose`` command. So ``docker-compose`` will be preferred, unless you set an environment variable ``TUTOR_USE_COMPOSE_SUBCOMMAND`` to enforce using ``docker compose``.
As of v16.0.0, Tutor now uses the ``docker compose`` subcommand instead of the separate ``docker-compose`` command.

.. _tutor_root:

Expand Down
16 changes: 8 additions & 8 deletions tutor/commands/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def reboot(context: click.Context, detach: bool, services: list[str]) -> None:
@click.command(
short_help="Restart some components from a running platform.",
help="""Specify 'openedx' to restart the lms, cms and workers, or 'all' to
restart all services. Note that this performs a 'docker-compose restart', so new images
restart all services. Note that this performs a 'docker compose restart', so new images
may not be taken into account. It is useful for reloading settings, for instance. To
fully stop the platform, use the 'reboot' command.""",
)
Expand Down Expand Up @@ -302,8 +302,8 @@ def do() -> None:
@click.command(
short_help="Run a command in a new container",
help=(
"Run a command in a new container. This is a wrapper around `docker-compose run`. Any option or argument passed"
" to this command will be forwarded to docker-compose. Thus, you may use `-v` or `-p` to mount volumes and"
"Run a command in a new container. This is a wrapper around `docker compose run`. Any option or argument passed"
" to this command will be forwarded to docker compose. Thus, you may use `-v` or `-p` to mount volumes and"
" expose ports."
),
context_settings={"ignore_unknown_options": True},
Expand Down Expand Up @@ -368,7 +368,7 @@ def copyfrom(
@click.command(
short_help="Run a command in a running container",
help=(
"Run a command in a running container. This is a wrapper around `docker-compose exec`. Any option or argument"
"Run a command in a running container. This is a wrapper around `docker compose exec`. Any option or argument"
" passed to this command will be forwarded to docker-compose. Thus, you may use `-e` to manually define"
" environment variables."
),
Expand All @@ -383,7 +383,7 @@ def execute(context: click.Context, args: list[str]) -> None:

@click.command(
short_help="View output from containers",
help="View output from containers. This is a wrapper around `docker-compose logs`.",
help="View output from containers. This is a wrapper around `docker compose logs`.",
)
@click.option("-f", "--follow", is_flag=True, help="Follow log output")
@click.option("--tail", type=int, help="Number of lines to show from each container")
Expand All @@ -406,10 +406,10 @@ def status(context: click.Context) -> None:


@click.command(
short_help="Direct interface to docker-compose.",
short_help="Direct interface to docker compose.",
help=(
"Direct interface to docker-compose. This is a wrapper around `docker-compose`. Most commands, options and"
" arguments passed to this command will be forwarded as-is to docker-compose."
"Direct interface to docker compose. This is a wrapper around `docker compose`. Most commands, options and"
" arguments passed to this command will be forwarded as-is to docker compose."
),
context_settings={"ignore_unknown_options": True},
name="dc",
Expand Down
2 changes: 1 addition & 1 deletion tutor/hooks/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def run_this_on_start(root, config, name):
For more information about how actions work, check out the :py:class:`tutor.core.hooks.Action` API.
"""

#: Triggered whenever a "docker-compose start", "up" or "restart" command is executed.
#: Triggered whenever a "docker compose start", "up" or "restart" command is executed.
#:
#: :parameter str root: project root.
#: :parameter dict config: project configuration.
Expand Down
4 changes: 2 additions & 2 deletions tutor/templates/local/docker-compose.jobs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Tutor provides the `tutor MODE do JOB ...` CLI as a consistent way to execute jobs
# across the dev, local, and k8s modes. To support jobs in the docker-compose modes
# across the dev, local, and k8s modes. To support jobs in the docker compose modes
# (dev and local), we must define a `-job` variant service in which jobs could be run.

# When `tutor local do JOB ...` is invoked, we `docker-compose run` each of JOB's
# When `tutor local do JOB ...` is invoked, we `docker compose run` each of JOB's
# tasks against the appropriate `-job` services, as defined here.
# When `tutor dev do JOB ...` is invoked, we do the same, but also include any
# compose overrides in ../dev/docker-compose.jobs.yml.
Expand Down

0 comments on commit 97b999b

Please sign in to comment.