Server Configuration: Difference between revisions
From ParaQ Wiki
Jump to navigationJump to search
Line 14: | Line 14: | ||
* 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. | * <Option> tags are options that will be presented to the user prior to starting a server. | ||
* An optional "readonly" attribute can be used to | * 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. | ||
* When a startup command is run, its environment will include all of the variables defined by <Option> tags, plus the following predefined variables: | * When a startup command is run, its environment will include all of the variables defined by <Option> tags, plus the following predefined variables: |
Revision as of 11:52, 23 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:
- "name" attributes are unique identifiers.
- "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.
- 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.
- <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
- 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.
- The "owner" attribute in a <Server> tag indicates the origin of a configuration, valid values currently are "user" (the configuration was setup by the user) or "site" (the configuration was setup by site administrators). The client uses this information to set policy, e.g: "site" configurations are read-only, only "user" configurations are stored in per-user preferences, etc.
<Servers> <Server name="localhost (reverse)" resource="csrc://localhost" owner="user"> <ManualStartup/> </Server> <Server name="localhost (simple)" 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 (fancy)" 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>