summaryrefslogtreecommitdiff
path: root/yaksh/documentation/installation.rst
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/documentation/installation.rst')
-rw-r--r--yaksh/documentation/installation.rst119
1 files changed, 40 insertions, 79 deletions
diff --git a/yaksh/documentation/installation.rst b/yaksh/documentation/installation.rst
index 57dc2fd..e4ec581 100644
--- a/yaksh/documentation/installation.rst
+++ b/yaksh/documentation/installation.rst
@@ -12,106 +12,67 @@ Installing Yaksh
**For installing Yaksh**
- * For latest stable release::
-
- $ pip install yaksh
+ 1. **Clone the repository**::
- * For the development version::
+ $ git clone https://github.com/FOSSEE/online_test.git
- $ pip install git+https://github.com/FOSSEE/online_test.git
+ 2. **Go to the online_test directory**::
-Quick Start
------------
-
-**In the terminal run**::
-
- yaksh create_demo [-p PATH] [project_name]
-
-* **project_name**
- The desired name of the django project. In case a project_name is not specified, the project is initialised with the name yaksh_demo
-* **PATH**
- An optional flag to specify where the django project will be installed. If PATH is not provided, the project is created in the current directory
-
-**Now execute**::
-
- $ yaksh run_demo
-
-This starts the web server at localhost
-
-**In a new terminal, execute**::
-
- $ sudo yaksh run_code_server
-
-This starts the code server
-
-**Open your browser and go to URL** ::
-
- http://localhost:8000/exam
-
-**Login as a teacher to edit the quiz or as a student to take the quiz Credentials:**
-
- For Student:
- * Username: student
- * Password: student
-
- For Teacher:
- * Username: teacher
- * Password: teacher
-
-**User can also login to the Default Django admin by going to URL**::
-
- http://localhost:8000/admin
+ $ cd ./online_test
-**And entering the following admin credentials**
- * Username: admin
- * Password: admin
+ 3. **Install the dependencies** -
+ * For Python 2 use::
-Running The Code Server
------------------------
+ $ pip install -r ./requirements/requirements-py2.txt
-**Local Instance**:
+ * For Python 3 (recommended) use::
-In a new terminal run the command::
+ $ pip install -r ./requirements/requirements-py3.txt
- cd /path/to/online_test
- sudo python -m yaksh.code_server
-
-Keep this instance running in the background
+Quick Start
+-----------
-**Using Docker**:
+1. **Start up the code server that executes the user code safely**:
+ * To run the code server in a sandboxed docker environment, run the command::
-1. Install docker
+ $ invoke start
-2. Create a Docker Image using the Docker file:
+ .. note::
- * Go to the directory where the project is located::
+ Make sure that you have Docker installed on your system beforehand.
+ Find docker installation guide `here <https://docs.docker.com/engine/installation/#desktop>`_.
- cd /path/to/online_test
+ * To run the code server without docker, locally use::
- * Build a docker image using the Dockerfile::
+ $ invoke start --unsafe
- sudo docker build --tag=yaksh_code_server:v1 .
+ .. note::
-3. Start a Docker container::
+ Note this command will run the yaksh code server locally on your machine and is susceptible to malicious code. You will have to install the code server requirements in sudo mode.
- docker run -d -p 8001:8001 -p 53579:53579 -v /path/to/online_test/yaksh/data:/src/yaksh/data yaksh_code_server:v1
+2. **On another terminal, run the application using the following command**
+ * To start the django server::
-**Note**:
- * The default ports on which the code server runs and the pool port on which the former ports are available is specified in online_test/yaksh/settings.py. The code server also supports multiple ports
+ $ invoke serve
- * The server port is 8001 by default, this can be changed in the settings::
-
- SERVER_PORTS = 8001
+ .. note::
- * Multiple ports can be specified as::
-
- SERVER_PORTS = [8001, 8002, 8003, 8004, 8005] # Or use range(8001, 8040) for larger number of ports
+ The serve command will run the django application server on the 8000 port and hence this port will be unavailable to other processes.
- * The default pool port is 53579 by default, this can be changed in the settings::
-
- SERVER_POOL_PORT = 53579
+3. **Open your browser and open the URL** - ``http://localhost:8000/exam``
- * The docker command to start a docker container when using multiple ports is::
+4. **Login as a teacher to edit the quiz or as a student to take the quiz**
- docker run -d -p 8001-8039:8001-8039 -p 53579:53579 yaksh_code_server:v1
+ * Credentials:
+ For Student:
+ * Username: student
+ * Password: student
+ For Teacher:
+ * Username: teacher
+ * Password: teacher
+
+5. **User can also login to the Default Django admin by going to URL and entering the following admin credentials** ``http://localhost:8000/admin``
+ For admin:
+ * Username: admin
+ * Password: admin