summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2018-01-02 18:24:27 +0530
committerankitjavalkar2018-01-04 12:51:43 +0530
commit2846e4372bb5d255c9b4405456b133f174916893 (patch)
treea2c030c382ce79d63cb75835954aa4bca2c36cb8
parent7d7cc537f908db40ca6f3b10cc2c10d597b2877a (diff)
downloadonline_test-2846e4372bb5d255c9b4405456b133f174916893.tar.gz
online_test-2846e4372bb5d255c9b4405456b133f174916893.tar.bz2
online_test-2846e4372bb5d255c9b4405456b133f174916893.zip
- Update README_production.rst to fix incorrect commands, links and formatting
- Remove README inside docker folder
-rw-r--r--README_production.rst40
-rw-r--r--docker/README.md30
-rw-r--r--online_test/.env.sample16
-rw-r--r--tasks.py2
4 files changed, 25 insertions, 63 deletions
diff --git a/README_production.rst b/README_production.rst
index 29d79e5..a9bd55b 100644
--- a/README_production.rst
+++ b/README_production.rst
@@ -3,14 +3,13 @@ Production Deployment
This README provides documentation to help deploy Yaksh in a production
environment. If you wish to take Yaksh on a trial run, here is a
-[Quickstart Guide]
-(https://github.com/FOSSEE/online\_test/blob/master/README.md)
+`Quickstart Guide <https://github.com/FOSSEE/online\_test/blob/master/README.rst>`__
###################
Deploying Locally
###################
-Follow these steps to deploy locally on the server. For deployment instructions using Docker see :ref:`deploying-multiple-dockers`.
+Follow these steps to deploy locally on the server. For deployment instructions using Docker see `Deploying Multiple Dockers <https://github.com/FOSSEE/online_test/blob/add-docker-compose-test/README_production.rst#deploying-multiple-dockers>`__
Pre-Requisite
^^^^^^^^^^^^^
@@ -56,7 +55,10 @@ Installation & Usage
To install this app follow the steps below:
1. Clone this repository and cd to the cloned repo.
- ``$ git clone https://github.com/FOSSEE/online_test.git``
+
+ ::
+
+ $ git clone https://github.com/FOSSEE/online_test.git
2. Rename the ``.sampleenv`` to ``.env``
@@ -98,7 +100,8 @@ To install this app follow the steps below:
that this will likely spawn multiple processes as "nobody" depending
on the number of server ports specified.
- You can also use a Dockerized code server, see :ref:`dockerized-code-server`.
+ You can also use a Dockerized code server, see `Dockerized Code Server <https://github.com/FOSSEE/online_test/blob/add-docker-compose-test/README_production.rst#using-dockerized-code-server>`__
+
6. The ``wsgi.py`` script should make it easy to deploy this using
mod\_wsgi. You will need to add a line of the form:
@@ -109,7 +112,7 @@ To install this app follow the steps below:
to your apache.conf. For more details see the Django docs here:
- https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
+ https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
7. Create a Superuser/Administrator:
@@ -125,9 +128,7 @@ To install this app follow the steps below:
each user. Users can potentially write output into these that can be
used for checking later.
-10. As admin user you can visit http://desired\_host\_or\_ip/exam/monitor to view results
- and user data interactively. You could also "grade" the papers
- manually if needed.
+10. As admin user you can visit http://desired\_host\_or\_ip/exam/monitor to view results and user data interactively. You could also "grade" the papers manually if needed.
.. _dockerized-code-server:
@@ -137,14 +138,20 @@ Using Dockerized Code Server
1. Install
`Docker <https://docs.docker.com/engine/installation/>`__
-2. Go to the directory where the project is located cd
- /path/to/online\_test
+2. Go to the directory where the project is located
+
+ ::
-3. Create a docker image. This may take a few minutes docker build -t
- yaksh\_code\_server -f ./docker/Dockerfile\_codeserver
+ cd /path/to/online_test
-4. Check if the image has been created using the output of, docker
- images
+3. Create a docker image. This may take a few minutes,
+
+ ::
+
+ docker build -t yaksh_code_server -f ./docker/Dockerfile_codeserver
+
+4. Check if the image has been created using the output of ``docker
+ images``
5. Run the invoke script using the command ``invoke start`` The command
will create and run a new docker container (that is running the
@@ -153,6 +160,7 @@ Using Dockerized Code Server
6. You can use ``invoke --list`` to get a list of all the available commands
+
.. _deploying-multiple-dockers:
######################################
@@ -211,7 +219,7 @@ Follow these steps to deploy and run the Django Server, MySQL instance and Code
::
- invoke clean
+ invoke remove
12. You can use ``invoke --list`` to get a list of all the available commands
diff --git a/docker/README.md b/docker/README.md
deleted file mode 100644
index 34e30da..0000000
--- a/docker/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-#### Pre-Requisites
-
- 1. Install Docker https://docs.docker.com/engine/installation/
- 2. Install Docker Compose https://docs.docker.com/compose/install/#install-compose
- 3. install git
-
-
-#### Help for deploying Yaksh interface.
-
- - To get help while deployment
- $ make help
-
- - Clone yaksh form github:
- $ make clone
-
- - Build docker images:
- $ make build
-
- - To run containers:
- $ make start
-
- - You need to create super a user to work with yaksh:
- $ make createsuperuser
-
- - Now Your interface is ready. You can access it using browser just go to http://localhost:8000
-
- - Clean your docker containers:
- $ make clean
-
- - other utilities like restart, tail, status
diff --git a/online_test/.env.sample b/online_test/.env.sample
deleted file mode 100644
index 14fcf89..0000000
--- a/online_test/.env.sample
+++ /dev/null
@@ -1,16 +0,0 @@
-# Django settings
-
-SECRET_KEY=dUmMy_s3cR3t_k3y
-#DB_ENGINE=mysql
-#DB_NAME=name_of_db
-#DB_USER=name_of_db_user
-#DB_PASSWORD=db_password
-#DB_HOST=db_hostname
-#DB_PORT=8180
-
-# Yaksh settings
-
-#N_CODE_SERVERS=5
-#SERVER_POOL_PORT=55555
-#SERVER_HOST_NAME=http://localhost
-#SERVER_TIMEOUT=4
diff --git a/tasks.py b/tasks.py
index 4a29c4d..8396723 100644
--- a/tasks.py
+++ b/tasks.py
@@ -63,7 +63,7 @@ def serve(ctx):
@task
def clean(ctx):
print("** Discarding database **")
- ctx.run("rm -rf {0}".format(os.path.join(SCRIPT_DIR, 'db.sqlite3')))
+ remove_check_file(os.path.join(SCRIPT_DIR, 'db.sqlite3'))
@task
def getimage(ctx, image=SRC_IMAGE_NAME):