I have made a static website (HTML, CSS, Javascript) which i would like to deploy to Azure. Is there another choice for a static website on Azure rather than Web App. I mean if we consider pricing what choice have i got? And why i should choose it?
You can also have a free webapp (No custom domains or shared for 4.99 per month) and deploy using FTP.
If you really do only have static content, you can just upload it to a blob storage. With containers, you have to option to mimic folders (and also with the actual file names), you can have backups, replication and so on. You can even attach custom domains to the blob store. And compared to a Web App, they are a lot cheaper.
https://azure.microsoft.com/en-us/pricing/details/storage/blobs/
[Edit after almost two years :) ]
So I guess I was a little too quick to jump to answering this question back then. As the comments pointed out, there was no "default document" when using blob storage. But now there is: Static website hosting is in preview for blobs. Check out the documentation here:
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website
Related
Is there any easy way to limit the availability of an Azure static website to eg office hours?
Define 'easy'. If easy means inside an Azure Static website does this functionality exist, the answer is no. There are ways to accomplish this but you need something outside of Azure Static Website to accomplish the scheduling part. One path to consider.
You could, on a schedule, replace the current site with an 'off-hour' site that might just have a index.html (could be an image of a closed sign).
Github actions can be scheduled see documentation
Another option is to schedule the deletion/recreation of the static site using either Azure Automation or my personal favorite, Azure Logic Apps. Depending on the size and complexity of the static site, this might be a show-stopper.
I have a very special requirement which is:
Two web roles accessing a local shared file location.
I am aware of the "Local Storage" role settings, but those are only accessible within each role scope.
Does anyone know another option to accomplish this?
------- EDIT --------
As suggested I will explain more clearly what I'm trying to achieve here.
I'm implementing Only Office which is a web editor for office files. Their product requires to have a file saved on the file system to be opened on the editor.
I don't want to mix their ASP.NET MVC open source project with my code, so that's why I want to deploy their website as a separate webrole.
-------- END EDIT ------------
Thanks
In your question, you state that (my emphasis):
I'm implementing Only Office which is a web editor for office files. Their product requires to have a file saved on the file system to be opened on the editor.
If Only Office's requirement is to have temporary file storage that is used while the document is being edited, you may be able to get away with this in a Cloud Service Web Role. This is assuming that your users wouldn't be too angry if the temp. working document was 'lost' during a role re-start.
Web (and Worker) Roles are non-durable and the Azure Service Fabric might bounce them if they need to patch the underlying host or they might just crash due to a fault (which is usually why you deploy them in pairs - fault-tolerance etc.) If you save something to the file system on a Web Role, you are not guaranteed that it will be there if the role is bounced.
If however you need durability, you will need to implement something based around Azure Blob Storage and possibly something based on Blob Leases. However I imagine that Only Office doesn't have an implementation for Azure....
Failing that, you could try running on Azure Web App Service, however I imagine you would have the same issue re. backing storage and would need to implement something on Blob Storage.
So, finally, if you want complete control and something akin to running on-premise, take a look at using an IaaS Virtual Machine where you have all of the file system to play-with as you please.
==UPDATE==
Taking a look at the Only Office website, there is a SaaS offering Only Office SaaS Hosting which is probably cheaper to run for a year than the time taken for me to write this answer!
Failing that, if you look at the requirements for Only Office Document Server there is no way you're going to run that on a Web Role. Go Azure IaaS VM's.
You basically have 2 options here, both mentioned in the comments. You can use BLOB storage, or you can use an SMB share using Azure Files, which I believe is in preview still. We have used Azure files to mount an SMB share on several linux boxes. One thing we have noticed is that it is not particularly fast. It is also built on top of blob storage. Here is a link to Azure Files https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-files/.
If you choose to use blob storage and you will need to consider concurrency.
https://azure.microsoft.com/en-us/blog/managing-concurrency-in-microsoft-azure-storage-2/
I would suggest to use Azure File Services, you could have a share like URI to be used.
take a look at this:
https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-files/
Hello I'm looking at a method for speeding up a website and providing a 5MB download (Windows App + Later this year Android version) to international customers. The numbers etc are not known at this stage but would like to know what options are available. The web server is based in NZ currently and is a WordPress install.
I'm new to these subject areas, so not 100% sure on the best move. So have a few Questions?
Would a Proxy such as Varnish be enough for a few 100 downloads a day (Possibly Hopeful)? - if hosted in NZ - its likely to be slow for international customers - without testing would be hard to know - have had a Google and haven't found anything to answer this thoroughly yet.
Could I use Azure CDN and point that at my current web server - if so where would I find good documentation on this? Or could someone provide some measure of cost here, the CDN pricing refers to the locations - I assume that would refer to each edge server - so perhaps would need to purchase a few locations to get a thorough coverage?
I assume once its setup it isn't too much hassle to add in more locations if needed + I think if we had an Australian location (Perhaps first location) - it should in theory be quite a bit faster than from NZ (Not that Azure offers)
Will keep looking in the meantime...
Thanks
Azure CDN would be a good solution. However, you don't "point" Azure CDN at your server. You upload and manage content in Azure BLOB Storage and enable CDN capabilities that basically duplicates your content to all Azure data centers and uses the CDN capability to pull from the location closest to the client. The CDN provides a CDN based URL or custom URL to link your content in a website.
I'm developing a webapp in nodejs that require the upload of some media and
I'm deciding if using Google Drive or Box as storage for static media of my app.
Both solutions use oauth2 for authentication, but I can't understand how to connect my node app to a single account (where the storage must be). The problem is that I can't find in their documentation an example that fit my problem.
What I have to do to implements this?
If it's not possible what are good cloud storage alternatives that offers free space? I don't want to pay for a service before of a production environment
Unless each user is going to be uploading content to their own Google Drive or Box (which it doesn't appear to be in this case). Both of those options aren't really the right solution to your problem.
If you're simply doing static assets that don't frequently change, just keep them as assets in your project. This would be the right approach for things like logos.
Otherwise you should look into either Amazon Web Service or Google Cloud Services. Both are pretty inexpensive for small amounts of storage. Not sure about Google Cloud, but AWS gives you a small amount of storage for free for the first year. This would be a better solution if you have some web interface that requires you to upload an image, for say a blog.
It all just depends on what you're actually trying to achieve.
We're developing a web-application with Azure and the question is - how to upload into BLOB large images effectively directly from browser and make it secure and reliable?
Probably, we're experiencing bad performance because we're from Russia and currently using a trial Azure. Maybe with the full subscription this problem will go away?
Anyway, my concern is that our application has to pass our image through the following path:
WebBrowser > (image.jpg) > Azure WebRole [store name in DB] > (image.jpg) > Azure BLOB
So there is an overhead involving WebRole. What I'd like to do is to upload my large file to BLOB directly and send image name to WebRole in parallel:
WebBrowser > (image.jpg) > Azure BLOB
WebBrowser > WebRole [store name in DB]
The problem here is security. I'm talking about uploading user pictures and don't want hackers being able to write into one's container.
Is it reasonable at all?
Silverlight is an option, using Shared Access Signatures (special URLs that allow write access on a time-limited basis). See my series of blog posts: http://blog.smarx.com/posts/uploading-windows-azure-blobs-from-silverlight-part-1-shared-access-signatures
+1 for #smarx's suggestion of uploading via Shared Access Signature - that offers a time-limited URL that lets you access a private blob as if it were public. Someone would need to be running a network sniffer to attempt to discover an SAS-encoded URL, and even then, it would only be valid for a short period of time.
Just wanted to add that having a trial subscription is no different from a paid subscription, when it comes to performance. That's just a billing thing and has nothing to do with resource allocation.