Server Configuration: Difference between revisions

From ParaQ Wiki
Jump to navigationJump to search
Line 119: Line 119:


* "label" attributes are human-readable labels for use by the user interface.
* "label" attributes are human-readable labels for use by the user interface.
* The <Server> "resource" attribute specifies the type of server connection, server host(s) and optional port(s) for making a connection.  See [[Server Resources]].
* The <ManualStartup> tag indicates that the user will manually start the given server prior to connecting - no other configuration is necessary in this case.
* The <CommandStartup> tag is used to run an external command to start a server.
* The <CommandStartup> tag is used to run an external command to start a server.
* <Option> tags are options that will be presented to the user prior to starting a server.
* The <ManualStartup> tag indicates that the user will manually start the given server prior to connecting.
** <ManualStartup> may include an optional <Options> tag, which can be used to prompt the user for options required at startup, primarily PV_SERVER_PORT, PV_DATA_SERVER_PORT, PV_RENDER_SREVER_PORT, or PV_CONNECT_ID.
* Other startup tags may be added in the future to support e.g: builtin SSH client functionality.
* Other startup tags may be added in the future to support e.g: builtin SSH client functionality.
* <Option> tags are options that will be presented to the user prior to starting a server.
* An optional "readonly" attribute can be used to designate <Option> tags which are user-visible, but cannot be modified.
* An optional "readonly" attribute can be used to designate <Option> tags which are user-visible, but cannot be modified.
* <Argument> tags are command-line arguments that will be passed to the startup command when starting a server.
* <Argument> tags are command-line arguments that will be passed to the startup command when starting a server.

Revision as of 13:17, 31 August 2006

Overview

To simplify the user experience, many sites may opt to provide predefined ParaView server configurations for their users, which can be done with an external XML file - see Server Startup. Although server configuration is new to ParaView, similar functionality already exists in ParaView Enterprise. This page proposes an XML schema for storing server configurations that is based on the existing functionality.

Example

Following is an example of the proposed server configuration XML:

<Servers>

 <Server name="localhost (forward)" resource="cs://localhost" owner="site">
  <CommandStartup>
   <Command exec="cmd" timeout="120" delay="3">
    <Arguments>
     <Argument value="/c" />
     <Argument value="start" />
     <Argument value="/b" />
     <Argument value="pvserver" />
     <Argument value="--server-port=$PV_SERVER_PORT$" />
     <Argument value="--use-offscreen-rendering" />
    </Arguments>
   </Command>
  </CommandStartup>
 </Server>

 <Server name="localhost (forward - with port selection)" resource="cs://localhost" owner="site">
  <CommandStartup>
   <Options>
     <Option name="PV_SERVER_PORT" label="Port">
       <Range type="int" min="1" max="65535" step="1" default="11111" />
     </Option>
   </Options>
   <Command exec="cmd" timeout="120" delay="3">
    <Arguments>
     <Argument value="/c" />
     <Argument value="start" />
     <Argument value="/b" />
     <Argument value="pvserver" />
     <Argument value="--server-port=$PV_SERVER_PORT$" />
     <Argument value="--use-offscreen-rendering" />
    </Arguments>
   </Command>
  </CommandStartup>
 </Server>

 <Server name="localhost (reverse)" resource="csrc://localhost" owner="user">
  <ManualStartup/>
 </Server>

 <Server name="localhost (reverse - with port selection)" resource="csrc://localhost" owner="user">
  <ManualStartup>
   <Options>
     <Option name="PV_SERVER_PORT" label="Port">
       <Range type="int" min="1" max="65535" step="1" default="11111" />
     </Option>
   </Options>
  </ManualStartup>
 </Server>

 <Server name="jupiter" resource="cs://jupiter" owner="site" >
  <CommandStartup>
   <Options>
    <Option name="NODES" label="Number of Nodes">
     <Range type="int" min="1" max="1024" step="1" default="1" />
    </Option>
    <Option name="MINUTES" label="Number of Minutes">
     <Range type="int" min="1" max="3600" step="15" default="60" />
    </Option>
    <Option name="COMPURATE" label="Comp-U-Rate">
     <Range type="double" min="1" max="99999999" step="0.1" precision="1" default="1.5" />
    </Option>
    <Option name="PROJECTTASK" label="Project/Task">
     <String default="123/4.5" />
    </Option>
    <Option name="FLAVORENDER" label="Enable Flav-O-Render">
     <Boolean true="--flav-o-render" false="" default="true"/>
    </Option>
    <Option name="FLAVOR" label="Flavor">
     <Enumeration default="cherry">
      <Entry value="cherry" label="Cherry" />
      <Entry value="lime" label="Lime" />
      <Entry value="rutabaga" label="Rutabaga" />
     </Enumeration>
    </Option>
    <Option name="CONNECTID" label="Connection ID" readonly="true" >
     <Range type="int" min="1" max="65535" step="1" default="random" />
    </Option>
   </Options>
   <Command exec="cmd" timeout="120" delay="5">
    <Arguments>
     <Argument value="/c" />
     <Argument value="start" />
     <Argument value="/b" />
     <Argument value="mystartup" />
     <Argument value="--server-port=$PV_SERVER_PORT$" />
     <Argument value="--nodes=$NODES$" />
     <Argument value="--minutes=$MINUTES$" />
     <Argument value="--compurate=$COMPURATE$" />
     <Argument value="--project-task=$PROJECTTASK$" />
     <Argument value="$FLAVORENDER$" />
     <Argument value="--flavor=$FLAVOR$" />
     <Argument value="--connect-id=$CONNECTID$" />
    </Arguments>
   </Command>
  </CommandStartup>
 </Server>
 
</Servers>

Notes

  • The <Servers> tag is the root element of the document, which contains zero-to-many <Server> tags.
  • Each <Server> tag represents a configured server:
    • The "name" attribute uniquely identifies the server configuration, and is displayed in the user interface.
    • The "resource" attribute specifies the type of server connection, server host(s) and optional port(s) for making a connection. See Server Resources.
    • The "owner" attribute where the configuration originated, current valid values are "builtin" (the configuration was hard-coded into the application), "site" (the configuration was setup by site administrators), or "user" (the configuration was setup by the user). The client uses this information to set policy, e.g: "builtin" and "site" configurations are read-only, only "user" configurations are stored in per-user preferences, etc.
  • "label" attributes are human-readable labels for use by the user interface.
  • The <CommandStartup> tag is used to run an external command to start a server.
  • <Option> tags are options that will be presented to the user prior to starting a server.
  • The <ManualStartup> tag indicates that the user will manually start the given server prior to connecting.
    • <ManualStartup> may include an optional <Options> tag, which can be used to prompt the user for options required at startup, primarily PV_SERVER_PORT, PV_DATA_SERVER_PORT, PV_RENDER_SREVER_PORT, or PV_CONNECT_ID.
  • Other startup tags may be added in the future to support e.g: builtin SSH client functionality.
  • An optional "readonly" attribute can be used to designate <Option> tags which are user-visible, but cannot be modified.
  • <Argument> tags are command-line arguments that will be passed to the startup command when starting a server.
  • When a startup command is run, its environment will include all of the variables defined by <Option> tags, plus the following predefined variables:
    • PV_CONNECTION_URI
    • PV_CONNECTION_SCHEME
    • PV_SERVER_HOST
    • PV_SERVER_PORT
    • PV_DATA_SERVER_HOST
    • PV_DATA_SERVER_PORT
    • PV_RENDER_SERVER_HOST
    • PV_RENDER_SERVER_PORT
    • PV_USERNAME
  • If an <Option> tag defines a variable with the same name as a predefined variable, the <Option> tag value takes precedence.
  • When a startup command is run, string substitution is performed on its arguments, replacing each $STRING$ using the same collection of options and predefined variables.