Deployment to Production Servers

Deploy Compute for Production

How to deploy Compute to production server environment. To run Compute locally for development and testing, read Running and Debugging Compute Locally.

1. Set up Core-Hour Billing

Follow the “Core-Hour Billing” guide to get set up. This is important so do not skip.

2. Prepare Windows Server

To run Compute you’ll need a server or virtual machine pre-installed with Windows Server 2019.

We’ll assume you’re deploying Compute to one of Amazon’s EC2 instances. There are a few things to pay attention to when setting up the instance – use this as a rough guide if you’re using a virtual machine from another cloud provider or a physical server.

  • Start with the “Microsoft Windows Server 2019 Base” AMI.
  • The t2.medium instance type (2 vCPU, 4 GB RAM) is recommended.
  • Assign a public ip, or better yet use an Elastic IP and Route53.
  • Set a “Name” tag to help keep track of instances.
  • Configure the security group to allow Compute traffic:
    • RDP - 3389 TCP
    • HTTP - 80 TCP
    • HTTPS - 443 TCP

Wait for the virtual machine to spin up… ☕️

3. Install Rhino and Compute

  1. Connect to the server or virtual machine (usually using RDP) and open a PowerShell window.
  2. Copy and paste the command below and hit Enter, to download and run the installer scripts:

     iwr -useb https://raw.githubusercontent.com/mcneel/compute.rhino3d/master/script/bootstrap-server.ps1 -outfile bootstrap.ps1; .\bootstrap.ps1 -install
    

    This script will install Rhino and the latest build of Compute as well as ensuring that clients can communicate with Compute. Compute will be installed as a Windows service (named “rhino.compute”) so that it starts automatically when the server or virtual machine starts. You will be asked to enter a few things…

    • EmailAddress - The script will use this email to download a copy of Rhino to install. This is similar to the Rhino download page behavior.
    • ApiKey - The API key is a string of text that is secret to your compute server and your applications that are using the compute API e.g. u5E5kFMKDx5GDfYsnJPf3dy0BcVjJF4O. It is basically how the compute server ensures that the API calls are coming from Your apps only. You can enter any string that is unique and secret to you and your compute apps. Make sure to keep this in a safe place.
    • RhinoToken – This is a long token that identifies your instance of Rhino Compute to the core-hour billing system. Go to the Licenses Portal to generate this unique id based on your license. See “Using Core-Hour Billing” guide for more information.
  3. At the end of the installation process, Windows will restart to complete the setup. Wait a minute and log back in to check that the “rhino.compute” service is running.

4. Verify Compute and license usage

  1. Open a browser and go to http://public-dns-or-ip/version. If Compute is working it will return its version and Rhino’s version.
  2. Go to the Licenses Portal (login to your Rhino account if prompted).
  3. Under Team Licenses click your new team.
  4. Verify that Rhino is in use in your core-hour billing team.

5. Next steps

Check out the Rhino Compute AppServer – a node.js server acting as a bridge between client apps and private Compute servers.