updating deploy.py to push dotnet by default (#1888)

* updating deploy.py to push dotnet by default

* Updating requirements for Azure Function core tools CLI to 4

* updating docs for Azure Functions Core Tools v 4.x requirement

* Update src/utils/check-pr/README.md

Co-authored-by: Cheick Keita <chkeita@microsoft.com>
This commit is contained in:
Adam
2022-05-04 11:44:27 -07:00
committed by GitHub
parent 457f03e4ae
commit 793ce85cdf
6 changed files with 8 additions and 17 deletions

View File

@ -150,7 +150,7 @@ OneFuzz is built with multiple components and runs on Linux and Windows:
* [Python](https://www.python.org) (at least 3.7 or later) * [Python](https://www.python.org) (at least 3.7 or later)
* [Azure Functions Core * [Azure Functions Core
Tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local) Tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local)
(latest version of the 3.x) (latest version of the 4.x)
While local builds are possible for every component of the system, new While local builds are possible for every component of the system, new
contributors may find [automatic builds for contributors may find [automatic builds for

View File

@ -74,7 +74,7 @@ stages:
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update sudo apt-get update
sudo apt-get install azure-functions-core-tools-3 sudo apt-get install azure-functions-core-tools-4
- task: CmdLine@2 - task: CmdLine@2
displayName: "Deploying update to OneFuzz" displayName: "Deploying update to OneFuzz"

View File

@ -19,7 +19,7 @@ registered:
## Deploying an instance of OneFuzz ## Deploying an instance of OneFuzz
Ensure you have Python with `python --version` >= 3.7, [Azure Functions Core Tools Ensure you have Python with `python --version` >= 3.7, [Azure Functions Core Tools
v3](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local), v4](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local),
and OpenSSL installed. and OpenSSL installed.
From the [Latest Release of From the [Latest Release of

View File

@ -1,6 +1,7 @@
{ {
"IsEncrypted": false, "IsEncrypted": false,
"Values": { "Values": {
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated" "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"linux_fx_version": "DOTNET-ISOLATED|6.0"
} }
} }

View File

@ -90,7 +90,7 @@ AZCOPY_MISSING_ERROR = (
) )
FUNC_TOOLS_ERROR = ( FUNC_TOOLS_ERROR = (
"azure-functions-core-tools is not installed, " "azure-functions-core-tools is not installed, "
"install v3 using instructions: " "install v4 using instructions: "
"https://github.com/Azure/azure-functions-core-tools#installing" "https://github.com/Azure/azure-functions-core-tools#installing"
) )
@ -1125,6 +1125,7 @@ def main() -> None:
("instance-specific-setup", Client.upload_instance_setup), ("instance-specific-setup", Client.upload_instance_setup),
("third-party", Client.upload_third_party), ("third-party", Client.upload_third_party),
("api", Client.deploy_app), ("api", Client.deploy_app),
("dotnet-api", Client.deploy_dotnet_app),
("export_appinsights", Client.add_log_export), ("export_appinsights", Client.add_log_export),
("update_registration", Client.update_registration), ("update_registration", Client.update_registration),
] ]
@ -1237,11 +1238,6 @@ def main() -> None:
nargs="*", nargs="*",
help="Set additional AAD tenants beyond the tenant the app is deployed in", help="Set additional AAD tenants beyond the tenant the app is deployed in",
) )
parser.add_argument(
"--dotnet_deploy",
action="store_true",
help="deploys the dotnet version of the app along with the python version",
)
args = parser.parse_args() args = parser.parse_args()
@ -1289,12 +1285,6 @@ def main() -> None:
) )
states = rbac_only_states states = rbac_only_states
else: else:
if args.dotnet_deploy:
logger.info("deploying dotnet and python services for Azure functions")
after_python = full_deployment_states.index(("api", Client.deploy_app)) + 1
full_deployment_states.insert(
after_python, ("dotnet-api", Client.deploy_dotnet_app)
)
states = full_deployment_states states = full_deployment_states
if args.start_at != states[0][0]: if args.start_at != states[0][0]:

View File

@ -5,7 +5,7 @@
* Python >= 3.7, and dependencies (see `requirements.txt`) * Python >= 3.7, and dependencies (see `requirements.txt`)
* [az-cli](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). * [az-cli](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli).
* [azcopy](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10) * [azcopy](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10)
* [azure-functions-core-tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v3%2Clinux%2Ccsharp%2Cportal%2Cbash%2Ckeda#install-the-azure-functions-core-tools) * [azure-functions-core-tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Clinux%2Ccsharp%2Cportal%2Cbash#install-the-azure-functions-core-tools) (ver. 4.x required)
## Setup ## Setup