Azure, Download the site to a local development environment? - azure

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

Related

Worker Role third-party software

We have third-party software hosted in Azure Virtual Machines. This software hosts a service which is consumed by one of our Cloud Service Web Roles.
The issue is that the network latency between the VM and the Web Role is significantly affecting the performance of our application.
A solution would be to publish this third-party software in the same Cloud Service (in a Worker Role).
VM Role sounds like a good implementation for the above problem. Unfortunately this is a deprecated service!
One idea would be to package the relevant installation scripts and files into a Visual Studio project and configure the ServiceDefinition to set up the software accordingly. The concern here is that the installation files are over 1Gb.
Is there currently any Azure service that can support my problem? Is there a replacement to the VM Role?
Though a bit old, but you may want to take a look at Azure Bootstraper on CodePlex. From the project description page:
The Windows Azure Bootstrapper is a command line tool meant to be used
by your running Web and Worker roles in Windows Azure. This tool
allows you to easily download resources (either public resources or
ones in your blob storage), extract them if necessary, and launch
them. Since you don't want to always download and run during
restarts, it will also help track those dependencies and only launch
an installer one time! In addition, there are some very useful
features that make it a great tool to package with your roles.
Yet another idea (though I have not tried it) would be to make use of Azure File Service. What you could do is upload the installers in an Azure File Service share and then mount the share in your Cloud Service VMs and use it as a drive on your VM. You should be able to install software that way.
You're right that bundling 3rd-party software inside the cspkg can be problematic, size-wise.
It's common practice to download needed software from either a startup command file (.cmd) or from OnStart(). These downloads can be sourced from anywhere that you have access to: Azure blob storage, the actual vendors themselves (e.g. download from their public download link), etc. In your startup script, you'd need to handle the downloading (and potential unzipping) into a local folder, then installing as necessary.

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.

Sync folders on all Azure Cloud Instances

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.

Windows Azure and SFTP

I know very little about Azure, but I am looking for a cloud server where I can have clients SFTP their files to us. It will be used primarily for data storage. The only requirement is that the files be sent over SFTP (not FTP).
Does anyone have any experience with this? How difficult is this to setup? Is this even possible?
You can find step by step instructions on how to set up a regular FTP site on Windows Azure VM here - http://nicoploner.blogspot.com/2010/12/ftp-server-on-windows-azure-from.html
Here's how to set up SFTP on Windows Server (applies to Azure VM as well) - http://www.digitalmediaminute.com/article/1487/setting-up-a-sftp-server-on-windows
Yes you can set up an Azure VM Role and then install a SFTP Server for a Windows Server.
You can also set up a Linux VM Role and just use the native sftp command.
Depending on what you are doing, you may want to use a RESTful service that points back to blob storage (this is not SFTP), but it does go over HTTPs and you have all the benefits of Azure Blob Storage directly.
Here are a couple of options and additional resources:
1) You can install SFTP on Windows Server
https://winscp.net/eng/docs/guide_windows_openssh_server
This uses an OpenSSH package on GitHub from Microsoft.
2) You can use an Ubuntu VM
As #Bart Czernicki mentioned, OpenSSH is built into Linux, and it comes with SFTP out of the box. Customize your implementation using the /etc/ssh/sshd_config file.
3) SFTP Gateway
We have a product on the Azure Marketplace called SFTP Gateway that might help. (Disclosure: I work for Thorn Technologies.)
This is a good option for launching an SFTP server without having to build it from scratch. It also has a web interface for managing users, to help minimize the time spent at the SSH terminal.
BTW, although this wasn't asked in the original question, you might want to consider moving data to a durable storage layer (Azure Blob Storage). One approach would be to use incron to listen for file events. Once a file is done transferring via SFTP, use the Azure CLI to copy the file to Azure Blob Storage, and then delete the file from disk on success. This is the approach we used to build SFTP Gateway.
Hope this helps!

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