Uber Cadence is a powerful tool for writing long-running applications. It’s used at Uber for many scenarios because of its consistency guarantees and simple programming model. At Uber, we use Mac and Linux so all the instructions for running Cadence locally are geared toward Mac. I have mostly Windows machines but would still like to experiment with it at home. Fortunately, the Cadence server is a Docker container so it can be run on Windows.
The instructions for running the Cadence server on Mac are:
This looks for the link to the latest release using curl and egrep then calls wget to download the package. Then it decompresses the package and starts the container. We can do the same thing with PowerShell (3.0 or higher) on Windows except we’ll need something to handle the tar. Here are the steps:
- Install Docker: https://docs.docker.com/docker-for-windows/install/
- Install Chocolatey: https://chocolatey.org/install
- Open an admin PowerShell command window
choco install 7zip.installand follow the prompts to install 7zip
- Run the following PowerShell commands
Some quick explanation of what this does. First is the weird ServicePointManager statement:
This is needed because PowerShell defaults to TLS 1.0. Read more about this solution on Stack Overflow.
The script uses wget, which is actually a
I added the
-UseBasicParsing parameter to the first command since it skips DOM parsing and without it the next line will hang.
There was some indication that 7zip requires two steps, one for gz and the next for tar. But this appears to have been fixed.