From 592d3aec541932274e01ce7af4c2e7b430f8fcd3 Mon Sep 17 00:00:00 2001 From: jorg Date: Wed, 5 Jan 2022 14:01:49 +0100 Subject: [PATCH 1/4] Update readme to improve setup script for new users --- README.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cf27fc58a2..95f05cc934 100644 --- a/README.md +++ b/README.md @@ -36,17 +36,25 @@ If you want to help with development, issues tagged with the [student label](htt ``` 3. Create a `dodona` user with access to the `dodona` and `dodona_test-N` databases. You will need as much test databases as hou have CPU threads. ```sql + CREATE DATABASE dodona; + CREATE DATABASE dodona_test; + CREATE DATABASE `dodona_test-0`; + ... + CREATE DATABASE `dodona_test-N`; CREATE USER 'dodona'@'localhost' IDENTIFIED BY 'dodona'; - GRANT ALL ON dodona.* TO 'dodona'; - GRANT ALL ON dodona_test.* TO 'dodona'; - GRANT ALL ON dodona_test-0.* TO 'dodona'; + GRANT ALL ON dodona.* TO 'dodona'@'localhost'; + GRANT ALL ON dodona_test.* TO 'dodona'@'localhost'; + GRANT ALL ON `dodona_test-0`.* TO 'dodona'@'localhost'; ... - GRANT ALL ON dodona_test-3.* TO 'dodona'; + GRANT ALL ON `dodona_test-N`.* TO 'dodona'@'localhost'; ``` -4. Create and seed the database with `rails db:setup`. (If something goes wrong with the database, you can use `rails db:reset` to drop, rebuild and reseed the database.) +4. Install correct `ruby` version using [RVM](https://rvm.io/) and install `rails` +5. install correct `node` version using `nvm` and [yarn](https://yarnpkg.com/) +6. Run `bundle install` and `yarn install` +7. Create and seed the database with `rails db:setup`. (If something goes wrong with the database, you can use `rails db:reset` to drop, rebuild and reseed the database.) If the error "Could not initialize python judge" arises, use `SKIP_PYTHON_JUDGE=true rails db:setup` -5. [Start the server](#starting-the-server). The simplest way is with `rails s`. Dodona [will be available on a subdomain of localhost](#localhost-subdomain): http://dodona.localhost:3000. -6. Because CAS authentication does not work in development, you can log in by going to these pages (only works with the seed database from step 4) +8. [Start the server](#starting-the-server). The simplest way is with `rails s`. Dodona [will be available on a subdomain of localhost](#localhost-subdomain): http://dodona.localhost:3000. +9. Because CAS authentication does not work in development, you can log in by going to these pages (only works with the seed database from step 4) - `http://dodona.localhost:3000/nl/users/1/token/zeus` - `http://dodona.localhost:3000/nl/users/2/token/staff` - `http://dodona.localhost:3000/nl/users/3/token/student` @@ -55,8 +63,11 @@ If the error "Could not initialize python judge" arises, use `SKIP_PYTHON_JUDGE= These steps are not required to run the server, but you need docker to actually evaluate exercises. 1. Install and start `docker`. -2. Clone the [docker-images repository](https://github.com/dodona-edu/docker-images). -3. Build a docker image. The `build.sh` scripts builds all images. But with the initial data, only `dodona-python` is needed. You can build this image with `docker build --pull --force-rm -t "dodona-python" -f "dodona-python.dockerfile" .`. +2. run `docker pull dodona/dodona-python` + +If you want to build the docker images yourself: +1. Clone the [docker-images repository](https://github.com/dodona-edu/docker-images). +2. Build a docker image. The `build.sh` scripts builds all images. But with the initial data, only `dodona-python` is needed. You can build this image with `docker build --pull --force-rm -t "dodona-python" -f "dodona-python.dockerfile" .`. #### Loading visualisations locally These steps are not required to run the server, but are needed to let the visualisations load. From fe9f011aebd8712d5de73616fb47430a69548cac Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Wed, 5 Jan 2022 14:58:39 +0100 Subject: [PATCH 2/4] Improve readability and spelling in README Co-authored-by: Niko Strijbol --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 95f05cc934..6a05a63036 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ If you want to help with development, issues tagged with the [student label](htt ... GRANT ALL ON `dodona_test-N`.* TO 'dodona'@'localhost'; ``` -4. Install correct `ruby` version using [RVM](https://rvm.io/) and install `rails` -5. install correct `node` version using `nvm` and [yarn](https://yarnpkg.com/) +4. Install the correct `ruby` version using [RVM](https://rvm.io/) and install `rails` +5. Install the correct `node` version using `nvm` and [yarn](https://yarnpkg.com/) 6. Run `bundle install` and `yarn install` 7. Create and seed the database with `rails db:setup`. (If something goes wrong with the database, you can use `rails db:reset` to drop, rebuild and reseed the database.) If the error "Could not initialize python judge" arises, use `SKIP_PYTHON_JUDGE=true rails db:setup` From 08e005b6e04c98c5de7fe89e87572690fbef9f78 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Wed, 5 Jan 2022 16:09:30 +0100 Subject: [PATCH 3/4] Update README.md Co-authored-by: Charlotte Van Petegem --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a05a63036..a96d77b4ab 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ If the error "Could not initialize python judge" arises, use `SKIP_PYTHON_JUDGE= These steps are not required to run the server, but you need docker to actually evaluate exercises. 1. Install and start `docker`. -2. run `docker pull dodona/dodona-python` +2. Run `docker pull dodona/dodona-python` If you want to build the docker images yourself: 1. Clone the [docker-images repository](https://github.com/dodona-edu/docker-images). From 87d975136c79715a80302fded321738333339c6e Mon Sep 17 00:00:00 2001 From: jorg Date: Wed, 5 Jan 2022 16:17:42 +0100 Subject: [PATCH 4/4] Apply comments: remove unneeded code --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index a96d77b4ab..2b0fa917fe 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,6 @@ If you want to help with development, issues tagged with the [student label](htt ``` 3. Create a `dodona` user with access to the `dodona` and `dodona_test-N` databases. You will need as much test databases as hou have CPU threads. ```sql - CREATE DATABASE dodona; - CREATE DATABASE dodona_test; - CREATE DATABASE `dodona_test-0`; - ... - CREATE DATABASE `dodona_test-N`; CREATE USER 'dodona'@'localhost' IDENTIFIED BY 'dodona'; GRANT ALL ON dodona.* TO 'dodona'@'localhost'; GRANT ALL ON dodona_test.* TO 'dodona'@'localhost'; @@ -48,7 +43,7 @@ If you want to help with development, issues tagged with the [student label](htt ... GRANT ALL ON `dodona_test-N`.* TO 'dodona'@'localhost'; ``` -4. Install the correct `ruby` version using [RVM](https://rvm.io/) and install `rails` +4. Install the correct `ruby` version using [RVM](https://rvm.io/) 5. Install the correct `node` version using `nvm` and [yarn](https://yarnpkg.com/) 6. Run `bundle install` and `yarn install` 7. Create and seed the database with `rails db:setup`. (If something goes wrong with the database, you can use `rails db:reset` to drop, rebuild and reseed the database.)