Disclaimer: This guide describes the basic setup of Compute Server on Azure. There are a lot of extra features (e.g. security, availability) that may have to be added to fit your specific needs.
- If you have not done so already, define a Virtual Network and a subnet within this network. Note that the VPC, subnet, and all instances have to be in the same cloud region.
- Create a VM instance of the desired size. You can use Ubuntu as the Amazon Machine Image (AMI), but there is no wrong choice as Gurobi runs on Windows, macOS, and all major Linux distributions.
- It is best to create a dedicated disk where Gurobi is stored.
- It is good practice to store the SSH private key as it is impossible to configure
- Open the port that the Compute Server can use. This can be done in the dashboard of the Instance you created by going to “Networking” and select the security group.
- If the Compute Server should only be used inside of the Virtual Network, then it should already be allowed.
- Otherwise, you should add an HTTP rule that anyone (i.e., Source="0.0.0.0/0") can use. This can be set to HTTPS, but this is not necessary when the communication stays with a given Virtual Network.
- Connect to the instance:
- It is best if you SSH into the VM using the "Connect" button on the left-hand side of the Azure portal.
- Since you need to execute a lot of “sudo” commands, we suggest that you run sudo su to use root directly.
- Attach the Disk to the instance
- If the disk was newly created, please follow the guide in this link to set up the filesystem accordingly.
- Download Gurobi Remote Services. Note that in Unix you can use wget to download the package in the terminal.
- Setup Gurobi Remote Services. It is good practice to add the additional path variable to a shell script so that it gets executed every time one opens a session. You can consult this stackoverflow discussion around what the most suitable way is for you.
- Install the Gurobi Remote Services service using grb_rs install.
- Open the generated grb_rs.cnf file, and add the name that will be used by other machines to send problems as the HOSTNAME. If you are using the server within the Virtual Network only, then you can use the private IP address or configure a DNS name yourself. If the server is supposed to be reachable by the outside world, then you have to use the Public IP Address. Note that this should be constant, and therefore you should assign a static IP address.
Starting up the service
- Launch the service with grb_rs start. To check the status of the service, you can at any time call systemctl status grb_rs.service.
- To start sending jobs to the service, all you need is a client license file that reads:
COMPUTESERVER=<AZURE domain name>:<port>Note that the <port> needs to match the port set in the grb_rs.cnf file and the port opened in the Security Group (see Step 3 of the Connectivity section above).