6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-11-12 16:26:40 +00:00
tutor/docs/local.rst

121 lines
4.1 KiB
ReStructuredText
Raw Normal View History

.. _local:
Local deployment
================
2018-12-26 15:00:47 +00:00
This method is for deploying Open edX locally on a single server. Docker images are orchestrated with `docker-compose <https://docs.docker.com/compose/overview/>`_.
2018-12-26 15:00:47 +00:00
The following commands should be run inside the ``deploy/local`` folder::
cd deploy/local
You can use these commands individually instead of running the full installation with ``make all``.
2018-12-26 15:00:47 +00:00
Configuration
-------------
::
make configure
2018-12-26 15:00:47 +00:00
This is the only non-automatic step in the install process. You will be asked various questions about your Open edX platform and appropriate configuration files will be generated. If you would like to automate this step then you should run ``make configure`` interactively once. After that, you will have a ``config.json`` file at the root of the repository.
2018-12-26 15:00:47 +00:00
If you want to run a fully automated install, upload the ``config.json`` file to wherever you want to run Open edX, and then run ``make configure SILENT=1`` instead of ``make configure``. All values from ``config.json`` will be automatically loaded.
Downloading docker images
-------------------------
::
make update
You will need to download the docker images from `Docker Hub <https://hub.docker.com/r/regis/openedx/>`_. Depending on your bandwidth, this might take a long time. Minor image updates will be incremental, and thus much faster.
Database management
-------------------
::
make databases
2018-12-26 15:00:47 +00:00
This command should be run just once. It will create the required databases tables and apply database migrations for all applications.
If migrations are stopped with a ``Killed`` message, this certainly means the docker containers don't have enough RAM. See the :ref:`troubleshooting` section.
2018-12-26 15:00:47 +00:00
Collecting static assets
------------------------
::
make assets
This command also needs to be run just once. It will make sure that static assets, such as images, stylesheets and Javascript dependencies, can be served by the nginx container.
Running Open edX
----------------
::
make run
This will launch the various docker containers required for your Open edX platform. The LMS and the Studio will then be reachable at the domain name you specified during the configuration step. You can also access them at http://localhost and http://studio.localhost.
2018-12-26 15:00:47 +00:00
To stop the running containers, just hit Ctrl+C.
2018-12-26 15:00:47 +00:00
In production, you will probably want to daemonize the services. Instead of ``make run``, run::
2018-12-26 15:00:47 +00:00
make daemonize
And then, to stop all services::
make stop
Creating a new user with staff and admin rights
-----------------------------------------------
You will most certainly need to create a user to administer the platform. Just run::
make create-staff-user USERNAME=yourusername EMAIL=user@email.com
You will asked to set the user password interactively.
Importing the demo course
-------------------------
On a fresh install, your platform will not have a single course. To import the `Open edX demo course <https://github.com/edx/edx-demo-course>`, run::
make import-demo-course
Updating the course search index
--------------------------------
The course search index can be updated with::
make reindex-courses
Run this command periodically to ensure that course search results are always up-to-date.
.. _portainer:
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::
make portainer
.. .. 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 and 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.
2018-12-26 15:00:47 +00:00
Additional commands
-------------------
2018-12-26 15:00:47 +00:00
All available commands can be listed by running::
2018-12-26 15:00:47 +00:00
make help