.. _server_import_setup: Server Import ============= What is the Server Import? -------------------------- The ``Server Import`` cron job connects to the d3VIEW sever, as configured in the Lucy config. Once connected it will check with the scheduler or locate server config files on a local disk to import into d3VIEW. The d3VIEW HPC Server configuration sections that can be imported are queues and solvers. Configure Server Import ----------------------- The option :option:`-mode` can be used to specify the replacement mode for combining queues and solvers for the HPC Server. Without this option, solver attributes will only be updated if a change has been made, or added if the existing option was not previously defined. The section ``import_server_config`` in the d3view.json file contains a list of ids which are hidden as well as a mapping to map keys in the xml to a d3VIEW reserved key name. For example:: "hidden_ids": [ "debug_mode" ], "import_mapping": [ { "d3view_reserved_key": "solver_queue", "custom_key_name": "queue" }, { "d3view_reserved_key": "solver_input_file", "custom_key_name": "i" } ] How to run ---------- The ``Server Import`` cron job can be used by invoked ``Lucy`` manually or in a crontab. The most basic command is:: $ lucy server import :program:`lucy` :program:`server` :program:`import` Arguments --------- ``Server Import`` comes with a number of arguments to allow flexibility when importing data. All arguments are shown directly below, with links to their sections. +--------------------------------+------------------+ | Parameter name | When required | +================================+==================+ +--------------------------------+------------------+ |:option:`-server-to-update` | | +--------------------------------+------------------+ |:option:`-mode` | | +--------------------------------+------------------+ |:option:`-from-files` | | +--------------------------------+------------------+ |:option:`-only-import-queues` | | +--------------------------------+------------------+ |:option:`-log-file` | | +--------------------------------+------------------+ |:option:`-legacy-queues` | | +--------------------------------+------------------+ .. option:: -server-to-update Specifies the HPC Server to update. This should exactly match the name of the HPC Server in d3VIEW. **If this is not specified, all HPC Servers will be updated.** .. option:: -mode There are 4 modes for merging the data: 1) default : merges changes 2) append : only appends new solvers, does not append attributes to existing solvers 3) values : appends new solvers and new attributes, and only updates ``default_value`` and ``values`` of solver attributes 4) append_attributes : appends new solvers and new attributes, but does not update the existing attributes 5) replace_all : replaces all solvers with imported data .. option:: -from-files Set this option to import the data from files as specified in the d3VIEW HPC server, otherwise the import load data from the scheduler .. option:: -only-import-queues If this option is set, the solvers will not be imported, and only queues will be imported. .. option:: -log-file Path to the log file to be written. .. option:: -legacy-queues This allows the import to work for older versions of d3VIEW with the old style queues.