You are on page 1of 2

root@myLapi:/mnt/d# func init azure-function-v2-example --worker-runtime python --

model V2
root@myLapi:/mnt/d# cd azure-function-v2-example
root@myLapi:/mnt/d/azure-function-v2-example# func new
Select a number for worker runtime:
1. dotnet
2. dotnet (isolated process)
3. node
4. python
5. powershell
6. custom
Choose option: 4
python
Found Python version 3.10.12 (python3).
The new Python programming model is generally available. Learn more at
https://aka.ms/pythonprogrammingmodel
Writing requirements.txt
Writing function_app.py
.gitignore already exists. Skipped!
Writing host.json
Writing local.settings.json
/mnt/d/azure-function-v2-example/.vscode/extensions.json already exists. Skipped!
Select a number for template:
1. Blob trigger
2. CosmosDB trigger
3. EventGrid trigger
4. EventHub trigger
5. HTTP trigger
6. Queue trigger
7. ServiceBus Queue trigger
8. ServiceBus Topic trigger
9. Timer Trigger
Choose option: 5
Function Name: [http_trigger]
Select a number for Auth Level:
1. FUNCTION
2. ANONYMOUS
3. ADMIN
Choose option: 2
Appending to /mnt/d/azure-function-v2-example/function_app.py
The function "http_trigger" was created successfully from the "HTTP trigger"
template.
root@myLapi:/mnt/d/azure-function-v2-example#

az functionapp deployment source config-zip --resource-group rg-csc-dataanalytics-


integration-usw-prod --name fx-csc-dna-usw-p-ase-test --src azure-function-v2-
example.zip --build-remote true --debug

WSL installation
-----------------

wsl --list --verbose


wsl --unregister <DistributionName>
dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux
/norestart
dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestart
reboot
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux
/all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all
/norestart
wsl --set-default-version 2
reboot

You might also like