This article will guide you through the installation, configuration, activation, and testing of your self-managed Compute Server cluster.
The figure below depicts the architecture of a self-managed Compute Server cluster. The cluster nodes are Gurobi Compute Server(s). To learn more about the differences between a self-managed and a managed Compute Server cluster, please refer to How do I set up a Gurobi Compute Server Cluster (with/without a manager)?
These instructions are valid for Compute Server nodes running on a physical or a Virtual Machine. If you want to set up a Compute Server node using Docker or Kubernetes please see https://hub.docker.com/r/gurobi/compute.
The instructions below assume that you want to set up k(>=1) Compute Server nodes, and use the notation cs_t for t=1,...,k, and IP_t for t=1,...,k to represent the Compute Server node t, and its IP address, respectively.
Installation of a self-managed Compute Server Cluster
On every cluster node:
- Install Gurobi Remote Services,
- Install Gurobi Optimizer (full installation) or upgrade Gurobi Optimizer,
- Retrieve and set up a Gurobi license for each node.
Set the environment variables GUROBI_HOME and GUROBI_SERVER_HOME to point to the installation directories of the Gurobi Optimizer and the Gurobi Remote Services package, respectively. This step is optional but recommended. The precise paths depend on your OS:
Configuration of a self-managed Compute Server cluster
For each Compute Server node t=1,...,k
- Locate and open the $GUROBI_SERVER_HOME/bin/grb_rs.cnf file.
- Change the HOSTNAME property to IP_t. Alternatively, you can set HOSTNAME to the DNS name of the node that can be resolved from the other nodes or clients in your network (see $GUROBI_SERVER_HOME/bin/grb_rs.cnf file for more details).
- Set the PORT property. For example, you can set the port of each node to the value 60100.
Activation of a self-managed Compute Server cluster
- Start the Compute Server cluster with the first node (cs_1) by opening a terminal and running
- For t=2,...,k add node cs_t to the cluster by opening a terminal and running the command
Testing your self-managed Compute Server Cluster
On a client machine with Gurobi Optimizer installed:
- Create a Compute Server Cluster Client License (gurobi.lic) file containing a single line: COMPUTESERVER=IP_1:60100,...,IP_k:60100
- Save the client license file to the user's home directory (e.g., ~/). If you want to place the client license file in a different location, follow the instructions in Where do I place the Gurobi license file (gurobi.lic)?
- Open a terminal, and solve a sample model by running
gurobi_cl $GUROBI_HOME/examples/data/coins.lpA successful test will show an output similar to
Set parameter ComputeServer to value "IP_1:60100,IP_2:60100,...,IP_k:60100"
Set parameter LogFile to value "gurobi.log"
Using license file <PATH/TO/CLIENT/LICENSE/FILE>
Compute Server job ID: 70572e6e-b798-4b2c-b852-cfb33d3e252c
Capacity available on 'IP_2:60100' - connecting...
Established HTTP unencrypted connection
Advanced Configuration Options
This article provided a simple setup of a working Gurobi Compute Server cluster. Starting with a working Gurobi Compute Server cluster, we encourage users to explore and test various configurations for their specific needs, ranging from starting a Compute Server as a service to configuring an enterprise-grade Compute Server cluster with LDAP integration, high availability, failover, and more. The Gurobi Optimizer Reference Manual and Gurobi Remote Services document the configuration options and details.