Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Options
    • --input-dir
      • Specifies the input directory of JS1 *.xml files for scheduling objects. Such files typically are located in the SCHEDULER_DATA/config/live folder. If you do not want to run the converter directly on the machine in which the *.xml files are located then you can copy the live folder or any sub-folder to a Unix or Windows machine on which to run the converter. The operating system of JobScheduler Master using the *.xml files is independent from the operating system of the converter.
      • The Converter recursively traverses the input directory.
    • --output-dir
      • Specifies the output directory to which converted .*json files are written. For a number of *.xml files there is a corresponding *.json file.
      • For each sub-directory of the input directory the corresponding sub-directory is created in the output directory.
      • On start-up the Converter removes existing files and sub-directories from the output directory.
    • --report-dir
      • The Converter will report to the specified directory by use of a number of .csv files the extent to which the conversion is successful:
        • parser_summary.csv: reports the number of objects found in the input directory and sub-directories.
        • parser_analyzer.csv: includes debugging information.
        • converter_summary.csv: reports the number converted objects per object type such as workflows and scheduled.
        • converter_warnings.csv: includes warnings about XML elements that could not be perfectly converted.
    • --archive
      • Specifies the path to an archive file with the .tar.gz (Unix) or .zip (Windows) extension that will be created by the Converter. Depending on the file extension the related archive format will be used on any OS platform.
      • The archive includes the *.json files of the output directory and can be used for later import into JS7, see JS7 - Inventory Export and Import.
      • An existing archive file will be overwritten.
    • --config
      • Specifies the location of the Converter Configuration File.. This file is required for the Converter to run. It includes a number of settings that can be adjusted.

...

Code Block
titleExample for running the Converter Start Script for Unix with more Arguments
linenumberstrue
./js7_convert_js1.sh \
    --input-dir=/var/sos-berlin.com/jobscheduler/config/live \
    --output-dir=/tmp/output
    --report-dir=/tmp/report
    --archive=/tmp/js7-import.tar.gzzip

# reads *.xml files directly from the Master's "live" sub-directory and creates the corresponding directory hierarchy in "/tmp/output";
# report files are written to "/tmp/report", the resulting archive file is written to "/tmp/js7-import.tar.gzzip".

Windows

Code Block
titleExample for running the Converter Start Script for Windows with minimum Arguments
linenumberstrue
js7_convert_js1.cmd --input-dir=C:\ProgramData\sos-berlin.com\jobscheduler\config\live

@rem reads *.xml files from the Master's "live" folder and creates the corresponding directory hierarchy in the "output" sub-directory of the working directory;
@rem reports are written to the "reports" sub-directory of the working directory, the resulting "js7_converted.zip" archive file is written to the working directory.

...

SettingsDefaultExplanation
agentConfig.forcedControllerId
Forces use of the given ControllerId for all generated agents.
agentConfig.defaultControllerId
This setting specifies the ControllerId for generated agents if the Master ID in JS1 (process_class.spooler_id) is empty.
agentConfig.forcedAgent

Forces use of the given Agent for all converted jobs.

Agent definition:

  • Expects a JSON value.
  • The JSON can be provided as:
    • JSON text
      or
    • JSON include file (relative to the properties file)
  • JSON elements:
    • NameDefaultExplanation
      platformUNIXForces use of the UNIX or WINDOWS platform.
      subagentClusterId
      Forces use the given subagentClusterId for converted jobs when an agentCluster is used.
      standaloneAgent
      See agent-schema.json.
      agentCluster
      See clusterAgent-schema.json.
  • Examples:
    • {"platform":"UNIX"}
      • Forces use of the UNIX platform for all converted jobs.
    •  {"standaloneAgent":{"url":"http://localhost:4445"}}
      • Forces use of the standalone Agents in all converted jobs with the given url.
    •  {"platform":"UNIX", "standaloneAgent":{"agentName":"forced_agent", "url":"http://localhost:4445"}}
      • Forces use of a standalone Agent forced_agent in all converted jobswith the given url.
agentConfig.defaultAgent
NameURL
default_agenthttp://localhost:4445

Without an Agent being specified the JS1 executes jobs with the Master. In JS7 an Agent has to be used. This setting specifies an Agent that is used for jobs that are executed with a Master in JS1.

The syntax for assignments: see agentConfig.forcedAgent Agent definition.

agentConfig.mappings

By default the Converter handles the mapping of Agent Names found in JS1 process classes (<process_class>) like this:

  • Agents are determined by the unique URL assigned the Agent in existing process classes.
  • The name of a process class is mapped
    • to a Standalone Agent if it includes a single Agent
    • to a Cluster Agent if it includes more than one Agent

The syntax for mapping includes:

<js1-agent-name>=<Agent definition>

<js1-agent-name> is the name of the JS1 Agent.
<Agent definition> see agentConfig.forcedAgent Agent definition..

Example:

js1_agent1={"platform":"UNIX", "standaloneAgent":{"agentName":"primaryAgent", "url":"http://unix:4445"}};js1_agent2={"platform":"WINDOWS", "standaloneAgent":{"agentName":"secondaryAgent", "url":"http://win:4445"}}

  • The process class js1_agent1 is mapped to the JS7 Agent with the name primaryAgent that is operated for Unix.
  • The process class js1_agent2 is mapped to the JS7 Agent with the name secondaryAgent that is operated for Windows.

or

 js1_agent1=examples/agent_standalone.json; js1_agent2=examples/cluster_agent.json

  • The process class js1_agent1 is mapped to the JS7 Agent defined in the examples/agent_standalone.json file.
  • The process class js1_agent2 is mapped to the JS7 Agent defined in the examples/cluster_agent.json file.

Any number of mappings are specified separated by a semicolon. This setting can be split across a number of lines by use the "\" line continuation character at the end of each line that should be continued.

...