Resetting the Azure Development Storage - c#

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

Related

Is there a direct way to send container logs to azure log analytics workspace from iot edge device?

I am looking for a solution to send the application logs generated on iot edge devices to an azure log analytics workspace.
I have tried using the Microsoft Monitoring agent using which I was able to send logs generated by running docker containers. However, on an edge device, we are using the moby engine instead of the docker daemon because of which monitoring agent is not collecting the log records(followed this set up to run with docker - https://learn.microsoft.com/en-us/azure/azure-monitor/insights/containers#install-and-configure-windows-container-hosts). Moreover, since I am running my edge environment on windows, I didn't find any container image of monitoring agent targeted for windows.(present for Linux https://hub.docker.com/r/microsoft/oms/)
I am looking for a completely automated way of streaming application logs , generated on the edge device, to azure log analytics workspace.
There is no built-in way as of today (might be worth checking with team on Github, as they might have this on the roadmap).
However, you can build your own solution using the new log-pull feature:
Write a small time-triggered Azure Function that pulls the logs every few minutes for the containers you are interested in (or all containers). The logs will be written to a storage account
A second blob-triggered Function picks up the uploaded logs and sends them into Log Analytics.
//Edit: Very new feature (still in Release Candidate for Edge 1.0.9): https://github.com/veyalla/ehm This might be exactly what you are looking for

Service to pull data from Azure Storage to local machine every day

I have a Azure process that stores some .png files in Azure File storage or Blob storage every 2 hrs. I want to create a service which will run from my machine and pull the latest files every 2 hrs . Please suggest if we can do this by Windows service or if there is any other better solution to Automate this.
Please suggest if we can do this by Windows service or if there is any
other better solution to Automate this.
Yes, you could do it with windows service ,this is the official doc, it also shows how to add Timer Event then you could handle Azure-Storage like normal program.
Or you could choose to use console app, this also could satisfy your requirement. You could use a Timer to handle Azure-Storage , however you need to keep this app running all the time.
If you still have questions, please let me know.

Azure Worker Role Copy File from Linux VM

I'm pretty new to the Azure Platform, I have tried to search on Google for any assistance but unfortunately my Google searching skills aren't the best.
I have a Linux VM in Azure, the Linux VM occasionally will have wav files on it, that will need to be copied off of it.
My plan is to use a Wokrer Role to access the Linux VM and copy the files off using scp, and then storing them in a storage account in Azure.
Is it possible to have a few pointers in the right direction of how this could be accomplished?
In your case, there would be no need for a worker role (which is nothing more than a Windows Server VM running in a Cloud Service). If you did need a worker role instance talking to a Linux instance, you'd have to connect them with a Virtual network. I'm guessing you're just starting out, and that solution sounds over-engineered.
Instead: Just write directly to blob storage from your linux-based app. If you're using .NET, Java, PHP, Python, or Ruby, there are already SDKs that handle this for you - go here and scroll down to Developer Centers, download the SDK of choice, and then look at some of the getting-started tutorials.
Just remember that blob storage is Storage-as-a-Service, accessible from anywhere. Underneath, it's just REST calls, with the language sdk's wrapping those calls.
There are more examples in the Azure Training Kit.

Publish MongoDB in Windows Azure worker role - Always Busy

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?

Xamarin Android App update

I've been developing android apps on Xamarin for 3months now, but I am facing a problem to update the application when a new release is available.
The application is not published to any app store(as we use it internally), I know Play store can do automatic updating, but I need to look for an update on our server, I would prefer if all this can be done silently(in the background).
here is my current code, this copy's the app to the device:
intent.SetData(Android.Net.Uri.Parse(#"http://xxxxx/downloads/app.test-signed.apk"));
StartActivity(intent);
this installs the app onto the device:
intent.SetDataAndType(Android.Net.Uri.FromFile(new Java.IO.File(Android.OS.Environment.ExternalStorageDirectory.Path +
"/app.test-signed.apk")), "application/vnd.android.package-archive");
StartActivity(intent);
but this way it asks to install (and I don't think this is the correct way), and doesn't start my app automatically after it was installed. And I am not sure how to wait until the app finished downloading before it tries to install.
I had a similar issue with an app which only gets used internally in my company. I didn't want the app going to the big wide world as the general public wouldn't have any use for it.
So, what we've done is publish the final product as 'Alpha release' in Google Play. You set up a Google Group with a set of e-mail addresses of devices that can access it, and once the app has been downloaded it will update just like any other app from Google Play.
There's an option to 'Promote' it to Beta or Production, but given that it never gets promoted it is never searchable on Google Play.
As Corey Ogburn mentionned, the silent install won't be possible without root.
Altough an answer was already posted to your question on Xamarin's forum.
On another note, following Dave's idea, you could set a Private Channel on Google Play. As you already know, Google Play offers easy automatic update, and with a Private Channel, you will be able to give special authorization on who has access to your app.
Read more on Private Channel here.

Categories

Resources