In this article you will learn about the new Azure Cloud Optimizer package type, how to create one in TimeXtender Data Orchestration and run it.
When using cloud resources, such as Azure virtual machines and Azure SQL databases, leaving them idle at high resource usage levels, or running at all, when they are not truly needed can quickly become very expensive. The Azure Cloud Optimizer package type for TimeXtender Data Orchestration allows you to create packages that can switch Azure Virtual Machines on or off, and reboot them should that be required, or scale Azure SQL databases up or down, between purchasing models, tiers and the different available capacities. These packages can be run before and after other processes, making sure those processes that need powerful virtual machines running that nothing else uses, or that require databases to process much more data than they otherwise do very quickly, have what they need, but then going back to the less expensive configuration afterwards.
Create a Data Provider
- Open up TimeXtender Orchestration and Data Quality (O&DQ) Desktop client
- Click General > Data Providers
- Right-click Data Providers, select New -> Data Provider
- Type in a Name for your Data Provider
- Type in a Description for your Data Provider
- Select the Systems in which your Data Provider should be accessible
- Click Data source Type and choose Azure Connection
- Type in the Tenant-Id, App Id and the Client Secret from the Azure App Registration
- Click Save
Create Azure Virtual Machine package
- Click Orchestration
- Right-click Packages, select New -> Azure Cloud Optimizer.
- Type in a Name for the Azure Cloud Optimizer package.
- Select the recently created Data Provider.
- Select the appropriate resource type, “Virtual machine start/stop”. This will show the appropriate Configuration panel, and populate the list of Azure virtual machines. Depending on the amount of resources in your Azure subscription this step may take a long time.
- Select the virtual machine name you wish to configure the package for.
- Select the appropriate operation for the virtual machine, Start, Restart or Shut down.
- Click Save, and the package is ready to be run.
Create Azure SQL Database scaling package
- Right-click Packages, select New -> Azure Cloud Optimizer.
- Type in a Name for the Azure Cloud Optimizer package.
- Select the recently created Data Provider.
- Select the appropriate Resource Type “Azure SQL database scaling”. This will show the appropriate Configuration panel and populate the list of Azure SQL databases. Depending on the Amount of resources in your Azure subscription this step may take a long time.
- Select the SQL database name you wish to configure the package for.
- Select the purchasing model you wish to configure the database to (vCore or DTU).
- Select the tier you wish to configure the database to (“General Purpose”, “Business Critical” or “Hyperscale” for the vCore purchasing model, “Basic”, “Standard” or “Premium” for the DTU purchasing model.
- Select the capacity you wish to change the Database to, depending on the purchasing model and tier, there are different capacities available.
- Click Save, and the package is ready to be run.
For advanced users there is an option to write the JSON payload of the REST command to scale the database directly (for information on the parameters that can be configured this way consult the Azure documentation from Microsoft). Note that when a package using custom JSON to scale a database is run, the package run is marked as successful once Azure has responded to the scaling REST command with a success code.