Fixup: Links and newlines
This commit is contained in:
parent
a4a85ce1b8
commit
e48e7c693a
1 changed files with 27 additions and 51 deletions
78
README.md
78
README.md
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
*Behold, the (almighty) abgabesystem!**
|
*Behold, the (almighty) abgabesystem!**
|
||||||
|
|
||||||
The aim of this project is to automate the handling of students' homework
|
The aim of this project is to automate the handling of students' homework solutions using Gitlab.
|
||||||
solutions using Gitlab. So far It can
|
So far It can
|
||||||
|
|
||||||
- import student accounts from LDAP,
|
- import student accounts from LDAP,
|
||||||
- import a list of users from Stud.IP,
|
- import a list of users from Stud.IP,
|
||||||
|
@ -16,23 +16,15 @@ solutions using Gitlab. So far It can
|
||||||
|
|
||||||
## Setup Gitlab and CI runners
|
## Setup Gitlab and CI runners
|
||||||
|
|
||||||
There are multiple components involved in the abgabesystem. The CI script uses a
|
There are multiple components involved in the abgabesystem.
|
||||||
[https://github.com/timschubert/docker-abgabesystem](Docker Container) that
|
The CI script uses a [Docker Container](https://github.com/timschubert/docker-abgabesystem) that contains the Python module and the [https://jplag.ipd.kit.edu/](JPlag) plagiarism checker.
|
||||||
contains the Python module and the [https://jplag.ipd.kit.edu/](JPlag)
|
Another container with [Checkstyle](https://github.com/timschubert/docker-checkstyle) is optionally required for style checking of each student repository.
|
||||||
plagiarism checker. Another container with
|
|
||||||
[https://github.com/timschubert/docker-checkstyle](Checkstyle) is optionally
|
|
||||||
required for style checking of each student repository.
|
|
||||||
|
|
||||||
If you do not already have a working Gitlab instance see
|
If you do not already have a working Gitlab instance see [here](https://docs.gitlab.com/omnibus/README.html#installation) how to install and configure it.
|
||||||
[https://docs.gitlab.com/omnibus/README.html#installation](here) how to install
|
Additionally you will need the [Gitlab CI runner](https://docs.gitlab.com/runner/).
|
||||||
and configure it. Additionally you will need the
|
For performance reasons, you might want to have the CI runner on another host than Gitlab or otherwise limit the resources available to the runner (depending on the number of students and CI jobs).
|
||||||
[https://docs.gitlab.com/runner/](Gitlab CI runner). For performance reasons,
|
|
||||||
you might want to have the CI runner on another host than Gitlab or otherwise
|
|
||||||
limit the resources available to the runner (depending on the number of students
|
|
||||||
and CI jobs).
|
|
||||||
|
|
||||||
See [https://docs.gitlab.com/ce/administration/auth/ldap.html#doc-nav](here) on
|
See [here](https://docs.gitlab.com/ce/administration/auth/ldap.html#doc-nav) on how to configure LDAP authentication.
|
||||||
how to configure LDAP authentication.
|
|
||||||
|
|
||||||
## Install the python module
|
## Install the python module
|
||||||
|
|
||||||
|
@ -46,12 +38,9 @@ $ pip install .
|
||||||
|
|
||||||
## Set up the course
|
## Set up the course
|
||||||
|
|
||||||
To proceed, you need to have an
|
To proceed, you need to have an [API token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with administrative privileges.
|
||||||
[https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html](API token)
|
After having configured Gitlab and the runner, continue with setting up your course.
|
||||||
with administrative privileges. After having configured Gitlab and the runner,
|
Gitlab can only add existing users to projects, so we create pseudo-users that later will be fetched from LDAP, the first time each user logs in.
|
||||||
continue with setting up your course. Gitlab can only add existing users to
|
|
||||||
projects, so we create pseudo-users that later will be fetched from LDAP, the
|
|
||||||
first time each user logs in.
|
|
||||||
|
|
||||||
First create your course either using the Gitlab UI or
|
First create your course either using the Gitlab UI or
|
||||||
|
|
||||||
|
@ -59,10 +48,8 @@ First create your course either using the Gitlab UI or
|
||||||
$ abgabesystem courses -c <some_course>
|
$ abgabesystem courses -c <some_course>
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, since there is currently no API available to export a list of participants
|
Next, since there is currently no API available to export a list of participants from [https://www.studip.de/](Stud.IP), we use the CSV file (encoded as latin-1 🤢) that lists all students currently enrolled in the course.
|
||||||
from [https://www.studip.de/](Stud.IP), we use the CSV file (encoded as latin-1
|
This list may of course change from time to time, so make sure to re-run the script regularly.
|
||||||
🤢) that lists all students currently enrolled in the course. This list may of
|
|
||||||
course change from time to time, so make sure to re-run the script regularly.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ abgabesystem users -s <students.csv> -b <LDAP base domain> -p main
|
$ abgabesystem users -s <students.csv> -b <LDAP base domain> -p main
|
||||||
|
@ -70,20 +57,14 @@ $ abgabesystem users -s <students.csv> -b <LDAP base domain> -p main
|
||||||
|
|
||||||
Now create a fork of this repository inside the namespace of the course.
|
Now create a fork of this repository inside the namespace of the course.
|
||||||
|
|
||||||
This repository contains CI jobs that need their own
|
This repository contains CI jobs that need their own [Docker Container](https://github.com/timschubert/docker-abgabesystem).
|
||||||
[https://github.com/timschubert/docker-abgabesystem](Docker Container). Build
|
Build the container, push it to the container registry and create a new runner that uses the container.
|
||||||
the container, push it to the container registry and create a new runner that
|
You can also [automate this](https://docs.gitlab.com/ce/ci/docker/using_docker_build.html) using the CI scripts included in the Docker container projects and let your Gitlab CI build and deploy the updated containers for you.
|
||||||
uses the container. You can also
|
|
||||||
[https://docs.gitlab.com/ce/ci/docker/using_docker_build.html](automate this)
|
|
||||||
using the CI scripts included in the Docker container projects and let your
|
|
||||||
Gitlab CI build and deploy the updated containers for you.
|
|
||||||
|
|
||||||
Proceed by creating an API token that has access to the group of the course. Add
|
Proceed by creating an API token that has access to the group of the course.
|
||||||
this token as `PRIVATE_API_TOKEN` to the
|
Add this token as `PRIVATE_API_TOKEN` to the [secret variables](https://docs.gitlab.com/ce/ci/variables/) of the forked abgabesystem project.
|
||||||
[https://docs.gitlab.com/ce/ci/variables/](secret variables) of the forked
|
Then generate an SSH deploy key and add the private part as `SSH_PRIVATE_KEY` to the secret variables.
|
||||||
abgabesystem project. Then generate an SSH deploy key and add the private part
|
The key will be used by the CI script to fetch from the student projects.
|
||||||
as `SSH_PRIVATE_KEY` to the secret variables. The key will be used by the CI
|
|
||||||
script to fetch from the student projects.
|
|
||||||
|
|
||||||
Set up the the student projects using
|
Set up the the student projects using
|
||||||
|
|
||||||
|
@ -92,24 +73,19 @@ $ abgabesystem projects -c <some_course> -d <deploy key> -s <students.csv>
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Here deploy_key is the *PUBLIC* part of the deploy key. This creates one
|
Here deploy_key is the *PUBLIC* part of the deploy key.
|
||||||
project per student, that each is forked from a project where your example
|
This creates one project per student, that each is forked from a project where your example solutions will be stored (`<course>/solutions/solutions`).
|
||||||
solutions will be stored (`<course>/solutions/solutions`). Check that
|
Check that `<course>/solutions/` a contains project for each student.
|
||||||
`<course>/solutions/` a contains project for each student.
|
|
||||||
|
|
||||||
At last, you can add everyone with permission to view all student solutions to
|
At last, you can add everyone with permission to view all student solutions to the group of the course.
|
||||||
the group of the course.
|
|
||||||
|
|
||||||
## Checking student solutions
|
## Checking student solutions
|
||||||
|
|
||||||
When you have reachd the deadline for an exercise, push a new tag to
|
When you have reachd the deadline for an exercise, push a new tag to `<course>/abgabesystem` to trigger the plagiarism checker and automatically create a tag in each student project.
|
||||||
`<course>/abgabesystem` to trigger the plagiarism checker and automatically
|
|
||||||
create a tag in each student project.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git tag <exercise_name>
|
$ git tag <exercise_name>
|
||||||
$ git push --tags
|
$ git push --tags
|
||||||
```
|
```
|
||||||
|
|
||||||
Check the build artifacts of the CI job for the results of the plagiarism
|
Check the build artifacts of the CI job for the results of the plagiarism checker.
|
||||||
checker.
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue