You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 30, 2024. It is now read-only.
Docker containers (the Runestone application, redis cache, postgres DB, and Jobe code compilation).
16
14
17
15
.. note::
18
16
19
17
These instructions have been tested on Ubuntu 20.04 and should work on any version of Ubuntu 18.04+.
20
18
Installation on older versions of Ubuntu or other Linux distributions may require adjustments.
21
-
These instructions have also been tested on OS X. For Windows, use WSL, VirtualBox, or other similar virtualization software.
19
+
These instructions have also been tested on OS X. For Windows, use `WSL2 <https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#1-overview>`_, VirtualBox, or other similar virtualization software.
20
+
22
21
22
+
**Contents**
23
23
24
-
Contents
25
-
--------
26
24
.. contents::
25
+
:local:
27
26
28
27
29
28
Setup
@@ -40,18 +39,16 @@ To build a Docker application with the server and all its dependencies, download
# Run the build, choosing appropriate options for your case.
44
43
python3 docker_tools.py build <your options here>
45
44
46
-
This will take a while. But once built, you will not need to rebuild the image unless you need to modify settings
47
-
inside it. If you do need to modify a built image, you can either `shell into the built container <Shelling Inside>`_
48
-
to make changes or rebuild the image.
45
+
This will take a while. But once built, you will not need to rebuild the image unless you need to modify settings inside it. If you do need to modify a built image, you can either `shell into the built container <Shelling Inside>`_ to make changes or rebuild the image.
49
46
50
47
When this completes, **log out then back in** (reboot if using a VM) to update your group membership. Next, ``cd RunestoneServer``.
51
48
52
49
.. note::
53
50
54
-
All future commands should be run in the ``RunestoneServer`` directory unless instructions specify otherwise.
51
+
All future commands should be run in the ``RunestoneServer`` directory unless instructions specify otherwise. After the first **successful** invocation of ``python3 docker_tools.py build``, use the (newly-installed) ``docker-tools`` command, instead of ``python3 docker_tools.py``. For example, ``docker-tools build <your options here>``.
55
52
56
53
.. note:: VirtualBox
57
54
@@ -90,13 +87,11 @@ Python Settings
90
87
You also will also likely want to configure some options in the Python code. These options
91
88
will be in the file ``models/1.py`` (which is automatically created on the first build).
92
89
93
-
94
90
Again, if you are installing for local development/testing you should not need to modify
95
91
any of the settings. If you are installing for production, you will want/need to modify
96
92
some of them (so that things like sending students emails for lost passwords work).
97
93
See comments in the file for details.
98
94
99
-
100
95
.. warning::
101
96
102
97
You will NOT want to check either ``.env`` or ``models/1.py`` into source control. The
@@ -128,45 +123,40 @@ To stop all containers use:
128
123
129
124
docker-compose stop
130
125
131
-
132
126
To restart the containers, to reload configuration files or because you have added a new book,
133
127
do:
134
128
135
129
.. code-block:: bash
136
130
137
131
docker-compose restart
138
132
139
-
140
133
Or to just restart the Runestone container (which is generally the only one that needs to be updated):
141
134
142
135
.. code-block:: bash
143
136
144
137
docker-compose restart runestone
145
138
146
-
147
139
If you ever want to completely wipe the containers, stop them and then do:
148
140
149
141
.. code-block:: bash
150
142
151
143
docker-compose rm
152
144
153
145
154
-
4. Install `rsmanage`
155
-
156
-
The rsmanage command will run many useful commands inside the container for you. With rsmanage you can:
146
+
Introducing `rsmanage`
147
+
^^^^^^^^^^^^^^^^^^^^^^
148
+
The ``rsmanage`` command will run many useful commands inside the container for you. With ``rsmanage`` you can:
157
149
158
150
* Add a course - ``rsmanage addcourse``
159
151
* Add a user - ``rsmanage adduser``
160
-
* Get infromation about a course ``rsmanage courseinfo``
152
+
* Get information about a course ``rsmanage courseinfo``
161
153
* Build a book - ``rsmanage build --course bookname``
162
154
* Get a database shell in the current database ``rsmanage db``
163
155
164
-
And lots of other things. Just type ``rsmanage`` for a list of things it can do. For a list of options just type rsmanage and the subcommand you want followed by `--help`
156
+
...and lots of other things. Just type ``rsmanage`` for a list of things it can do. For a list of options just type ``rsmanage`` and the subcommand you want followed by ``--help``; for example, ``rsmanage build --help``.
165
157
166
-
To install rsmanage type ``pip install -e /path/to/RunestoneServer/rsmanage``
167
158
168
-
169
-
1. Add Books
159
+
4. Add Books
170
160
**************************
171
161
172
162
To add a book, you need to add its source code to the ``RunestoneServer/books/`` directory. For an existing
@@ -179,7 +169,6 @@ To add a book, you need to add its source code to the ``RunestoneServer/books/``
It is important that the folder name for the book matches the ``project_name`` set in its ``pavement.py``.
@@ -188,7 +177,7 @@ To add a book, you need to add its source code to the ``RunestoneServer/books/``
188
177
If there is a mismatch, you will want to rename the folder you cloned the code into so that it
189
178
matches the ``project_name``.
190
179
191
-
After cloning a book, you may need to add it to the database. Most of the standard books are already there, but you can use ``rsmanage addcourse`` to add it if needed.
180
+
After cloning a book, you may need to add it to the database. Most of the standard books are already there, but you can use ``rsmanage addcourse`` to add it if needed.
192
181
You also need to rebuild after making any edits/updates to a book.
193
182
194
183
.. code-block:: bash
@@ -201,7 +190,6 @@ You can also have ``rsmanage`` clone the book for you the first time you want to
0 commit comments