Skip to content
Snippets Groups Projects
Commit edd30828 authored by michael.minelli's avatar michael.minelli
Browse files

Wiki => Reorganisation

parent cf08355f
No related branches found
No related tags found
1 merge request!2Adds a first version of the wiki documentation
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
File moved
File moved
# Installation of the Dojo CLI
1. Download the latest stable version (without "-dev" suffix) from the releases: <https://gitedu.hesge.ch/dojo_project/projects/ui/dojocli/-/releases>
![releases](../figures/releases.png)
2. Download the executable corresponding to your OS and architecture.
- ℹ️ For macOS users you can use the pkg version that install the binary at the right place (so you can ignore the next point).
3. Put it in your path. For
- ℹ️ Linux user this may be `$HOME/.local/bin` for example.
4. Verify your installation is working correctly by calling the `dojo` CLI.
```bash
dojo
```
```console
Usage: dojo [options] [command]
CLI of the Dojo application
Options:
-h, --help display help for command
-H, --host <string> override the Dojo API endpoint (default: "https://rdps.hesge.ch/dojo/api")
-V, --version output the version number
Commands:
assignment manage an assignment
exercise manage an exercise
help [command] display help for command
session manage Dojo and Gitlab sessions
```
As you can see calling the `dojo` command shows the help menu.
\ No newline at end of file
# Authentication to the Dojo
The authentication is done in two steps: login into the dojo app and into https://gitedu.hesge.ch (through an API token).
1. Login into the dojo application:
```bash
dojo session application login --user <email>
```
```console
? Please enter your password [hidden]
Please wait while we are logging in you to Dojo...
✔ Logged in
✔ Teaching staff permissions
✔ Student permissions
```
2. Register the API token (see below) for Gitlab
```bash
dojo session gitlab login <token>
```
```console
Please wait while we are testing your Gitlab token...
ℹ Checking Gitlab token:
✔ Read access
✔ Write access
```
The API token can be created by (see <https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html> for more informations):
- Logging into <https://gitedu.hesge.ch>
- **Preferences -> Access Tokens**
- Give a name to your token and a validity
- Tick the **api** box
- Click the **Create personal access token**
3. Test if it is working
```bash
dojo session test
```
```console
ℹ Checking Dojo session:
✔ The session is valid
✔ Teaching staff permissions
✔ Student permissions
ℹ Checking Gitlab token:
✔ Read access
✔ Write access
```
Good news. You can use the Dojo!
# Assignment creation
The assignment is created by a member of the teaching staff and is the basis for students to perform their exercise.
1. To create an assignment
```bash
dojo assignment create --name <unique_name>
```
```console
Please wait while we verify and retrieve data...
ℹ Checking Dojo session:
✔ The session is valid
✔ Teaching staff permissions
ℹ Checking Gitlab token:
✔ Read access
✔ Write access
✔ Assignment name "unique_name" is available
Please wait while we are creating the assignment...
✔ Assignment successfully created
ℹ Name: unique_name
ℹ Web URL: https://gitedu.hesge.ch/dojo/assignment/unique_name
ℹ HTTP Repo: https://gitedu.hesge.ch/dojo/assignment/unique_name.git
ℹ SSH Repo: ssh://git@ssh.hesge.ch:10572/dojo/assignment/unique_name.git
```
where `<unique_name>` is the name of the assignment. By default only the creator of the exercise is added to
the assignment (which is just a git repository with some configuration files in it).
There are several other options that can be provided:
```bash
dojo assignment create --name <unique_name> --template <url>
```
where `<url>` is the url of the template repository one may want to use as a basis for the assignment-
```bash
dojo assignment create --name <unique_name> --members_username <usernames>
```
where `<usernames>` is a list of gitedu usernames that will be given the same permissions as the
user creating the assignment.
As usual one can show the help menu by typing
```bash
dojo assignment create --help
```
Or you may just enter (`--help` is implicit in most commands)
```bash
dojo assignment create
```
2. Clone the repository of the assignment that was just created:
```bash
git clone ssh://git@ssh.hesge.ch:10572/dojo/assignment/unique_name.git
```
3. Modify the `unique_name` assignment as you want (modify the Dockerfile, docker-compose.yml files, add a readme, source code, compilation tools, etc.). Commit and push our work (soon™ more details will be provided on how to create assignment).
4. Once the assignment is done it must be published to be available to students:
```bash
dojo assignment publish unique_name
```
```console
? Are you sure you want to publish this assignment? Yes
Please wait while we verify and retrieve data...
ℹ Checking Dojo session:
✔ The session is valid
ℹ Checking assignment:
ℹ unique_name
✔ The assignment exists
✔ You are in the staff of this assignment
Please wait while we publish the assignment...
✔ Assignment unique_name successfully published
```
\ No newline at end of file
# How to use the dojo CLI (version 2.0) # Exercise creation
There are four different parts covered in this chapter:
- [Installation](#installation)
- [Authentication](#authentication)
- [Create an assignment](#create-an-assignment)
- [Create an exercise](#create-an-exercise)
## Installation
1. Download the latest stable version (without "-dev" suffix) from the releases: <https://gitedu.hesge.ch/dojo_project/projects/ui/dojocli/-/releases>
![releases](uploads/eb9eb5b2434d709aa8787aee0d0405ce/releases.png)
2. Download the executable corresponding to your OS and architecture.
- ℹ️ For macOS users you can use the pkg version that install the binary at the right place (so you can ignore the next point).
3. Put it in your path. For
- ℹ️ Linux user this may be `$HOME/.local/bin` for example.
4. Verify your installation is working correctly by calling the `dojo` CLI.
```bash
dojo
```
```console
Usage: dojo [options] [command]
CLI of the Dojo application
Options:
-h, --help display help for command
-H, --host <string> override the Dojo API endpoint (default: "https://rdps.hesge.ch/dojo/api")
-V, --version output the version number
Commands:
assignment manage an assignment
exercise manage an exercise
help [command] display help for command
session manage Dojo and Gitlab sessions
```
As you can see calling the `dojo` command shows the help menu.
## Authentication
The authentication is done in two steps: login into the dojo app and into https://gitedu.hesge.ch (through an API token).
1. Login into the dojo application:
```bash
dojo session application login --user <email>
```
```console
? Please enter your password [hidden]
Please wait while we are logging in you to Dojo...
✔ Logged in
✔ Teaching staff permissions
✔ Student permissions
```
2. Register the API token (see below) for Gitlab
```bash
dojo session gitlab login <token>
```
```console
Please wait while we are testing your Gitlab token...
ℹ Checking Gitlab token:
✔ Read access
✔ Write access
```
The API token can be created by (see <https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html> for more informations):
- Logging into <https://gitedu.hesge.ch>
- **Preferences -> Access Tokens**
- Give a name to your token and a validity
- Tick the **api** box
- Click the **Create personal access token**
3. Test if it is working
```bash
dojo session test
```
```console
ℹ Checking Dojo session:
✔ The session is valid
✔ Teaching staff permissions
✔ Student permissions
ℹ Checking Gitlab token:
✔ Read access
✔ Write access
```
Good news. You can use the Dojo!
## Create an assignment
The assignment is created by a teacher typically and is the basis for students to perform their exercise.
1. To create an assignment
```bash
dojo assignment create --name <unique_name>
```
```console
Please wait while we verify and retrieve data...
ℹ Checking Dojo session:
✔ The session is valid
✔ Teaching staff permissions
ℹ Checking Gitlab token:
✔ Read access
✔ Write access
✔ Assignment name "unique_name" is available
Please wait while we are creating the assignment...
✔ Assignment successfully created
ℹ Name: unique_name
ℹ Web URL: https://gitedu.hesge.ch/dojo/assignment/unique_name
ℹ HTTP Repo: https://gitedu.hesge.ch/dojo/assignment/unique_name.git
ℹ SSH Repo: ssh://git@ssh.hesge.ch:10572/dojo/assignment/unique_name.git
```
where `<unique_name>` is the name of the assignment. By default only the creator of the exercise is added to
the assignment (which is just a git repository with some configuration files in it).
There are several other options that can be provided:
```bash
dojo assignment create --name <unique_name> --template <url>
```
where `<url>` is the url of the template repository one may want to use as a basis for the assignment-
```bash
dojo assignment create --name <unique_name> --members_username <usernames>
```
where `<usernames>` is a list of gitedu usernames that will be given the same permissions as the
user creating the assignment.
As usual one can show the help menu by typing
```bash
dojo assignment create --help
```
Or you may just enter (`--help` is implicit in most commands)
```bash
dojo assignment create
```
2. Clone the repository of the assignment that was just created:
```bash
git clone ssh://git@ssh.hesge.ch:10572/dojo/assignment/unique_name.git
```
3. Modify the `unique_name` assignment as you want (modify the Dockerfile, docker-compose.yml files, add a readme, source code, compilation tools, etc.). Commit and push our work (soon™ more details will be provided on how to create assignment).
4. Once the assignment is done it must be published to be available to students:
```bash
dojo assignment publish unique_name
```
```console
? Are you sure you want to publish this assignment? Yes
Please wait while we verify and retrieve data...
ℹ Checking Dojo session:
✔ The session is valid
ℹ Checking assignment:
ℹ unique_name
✔ The assignment exists
✔ You are in the staff of this assignment
Please wait while we publish the assignment...
✔ Assignment unique_name successfully published
```
## Create an exercise
The exercise is an instance of a **published assignment** to be performed by students (or group of students). The exercise is an instance of a **published assignment** to be performed by students (or group of students).
......
...@@ -2,12 +2,20 @@ ...@@ -2,12 +2,20 @@
In this wiki you will find the documentation related to the `dojo` CLI. In this wiki you will find the documentation related to the `dojo` CLI.
* [User documentation](CLI-user-documentation)
## Assignment documentation
* [Assignment creation](CLI-assignment-creation)
## Exercise documentation ## User documentation
* [How to perform an exercise](CLI-exercise-perform) * [Installation of the CLI](UserDocumentation/0-Installation)
* [Authentification](UserDocumentation/1-Authentification)
* [Assignment creation](UserDocumentation/2-Assignment-creation)
* [Exercice creation](UserDocumentation/3-Exercise-creation)
## Tutorials / Exemples
### Students / Everyone
* [How to perform an exercise](Tutorials/0-Exercise-perform)
### Teaching staff
* [How to create and publish an assignment](Tutorials/1-Assignment-creation)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment