Quick Cluster Manager Installation
The rest of this section lays out the steps required to install and configure Gurobi Remote Services and the Cluster Manager. Before diving into those details, though, we first want to provide a quick, high-level overview. The intent is to give you a basic understanding of the relevant concepts and tools. We suggest that you try these steps on your local machine before performing them on your server.
- Download and install the Gurobi client and Remote Services packages
from our download
Detailed instructions depend on you platform and are provided in this section.
- Install and start a MongoDB database server 4.0 or later (as
explained in their
- Start the Cluster Manager.
In a new terminal window, start the Cluster Manager executable: > grb_rsm
info : Gurobi Cluster Manager starting...
info : Version is 9.1.0
info : Connecting to database grb_rsm on 127.0.0.1:27017...
info : Connected to database grb_rsm (version 4.0.4)
info : Starting cluster manager server (HTTP) on port 61080...
The default configuration will start the Cluster Manager on port 61080 and will connect to the database on the local machine. If you have installed the database with other options or want to use an existing database, you can provide a database connection string with the --database flag:
> grb_rsm --database=....
The Cluster Manager has several important options that are detailed in this section.
- Get your Gurobi license.
Follow the instructions in the Gurobi license portal to retrieve your license. To avoid conflicts with client license files, you should place your license file in a non-default location:
info : grbgetkey version 9.1.0
info : Contacting Gurobi key server...
info : Key for license ID XXXXX was successfully retrieved
info : Saving license key...
In which directory would you like to store the Gurobi license key file?
[hit Enter to store it in /Users/john]: /Users/john/tutorial
info : License XXXXX written to file /Users/john/tutorial/gurobi.lic
info : You may have saved the license key to a non-default location
info : You need to set the environment variable GRB_LICENSE_FILE before you can use this license key
info : GRB_LICENSE_FILE=/Users/john/tutorial/gurobi.lic
- Connect a Compute Server node.
In a new terminal, set the license file variable. For Linux and Mac OS, use this command:
export GRB_LICENSE_FILE=/Users/john/tutorial/gurobi.licFor Windows, use this command instead:
Then, start a Remote Services agent, using a few parameters to connect to the manager and to run on port 61000:
> grb_rs -manager=http://localhost:61080 -port=61000
info : Gurobi Remote Services starting...
info : Version is 9.1.0
info : Accepting worker registration on port 64121...
info : Starting API server (HTTP) on port 61000...
info : Joining cluster from manager
The Remote Services Agent has several important options that are detailed in this section.
- Open the Cluster Manager Web UI in a browser at
You will be asked to log in. You can use one of the three predefined users and passwords (
sysadmin/cluster). If you navigate to the
clustersection, you should see the Compute Server node status display.
- Log in to the Cluster Manager using the command-line tools.
In a new terminal, log in to the Cluster Manager using the appropriate connection parameters. Connection information is stored into your gurobi.lic client license file once you connect, so you won't need to include these parameters with each future command.
grbcluster login --manager=http://localhost:61080 --username=gurobiEnter the default password 'pass' when prompted.
More options and detailed client configuration is explained in a following section.
- Submit jobs and batches from the command-line tools or the programming language APIs.
Once you have logged in, you are ready to submit optimizations requests. In the following examples, we will refer to the installation directory of the main Gurobi tools and libraries as <gurobi_installation>.
You can submit an interactive job:
gurobi_cl ResultFile=solution.sol <gurobi_installation>/examples/data/misc07.mps
You can also submit a batch job and will wait for the completion to download the results:
grbcluster batch solve ResultFile=solution.sol gurobi_installation>/examples/data/misc07.mps --download
Finally, you can submit a batch with the Python API. The Gurobi distribution includes a complete example:
Let's now dive into more detailed discussions of these steps.