6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 06:07:56 +00:00

Get rid of the local portainer command

It makes more sense to document this command instead of adding it to the
`local` commands. If need be, in the future we should be able to re-add
it as a plugin.
This commit is contained in:
Régis Behmo 2019-12-05 11:54:44 +01:00
parent 0fb9bfe008
commit 302e1fc986
3 changed files with 7 additions and 25 deletions

View File

@ -4,7 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
## Unreleased
- 💥[Improvement] Get rid of the `indexcourses` command (#269)
- 💥[Improvement] Get rid of the `indexcourses` and `portainer` command (#269)
## 3.8.0 (2019-11-22)

View File

@ -127,12 +127,16 @@ Docker container web UI with `Portainer <https://portainer.io/>`__
Portainer is a web UI for managing docker containers. It lets you view your entire Open edX platform at a glace. Try it! It's really cool::
tutor local portainer
docker run --rm \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--volume=/tmp/portainer:/data \
-p 9000:9000 \
portainer/portainer:latest --bind=:9000
.. .. image:: https://portainer.io/images/screenshots/portainer.gif
..:alt: Portainer demo
After launching your platfom, the web UI will be available at `http://localhost:9000 <http://localhost:9000>`_. You will be asked to define a password for the admin user. Then, select a "Local environment" to work on; hit "Connect" and select the "local" group to view all running containers.
You can then view the portainer UI at `http://localhost:9000 <http://localhost:9000>`_. You will be asked to define a password for the admin user. Then, select a "Local environment" to work on; hit "Connect" and select the "local" group to view all running containers.
Among many other things, you'll be able to view the logs for each container, which is really useful.

View File

@ -316,27 +316,6 @@ def importdemocourse(root):
scripts.import_demo_course(runner)
@click.command(
help="Run Portainer (https://portainer.io), a UI for container supervision",
short_help="Run Portainer, a UI for container supervision",
)
@opts.root
@click.option(
"-p", "--port", type=int, default=9000, show_default=True, help="Bind port"
)
def portainer(root, port):
docker_run = [
"--volume=/var/run/docker.sock:/var/run/docker.sock",
"--volume={}:/data".format(tutor_env.data_path(root, "portainer")),
"-p",
"{port}:{port}".format(port=port),
"portainer/portainer:latest",
"--bind=:{}".format(port),
]
fmt.echo_info("View the Portainer UI at http://localhost:{port}".format(port=port))
utils.docker_run(*docker_run)
class ScriptRunner(scripts.BaseRunner):
def exec(self, service, command):
docker_compose(
@ -371,4 +350,3 @@ local.add_command(https)
local.add_command(logs)
local.add_command(createuser)
local.add_command(importdemocourse)
local.add_command(portainer)