Replace rake functions with python paver functions
Deprecated rake functions issue a warning and then call paver replacements Bring Paver commands up to date with master for servers, assets, and docs. Revert deprecation of quality, tests, and i18n for a future pull request. Deprecate workspace migration
This commit is contained in:
@@ -33,6 +33,7 @@ Internationalization
|
||||
|
||||
i18n.rst
|
||||
i18n_translators_guide.rst
|
||||
pavelib.rst
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
172
docs/en_us/developers/source/pavelib.rst
Normal file
172
docs/en_us/developers/source/pavelib.rst
Normal file
@@ -0,0 +1,172 @@
|
||||
*******************************************
|
||||
Paver
|
||||
*******************************************
|
||||
|
||||
|
||||
Paver provides a standardised way of managing development and operational tasks in edX.
|
||||
|
||||
To run individual commands, use the following syntax:
|
||||
|
||||
paver <command_name> --option=<option value>
|
||||
|
||||
|
||||
Paver Commands
|
||||
*******************************************
|
||||
|
||||
Paver commands are grouped as follows:
|
||||
|
||||
- Prereqs_ Install all of the prerequisite environments for Python, Node and Ruby
|
||||
- Docs_ Docs is used to build and then optionally display the EdX docs relating to development, authoring and data management
|
||||
- Assets_ Assets will compile Sass (CSS), Coffeescript (Javascript) and XModule assets. Optionally it can call Django’s collectstatic method
|
||||
- `Run Servers`_ Run servers
|
||||
|
||||
|
||||
.. _Prereqs:
|
||||
|
||||
Prereqs
|
||||
=============
|
||||
|
||||
Install all of the prerequisite for Python, Node and Ruby
|
||||
|
||||
**install_prereqs** : installs Ruby, Node and Python requirements
|
||||
|
||||
::
|
||||
|
||||
paver install_prereqs
|
||||
|
||||
..
|
||||
|
||||
|
||||
.. _Docs:
|
||||
|
||||
Docs
|
||||
=============
|
||||
|
||||
Docs is used to build and then optionally display the EdX docs relating to development, authoring and data management
|
||||
|
||||
**build_docs**: Invoke sphinx 'make build' to generate docs.
|
||||
|
||||
*--type=* <dev, author, data> Type of docs to compile
|
||||
|
||||
*--verbose* Display verbose output
|
||||
|
||||
::
|
||||
|
||||
paver build_docs --type=dev --verbose
|
||||
|
||||
..
|
||||
|
||||
|
||||
.. _Assets:
|
||||
|
||||
Assets
|
||||
=============
|
||||
|
||||
Assets will compile Sass (CSS), CoffeeScript (Javascript) and XModule assets. Optionally it can call Django's collectstatic command.
|
||||
|
||||
|
||||
**update_assets**: Compiles Coffeescript, Sass, Xmodule and runs collectstatic
|
||||
|
||||
*system* lms or studio
|
||||
|
||||
*--settings=* Django settings e.g. aws, dev
|
||||
|
||||
*--debug* Disable Sass compression
|
||||
|
||||
*--skip-collect* Skip collection of static assets
|
||||
|
||||
::
|
||||
|
||||
paver update_assets lms
|
||||
|
||||
..
|
||||
|
||||
.. _Run Servers:
|
||||
|
||||
Run Servers
|
||||
=============
|
||||
|
||||
**lms**: runs LMS server
|
||||
|
||||
*--settings=* Django settings e.g. aws, dev
|
||||
|
||||
*--fast* Skip updating assets
|
||||
|
||||
::
|
||||
|
||||
paver lms --settings=dev
|
||||
|
||||
..
|
||||
|
||||
|
||||
**studio**: runs Studio
|
||||
|
||||
*--settings=* Django settings e.g. aws, dev
|
||||
|
||||
*--fast* Skip updating assets
|
||||
|
||||
::
|
||||
|
||||
paver studio --settings=dev
|
||||
|
||||
..
|
||||
|
||||
**devstack**: runs LMS or Studio (for use within a Vagrant devstack VM)
|
||||
|
||||
*system* LMS or Studio
|
||||
|
||||
*--fast* Skip updating assets
|
||||
|
||||
::
|
||||
|
||||
paver devstack lms
|
||||
|
||||
..
|
||||
|
||||
|
||||
**run_all_servers**: runs lms, cms and celery workers
|
||||
|
||||
*--settings=* Django settings e.g. aws, dev
|
||||
|
||||
*--worker_settings=* Django settings for celery workers
|
||||
|
||||
|
||||
::
|
||||
|
||||
paver run_all_servers --settings=dev --worker_settings=celery
|
||||
|
||||
..
|
||||
|
||||
|
||||
**run_celery**: runs celery for specified system
|
||||
|
||||
*--settings=* Environment settings e.g. aws, dev
|
||||
|
||||
::
|
||||
|
||||
paver celery --settings=dev
|
||||
|
||||
..
|
||||
|
||||
**update_db**: runs syncdb and then migrate
|
||||
|
||||
*--settings=* Django settings e.g. aws, dev
|
||||
|
||||
::
|
||||
|
||||
paver update_db --settings=dev
|
||||
|
||||
..
|
||||
|
||||
|
||||
**check_settings**: checks settings files
|
||||
|
||||
*system*: System to check (lms or studio)
|
||||
*settings*: Django settings to check.
|
||||
|
||||
::
|
||||
|
||||
paver check_settings lms aws
|
||||
|
||||
..
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
To install all of the libraries needed for our rake commands, run `bundle install`.
|
||||
This will read the `Gemfile` and install all of the gems specified there.
|
||||
Note: Rake has been deprecated to the Python Paver. This is only needed until rake is fully deprecated
|
||||
|
||||
### Python
|
||||
|
||||
@@ -46,7 +47,7 @@ After MongoDB daemon is successfully running, check out the course data
|
||||
directories that you want to work with into the `GITHUB_REPO_ROOT` (by default,
|
||||
`../data`). Then run the following command:
|
||||
|
||||
rake resetdb
|
||||
paver update_db
|
||||
|
||||
## Installing
|
||||
|
||||
@@ -60,10 +61,10 @@ the repo:
|
||||
|
||||
Both the LMS and Studio can be started using the following shortcut tasks
|
||||
|
||||
rake lms # Start the LMS
|
||||
rake cms # Start studio
|
||||
rake lms[cms.dev] # Start LMS to run alongside Studio
|
||||
rake lms[cms.dev_preview] # Start LMS to run alongside Studio in preview mode
|
||||
paver lms # Start the LMS
|
||||
paver studio # Start studio
|
||||
paver lms --settings=cms.dev # Start LMS to run alongside Studio
|
||||
paver lms --settings=cms.dev_preview # Start LMS to run alongside Studio in preview mode
|
||||
|
||||
Under the hood, this executes `./manage.py {lms|cms} --settings $ENV runserver`,
|
||||
which starts a local development server.
|
||||
@@ -72,13 +73,12 @@ Both of these commands take arguments to start the servers in different environm
|
||||
or with additional options:
|
||||
|
||||
# Start the LMS using the test configuration, on port 5000
|
||||
rake lms[test,5000] # Executes ./manage.py lms --settings test runserver 5000
|
||||
paver lms --settings=test --port=5000 # Executes ./manage.py lms --settings test runserver 5000
|
||||
|
||||
*N.B.* You may have to escape the `[` characters, depending on your shell: `rake "lms[test,5000]"`
|
||||
To get a full list of available paver tasks, run:
|
||||
|
||||
To get a full list of available rake tasks, use:
|
||||
paver --help
|
||||
|
||||
rake -T
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ To fully test the discussion forum, you might want to act as a moderator or an a
|
||||
|
||||
First make sure that the database is up-to-date:
|
||||
|
||||
rake resetdb
|
||||
paver update_db
|
||||
|
||||
If you have created users in the edx-platform django apps when the comment service was not running, you will need to one-way sync the users into the comment service back end database:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user