Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Bicep - function-app-windows-consumption #13797

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

mumian
Copy link
Collaborator

@mumian mumian commented Feb 23, 2024

PR Checklist

Check these items before submitting a PR...

Contribution Guide

Best Practice Guide

  • - Please check this box once you've submitted the PR if you've read through the Contribution Guide and best practices checklist.

Changelog

@azure-quickstarts
Copy link
Collaborator

@ggailey777 - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@azure-quickstarts azure-quickstarts added the readme violations README violations during PR label Feb 23, 2024
@mumian mumian changed the title Add Bicep Add Bicep - function-app-windows-consumption Feb 23, 2024
@azure-quickstarts
Copy link
Collaborator

@ggailey777 - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@azure-quickstarts azure-quickstarts removed the readme violations README violations during PR label Feb 23, 2024
@azure-quickstarts
Copy link
Collaborator

@ggailey777 - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@mumian
Copy link
Collaborator Author

mumian commented Feb 23, 2024

@ggailey777 - can you take a look of this PR. The package, https://zipfortesting.blob.core.windows.net/deployment/cp-lin-py.zip, doesn't exist.

Copy link
Contributor

@ggailey777 ggailey777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to remove the ARM template?

@@ -19,6 +20,8 @@ languages:
![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.web/function-app-windows-consumption/BestPracticeResult.svg)
![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.web/function-app-windows-consumption/CredScanResult.svg)

![Bicep Version](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.web/function-app-windows-consumption/BicepVersion.svg)

This sample Azure Resource Manager template deploys an Azure Function App on Windows Consumption plan and required resource including ZipDeploy extension to mount zip package for deployment.

[![Deploy To Azure](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazure.svg?sanitize=true)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.web%2Ffunction-app-windows-consumption%2Fazuredeploy.json)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't you just delete this file?

@azure-quickstarts
Copy link
Collaborator

@ggailey777 - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@azure-quickstarts
Copy link
Collaborator

@ggailey777 - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@azure-quickstarts
Copy link
Collaborator

@ggailey777 - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@azure-quickstarts
Copy link
Collaborator

@ggailey777 - check this PR for updates that may be needed to documentation that references this sample. [This is an automated message. You are receiving it because you are listed as the docOwner in metadata.json.]

@mumian
Copy link
Collaborator Author

mumian commented Apr 11, 2024

@ggailey777 - do you know anything about the following error message:

2:26:59 PM - The deployment 'mainTemplate-deployment' failed with error(s). Showing 1 out of 1 error(s).
Status Message: Package deployment failed
ARM-MSDeploy Deploy Failed: 'Microsoft.Web.Deployment.DeploymentClientServerException: An error was encountered when processing operation 'Delete File' on 'C:\home\site\wwwroot\FAILED TO INITIALIZE RUN FROM PACKAGE.txt'. ---> Microsoft.Web.Deployment.DeploymentException: The error code was 0x800703E6. ---> System.IO.IOException: Invalid access to memory location.

at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
at Microsoft.Web.Deployment.FileEx.Delete(String path)
at Microsoft.Web.Deployment.FilePathProviderBase.Delete(Boolean whatIf)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Microsoft.Web.Deployment.FilePathProviderBase.HandleKnownRetryableExceptions(DeploymentBaseContext baseContext, Int32[] errorsToIgnore, Exception e, String path, String operation)
at Microsoft.Web.Deployment.FilePathProviderBase.Delete(Boolean whatIf)
at Microsoft.Web.Deployment.DeploymentObject.DeleteOperation(DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentObject.Delete(DeploymentSyncContext syncContext)
at Microsoft.Web.Deployment.DeploymentSyncContext.HandleDelete(DeploymentObject destObject, DeploymentObject sourceParentObject)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncDirPathChildren(DeploymentObject destRoot, DeploymentObject sourceRoot)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenNoOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.Deploy(String deploymentSite, String siteSlotId, Boolean doNotDelete) in C:__w\1\s\src\hosting\wdeploy\Microsoft.Web.Deployment.WebApi\AppGalleryPackage.cs:line 343
at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__25.MoveNext() in C:__w\1\s\src\hosting\wdeploy\Microsoft.Web.Deployment.WebApi\Controllers\DeploymentController.cs:line 492' (Code:Failed)

Copy link
Contributor

@mumian the command you issued was incorrect. Please try again.

Examples are:

@ agree

and

@ agree company="your company"

@mumian
Copy link
Collaborator Author

mumian commented Apr 11, 2024

@ggailey777 - can you provide some details? My knowledge of azure functions is quite limited.

@description('The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated. Use the defaultValue if the staging location is not secured.')
param _artifactsLocationSasToken string = ''

var packageUri = uri(_artifactsLocation, 'packages/nodejs.zip${_artifactsLocationSasToken}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patelchandni we're having trouble deploying with the package .zip file in this repo. Is this possible, or does it have to be some public URL location? I'm not familiar with how to do this in Bicep (or ARM frankly).

Comment on lines +114 to +120
resource msDeploy 'Microsoft.Web/sites/extensions@2023-01-01' = {
parent: functionApp
name: 'MSDeploy'
properties: {
packageUri: packageUri
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to @patelchandni, it sounds like the bicep-first approach might not work here since Functions requires a zipdeploy resource, which doesn't seem to yet be supported by Bicep. The PM for Functions deployments is @im-samz.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, @ggailey777. Feel free to set time up next week to discuss this in more detail. Weird that Bicep wouldn't support the zipdeploy resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants