Is there any API or Automation for MS Azure Migrate? - azure

I came across the Azure Site Recovery runbook scripts to perform various task but now MS recommend using Azure Migrate instead of ASR for migration projects. Any one know if there are any API, ARM, scripts or runbook capability available for Azure Migrate Automation? I haven't been able to find anything.
Anything information on this would be greatly appreciated. Thanks,

Here are the set of API's for migrate projects. For more information related to Azure Migrate, please refer this official documentation.

For any one looking into this there is finally PowerShell modules to handle this: https://azure.microsoft.com/en-us/blog/atscale-migration-automation-support-with-azure-migrate-and-azure-powershell/

Related

How to Automate Deployment of Azure Database for PostgreSQL using Azure DevOps

Can someone pls help me to automate build and release pipelines in Azure DevOps for Azure DB for PostgreSQL database (Single Server) so that I can create a Database and run different scripts in that database for creating/altering tables, functions, indexes etc. ?
I googled and found nothing in Microsoft documentation for this purpose but I did find it can be done using Zapier
As per organizational policies I can not use Zapier or any third-party tools/sites.
Is it doable only using Microsoft build and release tasks in Azure DevOps, can someone pls guide me with any steps for this purpose ?
Database DevOps is difficult because you have to manipulate existing objects, not simply replace them like you do for application deployments. To do this, you have to add a tool that manages your Data Definition Language queries. Or you can build one. We did that a long time ago. I don't recommend it. Tons of work, lots of issues.
For PostgreSQL, I'd suggest you start testing Flyway. It works really well with Azure DevOps. I have a short video you can use to see it in action. Flyway is open source, so getting started with it is license free. You can install the software, but it also runs through containers, so it makes it really simple to implement through the Azure DevOps agents. The concept is pretty simple. It acts as a marshalling tool to run your DDL in the correct order, like a manifest. Then, it marks the database so it knows which scripts it has already run. You go from there.

Azure Logic Apps and VMs

I'm searching for some ideas, how to create an logic app which can turn on/off a VM.
Microsoft Azure team answered on a similar question a couple of months ago, but no any results till today. Does anybody have an idea, is there a way to implement it?
Thanks in advance.
Easiest way - create a webhook that will call an Azure Function that will shutdown a VM.
You could also use the Azure Automation service/connector from logic apps to run a PowerShell script to shut down a VM. Azure Automation has some samples in their gallery that do this.

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)

Remote monitoring Azure Products

I'm trying to figure out if there is a way to monitor Azure products (HDInsight, SQL Storage, etc) via API (or SDK or CLI), but from the documentation I can't figure it out.
Can anyone point me in the right direction? Is this even possible? Is there some documentation or tutorial somewhere that can help me understand how to do it?
Check out .NET nuget packages for Azure Management, specifically Azure Monitoring http://www.nuget.org/packages/Microsoft.WindowsAzure.Management.Monitoring/
Here's an example on how to talk to this library:
http://blogs.msdn.com/b/cie/archive/2014/02/20/how-to-use-windows-azure-monitoring-services-management-library-to-create-an-autoscale-rule.aspx
(although for auto-scaling rules, not monitoring, but connection is similar).
If you want to be more hands-off and white-glove about monitoring for Azure, check out http://cloudmonix.com
Disclaimer: affiliated with CloudMonix

Saving complete azure configuration to file?

Is there any way to save the complete state of my azure configuration?
Basically, I just created a demo for a project I'm working on. This demo has a website/webjob, scheduler, storage queue, storage blob, redis cache and documentDB. I have configured these components in terms of size/scale/schedules but now the demo is done.
I don't want to pay for these services and I don't need them online for now. However, I don't want to have to recreate and reconfigure them if I need to relaunch the demo in a month.
Is there a way to save my current azure configurations to a file and then to be able to recreate all the services again automatically (with a script or a small program)?
Thanks!
This is a very good question, that sums up a historical problem we're in the process of making easier and more flexible. I'll answer this question with two parts.
First and foremost, you have tools like the PowerShell cmdlets now, that you can script out the creation of an entire "world" in Azure and then re-run whenever you want, against a subscription, to scaffold out a whole architecture. You can also use the management libraries for .NET to do this from a .NET application. When we embarked on the VS WebJobs tooling, for instance, I worked up a prototype for my developers on using MAML to create WebJobs and scheduler job collections. You can see the demo code for that here: https://github.com/bradygaster/maml-demo-scheduled-webjob-creator
We've also recently embarked on new mission of re-creating a lot of the management APIs so that they support the notion of templates and resource groups, to marry up with the new portal experience. Here's a great MSDN article that discusses how the PowerShell cmdlets for the Gallery could be used to pull down a list of the various templates that could then be pushed back up as fully-baked architectures running in Azure. You have the capability of building these templates yourself, then you could use these cmdlets to fan out and create things that you write up in your own custom templates. http://msdn.microsoft.com/en-us/library/dn654596.aspx
Hope this helps!
For Azure websites you can use the Back and Restore option to store the site and restore it back when you want to demo again, But all you have to do is Stop the services and you should be able to keep the demo without incurring cost.

Resources