Installing Deadline from the Command Line
Version: Deadline 8.0
Deadline’s interactive installer programs make Deadline Repository and Client installation a breeze, but the heart of automation and testing is the command line. In this blog entry, you will see how easy it is to install Deadline from the command line.
First, the go-to guide for command line installation is, of course, the Deadline User Manual. As with any User Manual, the aim is to be comprehensive. And while comprehensiveness is an admirable trait for a manual, it is not always a useful trait to promote understanding. So in this post I will focus on minimal examples that convey key ideas which you can later build upon for your own unique environment.
If you have purchased Deadline or have requested an evaluation, you will have received download links for the installers. Deadline has two distinct installers: One for the Repository (and database) and one for the Client programs (Launcher, Monitor, Worker, etc.).
The installers are bundled together into a .tar, .zip, or .dmg file, depending on the target platform. So the first step is to extract the individual installers. On desktop operating systems you can typically double-click the file and get a window that offers to extract the files. On a Linux server, you can use the tar program, for example:
tar -xvf Deadline-18.104.22.168-linux-installers.tar
This will result in the following extracted files:
If the installers are double-clicked from a desktop file browser, or if they are run from a command line without any options, then they will present the interactive installation dialog:
However, in this post we are interested in purely command line installation. This is accomplished by passing additional switches (or options) to the installer programs.
In the remainder of this post, I’ll be showing examples for Linux, but the process is nearly identical for other platforms.
REPOSITORY AND DATABASE
The Deadline Repository is a file structure that is populated with things like Deadline scripts and plugins, settings files, and folders to hold job logs, auxiliary files, and so forth. The Repository installer can install the Repository file structure into any location (local or remote) that is accessible by the machine from which the installer is run. The Repository installer is also capable of installing Deadline’s database, MongoDB, and if set to install, it will be installed on the machine from which the installer is run.
Let’s look at an example command line, and then I’ll explain the switches. (I’m sure everyone is aware that the trailing backslash character just means to continue the current line.)
The Repository installer requires administration level privileges. So on Windows you may need to launch your command prompt with the right-click “Run as Administrator” option, and on unix-derived systems you may need to prefix the command with “sudo”.
sudo ./DeadlineRepository-22.214.171.124-linux-x64-installer.run \ --mode unattended \ --prefix /export/deadlinerepository8 \ --installmongodb true
Here’s what the switches do:
- --mode unattended tells the installer to run silently, and it means that you implicitly accept the licensing terms. Another option would be to use --mode text. Text mode does not require a GUI, but it will explicitly prompt for licence acceptance. As a result, --mode unattended is best for automation.
- --prefix /export/deadlinerepository8 tells the installer where to install the Repository file structure. The specified folder should be accessible to Deadline Client programs (such as via NFS or SMB sharing). If the destination path has spaces, it should be enclosed in quotes.
- --installmongodb true tells the installer to install MongoDB in addition to the Repository file structure.
That’s pretty easy! And now that you understand the basics of command line installation of the Repository, you can explore the many other installer switches that are available to customize your installation. You can list all of the switches by issuing the --help switch, as shown below, with additional details available in the Repository Installer Command Line documentation.
For example, it may be preferable to install MongoDB using the Mongo installation procedures if advanced features such as authentication, sharding, or replication are desired. There are a number of installer switches for configuring the Repository for a separately-installed database, and they all start with ‘db’. Check out the --dbhost and --dbport switches.
As mentioned above, detailed information about Repository and database installation can be found in the Advanced Database and Repository Installation documentation.
CLIENT INSTALLATION ON THE DESKTOP AND COMPUTE NODE
Next, let’s look at a basic command line installation of the Deadline Client programs on a Desktop workstation. In this example, assume the workstation has a mount to the Deadline Repository, such as /mnt/deadlinerepository8.
Note that depending on the target OS distribution and version, it may be necessary to install some prerequisites such as libX11 and libXext. You may also need libMesaGL1 (CentOS) or libgl1-mesa-glx (Debian) if OpenGL libraries are not automatically installed (as may be the case with virtual machines). (More information on dependencies may be found here.)
The Client installer requires administration level privileges. So on Windows you may need to launch your command prompt with the right-click “Run as Administrator” option, and on unix-derived systems you may need to prefix the command with “sudo”.
sudo ./DeadlineClient-126.96.36.199-linux-x64-installer.run \ --mode unattended \ --unattendedmodeui minimal \ --repositorydir /mnt/deadlinerepository8 \ --licenseserver @servername \
Here’s what the switches do:
- --mode unattended tells the Client installer to do a silent installation, and that all license terms are implicitly accepted. Like the Repository installer, --mode text is another option which will prompt for licensing acceptance.
- --unattendedmodeui minimal further tells the installer how to handle the UI during installation. For automated installations a choice of minimal or none is best.
- --repositorydir /mnt/deadlinerepository8 tells the installer where to find the Repository mount (or share on Windows). It’s a good idea to confirm the Repository mount before running the installer.
- --licenseserver @servername tells the installer where to find the Deadline license server.
Again, fairly easy! And as with the Repository installer, the Client installer has several additional switches that will allow you to customize your installation. You can list all of the Client installer switches by issuing the --help switch, as shown below, with additional details available in the Client Installer Command Line documentation.
Once installation has completed, you can test it with deadlinecommand. On Deadline 8, for example, you will find the installed Deadline Client programs in /opt/Thinkbox/Deadline8/bin/. Here I will use the GetRepositoryOptionssubcommand, but any sub-command that accesses the Repository will serve as a useful check.
If the Deadline Client installation was successful, and the Repository server and database are online and reachable, then the command should return quickly with a list of exposed Repository options. Otherwise, if there is an issue, then either an error will be returned or the command will continue to try to connect.
If you are not familiar with deadlinecommand, or if you would like a refresher, checkout the blog entry about Deadline’s Secret Weapon.
Detailed information about the installation of the Deadline Client programs can be found in the Advanced Client Installation documentation.
Deadline configuration is controlled through .ini files and environment variables. The User Manual has a helpful Client Configuration page with details about where the .ini files a located and the settings that are available.
Thinkbox’s GitHub repository is also a good resource for Deadline scripts and techniques.