Skip to content

Commit 605b3b5

Browse files
author
Oscar Carballal Prego
committed
Updated document structure and documentation
1 parent 6dba1cb commit 605b3b5

File tree

12 files changed

+250
-1178
lines changed

12 files changed

+250
-1178
lines changed

source/configure/faq.rst

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Frequently Asked Questions
2+
==========================

source/configure/moocng.rst

+133-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,135 @@
1+
moocng
12
======
2-
MoocNG
3-
======
43

5-
MoocNG
4+
These are the configuration steps required for the moocng installation to work.
5+
6+
Create the PostgreSQL database
7+
------------------------------
8+
9+
.. code-block:: bash
10+
11+
$ su - postgres
12+
$ createuser moocng --no-createrole --no-createdb --no-superuser -P
13+
Enter password for new role: *****
14+
Enter it again: *****
15+
$ createdb -E UTF8 --owner=moocng moocng
16+
17+
Add the new user to the allowed users for that database. For that we need to edit **/var/lib/pgsql/data/pg_hba.conf** and add this line in the first place, before anything:
18+
19+
.. code-block:: ini
20+
21+
# TYPE DATABASE USER CIDR-ADDRESS METHOD
22+
local moocng moocng md5
23+
24+
Please note: The pg_hba.conf location depends on your distribution, in Ubuntu for example, it is **/etc/postgresql/8.1/main/pg_hba.conf**
25+
26+
Configure rabbitMQ
27+
------------------
28+
29+
RabbitMQ is used in OpenMOOC engine to perform some tasks like sending emails and creating the last frames of the videos. First of all you need to install it:
30+
31+
.. code-block:: bash
32+
33+
# yum install erlang rabbitmq-server
34+
35+
First, you need to create a user, a password, and a virtual host. You can do it with these commands:
36+
37+
.. code-block:: bash
38+
39+
$ service rabbitmq-server start
40+
$ rabbitmqctl add_user rabbitusername rabbitpassword
41+
$ rabbitmqctl add_vhost yourvirtualhost
42+
$ rabbitmqctl set_permissions -p username virtualhost ".*" ".*" ".*"
43+
44+
*Example*:
45+
46+
.. code-block:: bash
47+
48+
$ service rabbitmq-server start
49+
$ rabbitmqctl add_user moocng moocngpassword
50+
$ rabbitmqctl add_vhost moocng
51+
$ rabbitmqctl set_permissions -p moocng moocng ".*" ".*" ".*"
52+
53+
You should not need anything else but putting the address of your rabbitMQ server in the settings. Edit your **/etc/openmooc/moocng/moocngsettings/local.py** file and add a connection line to your rabbitMQ server:
54+
55+
.. code-block:: ini
56+
57+
BROKER_URL = 'amqp://myuser:mypassword@rabbitServerAdress:5672/moocng'
58+
59+
*Example*:
60+
61+
.. code-block:: ini
62+
63+
BROKER_URL = 'amqp://moocng:moocngpassword@localhost:5672/moocng'
64+
65+
Configuring your moocng instance
66+
--------------------------------
67+
68+
The configuration files for moocng are located in **/etc/openmooc/moocng/moocngsettings/**. Open your *local.py* file and add this:
69+
70+
.. code-block:: python
71+
72+
DATABASES = {
73+
'default': {
74+
'ENGINE': 'django.db.backends.postgresql_psycopg2',
75+
'NAME': 'moocng',
76+
'USER': 'moocng',
77+
'PASSWORD': 'yourmoocngpassword',
78+
'HOST': 'localhost',
79+
'PORT': '',
80+
}
81+
}
82+
83+
Generate the SECRET_KEY
84+
.......................
85+
86+
The secret key is a random string that Django uses in several places like the CSRF attack protection. It is considered a security problem if you don't change this value and leave it as the moocng default. You can generate a random value with the following command:
87+
88+
.. code-block:: bash
89+
90+
$ tr -c -d '0123456789abcdefghijklmnopqrstuvwxyz' </dev/urandom | dd bs=32 count=1 2>/dev/null;echo
91+
92+
Copy the returning value in your **/etc/openmooc/moocng/moocngsettings/local.py** file, like this:
93+
94+
.. code-block:: python
95+
96+
SECRET_KEY = "uzy3hc2mtevod229yrsywldgh945cmiu"
97+
98+
Copy the static files
99+
.....................
100+
101+
If you will be using the default static and media folders, please skip until the copy part of this section. If you plan to use your own folders follow the full instructions.
102+
103+
The default moocng static and media directories are located in:
104+
105+
.. code-block:: bash
106+
107+
/var/lib/openmooc/moocng/static
108+
/var/lib/openmooc/moocng/media
109+
110+
To change the default directories you must edit your **/etc/openmooc/moocng/moocngsettings/local.py** and add these two settings:
111+
112+
.. code-block:: bash
113+
114+
MEDIA_ROOT = “path/to/your/media/files/”
115+
STATIC_ROOT = “path/to/your/static/files/”
116+
117+
To copy the static files we are going to use the command **moocngadmin**:
118+
119+
.. code-block:: bash
120+
121+
# moocngadmin collectstatic
122+
123+
Change the permissions in **/var/lib/openmooc/moocng** so nginx can read the files, and the wsgi can read/write them.
124+
125+
Sync the database and make the migrations
126+
127+
.. code-block:: bash
128+
129+
# moocngadmin syncdb --migrate
130+
131+
You’re done! You should be able to run a test instance and visit it with this command:
132+
133+
.. code-block:: bash
134+
135+
$ moocngadmin runserver 0.0.0.0:8000

source/index.rst

+14-9
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,32 @@ django framework with Apache 2.0 license (see )
77

88
.. note:: This documentation is still in heavy development. Feel free to send an email to the mailing list in [email protected] if you have any questions.
99

10-
10+
============
1111
Installation
1212
============
1313
.. toctree::
1414
:maxdepth: 2
1515

16-
install/install
16+
install/repositories
17+
install/moocng
1718
install/idp
18-
install/engine
1919
install/askbot
20-
install/installfaq
20+
install/faq
2121

22+
=============
2223
Configuration
2324
=============
24-
2525
.. toctree::
2626
:maxdepth: 2
2727

28-
configure/idp
2928
configure/moocng
29+
configure/idp
3030
configure/askbot
31+
configure/faq
3132

33+
=======
3234
Manuals
3335
=======
34-
3536
.. toctree::
3637
:maxdepth: 2
3738

@@ -40,20 +41,24 @@ Manuals
4041
manual/student
4142
manual/sentry
4243

43-
Reference
44-
=========
44+
==========
45+
Developers
46+
==========
4547
.. toctree::
4648
:maxdepth: 2
4749

4850
reference/mongo_structure
51+
reference/generating_rpms
4952

53+
=======
5054
License
5155
=======
5256

5357
OpenMOOC is licensed under the terms of `Apache 2.0 <http://www.apache.org/licenses/LICENSE-2.0.html>`_.
5458

5559
The main header image used on OpenMOOC platform and blog was created by `Ana Isabel Rey Botello <https://github.com/anarey>`_.
5660

61+
==================
5762
Indices and tables
5863
==================
5964

source/install/askbot.rst

+11-38
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,18 @@
1-
===============
2-
OpenMOOC Askbot
3-
===============
1+
Askbot
2+
======
43

5-
The Askbot component of OpenMOOC serves as a way to ask questions about a course.
4+
Askbot in OpenMOOC works a bit different than usual. As a start, you must install
5+
the regular askbot in your system:
66

7-
To install it via the package repository you just need to do::
7+
.. code-block:: bash
88
9-
# yum install openmooc-askbot openmooc-askbot-customs
9+
# yum install askbot
1010
11-
If for some reason the package from the repository couldn't work, you still can
12-
download the openmooc-askbot RPM and try to install it with the command::
11+
After that you must install the OpenMOOC components for Askbot, like this:
1312

14-
# yum --nogpgcheck localinstall openmooc-askbot-0.7.44_x86_64.rpm openmooc-askbot-customs-0.7.44_x86_64.rpm
13+
.. code-block:: bash
1514
16-
.. note:: Put link here
15+
# yum install openmooc-askbot openmooc-askbot-theme
1716
18-
You can now follow to OpenMOOC Askbot Configuration
19-
20-
CentOS
21-
------
22-
23-
Deployment
24-
..........
25-
26-
The installation instructions for askbot-openmooc are `here <https://github.com/OpenMOOC/askbot-openmooc/blob/master/README-centos.rst>`_
27-
28-
Deploying multiple instances
29-
............................
30-
31-
The usual deployment mehtod of OpenMOOC requires multiple instancing of Askbots,
32-
here are the `instructions <https://github.com/OpenMOOC/askbot-openmooc/blob/master/README-centos-multipleinstance.rst>`_
33-
34-
Ubuntu
35-
------
36-
37-
Deployment
38-
..........
39-
40-
`Instructions <https://github.com/OpenMOOC/askbot-openmooc/blob/master/README-ubuntu.rst>`_
41-
42-
Deploying multiple instances
43-
............................
44-
45-
`Instructions <https://github.com/OpenMOOC/askbot-openmooc/blob/master/README-ubuntu-multipleinstance.rst>`_
17+
This will install the OpenMOOC modifications to askbot and the OpenMOOC theme for
18+
Askbot.

source/install/engine.rst

-22
This file was deleted.

source/install/installfaq.rst renamed to source/install/faq.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
==========================
2-
Frequently Aksed Questions
1+
Frequently Asked Questions
32
==========================
43

54
.. note:: This section is live.

source/install/general.rst

-68
This file was deleted.

0 commit comments

Comments
 (0)