You will need a server or virtual machine with (minimum) Windows Server 2016 or 2019 (LTSC) installed is recommended. It's possible to run Compute on a Windows 10 machine, but this is only recommended for development and testing.
It's still Rhino running under the hood, albeit without the UI, so spec your machine(s) accordingly. AWS's t2.medium instance type (2 vCPU, 4 GB RAM) is a great starting point.
The machine can be totally fresh. Everything else is described in the Installation and Configuration sections below.
The following steps assume that you are either logged into the computer that will run Compute, or connected via Remote Desktop. Currently there is no "installer", but these are the steps to get things running!
- Get the latest build from the
master
branch (the one named compute-<build_number>.zip). Alternatively you can build from source. - Unzip everything into an empty directory, e.g.
C:\path\to\compute
. - Download and install the latest Rhino WIP.
- Run Rhino at least once so that you can configure the license (we recommend Cloud Zoo) and validate it.
- Start PowerShell,
cd C:\path\to\compute
and run& .\compute.frontend.exe
. - Open a browser and try navigating to
http://localhost/version
. - Hit Ctrl+C to stop Compute
- For next steps, see Configuration and Running Compute as a service.
Release builds of Compute listen on 0.0.0.0 by default so that you can connect from another computer. For this to work, you'll need to open ports in the Windows firewall. You may also need to configure URL reservation. The steps below assume you're using ports 80 for HTTP and 443 for HTTPS. If you're using another port, then you probably know what you're doing!
- Start PowerShell as Administrator
- Run
Install-WindowsFeature -name Web-Server -IncludeManagementTools
to install IIS and automatically open ports 80 and 443 - Configure URL reservation:
- For HTTP,
netsh http add urlacl url="http://+:80/" user="Everyone"
- For HTTPS,
netsh http add urlacl url="https://+:443/" user="Everyone"
- For HTTP,
All configuration of Compute – ports, authentication, etc. – is done via environment variables. See environment variables for details
HTTPS requires an SSL certificate. If you don't have one already, we recommend using Let's Encrypt.
- Configure a your domain name (e.g. compute.example.com) to point to your server's IP address
- Download win-acme and unzip
- Start PowerShell as Administrator
- Run
Install-WindowsFeature -name Web-Server -IncludeManagementTools
to install IIS (if you haven't already) - cd to unzipped directory
& .\wacs.exe
N
create new certificate4
manually input host namescompute.example.com
(or similar)1
for default web site- Enter your email address when prompted
yes
to accept the license agreementQ
to Quit
Compute uses TopShelf to make it easy to configure and run it as a service on Windows.
- Start PowerShell as Administrator
- Run
cd path\to\Release\
- Run
& .\compute.frontend install
to install as a service - In the interactive menu, enter your username in the format
.\\[USERNAME]
(for example:.\steve
) along with password for this account ⚠️ Important! Make sure to run Rhino (and configure the license) at least once as the user that the service will run as!
Rhino WIP encrypts Cloud Zoo license information by default. In order to create an image and scale your compute service you may need to disable encryption of the license information before creating your machine image. This is also a requirement for creating a Docker image.
- Open Rhino on the template machine (or host machine, in the case of Docker)
- From the Tools menu, click Options then click Advanced
- Search for
Rhino.LicensingSettings.CloudZooPlainText
- Select the checkbox to enable the plain text setting
⚠️ Important! Close all instances of Rhino – changes do not take effect until Rhino is restarted- Start Rhino
- Log back in to your Rhino Account
- Close Rhino
You can now create your machine image.
- Download and install the latest Rhino WIP.
- Start Rhino WIP at least once to configure its license.
- Open
src\compute.sln
in Visual Studio 2017 (or later) and compile asDebug
. - In Solution Explorer, right-click Solution 'compute', then click Properties.
- In the Startup Project tab, select Multiple Startup Projects, then set both
compute.frontend
andcompute.geometry
to Start. - Start the application in the debugger.
- Wait for the backend to load... ☕️
- Browse to http://localhost:8888/version to check that it's working!
- The "frontend" is where the boring stuff lives – mostly authentication and request logging. The frontend proxies requests through to the "geometry backend". The backend is the bit that exposes a RESTful API that wraps functionality in RhinoCommon, Rhino.Python and Grasshopper.
- There is a health check URL (
/healthcheck
) in case you want to set up a load balancer