It turns out to be as simple as setting the value a environment variable - AZURE_STORAGE_CONNECTION_STRING, which becomes the default connection string that Azure CLI uses, if a storage account is not specified. DOCUMENTED), it is possible to stitch the solution using the documentation for Azure Storage Emulator and Configuration for Azure CLI. Run a command-line tool to launch the Storage Emulator in your hosted. Run a command-line tool to set up the local database. Ensure you're using a Windows-based Hosted agent. Though not as well documented (as in here in your face. Using the emulator for local dev work is common practice, but in order for it to run on your Azure DevOps pipe (I'm using Hosted agents), there's some tricks you can do. So what if, there is a way to use the Azure CLI storage command to work with local storage versus working with Cloud Storage?Īs it turns out, THERE IS. And until now that is how I had been using Azure CLI, to work with Azure Cloud and not for local development. The Middle Ground - Hacked it! or really on shoulder of giantsĪzure CLI is a cross platform development for developers and administrators to interact with the Azure Cloud. It was an option, not the most efficient one.
#What is azure storage emulator how to
This article is about how to configure your Azure CLI to go with your local storage emulator. Second one, living the hashtag - #WeAreDevelopers, write some test harness/setup code using the Azure Python SDK and keep it up to date. Sometimes, we just have go local with development, that is not just food. Ugly, huh? It also flies right in the face of cross-platform development. But using Storage Explorer became an issue, we were left few options.įirst one, drop Linux as our development environment and move to Windows or MacOS, which did not seem to have this issue. Our project involved developing Azure Functions using Python, which was dependent on use of Azure Storage Queues and access to local development was critical for developer isolation and productivity. The root cause was the corporate proxy settings associated with the laptop that we just could not to resolve.Ī mighty unusual start in a way, but that is hand we were dealt. While working with a fellow engineer who uses virtualized Linux machine as their primary development environment on Windows 10 PC hosted on Virtual Box, we ran into challenges with accessing the Azure local storage emulator - Azurite, with the Azure Storage Explorer.