Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 'minimum configuration' added

...

  • Edit the ./bin/jobscheduler_agent_4441.sh script.

    • All environment variables in the instance script are initially commented out -  the default values will be used unless they are configured.
    • If you want to set an environment variable then the line with the variable has to be uncommented and a value specified following the syntax:

      • ENVIRONMENT_VARIABLE=value

        SCHEDULER_HOME

        This variable has to point to the installation path of the JobScheduler Universal Agent, e.g. /opt/sos-berlin.com/jobscheduler_agent.
        If the instance script is exclusively used in the current ./bin directory then this variable can remain unused..

        Note

        This setting is required if the instance script is used as a service init script in /ect/init.d to find the Agent installation!

        SCHEDULER_USER

        Specifies the user account that the JobScheduler Agent is operated for. This includes running jobs with the permissions of the specified user.
        Without setting this environment variable the user account that runs the start script is used.

        Note

        This setting is required if the instance script is used as a service init script in /ect/init.d to avoid that the Agent runs with the root user!

        SCHEDULER_HTTP_PORT

        The http port of the Agent. This has to be the same value as the suffix in the instance script basename. In this example

        Code Block
        SCHEDULER_HTTP_PORT=4441

        This option can be also used for indicating which network interfaces the JobScheduler Agent should listen to if you additionally specify a hostname or ip address.

        Code Block
        SCHEDULER_HTTP_PORT=localhost:4441
        SCHEDULER_HTTPS_PORT

        The https port of the Agent.

        Code Block
        SCHEDULER_HTTPS_PORT=40441

        This option can be also used for indicating which network interfaces the JobScheduler Agent should listen to if you additionally specify a hostname or ip address.

        Code Block
        SCHEDULER_HTTPS_PORT=123.456.789:40441
        SCHEDULER_DATA

        Set the directory where the JobScheduler Agent has the configuration, logs, etc.

        This directory must be unique for each instance of the JobScheduler Agent. The default is:

        Code Block
        SCHEDULER_HOME/var_SCHEDULER_HTTP_PORT

        Make sure that the JobScheduler Agent user has read/write permissions.

        SCHEDULER_LOG_DIR

        Set the directory where the JobScheduler Agent log files are created. The default location is SCHEDULER_HOME/logs.
        It is recommended to use the same log directory for all instances. According to the Linux Filesystem Hierarchy Standard (FHS) you can use for example

        Code Block
        SCHEDULER_LOG_DIR=/var/log/jobscheduler/agent
        Note

        Make sure that the SCHEDULER_USER has read and write permissions in SCHEDULER_LOG_DIR.
        If you use the same SCHEDULER_LOG_DIR for all instances then make sure that the SCHEDULER_USER of all instances has read and write permissions.

        SCHEDULER_PID_FILE_DIR

        Set the directory where the JobScheduler Agent pid file is created. The default location is SCHEDULER_LOG_DIR.

        Note

        Make sure that the SCHEDULER_USER has read and write permissions in SCHEDULER_PID_FILE_DIR.
        If you use the same SCHEDULER_PID_FILE_DIR for all instances then make sure that the SCHEDULER_USER of all instances has read and write permissions.

        SCHEDULER_WORK_DIR

        The default working directory of the JobScheduler Agent is SCHEDULER_HOME. You can specify a different working directory, e.g. $HOME.

    • According to the shell in use you can set the environment variables except SCHEDULER_HOMESCHEDULER_HTTP_PORT and SCHEDULER_USER in a ~/.profile or ~/.bashrc file too.
    • Info
      titleNote

      An often-used minimum configuration is:

      Code Block
      languagetext
      ...
      SCHEDULER_HOME=/opt/sos-berlin.com/jobscheduler/jobscheduler_agent
      ...
      SCHEDULER_USER=sos
      ...
      SCHEDULER_HTTP_PORT=4441
      ...
      SCHEDULER_LOG_DIR=/var/log/sos-berlin.com/jobscheduler/agent
      ...

      Note that in this example configuration, the Universal Agent is being installed in a directory with restricted permissions, /opt/. In this case, even if the sos user is a member of sudoers, the  SCHEDULER_LOG_DIR variable should be set to a directory where the sos user is able to write without requiring elevated permissions. If this is not the case the agent will not be able to execute any tasks.

  • If you want to install a JobScheduler Agent service for an automated start-up and shutdown then copy this instance script to /ect/init.d or corresponding locations.

    Code Block
    languagebash
    titlecreate a service init script set automated start-up and shutdown
    > cp ./bin/jobscheduler_agent_4441.sh /etc/init.d/jobscheduler_agent_4441 
    > # on SuSe or CentOS
    > chkconfig jobscheduler_agent_4441
    > # on Ubuntu or Debian
    > update-rc.d jobscheduler_agent_4441 default

...