From c5a8b2c72841ad0b58fb36870624737634778056 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 13 Oct 2018 03:10:03 +0200 Subject: HTMLize instructions and use jinja2 to render them Only fixed tasks for the kpov_2018 class for now. --- kpov_judge/tasks/ldap_search/task.py | 87 +++++++++++++++++++++++------------- 1 file changed, 56 insertions(+), 31 deletions(-) (limited to 'kpov_judge/tasks/ldap_search/task.py') diff --git a/kpov_judge/tasks/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py index 92a7223..485a2ae 100644 --- a/kpov_judge/tasks/ldap_search/task.py +++ b/kpov_judge/tasks/ldap_search/task.py @@ -5,59 +5,84 @@ # TODO: finish this! instructions = { - 'si':""" -Ustvari dva navidezna računalnika - SimpleArbiter z diskom simpleArbiterDhcp -ter LDAPServer. + 'si': '''\ +

+Ustvari dva navidezna računalnika: SimpleArbiter in LDAPServer. -Na LDAPServer namesti strežnik LDAP. Strežnik naj skrbi za domeno -DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si +

+Na LDAPServer namesti strežnik LDAP. Strežnik naj skrbi za domeno -V imeniku ustvari uporabnika -CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si +

DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-z geslom {LDAP_PASSWORD} in uporabnika -CN={BIND_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si -z geslom {BIND_PASSWORD} +

+V imeniku ustvari uporabnika -Poskrbi, da se bo lahko klient s simpleArbiterDhcp povezal na LDAP strežnik na LDAPServer. -V primeru, da se klient poveže kot {BIND_USERNAME} z geslom {BIND_PASSWORD}, +

CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ +

+z geslom {{LDAP_PASSWORD}} in uporabnika + +

CN={{BIND_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ +

+z geslom {{BIND_PASSWORD}}. + +

+Poskrbi, da se bo lahko klient s SimpleArbiter povezal na LDAP strežnik na LDAPServer. +V primeru, da se klient poveže kot {{BIND_USERNAME}} z geslom {{BIND_PASSWORD}}, naj strežnik omogoči spreminjanje podatkov za objekt -CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si -ter ustvarjanje novih objektov v DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si + +

CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ +

+ter ustvarjanje novih objektov v + +

DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
 
 CN = Common Name
 O = Organization
 OU = Organizational Unit
 DC = Domain Component
-""",
-    'en': """
-Create two virtual machines - SimpleArbiter using the disk simpleArbiterDhcp
-and LDAPServer.
+
+''', + 'en': '''\ +

+Create two virtual machines: SimpleArbiter and LDAPServer. -Set up an LDAP server on LDAPServer. Make it responsible for -DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si +

+Set up an LDAP server on LDAPServer. Make it responsible for +

DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ +

Create a user -CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si -with the password {LDAP_PASSWORD} and a user -CN={BIND_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si +

CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ +

+with the password {{LDAP_PASSWORD}}, and a user + +

CN={{BIND_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
-with the password {LDAP_PASSWORD} . +

+with the password {{LDAP_PASSWORD}} . -Make sure that a client from simpleArbiterDhcp can connect to the LDAP server on -LDAPServer. If the client identifies themself as {BIND_USERNAME} with the password -{BIND_PASSWORD}, allow it to change data for the object +

+Make sure that a client from SimpleArbiter can connect to the LDAP server on LDAPServer. If the client identifies themself as {{BIND_USERNAME}} with the password {{BIND_PASSWORD}}, allow it to change data for the object -CN={LDAP_USERNAME},ou=users,DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si -and to create objects in DC={DOMAIN},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si +

CN={{LDAP_USERNAME}},ou=users,DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
+ +

+and to create objects in + +

DC={{DOMAIN}},DC=kpov,DC=lusy,DC=fri,DC=uni-lj,DC=si
 
 CN = Common Name
 O = Organization
 OU = Organizational Unit
 DC = Domain Component
-
-"""
+
+''', } computers = { -- cgit v1.2.1 From 481fd30e6cc6fc242e9471ce08f676f4883a3e69 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 13 Oct 2018 19:16:45 +0200 Subject: Call write_default_config for arbiter in all KPOV 2018 tasks --- kpov_judge/tasks/ldap_search/task.py | 1 - 1 file changed, 1 deletion(-) (limited to 'kpov_judge/tasks/ldap_search/task.py') diff --git a/kpov_judge/tasks/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py index 485a2ae..29117db 100644 --- a/kpov_judge/tasks/ldap_search/task.py +++ b/kpov_judge/tasks/ldap_search/task.py @@ -208,4 +208,3 @@ objectClass: organization\r def prepare_disks(templates, task_params, global_params): write_default_config(templates['simpleArbiterDhcpGWLDAP'], global_params) - -- cgit v1.2.1