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

Make tutor ready for the AWS cloud

This commit is contained in:
Régis Behmo 2019-02-13 23:44:42 +01:00
parent 5df069f42a
commit 877a2239f7
9 changed files with 36 additions and 10 deletions

View File

@ -2,7 +2,10 @@
## Latest
- [Improvement] Add `runserver top` command
- [Feature] Add cloud deployment script
- [Improvement] Run `images pull` command
- [Improvement] Run `indexcourses` on importing demo course
- [Improvement] Add `runserver stop` command
## 3.0.4 (2019-02-13)

View File

@ -1,7 +1,8 @@
#! /bin/bash -e
# Provision an AWS cloud instance with tutor.
# Run with: curl -sSL https://raw.githubusercontent.com/regisb/tutor/cloud/cloud/ubuntu.sh | sudo bash -e
# Run with: curl -sSL https://raw.githubusercontent.com/regisb/tutor/master/cloud/ubuntu.sh | sudo bash -e
export TUTOR_VERSION="v3.0.4"
export USER=ubuntu
export DEBIAN_FRONTEND=noninteractive
@ -32,7 +33,7 @@ curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compo
chmod +x /usr/local/bin/docker-compose
echo "=============== Installing tutor"
curl -L "https://github.com/regisb/tutor/releases/download/v3.0.4/tutor-linux" -o /usr/local/bin/tutor
curl -L "https://github.com/regisb/tutor/releases/download/$TUTOR_VERSION/tutor-linux" -o /usr/local/bin/tutor
chmod +x /usr/local/bin/tutor
echo "=============== Configuring supervisor"

View File

@ -11,11 +11,13 @@ The only prerequisite for running this is a working docker install. Both docker
- `Docker <https://docs.docker.com/engine/installation/>`_
- `Docker compose <https://docs.docker.com/compose/install/>`_
Note that the production web server container will bind to port 80, so if you already have a web server running (Apache or Nginx, for instance), you should stop it.
Note that the production web server container will bind to port 80 and 443, so if there a web server is running on the same server (Apache or Nginx, for instance), it should be stopped prior to running tutor. See the :ref:`troubleshooting <webserver>` section for a workaround.
You should be able to run Open edX on any platform that supports Docker, including Mac OS and Windows. Tutor was tested under various versions of Ubuntu and Mac OS.
With Tutor, Open edX can run on any platform that supports Docker, including Mac OS and Windows. Tutor was tested under various versions of Ubuntu and Mac OS.
At a minimum, the server running the containers should have 4 Gb of RAM. With less memory, the Open edX , the deployment procedure might crash during migrations (see the :ref:`troubleshooting` section) and the platform will be unbearably slow.
At a minimum, the server running the containers should have 4 Gb of RAM. With less memory, the deployment procedure might crash during migrations (see the :ref:`troubleshooting <migrations_killed>` section) and the platform will be unbearably slow.
At least 9Gb of disk space is required.
Also, the host running the containers should be a 64 bit platform. (images are not built for i386 systems)

View File

@ -29,6 +29,8 @@ The last commands produce the logs since the creation of the containers, which c
If you'd rather use a graphical user interface for viewing logs, you are encouraged to try out :ref:`Portainer <portainer>`.
.. _webserver:
"Cannot start service nginx: driver failed programming external connectivity"
-----------------------------------------------------------------------------
@ -57,13 +59,15 @@ You can identify which containers are consuming most resources by running::
docker stats
.. _migrations_killed:
"Running migrations... Killed!"
-------------------------------
Older versions of Open edX required at least 4 GB RAM, in particular to run the Open edX SQL migrations. On Docker for Mac, by default, containers are allocated at most 2 GB of RAM. On Mac OS, if the ``tutor local quickstart`` command dies after displaying "Running migrations", you most probably need to increase the allocated RAM. Follow `these instructions from the official Docker documentation <https://docs.docker.com/docker-for-mac/#advanced>`_.
``Build failed running pavelib.servers.lms: Subprocess return code: 1``
"Build failed running pavelib.servers.lms: Subprocess return code: 1"
-----------------------------------------------------------------------
::
@ -78,7 +82,7 @@ This might occur when you run a ``paver`` command. ``/dev/null`` eats the actual
The error produced should help you better understand what is happening.
``ValueError: Unable to configure handler 'local'``
"ValueError: Unable to configure handler 'local'"
---------------------------------------------------
::
@ -87,7 +91,7 @@ The error produced should help you better understand what is happening.
This will occur if you try to run a development environment without patching the LOGGING configuration, as indicated in the `development_` section. Maybe you correctly patched the development settings, but they are not taken into account? For instance, you might have correctly defined the ``EDX_PLATFORM_SETTINGS`` environment variable, but ``paver`` uses the ``devstack`` settings (which does not patch the ``LOGGING`` variable). This is because calling ``paver lms --settings=development`` or ``paver cms --settings=development`` ignores the ``--settings`` argument. Yes, it might be considered an edx-platform bug... Instead, you should run the ``update_assets`` and ``runserver`` commands, as explained above.
"``TypeError: get_logger_config() got an unexpected keyword argument 'debug'``"
"TypeError: get_logger_config() got an unexpected keyword argument 'debug'"
-------------------------------------------------------------------------------
This might occur when you try to run the latest version of ``edx-platform``, and not a version close to ``hawthorn.master``. It is no longer necessary to patch the ``LOGGING`` configuration in the latest ``edx-platform`` releases, as indicated in the `development_` section, so you should remove the call to ``get_logger_config`` altogether from your development settings.

View File

@ -34,3 +34,12 @@ Generate the documentation
You can then browse the documentation with::
make browse
Releasing a new version
-----------------------
- Bump the ``__version`` value in ``tutor/__about__.py``.
- Replace "Latest" by the version name in CHANGELOG.md.
- Upgrade the tutor version for the cloud.
- Create a commit with the version changelog.
- ``git push && git push --tags``

View File

@ -103,4 +103,5 @@ def image_list(image):
images.add_command(env)
images.add_command(download)
images.add_command(build)
images.add_command(pull)
images.add_command(push)

View File

@ -87,7 +87,10 @@ def createuser(root, superuser, staff, name, email):
@click.command(help="Import the demo course")
@opts.root
def importdemocourse(root):
click.echo(fmt.info("Importing demo course"))
ops.import_demo_course(root, run_bash)
click.echo(fmt.info("Re-indexing courses"))
indexcourses.callback(root)
@click.command(help="Re-index courses for better searching")
@opts.root

View File

@ -219,7 +219,10 @@ def createuser(root, superuser, staff, name, email):
@click.command(help="Import the demo course")
@opts.root
def importdemocourse(root):
click.echo(fmt.info("Importing demo course"))
ops.import_demo_course(root, run_bash)
click.echo(fmt.info("Re-indexing courses"))
indexcourses.callback(root)
@click.command(help="Re-index courses for better searching")
@opts.root

View File

@ -1,2 +1,2 @@
# Allow long domain names
server_names_hash_bucket_size 64;
server_names_hash_bucket_size 128;