wiki:docs_appconfig

application configuration json

  • this is currently for the html5 language setup (could be enabled in other languages execution models)

A typical appconfig.json (located in the base directory) will look like:

{
  "mail" : {
                "admin"    : "someone@someplace.net"
                ,"from"     : "someotherplace.net"
                ,"feedback" : "somefeedback@someplace.net"
                ,"smtp"     : {
                              "host"     : "some-smtpserver.domain.net"
                              ,"user"     : "some-user@somewhere.net"
                              ,"password" : "encrypted-pw"
                              }
            }
  ,"hostip" : "160.36.200.43"
  ,"messaging" : {
                  "wsport"     : 8080
                  ,"zmqhostip" : "1.2.3.4"
                  ,"zmqport"   : 12342
                  ,"udphostip" : "1.2.3.4"
                  ,"udpport"   : 12343
                 }
  ,"resources" : {
                  "local"     : ""
                  ,"compute0" : "ssh compute-0-0"
                  ,"compute1" : "ssh compute-0-1"
                 }
  ,"restricted" : {
                  "admin"  : [ "username1", "username2" ]
                  ,"other" : [ "bob", "carol" ]
                  }
  ,"joblimits"  : {
                   "default"   : 2
                   ,"restricted" : {
                     "admin" : "unlimited"
                    }
                   ,"users" : {
                     "username2" : 4
                    }
                  }
  ,"submitblock" : {
      "all" : {
          "text" : "Submission of jobs is currently disabled due to issues with the server."
          ,"allow" : "admin"
          ,"active" : 0
      }
      ,"compute0" : {
          "text" : "Submission of jobs to compute0 is currently disabled due to issues with the server"
          ,"allow" : "admin"
          ,"active" : 1
      }
      ,"compute1" : {
          "text" : "Submission of jobs to compute1 is currently disabled since it is down"
          ,"allow" : "admin"
          ,"active" : 1
      }
  }
  ,"motd" : {
     "text" : "motd text"
     ,"file" : "/location/of/motd/file"
     ,"active" : 1
  }
  ,"resourcedefault" : "local"
  ,"submitpolicy"    : "login"
}

Comments:

mail

  • The "mail" section defines mail server information for sending registration & password forgot messages
    • The "mail:admin" defines the administrator email for internal messages
    • The "mail:from" defines the "from" for email sent
    • The "mail:feedback" defines an email address for feedback messages
    • The optinal "mail:smtp" defines parameters for stmp mail if needed (otherwise, a postfix or sendmail system needs to be configured on the server)

network

  • The "hostip" should be the IP of the webserver
  • The "hostname" should be the FQDN of the webserver or, if not available, the IP
  • The "messaging" section configures the websocket, zmq and udp messaging server ips and ports

resources

  • The "resources" control execution location
    • in this case we have 3 resources configured
      1. local (direct execution on the webserver - probably not a good idea in general, but may be ok for very small footprint modules)
        • a local definition is *required* for system modules, such as logging in
      2. compute0 : this is an ssh compute node accessible from the webserver. As long as the modules' executables are available to run and ssh keys are setup, the webserver will run the job via ssh to compute-0-0
      3. compute1 : as compute0

resourcedefault

  • The "resourcedefault" defines the global default resource for module execution
    • module specific overrides are possible in the module json

submitpolicy

  • The "submitpolicy" defines the global default for module submission
    • It can restrict module submission to only logged in users ("login") or anyone ("all") [later to include "approved"]
    • module specific overrides are possible in the module json

restricted

  • the "restricted" object contains a set of tags (in the above example, "admin" and "other") whose value is a list of user names.

joblimits

  • the "joblimits" object contains information that can restrict the number of jobs a user is allowed to have simultaneously running.
    • the "default" value is the global default for the limit
    • the "restricted" section contains limits for users that belong to any of the "restricted" entries.
      • if a user belongs to multiple "restricted" groups, the most permissive (i.e. maximum joblimit) will be applied
    • the "users" section contains user specific limits
      • these will *override* any other values if specified (i.e. if they are also in a restricted group, the user specific value will hold regardless if it is larger or smaller)
    • any value for these limits can also be "unlimited"
      • this is actually set to 9e99, so if you need to run more simultaneous jobs than that, please get in touch, we would like to speak with you.
    • only jobs marked with a joblimit in the module.json will be effected by job limits
    • job limits are only in effect for users when logged on
    • a specific module's job can have any "jobweight", so instead of a default 1, a value of greater or less can be given
      • e.g. some jobs may be so heavy or light weight, that the administrator could assign a different weight

submitblock

  • the "submitblock" object controls resource specific job submission blocks
    • "active" must be set to 1 for the block to be active
      • this makes it easy to turn on and off without having to type in the whole section, as appconfig.json does not allow comments
    • "allow" allows a list of "restricted" names, whose users will be allowed to submit anyway (primarily for debugging)

motd

  • the "motd" object provides a method to inform the users
  • it is pretty basic and only currently shows on a reload of the webpage
    • this could be enhanced, please get in touch if you have thoughts on this
  • "active" must be set to 1 for the motd to be active
  • the optional "text" contains the text to display (you can use html for formatting)
  • the optional "file" contains the file whose contents will be displayed (as with "text", you can use html for formatting)
  • notes:
    • if you include both "text" and "file", both will be shown in one messagebox separated by a horizontal line
    • if the "text" and/or "file" are/is empty, no messagebox will be displayed
      • a convenient way to use this is to leave "active":1, use just the "file" tag and just edit the file contents
        • if the file missing, no messagebox will display, so you can just create and remove as needed
Last modified 9 days ago Last modified on Feb 17, 2018, 5:20:07 AM