creating your own server start-points

cyber-dojo's new architecture has customisable start-points.
If you want to use your own start-points you do not need to build a new web server image.

preparing your custom/languages start-point

  • Create a folder for the start-point
    eg
    $ md douglas
  • In the top-level folder create a file start_point_type.json
    eg
    $ touch douglas/start_point_type.json
    This file must specify the type of start-point.
    • languages (the type where setup will ask for an exercise)
      { 'type' : 'languages' }
    • custom (the type where setup will not ask for an exercise)
      { 'type' : 'custom' }
  • Create a sub-folder for each start-point entry
    eg
    $ md douglas/first
  • Create a manifest.json file in each folder
    eg
    $ nano douglas/first/manifest.json
  • Here's an example. Here's an explanation of the manifest.json format.
  • In each folder create the visible files named in manifest.json
    Here's an example



preparing your exercises start-point

  • Create a folder for the start-point
    eg
    $ md arthur
  • In the top-level folder create a file start_point_type.json
    eg
    $ touch arthur/start_point_type.json
    This file must specify the type of start-point.
    { 'type' : 'exercises' }
  • Create a sub-folder for each exercise
    eg
    $ md arthur/first
  • Create an instructions file in each folder
    $ nano arthur/first/instructions
    Here's an example



creating your start-point

Use the cyber-dojo script to create a new start-point. For example
$ cd douglas $ [sudo] ./cyber-dojo start-point create adams --dir=${PWD}
which attempts to create a start-point called adams from all the files in the douglas directory. If the creation fails the cyber-dojo script will print diagnostics.


starting your server with your start-point

eg with a type=custom start-point called hiker
$ [sudo] ./cyber-dojo up --custom=hiker
eg with a type=languages start-point named adams
$ [sudo] ./cyber-dojo up --languages=adams
eg with a type=exercises start-point named arthur
$ [sudo] ./cyber-dojo up --exercises=arthur
eg with a combination
$ [sudo] ./cyber-dojo up --languages=adams --exercises=arthur


4 comments:

  1. Hi there !
    I used cyberdojo for one year now, and I am trying to create new exercices for my students.
    I followed the explanation of this page:
    creating a folder "toto" with "toto/start_point_type.json" in it, and a folder "toto/tp1" with a file "totot/tp1/instructions" containing the instructions for this tp1 exercice.
    But we I run the following command "./cyber-dojo start-point create TEST --dir=toto" it returns "FAILED...
    /data/setup.json: is missing"
    Where can I find information about this /data/setup.json ?
    And how can i provide template code for them (eg Hiker.java of Hiker-test.java)

    Thanks !

    ReplyDelete
  2. Few things to try...
    1) ensure everthing is up to date first
    $ cyber-dojo update

    2) use the fully qualified name of the dir. Eg
    $ cd toto
    $ cyber-dojo start-point create TEST --dir=${PWD}

    You provide template code-files with a start-point of type 'languages' or type 'custom'

    Hope this helps.

    ReplyDelete
    Replies
    1. Hello!
      I followed your advices and nothing changed... /data/setup.json not found.
      When I run "locate setup.json" it returns results with "_data/json" ; can we do something with this?

      But maybe I completely misunderstood the concept of start points and exercices ?
      I am just trying to quickly create hands-on sessions, with different assignments, in Java.
      So in your vocab, is it a custom or exercice start point ?

      Thanks a lot for your help and for your work !

      Delete
  3. Hi again,
    can I suggest we switch to email... I'm jon AT jaggersoft DOT com
    Thanks
    Jon

    ReplyDelete