mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-04 20:37:52 +00:00
Add local/k8s reboot
commands
This is to replace `tutor local stop && tutor local start`, which I type way too frequently.
This commit is contained in:
parent
ce8a0315cb
commit
c31c9bdc89
@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
|
||||
|
||||
## Latest
|
||||
|
||||
- [Improvement] Add ``local/k8s reboot`` commands
|
||||
- [Improvement] Add ``-U/--unset`` option to ``config save``
|
||||
- [Bugfix] Fix insecure static asset loading when web proxy is enabled
|
||||
- [Improvement] Rename ``SECRET_KEY`` configuration parameter to ``OPENEDX_SECRET_KEY``
|
||||
|
@ -69,6 +69,13 @@ def stop(root):
|
||||
)
|
||||
|
||||
|
||||
@click.command(help="Reboot an existing platform")
|
||||
@opts.root
|
||||
def reboot(root):
|
||||
stop.callback(root)
|
||||
start.callback(root)
|
||||
|
||||
|
||||
def resource_selector(config, *selectors):
|
||||
"""
|
||||
Convenient utility for filtering only the resources that belong to this project.
|
||||
@ -218,6 +225,7 @@ def wait_for_pod_ready(config, service):
|
||||
k8s.add_command(quickstart)
|
||||
k8s.add_command(start)
|
||||
k8s.add_command(stop)
|
||||
k8s.add_command(reboot)
|
||||
k8s.add_command(delete)
|
||||
k8s.add_command(init)
|
||||
k8s.add_command(createuser)
|
||||
|
@ -90,9 +90,20 @@ def stop(root):
|
||||
|
||||
|
||||
@click.command(
|
||||
help="""Restart some components from a running platform.
|
||||
You may specify 'openedx' to restart the lms, cms and workers, or 'all' to
|
||||
restart all services."""
|
||||
short_help="Reboot an existing platform",
|
||||
help="This is more than just a restart: with reboot, the platform is fully stopped before being restarted again",
|
||||
)
|
||||
@opts.root
|
||||
@click.option("-d", "--detach", is_flag=True, help="Start in daemon mode")
|
||||
def reboot(root, detach):
|
||||
stop.callback(root)
|
||||
start.callback(root, detach)
|
||||
|
||||
|
||||
@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 may not be taken into account. To fully stop the platform, use the 'reboot' command.""",
|
||||
)
|
||||
@opts.root
|
||||
@click.argument("service")
|
||||
@ -336,6 +347,7 @@ local.add_command(pullimages)
|
||||
local.add_command(start)
|
||||
local.add_command(stop)
|
||||
local.add_command(restart)
|
||||
local.add_command(reboot)
|
||||
local.add_command(run)
|
||||
local.add_command(execute, name="exec")
|
||||
local.add_command(init)
|
||||
|
Loading…
Reference in New Issue
Block a user