Prerequisites for Microsoft Windows systems

WSL2, Python, and VS Code setup for developing Cloud Functions on Windows.

🚧

Microsoft Windows system setup

If you are not using a Microsoft Windows machine, you can skip this article. Cloud Functions tooling is built for UNIX, so macOS and Linux users can install Python, Docker, and Node.js directly and start developing. The steps below add WSL2 to a Windows machine so the same tooling works.

The Makefile that drives a Cloud Function workspace relies on UNIX technologies. Modifying it would break the workspace, so on Windows we instead run the workspace inside WSL2 (Windows Subsystem for Linux) — giving you a UNIX-compatible environment alongside Windows.

Install WSL2

  1. Open PowerShell as administrator. Right-click the Start menu and select Terminal (Admin), or search for Windows PowerShell, right-click, and Run as administrator.

  2. Install WSL with the default Ubuntu distribution. Run wsl --install. Verify with wsl --version.

    To install a specific Ubuntu version, list available distributions with wsl --list --online, then install your choice, for example: wsl --install -d Ubuntu-24.04. You should see a line "Downloading: Ubuntu 24.04 LTS" and a progress bar.

    ❗️

    We recommend a recent and up-to-date Ubuntu version.

  3. Reboot your PC to complete setup.

  4. Launch Ubuntu from the Start menu (search "Ubuntu" or "WSL"). On first launch you'll be prompted to create a UNIX username and password — store these somewhere safe; the user will have sudo privileges.

  5. Verify the installation by running wsl -l -v in PowerShell. This shows installed distributions and their WSL version (you want version 2).

  6. You can start Ubuntu anytime by searching "Ubuntu" or "WSL" in the Start menu, or by running wsl -d Ubuntu (or wsl -d Ubuntu-24.04). Your prompt will look like:

    username@DESKTOP-ABC123:~$
    📘

    Optional

    To start WSL as root, run wsl -u root. The prompt will look like root@DESKTOP-ABC123:/mnt/c/Users/username#.

Install Python 3 in WSL

You will need Python and its kit installedon your WSL.

Open your Ubuntu WSL terminal, and follow these steps:

  1. Update package lists: sudo apt update && sudo apt upgrade.
  2. Install Python 3, pip, and venv: sudo apt install python3 python3-pip python3-venv. Verify with python3 --version and pip --version.

The Python version you need depends on the ixoncdkingress version you're using:

  • Python 3.10 or higher — for ixoncdkingress v0.x.x.
  • Python 3.12 or higher — for ixoncdkingress v1.x.x (recommended). See Updating the Cloud Function workspace for the upgrade path.

Use WSL through VS Code

Prerequisites: VS Code installed on Windows, WSL set up, Python 3 installed in WSL.

👍

Editor choice

This guide uses VS Code, but any editor with a WSL extension works the same way.

  1. Install Visual Studio Code on Windows.

  2. Install the WSL extension from the VS Code Extensions marketplace:

    The extension's marketplace page has a detailed setup guide.

  3. Open a folder in WSL. Press Ctrl+Shift+P (or View > Command Palette), type WSL: Open Folder in WSL…, and select your project. VS Code will open a new window connected to your default WSL distro.

    📘

    Reaching your Windows drive

    In WSL, your Windows drives are mounted under /mnt. Your C: drive is at /mnt/c. After choosing WSL: Open Folder in WSL… you'll start in /home/username — clear that and type mnt, then browse to c/Users/... and your project.

    Alternatively, open a WSL terminal in a regular VS Code window, cd to your project folder, and run code ..

    With either approach, the project folder opens in VS Code through the WSL environment, with the venv provided by IXON's development setup. All required dependencies and tools work seamlessly without anything special in requirements.txt.

You now have a working WSL environment driving VS Code.

Optionals

You can open a Windows folder in VS Code from a WSL terminal using:

cd "/mnt/c/Users/<your_Windows_username>" && code .
❗️

This line won't work without &&!

📘

Already in a WSL bash terminal in VS Code?

Use this instead:

code "/mnt/c/Users/<your_Windows_username>"

You can browse WSL files from Windows File Explorer at \\wsl$\Ubuntu\home\<your_linux_username>. Replace Ubuntu with your distro name if different. Your Linux username likely has an underscore separating first and last name and no capitals.