mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-06 07:30:40 +00:00
Rename --silent
option to -y/--yes
This commit is contained in:
parent
6c13710c79
commit
3b9880ec74
@ -2,6 +2,7 @@
|
||||
|
||||
## Latest
|
||||
|
||||
- [Improvement] Rename `--silent` option to `-y/--yes`
|
||||
- [Bugfix] Fix (again) login from studio when https is activated (#193)
|
||||
|
||||
## v3.3.3 (2019-03-29)
|
||||
|
2
Makefile
2
Makefile
@ -50,7 +50,7 @@ ci-bundle: ## Create bundle and run basic tests
|
||||
cp ./dist/tutor ./releases/tutor-$$(uname -s)_$$(uname -m)
|
||||
./dist/tutor --version
|
||||
./dist/tutor config printroot
|
||||
./dist/tutor config save --silent --set ACTIVATE_NOTES=true --set ACTIVATE_XQUEUE=true
|
||||
./dist/tutor config save --yes --set ACTIVATE_NOTES=true --set ACTIVATE_XQUEUE=true
|
||||
|
||||
ci-images: ## Build and push docker images to hub.docker.com
|
||||
python setup.py develop
|
||||
|
@ -36,7 +36,7 @@ sudo curl -L "https://github.com/regisb/tutor/releases/download/latest/tutor-$(u
|
||||
sudo chmod +x /usr/local/bin/tutor
|
||||
|
||||
echo "=============== Pulling vendor docker images"
|
||||
tutor config save --silent
|
||||
tutor config save --yes
|
||||
tutor images pull elasticsearch
|
||||
tutor images pull memcached
|
||||
tutor images pull mongodb
|
||||
@ -64,7 +64,7 @@ docker push localhost:5000/$(tutor config printvalue DOCKER_IMAGE_NGINX)
|
||||
docker push localhost:5000/$(tutor config printvalue DOCKER_IMAGE_RABBITMQ)
|
||||
|
||||
echo "=============== Building openedx docker images"
|
||||
tutor config save --silent --set ACTIVATE_NOTES=true --set ACTIVATE_XQUEUE=true --set DOCKER_REGISTRY=localhost:5000/
|
||||
tutor config save --yes --set ACTIVATE_NOTES=true --set ACTIVATE_XQUEUE=true --set DOCKER_REGISTRY=localhost:5000/
|
||||
tutor images build all
|
||||
|
||||
echo "=============== Create Web UI script"
|
||||
|
@ -13,7 +13,7 @@ By default, this file contains only the required configuration parameters for ru
|
||||
|
||||
Alternatively, you can set each parameter from the command line::
|
||||
|
||||
tutor config save --silent --set PARAM1=VALUE1 --set PARAM2=VALUE2
|
||||
tutor config save -y --set PARAM1=VALUE1 --set PARAM2=VALUE2
|
||||
|
||||
Or from the system environment::
|
||||
|
||||
|
@ -75,7 +75,7 @@ Running a different ``openedx`` Docker image
|
||||
|
||||
By default, Tutor runs the `regis/openedx <https://hub.docker.com/r/regis/openedx/>`_ docker image from Docker Hub. If you have an account on `hub.docker.com <https://hub.docker.com>`_ or you have a private image registry, you can build your image and push it to your registry with::
|
||||
|
||||
tutor config save --silent --set DOCKER_IMAGE_OPENEDX=myusername/openedx:mytag
|
||||
tutor config save -y --set DOCKER_IMAGE_OPENEDX=myusername/openedx:mytag
|
||||
tutor images build openedx
|
||||
tutor images push openedx
|
||||
|
||||
|
@ -127,7 +127,7 @@ Running Open edX behind a web proxy
|
||||
|
||||
The containerized web server (nginx) needs to listen to ports 80 and 443 on the host. If there is already a webserver running on the host, such as Apache or Nginx, the nginx container will not be able to start. Tutor supports running behind a web proxy. To do so, add the following configuration::
|
||||
|
||||
tutor config save --silent --set WEB_PROXY=true --set NGINX_HTTP_PORT=81 --set NGINX_HTTPS_PORT=444
|
||||
tutor config save -y --set WEB_PROXY=true --set NGINX_HTTP_PORT=81 --set NGINX_HTTPS_PORT=444
|
||||
|
||||
In this example, the nginx container ports would be mapped to 81 and 444, instead of 80 and 443. You must then configure the web proxy on the host. Basic configuration files are provided by Tutor which can be used directly by your web proxy.
|
||||
|
||||
|
@ -21,12 +21,18 @@ def config():
|
||||
|
||||
@click.command(help="Create and save configuration interactively")
|
||||
@opts.root
|
||||
@click.option("--silent", is_flag=True, help="Run non-interactively")
|
||||
@click.option("-y", "--yes", "silent1", is_flag=True, help="Run non-interactively")
|
||||
@click.option("--silent", "silent2", is_flag=True, hidden=True)
|
||||
@opts.key_value
|
||||
def save(root, silent, set_):
|
||||
def save_command(root, silent1, silent2, set_):
|
||||
silent = silent1 or silent2
|
||||
save(root, silent=silent, keyvalues=set_)
|
||||
|
||||
def save(root, silent=False, keyvalues=None):
|
||||
keyvalues = keyvalues or []
|
||||
config = {}
|
||||
load_current(config, root)
|
||||
for k, v in set_:
|
||||
for k, v in keyvalues:
|
||||
config[k] = v
|
||||
if not silent:
|
||||
load_interactive(config)
|
||||
@ -225,6 +231,6 @@ def save_env(root, config):
|
||||
def config_path(root):
|
||||
return os.path.join(root, "config.yml")
|
||||
|
||||
config.add_command(save)
|
||||
config.add_command(save_command, name="save")
|
||||
config.add_command(printroot)
|
||||
config.add_command(printvalue)
|
||||
|
@ -20,7 +20,7 @@ def k8s():
|
||||
@opts.root
|
||||
def quickstart(root):
|
||||
click.echo(fmt.title("Interactive platform configuration"))
|
||||
tutor_config.save.callback(root, False, [])
|
||||
tutor_config.save(root)
|
||||
click.echo(fmt.title("Stopping any existing platform"))
|
||||
stop.callback()
|
||||
click.echo(fmt.title("Starting the platform"))
|
||||
|
@ -25,7 +25,7 @@ def local():
|
||||
@opts.root
|
||||
def quickstart(pullimages_, root):
|
||||
click.echo(fmt.title("Interactive platform configuration"))
|
||||
tutor_config.save.callback(root, False, [])
|
||||
tutor_config.save(root)
|
||||
click.echo(fmt.title("Stopping any existing platform"))
|
||||
stop.callback(root)
|
||||
if pullimages_:
|
||||
@ -167,8 +167,7 @@ def https_create(root):
|
||||
script = scripts.render_template(config, 'https_create.sh')
|
||||
|
||||
if config['WEB_PROXY']:
|
||||
click.echo(fmt.info(
|
||||
"""You are running Tutor behind a web proxy (WEB_PROXY=true): SSL/TLS
|
||||
click.echo(fmt.info("""You are running Tutor behind a web proxy (WEB_PROXY=true): SSL/TLS
|
||||
certificates must be generated on the host. For instance, to generate
|
||||
certificates with Let's Encrypt, run:
|
||||
|
||||
@ -193,8 +192,7 @@ def https_renew(root):
|
||||
click.echo(fmt.info("HTTPS is not activated: certificate renewal skipped"))
|
||||
return
|
||||
if config['WEB_PROXY']:
|
||||
click.echo(fmt.info(
|
||||
"""You are running Tutor behind a web proxy (WEB_PROXY=true): SSL/TLS
|
||||
click.echo(fmt.info("""You are running Tutor behind a web proxy (WEB_PROXY=true): SSL/TLS
|
||||
certificates must be renewed on the host. For instance, to renew Let's Encrypt
|
||||
certificates, run:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user