Is the file system shared across multiple Azure websites? - azure

Quick question. I'm looking to deploy a website to Azure using websites.
I read a comment that stated that the file system is shared across multiple instances of the website?
Is this true?
Does this mean if I upload an image to the file system
on one instance, all requests on the second instance will have
access to the file?
Are the files synced across the instances or do
they all point to a single drive i.e. in the blob storage somewhere?
We will be deploying an Umbraco 7 site, so I still need to test for any issue this might have on the lucene indexing etc. Does anyone know of any complications with Umbraco 7 and this method of deployment?
Thanks in advance
Gordon

The answer from bedane is incorrect. This question is about Azure Web Sites (not about Azure Web Roles)
1) Yes it is true. Azure Web Sites stores your content using Azure Storage blobs that are mounted and presented to the web site as a common share that is read/writable.
2) By virtue of 1), when you upload the file you are uploading it to the common share and therefore all instances will see the upload immediately.
3) The instances all point to a single drive (just repeating point 1)
This architecture for Azure Web Sites was designed specifically to enable applications like Umbraco, Wordpress, etc. that install plugins and make changes directly to the site content directory. This design point fixes the problem that currently exists in Azure Web Roles.

Related

Regarding Kentico 9 site deployment on Azure

I want to deploy Kentico 9 site on Azure and want to use shared file system for my media content, can you please suggest which Azure configuration (Azure Cloud Services or Azure Web Apps) I should referred?
I'd highly recommend going with Web App over Cloud Services. Mainly because Web App is almost like running on a regular server where Cloud Services is quite a bit different and harder to work with in my opinion.
Check this article out regarding some issues with Kentico and Azure Blog storage as well as how to setup your storage provider to only store media files.
http://www.kehrendev.com/blog/brenden-kehren/may-2016/problems-with-azure-and-kentico
Could you describe what do you mean by shared file system for my media content?
From my experience - it`s (a little bit) easier to deploy (and maintain) Kentico to Azure Web Apps but they do not provide so many customizations - in my humble opinion - the biggest one is you are not able to connect via remote desktop (but this is supported by Azure Cloud Services).
Please note - if you are using Cloud Services you must use Azure Blob Storage - source - which could be in conflict with your requirements.
You can find more information about Web Apps vs Cloud Services vs Virtual Machines on the mentioned page.
TL;DR; - if you do not need customizations, remote desktop and startup tasks - go for WebApps. If not, try to specify more requirements.
You can also check comparinson of the technologies from the Microsoft`s point of view here.
It's not clear who you want to share the media with...
If you want to share the assets amongst more Kentico instances or with a 3rd party system, I'd probably use the Azure Blob Storage. Kentico comes with a dedicated file provider for this exact use out of the box. It's called CMS.AzureStorage.
Using the blob storage is not a limiting factor in terms of hosting your app. You can still use all available options: Web Apps, VM or Cloud Service. There are some technical implications, of course. But they're all described in the documentation.
I recommend checking the comparison matrix to find a hosting option that suits your need best. Kentico recommends using App Service (Web Apps) for most projects as it's easiest to maintain. However, you can't use certain features like Kentico Windows services, for instance. Question is, do you really need them?

Azure - Web Role Virtual Directory to other Web Role

I currently have a few websites that are running in IIS and they all have a virtual directory to another website called "Resources". On the resources website I have images, css, and other static type content that I share across multiple sites.
I want to replicate this using web roles. Yes they all need to be in a separate web role because they belong to different clients. I would like to just create a separate website for resources and have virtual directory from each of the other sites. Please advise if this is possible or if I need to keep these sites on a VM.
Yes such a solution is possible. You can move your static resources css, images etc to azure blob storage and link it from there. Code change required. If you think you need a content delivery network CDN you can use azure CDN. See this blog post explaining it www.hanselman.com/blog/PennyPinchingVideoMovingMyWebsitesImagesToTheAzureCDNAndUsingACustomDomain.aspx
A slightly older stackoverflow question explains it too.
stackoverflow.com/questions/6968011/storing-css-files-on-windows-azure
You cannot attach a shared disk, since disk-attaches have exclusive leases.
The Azure File Storage service provides an SMB share (backed by Azure Storage). By attaching to the share at startup, you'd be able to take advantage of a shared folder. More info on Azure File Storage here.
You may also populate a shared-content directory on each web role instance, at startup, by downloading content from a common source (e.g. Azure blob).
Aside from those built-in mechanisms, there are any number of custom VM-based solutions.

Clarification on Azure Web App Scale Instance

Per article below web app has an option to either auto or manual scale:
https://azure.microsoft.com/en-us/documentation/articles/insights-how-to-scale/
Would appreciate if I can get clarification on below:
Scenario:
I've ASP.NET Sitecore CMS which uses Lucene behind the scene for search. Lucene index gets rebuilt upon publish of new pages.
Lets say I manually or auto scale to 2 instances:
What exactly happens behind the scene i.e. copies all the website folder to new VM and sets up IIS etc?
Web App has functionality to FTP and view website folders. Is it possible to FTP to both of these instances? From what I know I can only FTP to one of them.
Update:
Problem we are facing:
We use lucene index for our web applications. Looks like the index is built on one web app and not other (website works for some user and not for others). We would like to FTP or RDP and see to make sure this is the case.
Thanks.
The FTP or the GIT provided by the Azure is not on the same instance when you use WebApps, So if you do FTP its not to one of the instances - its somewhere else, but when you change files in the FTP or push to GIT, the triggers kick in and a continuous deployment to the Webapp instance/s is done. You can be very well assured that when you upload new files to your FTP that comes with WebApp the build will be updated on both instances. In fact that's one of the driving forces behind webapps that you don't need to think about a VM.
We used once Lucene on Web Apps with multiple instances. What we did back then was use Azure Blob Storage to keep the index files, no matter the number of instances, all had the same index information.
The only problem was that when new instances would come up (autoscale), they had to load the index on memory and that lead to some cold-starts.
We moved to Azure Search afterwards and never looked back :)

Umbraco 6.05 on Windows Azure

I am deploying Umbraco 6.05 to Windows Azure. I am currently using "Azure Web Sites" to do this, but from what I can glean, it appears that this may cause future problems with the storage of media being on the local file system (both due to space limitations and also due to scaling considerations). The site was created and uploaded using WebMatrix.
I have found various articles about using Blob Storage for this, but they all refer to "Cloud Services" and "Web Roles" - none of which seem to match with the current terminology used on Azure, and to be totally honest I am not that familiar with Azure yet anyway. I have also found various "accelerators" for previous versions but nothing for this version.
Can anybody provide any links to a definitive guide to the installation of this version of Umbraco as an Azure Web Site, utilising Azure Blob Storage where appropriate? If this is not feasible, perhaps further advice can be provided as to the recommended way of hosting Umbraco in Azure.
There are no different in term of how they store the file whether you use Web Sites or Cloud Services as long as you didn't modify the Umbraco.
Both Web Sites and Cloud Services keep the file, in this case, the Media folder in their local storage unless you modify Umbraco to save into Blob Storage to have a better scaling.
You can write and modify your own custom Media location or try to look at this URL http://our.umbraco.org/projects/backoffice-extensions/universal-media-picker

Deploying and maintaining multiple copies of the same web application at different URLs on Azure

I'm currently investigating the possibility of my company using Azure.
Our current hosting situation that we run ourselves involves a separate site in IIS for each of our clients, each one having a virtual directory to the CMS we've built with ASP.Net web forms. We can update the contents of that virtual directory, which then provides the latest version of our CMS to all our clients at once.
I'm not looking to recreate that exact situation in Azure, but I am instead interested in figuring out how to create a single Web application in Visual Studio, publish that application to Azure in such a way that multiple sites (that I've specified) are created on Azure. Then I would like to be able to make changes to that application, and publish it again in a such a way that all the sites for it get updated all together, without requiring something be done manually per site/client.
The closest explanation I've found is this one:
http://www.wadewegner.com/2011/02/running-multiple-websites-in-a-windows-azure-web-role/
That gets me close, but what I don't understand is that when I publish this application to Azure, I still only see one application / URL available in the Azure management console. Shouldn't the extra "Site" node result in a different site being available when I publish it? Why doesn't it? Is there a completely separate way to accomplish this that I'm not using?
When you look at the management console you're seeing the web roles that you have deployed, not the sites that are part of that web role which is why you're only seeing one. As long as you've followed the instructions correctly, then yes, you do have two sites running. The catch is that you can only access the main site through that default URL. Presuming you have urls that look like customer1.mysite.com and customer2.mysite.com, you need to make sure you've set these as the host headers in the sub sites and then change your DNS so both of these domains point to URL you can see in the portal (e.g. mysite.cloudapp.net).
When considering a multi-tenant solution, ideally you should design your web-application as a single website that is capable of responding to multiple tenants (each of your customers), as opposed to creating a website/web-application for each one of them. This makes updates across the system manageable.
Your web-application can partition and identity different tenants based on several options such as part of the url (e.g myapp/tenant1 vs myapp/tenant2) or via a host header (e.g. tenant1.myapp.cloudapp.net vs tenant2.myapp.cloudapp.net)
HTH

Resources