Setting Up Services
It is useful to set up tractor-engine and tractor-blade as system services so that they are automatically started at boot time. This also simplifies their starting and stopping from the command line. Instructions vary by OS.
Linux - with systemd
Required systemd files are located in INSTALL_DIR/lib/SystemServices/systemd.
To set up the engine as a systemd service:
Install the engine unit file.
sudo cp tractor-engine.service /usr/lib/systemd/system
Install the engine settings file. Edit this file to customize the Tractor installation directory, configuration directory, or the command-line options for tractor-engine.
sudo cp tractor-engine /etc/sysconfig/tractor-engine
Enable the engine service in systemd:sudo systemctl enable tractor-engine
Start or stop the engine:
sudo systemctl start tractor-engine
sudo systemctl stop tractor-engine
To set up the blade as a systemd service:
Install the blade unit file.
sudo cp tractor-blade.service /usr/lib/systemd/system
Install the systemd override file. Edit this file to override the owner of the blade process.
sudo mkdir /etc/systemd/system/tractor-blade.service.d && sudo cp 90-tractor-blade-overrides.conf /etc/systemd/system/tractor-blade.service.d
Install the blade settings file. Edit this file to customize the Tractor installation directory or the command-line options for tractor-blade.
sudo cp tractor-blade /etc/sysconfig/tractor-blade
Enable the blade service in systemd:
sudo systemctl enable tractor-blade
Start or stop the blade:
sudo systemctl start tractor-blade
sudo systemctl stop tractor-blade
The engine and blade systemd services are configured to use journald logging. For example, today's log for the engine can be viewed using:
sudo journalctl --since today -u tractor-engine
Or to follow the log for a blade:
sudo journalctl -flu tractor-blade
Refer to systemd documentation for more information on managing systemd services.
For older Linux installs, please follow these directions below.
Linux - with sysVinit
Required sysVinit files are located in INSTALL_DIR/lib/SystemServices.
To set up the engine as a sysVinit service:
Install the pixar settings file. Edit this file to customize the Tractor installation directory, configuration directory, or command-line options for tractor-engine. If this file already exists, you will need to manually add the Tractor entries at the bottom of the shipped file into the existing /etc/sysconfig/pixar file.
sudo cp pixar /etc/sysconfig
Install the engine init.d file.
sudo cp tractor-engine /etc/init.d
Enable the engine service to start on boot:
sudo chkconfig tractor-engine on
Start or stop the engine:
sudo /etc/init.d/tractor-engine start
sudo /etc/init.d/tractor-engine stop
To set up the blade as a sysVinit service:
Install the pixar settings file. Edit this file to customize the Tractor installation directory, the command-line options for tractor-blade, or the owner of the blade process. If this file already exists, you will need to manually add the Tractor entries at the bottom of the shipped file into the existing /etc/sysconfig/pixar file.
sudo cp pixar /etc/sysconfig
Install the blade init.d file.
sudo cp tractor-blade /etc/init.d
Enable the blade service:
sudo chkconfig tractor-blade on
Start or stop the blade:
sudo /etc/init.d/tractor-blade start
sudo /etc/init.d/tractor-blade stop
Windows
The Tractor blade installer on Windows automatically installs and starts the blade as a Windows service. This service is also configured to automatically start the blade whenever the computer is restarted. You can view the blade service entry by following these steps:
Start a command prompt window: Click the Start button in
Windows, and then select
All Programs -> Accessories -> Command Prompt
In the command prompt window, type:
services.msc
And then press the Enter key to open the Windows Services Management Console.
In the Services window, scroll down to the Pixar Tractor Blade Service service.
You can manage the service by right-clicking it and selecting Start, Stop, or Restart. Please note that there may be multiple Pixar Tractor Blade Service entries from previous installations. Make sure to select the most current version when starting/stopping or making changes.
It is recommended that you modify the user account that the service will run as. This can be done by right-clicking the service and selecting Properties. In the Properties window, on the Log On tab, you can set the service to run as a specific user account instead of Local System. The commands that are run by the blade should be run as a user account that has access to the remote drives and resources that are needed to run the commands successfully.
Note If you are installing an updated build of the same version of Tractor blade it is recommended to uninstall the previous build first. The uninstaller will automatically stop the existing service. If the service was set to run as a specific user (as recommended) remember to re-enter that information in the Services Management Console.
In an advanced installation, the command line parameters of the blade service may be needed. The "start parameters" on the Windows Service snap-in Properties dialog are not useful to accomplish this as when set there they only apply for the single run when the service is started manually from this dialog. Instead, to add command line arguments edit the registry settings under the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
and modify the installed blade's ImagePath
entry appending the command line options after the path to the .exe. The available command line options are listed on the Application - tractor-blade page. The usual caveat about modifying the Windows Registry carefully since it can cause irreparable damage applies.
macOS
Initial .plist files for the engine and blade are found in INSTALL_DIR/lib/SystemServices.
com.pixar.tractor-engine.plist
com.pixar.tractor-blade.plist
Edit these files to customize your installation.
Open the appropriate file in your text editor of choice and adjust the install location, launching user, and any program arguments.
Save the files (as needed) to /Library/LaunchDaemons
To start tractor-engine, run:
sudo launchctl load -w /Library/LaunchDaemons/com.pixar.tractor-engine.plist
To start tractor-blade, run:
sudo launchctl load -w /Library/LaunchDaemons/com.pixar.tractor-blade.plist
Sometimes the ownership and permission settings of the .plist files can be overwritten incorrectly during the editing process. To make sure that these files are correct, run:
sudo chown root /Library/LaunchDaemons/com.pixar.tractor*.plist
sudo chmod 644 /Library/LaunchDaemons/com.pixar.tractor*.plist
Services will now start on reboot.
Configuring Firewalls for Blade Services
Along with any access to network resources your anticipated jobs may need, the blade service particularly needs to be allowed access from the engine host. In the Tractor system, under most circumstances, network requests come from the blade to the engine and most default OS installations will allow such outbound traffic from the blade. Obviously the engine host must be configured to allow this. Periodically though, the engine does attempt to connect the blades specifically to collect information about the health of the blade. As listed on the Configuration page that requires port 9005 be opened for the blade service. Consult the documentation for the firewall software (if any) that you use in order to open this port.