Can I export my Azure subscription's entire configuration? - azure

Is it possible, using the Azure portal or some other means, to export the subscriptions configuration, for example as an XML file?
I mean things like details of web sites / roles, virtual machines, the size of the machines etc?
Then I could export every day and use a diff tool to check nothing has changed by mistake....
Just thought I'd ask before I write a giant PowerShell script.

I agree this would be a nice feature to have. It's often easier to build out the environment via the portal, but copying that from one tenant (dev) to another (prod) would be much faster and easier if it could be exported to JSON or XML and processed via PowerShell.

Azure Resource manager however does not support resources like Cloud Services, API Management, Mobile Services, Azure Scheduler, Azure Automation, Azure Active Directory, Recovery Services, Media Services, etc. ...
So the summary is - No, there is no such service yet to help you export all your subscriptions configurations.
If you just look for Virtual Machines and Web Sites, then Azure Resource Manager may be in help. But if you look for a complete backup - there is no way to easily achieve this today (2015-03-17).
Probably you could write some Powershell script combining the power of Azure Service Management + Azure Resource Manager, but frankly I am not really sure whether that would also help.

Related

Publishing a web application on Azure

I want to publish an web application on Azure market place.
I can create a Linux VM, install Java, Tomcat, SQL server and create an image of it. But instead of that, is it possible to create a tomcat instance along with database on Azure portal, add it to a resource group and publish this resource group on market place?
Would this approach be more advantageous?
thanks
As per the doc here:
https://learn.microsoft.com/en-us/azure/marketplace-publishing/marketplace-publishing-getting-started
Azure Marketplace offerings are based on Azure VM images or solution templates, your current solution would be the VM based route. It sounds like you may want to look at the solution template route to leverage other capabilities such as Azure SQL Server.
Neither route enable "publish this resource group to the market place". If that is the route you are aiming for that is essentially building out a multi-tenant application which is a bigger task and perhaps something like this link will help get you started:
https://azure.microsoft.com/en-gb/blog/with-newly-available-services-azure-continues-to-be-the-best-place-for-software-as-a-service-developers/
There are also other stackoverflow answers which may be of help:
Does a developer have to pay for publishing a SaaS app on Windows Azure Marketplace?
How can i publish my web solution to Marketplace

Migration to Azure Resource Manager

I'm doing some research to migrate virtual machines(vmware) to the new Azure Resource Manager portal.
I already succeeded doing this with powershell. But I was wondering if there where other methods to do this faster and more efficient with less downtime?
There is the Azure Site Recovery:
https://azure.microsoft.com/en-us/blog/azure-site-recovery-ga-move-vmware-aws-hyper-v-and-physical-servers-to-azure/
"Customers can replicate on-premises workloads to Azure with Azure Site Recovery for 31 days at no charge, effectively making migration to Azure free."
I do enjoy the cunning of #alexandr's solution! However the official solution from Microsoft is that they are currently building the tools to automate this for you.
from the Transitioning to the Resource Manager model blog. There are a basic set of scripts and a timeline for the more complex migrations (no VNet etc)
To directly answer your question, it seems like Powershell is the tool of choice for managing the migration. (I imagine if you leave it for long enough there will be a 'migrate' button in the portal, as they seem very eager to move everyone away from ASM)

Azure worker role automation

I created my custom Azure Worker Role. This code is ready. What I'm trying to do is to create instances of this Azure-Worker-Role in specific Azure data-center, at the requested time. For example, I'm want to send command to Azure to create 10 instances of my Custom-Azure-Worker in West-Europe data-center - now.
It's important to pass this command also a parameter that will be the input problem to be solved by my workers.
I pretty sure that this automation task must be covered by Azure automation. Is that true? Looking for more information\directions.
Thank you!
You can use Azure Management Libraries to create and deploy your cloud services from C# code. Just create application (eg ASP.NET MVC) to manage your cloud services by sending commands and deploy it also on Azure or even keep it locally.
See this article for more details http://www.bradygaster.com/post/getting-started-with-the-windows-azure-management-libraries
You'll want to leverage the service management API to spin up and tear down roles. It can be accessed any number of way, including directly via REST.
RE: providing a parameter to the worker role, one option is leveraging the cloud service configuration file that you provide with the cspkg. Define specifics for the role there.
Depending on the complexity or simplicity of your scenario, you may also get away with simply having a table in storage that you personally poke with desired configuration values and that the worker can read to retrieve.
The Azure Automation service should definitely be able to automate this task for you. Anything you can script via the Azure PowerShell module, can be imported as a runbook and called manually, via a third-party system, or on a schedule in Azure Automation.
Whether there is an existing runbook for the specific task you are looking to automate, I do not know. But Azure Automation has a gallery of community-contributed content for many common processes, so this may be available there.

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.

Accessing Azure Storage Services from Azure Websites?

I'm curious to know if this is possible, and if so, is it a good or bad idea?
We are developing an Azure application that is largely centered around worker roles that receive their work on a CloudQueue, and put the results in a CloudBlob, that the client then downloads. The web interface itself is a dead-simple ASP.NET MVC site that throws jobs in the CloudQueue, and builds URLs to download CloudBlobs.
Currently we accomplish this by having a Azure Cloud Project in our solution, which has a Web Role with the UI, and Worker Roles with the actual work.
Could we use Azure Websites to publish and host the UI, which calls back to our Worker Roles? The Azure DLLs are just regular old .NET libraries, I'm assuming Azure Websites won't have a problem with them. So, when we want to update the UI, we just publish with Visual Studio. And when we want to update the Worker Role - which is 300MB+ and has a bunch of nasty dependencies like Crystal Reports - we can build the cloud bundle and update the Cloud Service through the Azure management portal.
This seems to me like doing this would make it easier to update the UI. I think it would also be cheaper to host it, as we won't have to buy a bunch of instances for the Web Role.
If your question is "Could we use Windows Azure Websites*", based on your application architecture, you sure can use Azure Website to deploy your front end and configure all the networking connection properly so you can continue access other Azure Storage services. As you are using mostly Blob and Queue, you can continue use HTTP/HTTPS settings in the Azure websites. You can keep worker role by as it is however if it is very complex to deploy, using Windows Azure VM may be another direction to go.
I could say website deployment could be easier if your web app does not have something complex to configure in web server as websites may not be able to match web server level configuration compare to webrole and Azure VM. Answering "Easier and cheap" could be very subjective as this is all depend on load and distribution so you would have to try and evaluate it.

Resources