I have just started creating azure functions. I am creating a new azure function and got the below option. what does it mean? what if I select or unselect it? I have not found any documentation about it.
It shows this info, but I didn't understand it at all.
When you create an Azure Function, there needs to be an Azure Storage Account behind it, for various runtime needs (https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#azurewebjobsstorage).
For local development, you can choose to either use a real Azure Storage Account in the cloud by setting AzureWebJobsStorage app setting to that storage account's connection string, or you can use a local emulator (Azurite) that simulates a Storage Account on your machine.
So if you select that Azurite box, it will set AzureWebJobsStorage to use your local emulator instead, therefore no need for a storage account in the cloud.
https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio
Related
I am creating my first Azure function and I want it to be run when a Blob is uploaded, so in Visual Studio 2022 I selected the Azure functions template and then the Blob option. There are some steps I don't fully understand:
=> Do I need to select both when I also want to test my function locally with Azurite? The "service depedency" on this screen, does it mean the storage that is observed for new uploaded files or is it the storage that the Azure function uses for some internal management stuff?
=> The "service depedency" on this screen, does it mean the storage that is observed for new uploaded files or is it the storage that the Azure function uses for some internal management stuff?
does it mean the storage that is observed for new uploaded files or is it the storage that the Azure function uses for some internal management stuff?
It's the observed collection. The function's runtime storage location is chosen on the 1st wizard 'screen' when you select the .NET version.
I've successfully set up a user assigned identity on my function app to allow access to the function storage account. The app configuration parameter AzureWebJobsStorage has changed to AzureWebJobsStorage__accountName and my resources are accessible. I then decided to make a change to my code and attempted to deploy it which resulted in the following error:
app is missing AzureWebJobsStorage app setting. That setting is required for publishing consumption linux apps.
Which is funny because I'm not using Linux. Apparently this is due to a hard coded check in the Azure SDK itself looking for that exact config value. It doesn't seem to check if we are using Linux or Windows before erroring out, and it doesn't check if we are using a managed identity/have the AzureWebJobsStorage__accountName key set.
I've seen these two issues on github related to the problem
first
second
the one still open doesn't seem to be getting any attention. I see as a viable option to use a URL instead of setting WEBSITE_RUN_FROM_PACKAGE = 1 but according to azure there's some non-trivial downsides to not running from a package.
My question is - is it possible to keep WEBSITE_RUN_FROM_PACKAGE = 1 and use managed identity for storage in a function app? I saw there is a powershell script for hacking around this issue, but I would like to avoid that if possible.
I have developed my application with mongoDB and now I'm ready to live in cloud.
I have followed the tutorial from official mongoDB website about how to deploy it in
windows azure's worker role.
I have tried with local deployment in windows azure emulator, everything work really fine.
But when I tried to publish it into cloud service, the result wasn't like my expectation.
MongoDB.WindowsAzure.MongoDBRole_IN_X (where X is the instance number) is always in busy status with message ..
Starting role...
UnhandledException:Microsoft.WindowsAzure.StorageClient.CloudDriveException
I have no clue about this.
Could anyone have any suggestion ?
Thx.
PS1. Sorry for my english.
PS2. I have used the latest version of windows azure SDK.
In that worker role setup, MongoDb sets itself up to store the database on a durable drive (basically a vhd mounted in a blob). Since you're getting a CloudDriveException, the first thing I'd look at is the storage connection string for the account being used for mounting drives. Could it be that your configuration file is still pointing at local dev storage?
In Azure Development Storage's UI, there's a Reset button which stops, wipes, and restarts the devstore. Is there a programmatic way of doing this, similar to how I can stop and start the storage using
DevStore.Shutdown();
While I haven't reset the devstore programmatically, I suppose you could shell out to DSInit.exe programmatically:
DSInit /ForceCreate
#david-makogon's response is correct for the version of the SDK used in 2011, however in later versions of Azure Storage Emulator dsinit had been replaced with WAStorageEmulator and then with AzureStorageEmulator. (Maybe there was something else in between, but it doesn't matter as long as you use the latest SDK at the time of writing of this answer.)
A good overview of what's used at the moment can be found in Use the Azure Storage Emulator for Development and Testing.
And regarding your question that would be:
Start Azure Storage Emulator to bring up the storage emulator command-line tool.
Run AzureStorageEmulator init /forceCreate
Can an application recognize whether it runs in a cloud or on a normal server?
If that is possible, I could automatically let the application deside wehere to store f.e. user pictures: IO or blob storage.
Check the RoleManager.IsRoleManagerRunning property. This will be true if your app is running under Azure Fabric. Note however, that this can be the development fabric (the fabric that is running on your development machine during your dev phase) or the actual Azure cloud fabric.