Sync folders on all Azure Cloud Instances - azure

Just deployed my App to Azure. Everything works fine.
I'm currently running some legacy code on my app that I cannot upgrade right now, and it makes use of some files on the local VM Storage.
I need to find a way to keep all the cloud instances folder synced. Someone wrote a plugin that seems to do this using the Microsoft Sync Framework, but it runs on Azure SDK 1.5:
https://github.com/Interop-Bridges/Windows-Azure-File-System-Durability-Plugin
Does anyone know of a similar implementation for the current version of the SDK? or a better solution for this scenario?

You could use the CloudDrive feature of Windows Azure. You can put a .VHD file into the blob storage and mount it as a drive in your compute service.
But keep in mind that if you have multiple instance in your computing service, only one instance has read/write access to the VHD. You should share the VHD Drive among all your instances using standard network share technology.

Related

Access VM Shared Directory from Linux App Service

we have the new asp.net core web application running on Azure as App Service.
Because of the backward compatibility, we have a bunch of files (from the old version of the application) stored on VM Windows machine running at Azure too. Those files must be there!
And we need to access them from Linux App Service as files and directories as they are.
We wanted to use File Share. But because of the App Service sandbox, it is not possible.
Any help?
As of now you have option of mounting or using azure storage with Linux App Service.
https://learn.microsoft.com/en-us/azure/app-service/configure-connect-to-azure-storage?tabs=portal&pivots=container-linux
You can think of using or moving your filesystem from Azure VM to azure storage and further use Linux App Service mounting to Azure Storage.
The above article contains video with every step on how to do that.

Windows Azure Cloud Service: recover lost source code

I have a cloud service (WCF role) published on Azure. Source code has been lost. Is there anyway to download the deployment package back from Azure? Or any other way to get the DLL's back.
Perhaps. If you have RDP enabled, or at least configured, in your service definition on the role you can RDP into the instance and retrieve the DLLs that way.
If you deployed using Visual Studio then a copy of the package is in one of your Storage accounts because it uploads the package there before deploying it. Check each of your storage accounts for a vsDeploy container in your BLOB storage. I think a few other deployment mechanisms use this as well. If you find it you can download the cspkg file, rename it .zip and open it up just like a zip file. Inside for each role you'll see a cssx file. Extract that and rename it to .zip as well. Opening the csx folder will show you the code that was deployed to your instance.
Regardless of how you perform your deployments I highly recommend keeping the cspkg files you publish so that you can rollback or know what went out. I'd also recommend having RDP at least configured in your service definition but perhaps disabled for when you need to troubleshoot. Turning it on and off is a configuration update, though that can have it's own side effects.
If all else fails and you have a Windows Azure Support level of some kind above free you can put in a ticket to see if they will retrieve the DLLs for you I guess. I've not tried that.
Update: I didn't know about the operation to get package that Gaurav indicated. That should be your answer to retrieve your code.
Windows Azure Service Management API has an operation for that: http://msdn.microsoft.com/en-us/library/windowsazure/jj154121.aspx. I suggest you take a look at it.

Client-Side: Accessing Windows Azure Drive?

I am developing an Azure application, part of which involves users browsing an online filesystem. TO do this, I am trying to use the Windows Azure drive, but I can't figure out how to access it from client side, or how to make it accessible on the server side.
At the moment, I only know how to make the drive:
CloudStorageAccount devStorage = CloudStorageAccount.DevelopmentStorageAccount;
CloudBlobClient client = devStorage.CreateCloudBlobClient();
CloudBlobContainer container = new CloudBlobContainer("teacher", client);
CloudDrive.InitializeCache(localCache.RootPath,
localCache.MaximumSizeInMegabytes);
CloudDrive drive = new CloudDrive(container.GetPageBlobReference("drive1").Uri, devStorage.Credentials);
drive.Create(50);
I am using C# as my development language.
All help is greatly appreciated!
There are couple of things you need to understand with Windows Azure Cloud Drive:
Cloud drives are actual Page Blobs which are stored on Windows Azure Blob storage and mount as a drive (you will get a drive letter depend on your machine drive statistics) in a machine where you can provide Windows Azure Run time environment.
Programmatic it is very easy to mount a cloud drive in your code as you showed in your example however one thing is missed that is to be sure to have Windows Azure RunTime environment where this code can run.
I have written a utility to mount azure drive within Windows Azure VM (Web, Worker or VM Role) located here:
http://mountvhdazurevm.codeplex.com/
You can run above tool directly in Windows Azure VM and can also this the exact same code in your Compute Emulator (Windows Azure Development Fabric) so the bottom line is as long as you can provide Windows Azure Runtime environment, you can mount a Page blob VHD drive.
I have seen several cases where someone asked me to mount a Windows Azure Page Blob as drive in local machine (client and server, anywhere) and the actual hurdle was to bring Windows Azure Run time in local environment because it is not available. In some cases a few person went ahead and tries to use Windows Azure SDK to have Windows Azure runtime made
available in their desktop, created a dummy web role and then mount the VHD which was mounted in local machine and a drive letter was made available as well. I am not sure about such kind of solution because this is not Windows Azure compute emulator is designed.
Hope this description provide you some guideline.
I'm not sure I understand your question properly, but it sounds like you want multiple client applications - presumably on machines that are not on Azure - to access your Azure drive?
Unfortunately, Azure drives can only be accessed from Azure web/worker or VM role instances.
I've written a WebDAV Server which runs on an Azure Website which will allow clients, including Windows Explorer and Office to connect to Azure Storage. It uses a combination of Table and Blob Storage to store the file structure and files. I've tested it with Windows Explorer and Word 2013. Although this isn't a clouddrive solution it's still using Azure Storage as a backend and it's accessible from WebDAV clients. You might find it useful..
https://github.com/ichivers/AzureDAV
One additional point to the existing answers. You can always download the blob backing your Cloud Drive and mount it on a local system. The blob is really just a VHD. However, the download time isn't going to trivial unless the drive is small.
Erick

Azure, Download the site to a local development environment?

This might not be so much of a programming question..but still..
I have the need of getting a site the currently is hosted in azure down to a local development environment.. is there anyway to do that?, any tools or such?..
Thanks in advance!
Not currently. Once the cloud service deployment package has been handed over to the Azure Fabric controller, there is no way to reclaim it, even if you submit a support ticket. The closest you can get to this is either upload packages to Windows Azure Blob Storage first, then deploy from there, or enable remote desktop and copy the files from inside the VM to an external storage account.
My suggestion would be to do one of the following:
If you have RDP enabled, you can remote in and grab the files
Otherwise, I would suggest creating a support case and having Microsoft help you get out the files: https://support.microsoft.com/oas/default.aspx?&c1=501&gprid=14928&&st=1&wfxredirect=1&sd=gn

How can I migrate an Azure application to IIS?

I have a webrole I'd like to host in IIS for the time being.
Does anyone know how involved this is, considering that I still want Azure Storage functions of the IIS site to still work?
Azure Storage (tables, blobs, queues) only run on the actual Windows Azure environment in the cloud. There is a simulated development environment that runs a facsimile on a local SQL Server database, but that is only meant for development purposes and cannot be used for running an actual site.
Theoretically, you could run your webapp locally and connect to Azure Storage over the internet (e.g. by using the REST api), but latency would almost certainly be too high for any interactive site.
So, if you want to be able to run your site on premise on your own IIS environment, you will need to remove all the specific Azure platform dependencies and build in non-Azure alternatives. For Azure Storage, you could either do a relational database (SQL Server, mySQL) or look at a nosql/document database.
If you want to move it to IIS then tijmedvdk's answer is correct.
If your goal is to run it in your data center then you should consider Azure Appliance http://www.microsoft.com/windowsazure/appliance/ this allows you to run Azure applications on premise, without making any changes.
This answers seems misleading. Windows Azure is a platform that provides several services and you can choose from the services that you want to use.
In essence a Windows Azure is just a Virtual Machine with
*Windows Server 2008 R2
*IIS 7.5
So can if you have an application that you are currently hosting in Azure and you want to host it in IIS I don't see much of a problem there.
If you are using Storage, the only problem might be that the Storage account settings were in the WebRole or Service configuration files, but you can change your app logic to take the appropiate settings from other config files.
I have created Windows Desktop applications that for several reasons use Azure Storage and i also think of that as a great advantage of cloud computing.

Resources