local deployment steps
This commit is contained in:
70
content/deployment.asciidoc
Normal file
70
content/deployment.asciidoc
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
To start up the HTWK MOOC platform there are a few steps to follow, which will be layed out in the following sections. As container orchestration we need Nomad first, as it has to be installed on the host system. Once this precondition is met, we can start with the deployment using Docker compose.
|
||||||
|
|
||||||
|
**For a quick installation, all necessary instructions are printed in bold. The text gives a detailed explanation of the steps.**
|
||||||
|
|
||||||
|
== Installation of Nomad ==
|
||||||
|
**To install Nomad there should be a guide on the HashiCorp website: link:https://developer.hashicorp.com/nomad/docs/install[Nomad Installation Instructions]**.
|
||||||
|
After a successful installation (for example using a package repository), Nomad needs to be running on localhost using port 4646. Additionally, when enabled as systemd service it should be started automatically on system boot. Both should be set up by default.
|
||||||
|
|
||||||
|
To check if Nomad is running correctly, the following command can be used and should return the hostname of the instance:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl localhost:4646/v1/status/leader
|
||||||
|
```
|
||||||
|
|
||||||
|
Later on, this could be scaled to a cluster of multiple instances to keep the platform running on a larger scale.
|
||||||
|
|
||||||
|
The CodeOcean local setup guide advices to turn on Memory Oversubscription for Nomad now and with every subsequent restart of nomad with the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -X POST -d '{"SchedulerAlgorithm": "spread", "MemoryOversubscriptionEnabled": true}' http://localhost:4646/v1/operator/scheduler/configuration
|
||||||
|
```
|
||||||
|
|
||||||
|
This command is automatically executed when the Docker containers are started, so it is not necessary if the platform is started with Docker Compose.
|
||||||
|
|
||||||
|
== Pulling the CodeContender repository ==
|
||||||
|
The repository for the HTWK MOOC platform is hosted on the GitLab instance of the faculty DIT. It consists of submodules for Poseidon and Codeocean, which have to be initialized after cloning the repository.
|
||||||
|
|
||||||
|
**The repository can be cloned with the following commands:**
|
||||||
|
```
|
||||||
|
git clone https://gitlab.dit.htwk-leipzig.de/htwkmooc/codecontender.git
|
||||||
|
cd codecontender
|
||||||
|
git checkout submodules
|
||||||
|
git submodule update --init
|
||||||
|
```
|
||||||
|
|
||||||
|
Because the HPI repositories contain additional submodules, that are for internal use only and not necessary for the HTWK platform, the init command does not need to be recursive.
|
||||||
|
|
||||||
|
== Deployment with Docker Compose ==
|
||||||
|
|
||||||
|
To build and start the platform, Docker Compose is used. Default username and password for the admin can be changed in the `codeocean/docker-compose.yml` file. The default values are `support@htwkalender.de` and `htwkalender`.
|
||||||
|
**The following command downloads the necessary images, builds the containers and starts them:**
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose up --build
|
||||||
|
```
|
||||||
|
|
||||||
|
All data used by CodeOcean is stored in a Postgres database which is mounted
|
||||||
|
|
||||||
|
.This doesn't work yet, we have to manually go into the `poseidon` folder and copy `configuration.example.yaml` to `configuration.yaml` and adjust the following:
|
||||||
|
- `server.address` to `0.0.0.0`
|
||||||
|
- `nomad.address` to `host.docker.internal`
|
||||||
|
|
||||||
|
The rest seems to be left unchanged...
|
||||||
|
|
||||||
|
=== Checking access to CodeOcean ===
|
||||||
|
|
||||||
|
After starting up the Docker containers, the platform should be running on port 443 of the host system. This can be checked by navigating to https://localhost in a web browser on the host machine.
|
||||||
|
|
||||||
|
== Installing openEdx ==
|
||||||
|
|
||||||
|
The openEdx platform itself is not containerized, but there is a containerized distribution called Tutor, which can be deployed to a Kubernetes. Following the short installation process for a local deployment. Kubernetes instructions are following in the next section.
|
||||||
|
|
||||||
|
```
|
||||||
|
pip install tutor[full]
|
||||||
|
tutor local launch
|
||||||
|
```
|
||||||
|
|
||||||
|
After inputting the necessary information, all services should be running and the platform should be accessible on localhost. This can be checked by navigating to https://localhost on the host.
|
||||||
|
|
||||||
|
Problem is, that currently both platforms are running on the same port, so both can't be run at the same time.
|
1
content/dockerization-codeocean.asciidoc
Normal file
1
content/dockerization-codeocean.asciidoc
Normal file
@ -0,0 +1 @@
|
|||||||
|
One problem in the use of CodeOcean is the deployment. The installation instructions for CodeOcean are not comprehensive and only feature a development branch install, with a lot of installation steps to get the software working. They include Nomad as container orchestration instead of Kubernetes, which in itself doesn't run in Docker and therefore needs to be installed on the host system. Everything else, which is Codeocean with it's database and Poseidon, an interface between Codeocean and Nomad, was rewritten to run in Docker to simplify the deployment process. How this was done, and which configuration files are necessary is described in the following sections.
|
@ -14,11 +14,13 @@ cite:[noauthor_check50_nodate]
|
|||||||
|
|
||||||
The scalability of this solution consists of the use of GitHub repositories. The git-Wrapper `submit50` is used to store the solutions in a local repository and push them to GitHub, where CS50 staff can access them. cite:[noauthor_submit50_nodate]
|
The scalability of this solution consists of the use of GitHub repositories. The git-Wrapper `submit50` is used to store the solutions in a local repository and push them to GitHub, where CS50 staff can access them. cite:[noauthor_submit50_nodate]
|
||||||
|
|
||||||
=== CodeOcean ===
|
=== openHPI and CodeOcean ===
|
||||||
|
|
||||||
link:https://codeocean.openhpi.de/[CodeOcean]
|
link:https://codeocean.openhpi.de/[CodeOcean]
|
||||||
|
|
||||||
CodeOcean is a web based platform for practical programming tasks, that is used mainly in MOOCs (Massive Open Online Course) and was developed for openHPI, the MOOC platform of the Hasso Plattner Institute. It allows learners to write, execute and test code directly in their browser without the need to set up a development environment. Features include syntax highlighting, server-side code execution and automated feedback through unit tests. Additionally, learners can ask context-related questions, which makes it a collaborative learning environment.
|
The openHPI platform of the Hasso Plattner Institute in Potsdam (HPI) is an xMOOC (Massive Open Online Course) offer that focuses on video lectures, which are reused from existing recordings in form of podcasts at the HPI. It builds upon the Canvas LMS, which was chosen for its "modern user interface and the availability of crucial functional components [...]" cite:[totschnig_openhpi_2013].
|
||||||
|
|
||||||
|
The implemented solution for automatic grading of programming tasks in openHPI is CodeOcean, a web based platform separately developed at the HPI. It allows learners to write, execute and test code directly in their browser without the need to set up a development environment. Features include syntax highlighting, server-side code execution and automated feedback through unit tests. Additionally, learners can ask context-related questions, which makes it a collaborative learning environment.
|
||||||
|
|
||||||
The highlighted goals and requirements of this work are:
|
The highlighted goals and requirements of this work are:
|
||||||
- Versatility: Use of different programming languages possible
|
- Versatility: Use of different programming languages possible
|
||||||
|
Reference in New Issue
Block a user