Configuring New Distributed Cache for Azure Websites Preview - azure

UPDATE: Nevermind I've found it. It's not done via the Azure Portal but inside the Azure Project Properties Dialog inside Visual Studio.
Anyone know where the new Distributed Cache Feature (I'm not talking about Azure AppFabric Cache) that Scott mentioned in his post can be configured for a website?

Adding information for those who may be wondering what is it:
Yes "Distributed Cache" is a instance specific feature which can be configured during development time with Windows Azure June SDK, via Role properties in Visual Studio as seen in this screen shot:
This feature is available only for Windows Azure Virtual Machine and roles but not for "Windows Azure websites (FREE) in Shared Mode".

The distribute cache is not available in the Azure Website Free or shared because you are not alone on your instance. It should become possible on a reserved, but still not available. Don't forget that the distribute cache is still in preview, so always evolving.

Related

Memory metrics missing from Azure dashboard

We've recently started using Azure to host some virtual machines, but I've got problems getting the grips on the available resource monitoring metrics.
When I go to the dashboard for the virtual machine, I have the option to add metrics for several things, but Memory Available is missing:
When reading about how to monitor cloud services, it seems clear that you should have the option to add a metrics for Memory Available. Reading other posts here on Stack Overflow, I see other tools such as MetricsHub mentioned - but I don't think this is what we want, as we don't need any monitoring endpoint, we only want to see memory usage in the Azure dashboard (and apps from the Azure store isn't available to us, since we're on an Enterprise Agreement).
Am I missing something obvious here? What must be done to add memory monitoring to the dashboard?
Cloud Services is not the same as Virtual Machines. When you use cloud services, Azure will provision VMs for you and Azure is able to install monitoring tools that see the amount of available memory. When you create your own VMs Azure can't and shouldn't do that. In other words, with VMs you are on your own. The metrics you do see in the portal are the ones that can be measured from outside the VM.
If you do deploy as a Cloud Service then initially you will only have the same metrics as for the VM. There are several ways you can change this.
The easiest is to go to the configuration for your cloud service in the Management Portal and change the logging level from Minimal to Verbose; That will enable a lot more metrics. Alternatively, you can specify which metrics you want collected in the cloud configuration in your project in Visual Studio. It is also possible to do this in code, though that is not the currently recommended practice, instead use the configuration tool in the cloud project in visual studio.
The key thing to understand about the metrics in Cloud Services is that, whichever way you elect to configure them, they are stored in a standard way in Table Storage and Blob Storage. That means using the Azure Management Portal or the tool in Visual Studio or code, the outcome is the same. This also means that a variety of tools including Cerebrata, Visual Studio and, indeed, the management portal can all read this data.
It is also worth noting that because of the way this works, the configuration can be changed at runtime, usually through the portal but there are other tools and approaches in code.
In my experience, you normally only want to sample your performance metrics every two minutes, but do the log shipping every minute. Also note that you can configure trace logs and IIS logs etc to be available to tools like Visual Studio and Cerebrata. For Cloud Services, it is quite rich functionality but it takes some working with it before you start to "get" it all. Enjoy!
You can monitor memory and other "Guest" level metrics in Azure, here's how:
in Azure, go to your virtual machine, scroll down the settings to Monitoring > Diagnostics Settings
Click to enable Guest level monitoring, it can take a few minutes
Then you can go into Metrics for the VM, or Monitor at the top level:
choose the resource (the VM)
choose Guest in the metric namespace, it will load all the new metrics
choose Memory\Committed bytes or whatever ones you want.
You can then pin to dashboard etc as you would normally
It should be possible to install azure diagnostics on VM using powershell command Set-AzureVMDiagnosticsExtension
http://azure.microsoft.com/en-us/documentation/articles/cloud-services-dotnet-diagnostics/#virtual-machine
or using new management portal
http://feedback.azure.com/forums/231545-diagnostics-and-monitoring/suggestions/5535368-provide-azure-diagnostics-runtime-for-vm-iaas
I've tried to configure it using new portal, I can see the the extension IaaSDiagnostics is installed on VM, but no luck yet with getting the data.

Azure WebSites and Distributed caching

What is the right way to implement azure websites (not webroles) that use distributed caching?
Does Azure have anything built in or a 3-rd party has to be involved?
Edit:
I have been struggling with suggested Windows Azure Caching. The server kept responding with error ErrorCode<ERRCA0019>:SubStatus<ES0001>:Check the client version. It should be within the allowed version range on the server. If necessary, upgrade the client to the allowed version.
After looooong search I have stumbled upon this link that fixed it all.
Bottom line, when looking for NuGet package, DO NOT use Windows Azure Caching, but Windows Azure Shared Caching v1.7.
Windows Azure Cache Service (Preview) has just been released. That is the best way to use distributed caching with Azure Websites.
The Shared Caching service is being deprecated!
Well the easiest way is to just use Azure Shared Caching for distributed caching. You will have to provision the caching in the Azure Management Portal but then after that the API is pretty straightforward.
Here is a link to the Nuget package for the libraries: Windows Azure Caching
The prices for distributed caching are pretty outrageous still: Azure Cache Pricing

Configure Windows Azure Caching (preview) Cache Client Programmatically

Trying to convert from Windows Azure Shared Caching to Windows Azure Caching (Preview) where I was able to programmatically configure the DataCacheFactory via the DataCacheFactoryConfiguration class. Is the possible in the Caching (Preview)? If so, what are the values that need to be set for the server configuration?
Take a look at the old documentation ( http://technet.microsoft.com/en-us/library/gg618003.aspx ) I have not been able to find the "preview" version of this documentation.
The "How to" documentation on using Windows Azure Caching Preview is here. To include nuget package for Caching Preview please check section "Getting Started with Windows Azure Caching (Preview)" and also take a look at the section "Working with Caches" which shows code on how to use API.
As these two cache are fundamentally different because on is locally available and another one is in cloud, the libraries and API to configure Cache and Cache objects are different in between two. The key difference is that Caching Preview uses the following different reference:
using Microsoft.ApplicationServer.Caching;
and the code which is depend on above is different as documented above in provided links i.e.
DataCacheFactory cacheFactory = new DataCacheFactory();
DataCache cache = cacheFactory.GetDefaultCache();

appfabric composite model

I want to develop an application using appfabric composite application/model but i was unable to find any latest updates on it. Also very little help related to it is present on web thus creating a confusion that whether this feature is continued after June CTP 2011 or not ?
Is there any update going to be available in future release?
Also I have installed windows azure toolkit 1.7 and after that azure appfabric sdk1.5 but in visual studio project templates I cannot find any template for appfabric as shown in some videos.
What additional installables will I require ?
In Windows Azure, word "App Fabric" is not longer used, instead all the services which were part of "Windows Azure App Fabric *" are named completely different (Service bus, ACS, Cache * etc) specific to their objective. That why you do not see any latest documentation specific to "App Fabric" in Windows Azure. Now when App Fabric term is used specific to Windows Server specific service model.
That's another reason when you installed Windows Azure SDK 1.7 you did not see any thing specific to App Fabric at all.
I am not sure how much it will apply but you sure can take a look at "Building Hybrid Applications in the Cloud on Windows Azure - eBook" and see if that will help you.

How to publish dotnetnuke website to azure?

I am looking at migrating a dotnetnuke website to Azure. I need both staging and production versions of the site to be running.
I have looked at using Azure Websites, but at the moment there is no support for SSL on custom domains so this can't be used for the production website. I have migrated the staging site to an Azure Website and now have numerous options for publishing updates (ftp, git, using web matrix).
Due to the constraints of Azure Websites, I used the DNN Accelerator to create a cloud service for the production environment. This set up will allow me to have control over IIS and therefore manage SSL certificates (I think).
The problem I have with this is there does not seem to be any publishing options. The only way I can publish is by connecting to the Azure instance via RDP and then copying the website files onto the files system.
Are there any other ways of publishing? I have looked at converting the website to a WAP, but I believe this has implications when it comes to updating to new DNN versions.
You should never publish your application through RDP since these changes are non-persistent (meaning what you published might disappear after a hardware failure / ...). Adding new instances would also mean that these instances don't have the files you published before.
I suggest you start by looking at the DotNetNuke Azure Accelerator first. If this doesn't fit your needs you might always try to build something yourself, but if you want to say with a regular website and not a web application I wouldn't count on Visual Studio support. In that case you might want to look at creating a package from the command line and using startup scripts to add your website in IIS.
Sounds like you need to use a Start-up task to install the files in the correct place for a Web Role (Cloud Service) Smarx has a nice overview here, MSDN has a wealth of info too http://blog.smarx.com/posts/introduction-to-windows-azure-startup-tasks
Another option is IAAS for Azure with a persisted VM, more work mind you, Cloud Service would be the most efficient and correct solution...

Resources