Installing the tools
A known development environment makes the rest of the tutorial easier to follow and debug. We'll install Git, GitHub CLI, Docker, Sprocket, Visual Studio Code, and the Sprocket extension. After installing each tool, you'll run a check that proves it is ready.
Use the platform tabs to choose macOS, Linux, or Windows. The site remembers your choice for other platform-specific examples.
Identify your system
Installers often provide different files for different operating systems and processor architectures. Check yours now so you can choose the correct download later.
First, open a terminal. A terminal is an application where you run text commands:
- Press ⌘ + Space to open Spotlight.
- Type
Terminal. - Press Return.
- Press Ctrl + Alt + T.
- If that shortcut does not work, open the applications menu, search for
Terminal, and select the terminal application.
- Press the Windows key to open Start.
- Type
PowerShell. - Select Windows PowerShell or open a PowerShell tab in Windows Terminal.
The terminal shows a prompt where you can type. For each command block in this tutorial, type or paste the command after the prompt, then press Enter. Wait for the command to finish before running the next one.
Lines that start with # are comments, so they do not execute any code in the terminal.
In this tutorial, a comment either explains a command or shows what its output should
look like. It does no harm if you type or paste comments into the terminal.
Now run the commands for your platform:
bashuname -s # Darwin uname -m # arm64 or x86_64
bashuname -s # Linux uname -m # aarch64 or x86_64
powershell[System.Runtime.InteropServices.RuntimeInformation]::OSDescription # Microsoft Windows ... [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture # Arm64 or X64
Architecture names commonly appear as arm64 or aarch64 for ARM and x86_64 or
AMD64 for Intel or AMD processors. You will use this architecture to select the correct
downloads for the tools below. A download built for another architecture may not run on
your computer, so keep both your operating system and architecture handy.
Install Git and GitHub CLI
Git records changes to the pipeline, while GitHub CLI connects that local history to GitHub. We'll explain branches, commits, checkpoints, and pull requests in the Git crash course. For now, we're only installing and setting up the tools.
Follow the official Git installation and GitHub CLI installation instructions for your operating system. On Windows, install Git for Windows with Git Bash. Git Bash also provides the Bash executable used by WDL command sections.
Once done, check that both commands are available:
bashgit --version # git version 2... gh --version # gh version 2...
bashgit --version # git version 2... gh --version # gh version 2...
powershellgit --version # git version 2... gh --version # gh version 2... & "C:\Program Files\Git\bin\bash.exe" --version # GNU bash, version 5...
While we're here, Git records a name and email associated with each change you make to source code. Configure the values you want this course to use:
bashgit config --global user.name "Your Name" git config --global user.email "[email protected]" # No output is expected.
Connect GitHub CLI to your account. Choose GitHub.com, HTTPS, and browser authentication when prompted unless your organization requires another method:
bashgh auth login # ? What account do you want to log into? GitHub.com # ? What is your preferred protocol for Git operations? HTTPS # ? How would you like to authenticate GitHub CLI? Login with a web browser # ... Follow the remaining instructions to complete authentication. gh auth status # github.com # ✓ Logged in to github.com account YOUR-USERNAME (...)
This section is complete when Git reports a version and GitHub CLI reports an authenticated account.
Install Docker
Containers package tools with the system libraries they need, helping the same work run consistently on your computer, in the cloud, and on HPC. Docker builds and runs those containers. We'll explain them in more detail and build one in Containers. For now, we'll just install and configure the tools needed to work with containers.
Choose your platform:
Install Docker Desktop for Mac.
Select your distribution:
Follow Docker's official Install Docker Engine on Ubuntu guide.
Follow Docker's official Install Docker Engine on Debian guide.
Follow Docker's official Install Docker Engine on Fedora guide.
Follow Docker's official Install Docker Engine on CentOS guide.
Follow Docker's official Install Docker Engine on RHEL guide.
Follow Docker's official Install Docker Engine on Raspberry Pi OS guide.
Install Docker Desktop for Windows.
Docker Desktop has licensing conditions for some larger organizations. Check the current terms before using it for institutional work.
Installing the Docker command is only part of the setup. The command sends work to Docker Engine, a background service that builds and runs containers. Start Docker Desktop on macOS or Windows, or start Docker Engine on Linux, and wait until it is ready. Then check both the command and the running service:
bashdocker version # Client: Docker Engine ... # Server: Docker Engine ... docker run --rm hello-world # Hello from Docker!
bashdocker version # Client: Docker Engine ... # Server: Docker Engine ... docker run --rm hello-world # Hello from Docker!
powershelldocker version # Client: Docker Engine ... # Server: Docker Engine ... docker run --rm hello-world # Hello from Docker!
docker version must report both a client and a server. If it reports only a client,
the Docker service is not running or your account cannot reach it. The hello-world
container must finish successfully. Once both checks pass, leave Docker running while
you work through the tutorial. Later sections will use it to build and run containers.
Install Sprocket
Sprocket is a complete and modern development suite for WDL written in Rust. It helps you write, check, format, document, and run WDL. We'll use it throughout this tutorial.
This course requires Sprocket 0.30.1 or later. Choose whether you want Homebrew to
manage updates or whether you want to install the latest binary yourself:
Choose an installation approach:
Use Homebrew if you want to keep Sprocket updated to the latest release. If Homebrew is not installed, follow the instructions at brew.sh. Then run:
bashbrew install sprocket # ==> Installing sprocket # ...
To update Sprocket later, run brew update && brew upgrade sprocket.
Use the manual binary if you do not want to manage Sprocket with Homebrew. These commands
select the correct asset for your Mac's architecture, download it from the latest
Sprocket release, install it in /usr/local/bin, and remove the downloaded files:
bashcase "$(uname -m)" in arm64) pattern="sprocket-v*-aarch64-apple-darwin.tar.gz" ;; x86_64) pattern="sprocket-v*-x86_64-apple-darwin.tar.gz" ;; *) echo "Unsupported architecture: $(uname -m)"; exit 1 ;; esac install_dir="$(mktemp -d)" gh release download --repo stjude-rust-labs/sprocket --pattern "$pattern" --dir "$install_dir" # No output is expected. tar -xzf "$install_dir"/sprocket-*.tar.gz -C "$install_dir" sudo mkdir -p /usr/local/bin sudo install -m 755 "$install_dir/sprocket" /usr/local/bin/sprocket rm -r "$install_dir" # No output is expected from the final four commands.
Repeat these steps when you want to install a newer release.
Choose an installation approach:
Use Homebrew if you want to keep Sprocket updated to the latest release. If Homebrew is not installed, follow the instructions at brew.sh. Then run:
bashbrew install sprocket # ==> Installing sprocket # ...
To update Sprocket later, run brew update && brew upgrade sprocket.
Use the manual binary if you do not want to manage Sprocket with Homebrew. These commands
select the correct asset for your architecture, download it from the latest Sprocket
release, install it in /usr/local/bin, and remove the downloaded files:
bashcase "$(uname -m)" in aarch64|arm64) pattern="sprocket-v*-aarch64-unknown-linux-gnu.tar.gz" ;; x86_64) pattern="sprocket-v*-x86_64-unknown-linux-gnu.tar.gz" ;; *) echo "Unsupported architecture: $(uname -m)"; exit 1 ;; esac install_dir="$(mktemp -d)" gh release download --repo stjude-rust-labs/sprocket --pattern "$pattern" --dir "$install_dir" # No output is expected. tar -xzf "$install_dir"/sprocket-*.tar.gz -C "$install_dir" sudo install -m 755 "$install_dir/sprocket" /usr/local/bin/sprocket rm -r "$install_dir" # No output is expected from the final three commands.
Repeat these steps when you want to install a newer release.
Windows does not support Homebrew here, so you'll install the latest binary manually. Choose how to download it:
Open the latest Sprocket release. Under Assets, download the Windows ZIP that
matches your architecture. Choose the file containing aarch64-pc-windows-msvc for
Arm64 or x86_64-pc-windows-msvc for X64.
Run these commands to select the asset for your architecture and download it to your Downloads folder:
powershell$pattern = switch ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) { "Arm64" { "sprocket-v*-aarch64-pc-windows-msvc.zip" } "X64" { "sprocket-v*-x86_64-pc-windows-msvc.zip" } default { throw "Unsupported architecture" } } gh release download --repo stjude-rust-labs/sprocket --pattern $pattern --dir "$HOME\Downloads" # No output is expected.
After downloading the ZIP:
- Open your Downloads folder, right-click the ZIP, and select Extract All.
- Create the folder
C:\Tools\Sprocket, then movesprocket.exefrom the extracted folder into it. - Press the Windows key, type
environment variables, and select Edit the system environment variables. - Select Environment Variables, select
Pathunder User variables, then select Edit. - Select New, enter
C:\Tools\Sprocket, and select OK in each open dialog. - Close PowerShell and open it again so it can read the updated
Path.
Repeat these steps when you want to install a newer release.
Check the installation:
bashsprocket --version # sprocket 0.30.1 ... or later
bashsprocket --version # sprocket 0.30.1 ... or later
powershellsprocket.exe --version # sprocket 0.30.1 ... or later
The command should identify Sprocket 0.30.1 or later. If it reports an older version,
update Sprocket or install the latest Sprocket release.
Install Visual Studio Code and the extension
Visual Studio Code is the text editor we'll use to write WDL. The Sprocket extension connects the editor to Sprocket, which analyzes your WDL while you type. It adds syntax highlighting, formatting, snippets, and live error and lint messages directly beside the code they describe.
This immediate feedback helps you learn the language and fix problems while the relevant code is still in front of you. It also catches many mistakes before you send a workflow to a cloud or HPC system, where discovering the same mistake can take longer and consume compute resources.
Install Visual Studio Code and make its code command available in the terminal:
- Follow the official Visual Studio Code setup for macOS.
- Open Visual Studio Code.
- Press ⌘ + Shift + P to open the Command Palette.
- Type
shell command. - Select Shell Command: Install 'code' command in PATH.
- Close the terminal and open it again so it can find the new command.
- Follow the official Visual Studio Code setup for Linux for your distribution. The
official
.deb,.rpm, and Snap packages install thecodecommand. - Close the terminal and open it again so it can find the new command.
- Follow the official Visual Studio Code setup for Windows. The recommended User Setup
installer adds the
codecommand to yourPath. - Close every open PowerShell or Windows Terminal window, then open a new one. Opening
only a new tab may not load the updated
Path.
Check that the terminal can start Visual Studio Code:
bashcode --version # 1... # ...
bashcode --version # 1... # ...
powershellcode --version # 1... # ...
Install the Sprocket extension from the terminal:
bashcode --install-extension stjude-rust-labs.sprocket-vscode # Installing extensions... # Extension 'stjude-rust-labs.sprocket-vscode' was successfully installed.
Now use the terminal and Visual Studio Code to create a temporary WDL file:
- Return to the terminal and run:
bashcode environment-check.wdl # Visual Studio Code opens a new, empty file named environment-check.wdl.
- Paste this WDL into the empty editor:
wdlversion 1.3 workflow environment_check {}
This is a complete, valid WDL file, so the editor should not report any errors after you save it.
- Select File > Save. The
.wdlfilename tells VS Code and the Sprocket extension which language the file contains. - Open the Problems panel. The official Visual Studio Code errors and warnings guide shows what the panel looks like and how VS Code marks problems in a file:
Select View > Problems, or press ⌘ + Shift + M.
Select View > Problems, or press Ctrl + Shift + M.
Select View > Problems, or press Ctrl + Shift + M.
With the valid spelling, the Problems panel should be empty. Change workflow to
workflo and save the file again. The panel should list a syntax error with its message,
filename, and location, while the editor marks the affected line. Select the problem to
jump to that line. Restore the valid spelling, save the file, and confirm that the
problem disappears from both places. You can then delete the temporary file.
Seeing the error and then clearing it proves that the editor, extension, language server, and WDL file association work together.
Download the course repository
The code for this tutorial lives in the openwdl/production-guide-tutorial repository.
We'll use GitHub CLI to copy, or in Git parlance, clone, that repository to your
computer:
bashgh repo clone openwdl/production-guide-tutorial # Cloning into 'production-guide-tutorial'... # ... cd production-guide-tutorial
bashgh repo clone openwdl/production-guide-tutorial # Cloning into 'production-guide-tutorial'... # ... cd production-guide-tutorial
powershellgh repo clone openwdl/production-guide-tutorial # Cloning into 'production-guide-tutorial'... # ... Set-Location production-guide-tutorial
The course repository has a branch for the start of each section. A branch is a named line of changes to the source code. It lets many people work on the same project at once without mixing unfinished changes. In this course, each starting branch contains everything completed before that section.
Each section has a chapter/NN-topic branch containing its starting point. We will use
one of these branches to begin the hands-on course. Later sections will create their own
local branches from the corresponding branch on origin, the OpenWDL repository. You
will commit your work locally rather than push routine coursework to your fork.
Since we're about to start section three, [Git crash course], we'll go ahead and switch to that branch to make the files in your local copy match the section's starting point:
bashgit fetch origin # No output is expected. git switch chapter/03-git-crash-course # Switched to branch 'chapter/03-git-crash-course' # Your branch is up to date with 'origin/chapter/03-git-crash-course'. git status --short # No output is expected.
The first time you switch to a chapter branch, Git may instead say that it created a new
local branch that tracks the branch on origin. origin is Git's name for the GitHub
repository you cloned. Both messages mean you are on the correct starting branch.
You should see a project directory with source code, tests, examples, documentation, and
configuration appropriate for this point in the course. The exact files may change as
the course evolves. The important checks are that Git names the expected branch and
git status --short prints nothing, which means you have a clean starting copy.
The Git crash course will use a fork to teach
GitHub collaboration. After that exercise, each section will start from its own branch on
origin and keep your work on your computer unless the lesson specifically requires a
GitHub service.
Confirm that you are ready
Run this final checklist before continuing:
bashgit --version gh auth status docker version sprocket --version # Visual Studio Code reports WDL diagnostics
bashgit --version gh auth status docker version sprocket --version # Visual Studio Code reports WDL diagnostics
powershellgit --version gh auth status docker version sprocket --version # Visual Studio Code reports WDL diagnostics
If a check fails, fix that tool before continuing. The next section gives you the Git skills you'll use to track the project safely. Continue to Git crash course.