Creating UNIX Process Servers (Advanced)

Installing the Platform Agent manually requires you to choose a port, an instance name, and a security mode beforehand. If you do not run the installation script as a privileged user, remember to run the root.sh file, located in the current working directory, to complete the installation.

Prerequisites

  • A running RunMyJobs instance.
  • A supported UNIX server with appropriate access to the server (including root password).
  • A character set that can be converted to UTF-8 using the I18N tools. For example, en_US.UTF-8 or ISO-8859-15. This character set needs to be set in the environment of the scheduler startup script. Use the LANG or LC_ALL environment variables to set the locale and thus the character set. The Platform Agent will use I18N tools to convert the data encoded in the character set to UTF-8 to communicate with the central Redwood Server. LC_ALL overrides LANG as well as all the other LC_ environment variables.
  • I18N tools (for character set conversion).
  • The Korn shell (ksh or pdksh) must be installed if you need to run KSH processes.
    • The ksh binary must reside in /bin/ksh, or you must create a symbolic link called /bin/ksh that points at the ksh binary.
    • On Linux, the zsh shell also provides /bin/ksh, but its implementation is not POSIX compatible and may not be used.
  • If you install a UNIX Platform Agent that will run processes as multiple users, you must to decide which security option to use. Redwood recommends that you read Choosing a User Switching Security Option and discuss it with your system, network, and security administration teams before installing.
    • If you need support for other UNIX flavors (such as FreeBSD), contact Redwood Support Services.

Note: If you are running Linux and are unsure of the installed glibc version, run /lib/libc.so.6 in a terminal window. Note that on some 64-bit Linux distributions, this file might be located in /lib64/libc.so.6 (Suse/RedHat) or /lib/x86_64-linux-gnu/libc.so.6 (Debian/Ubuntu).

If ksh is not installed on your system in /bin/ksh, the following error message will be logged for any KSH process.

Copy
error 2023-07-27 12:33:30,811 WST [14188-Main tid=4188101184] opsys.job
- Cannot execute Redwood Job 3281 '/home/user/jobs/3281/run_KSH': No such file or directory

Character Sets

RunMyJobs uses the UTF-8 character set internally. Platform Agents communicate with the RunMyJobs server, so they must be able to convert data to UTF-8 prior to sending it. On UNIX, the I18N package provides tools for converting data from one character set to another. The RunMyJobs server relies on this functionality to convert data to UTF-8.

You must specify the correct locale in use on your system in the environment of a Platform Agent. If the locale has not been correctly specified in the environment, RunMyJobs assumes the character set is ISO-8859-15.

The following are some examples of incompatible locales.

Copy
<empty>, <not_set>, 646, C, ANSI_X3.4_1968, POSIX, US-ASCII, ASCII

Note: Setting an incompatible locale in the environment of a Platform Agent may cause garbled text.

To inspect your current character set, enter the following command.

Copy
$ locale charmap

Procedure

The procedure consists of the following steps.

  • Installing and start the Platform Agent on the machine that needs to run processes.
  • Configuring the Process Server in the repository.

Redwood recommends that you perform these steps in the above order, but you do not have to.

Pre-Installation Tasks

Redwood recommends that you create a new account and group that satisfies your local naming requirements to contain the Platform Agent. The examples below use an account named redwood and a group named redwood.

  1. Create the account: groupadd redwood.
  2. Create the user: useradd -g redwood -s /bin/ksh redwood.
  3. Create the home directory of the user: mkdir /home/redwood.
  4. Change ownership of the directories: chown redwood:redwood /home/redwood.
  5. Set the password for the account: passwd redwood.
  6. Login as redwood: su - redwood or login redwood.

Download the Software

To download Platform Agent installers manually, follow this procedure.

  1. Navigate to Environment > Process Servers.
  2. Download the appropriate file for the platform you want to run processes on and copy it to the target computer.
  3. Select the OS family (Linux or UNIX, Windows, VMS).
  4. Specify a hostname; the hostname must be resolvable from the central Redwood Server, it is recommended to specify the FQDN of the remote server. For Platform Agent initiated connections.

Installation

  1. Run the installation shell script for your platform.
  2. Choose an installation location such as /home/redwood/ and then press y to create the directory.
  3. Choose an instance name.
  4. Choose a port for the Platform Agent.
  5. Choose a security option.
  6. Specify whether the Platform Agent should run at system startup. This requires either SysVinit startup script support or systemd (GNU/Linux only).
  7. Specify whether you want to update the Platform Agent automatically whenever the central RunMyJobs server is updated. The server will check Platform Agent versions when it starts up, and if they differ, will push the new version to the computer, where it will install automatically.

Further platform-independent configuration instructions can be found in the Configuring Platform Agents section.

Starting the Platform Agent at Startup

Starting the Platform Agent at system startup is recommended. How this is done depends on whether your platform supports SysVinit or systemd.

If the installer was unable to configure automatic startup, you must include the command corresponding to your security option in your system startup scripts.

Creating the Process Server

The installer creates a Process Server automatically by contacting the RunMyJobs server at the provided address during the installation procedure. If this fails, or you want to do this yourself, do this.

  1. Navigate to Environment > Process Servers.
  2. Click .
  3. Configure the Process Server. For more information, see UNIX Process Server Configuration Data.

Automatic Updating

The UNIX Platform Agent supports Automatic Updating.

If the network processor is started by the Platform Agent the Platform Agent is capable of being updated automatically. The administrator can control whether auto-update should be performed by creating or removing the ${InstallDir}/etc/startup/${instance}/autoupdate directory.

Renaming the Agent

Redwood does not recommend renaming Platform Agents. If you do, it should be done by a platform expert, because the exact steps depend on your platform and configuration.

  • On Linux with systemd, follow this procedure.
    1. Stop instance sudo sysemctl stop scheduler@${instance}.
    2. Copy the ${install_dir}/net/instance/${instance} to ${install_dir}/net/instance/${new_instance}.
    3. Copy the systemd unit file /etc/systemd/system/scheduler.service.wants/scheduler@${instance}.service to /etc/systemd/system/scheduler.service.wants/scheduler@${new_instance}.service.
    4. Start instance sudo sysemctl start scheduler@${new_instance}. f all works as expected, delete /etc/systemd/system/scheduler.service.wants/scheduler@${instance}.service.
  • On Solaris with SMF, follow this procedure.
    1. Stop and set ${instance} service to maintenance mode. This is important because the service will restart if not in maintenance mode.
    2. Copy the ${install_dir}/net/instance/${instance} to ${install_dir}/net/instance/${new_instance}.
    3. Start instance ${new_instance}.
  • On a generic SysVinit system, follow this procedure.
    1. Stop instance scheduler stop-instance ${instance}.
    2. Copy the ${install_dir}/net/instance/${instance} to ${install_dir}/net/instance/${new_instance}.
    3. Start instance using scheduler start-instance ${new_instance}.
    4. If everything works as expected, delete ${install_dir}/net/instance/${instance}.