# Setup OCI Function Development on Windows with WSL2

# Install WSL2 - Ubuntu

1. Open the Microsoft Store.
    
2. Search for Ubuntu 24.04
    
3. Install
    

## Launch Ubuntu terminal

1. Search for "Ubuntu" in your apps.
    
2. On the initial launch, you'll be prompted to create a username and password. Set these and remember them.
    
3. Execute the following commands:
    
    ```bash
    sudo apt update && sudo apt full-upgrade -y
    ```
    

## Install podman-docker

```bash
sudo apt install podman-docker
sudo touch /etc/containers/nodocker
```

## Install Fn CLI

```bash
curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh
```

Set the Fn settings to use the Podman engine by adding or updating the following line:

```bash
vi ~/.fn/config.yaml
```

Add or update line:

```plaintext
container-enginetype: podman
```

## Install OCI CLI

```bash
sudo apt install python3-pip
pip3 install oci-cli --break-system-packages
```

### Create .bash\_profile

```bash
vi ~/.bash_profile
```

Set the file contents as follows:

```bash
#!/bin/bash

source ~/.bashrc
export PATH=~/.local/bin:$PATH
```

### Setup Config

```bash
oci setup config
```

### Complete Fn Setup

Follow steps 4 onwards in the [Functions QuickStart on Local Host](https://docs.oracle.com/en-us/iaas/Content/Functions/Tasks/functionsquickstartlocalhost.htm).

NOTES:

* Step 4.3 is optional. Set it if you're using a profile other than the DEFAULT profile in the OCI CLI config.
    
* Step 5.3: you can get the tenancy namespace by executing `oci os ns get`.
    

# Development in VS Code

1. Install the Remote Development extension in VS Code.
    
2. Connect to WSL
