Cloud Cruiser and Azure Public Rate Card API Integration In this article: Introduction Azure Rate Card API Cloud Cruiser s Interface to Azure Rate Card API Import Data from the Azure Rate Card API Defining New Services and Rate Plans Verify Azure Services and Rates Normalize WAP and Azure services Create Report for Workload Cost Simulation Analysis Next Steps Introduction In this tutorial, we describe how the information collected from the new Rate Card API can be used in Cloud Cruiser for workflow cost simulation and analysis. Azure Rate Card API The Rate Card API provides rate information from Azure. After authenticating with the proper credentials, you can query the API to collect metadata about the services available on Azure, along with the rates associated with your Offer ID. Below is a sample response from the API showing the prices for the A0 (Windows) instance: { "MeterId": "0e59ad56-03e5-4c3d-90d4-6670874d7e29", "MeterName": "Compute Hours", "MeterCategory": "Virtual Machines", "MeterSubCategory": "A0 VM (Windows)", "Unit": "Hours", "MeterRates": { "0": 0.029 }, "EffectiveDate": "2014-08-01T00:00:00Z", "IncludedQuantity": 0.0 },
Cloud Cruiser s Interface to Azure Rate Card API Cloud Cruiser can leverage the Rate Card API information in different ways. For this article, we will show how it can be used to make IaaS workload cost simulation and analysis. To demonstrate this use case, imagine a workload of several instances running on Windows Azure Pack (WAP.) The goal is to simulate this same workload on Azure, and estimate the costs of doing such migration. In order to create this simulation, there are two main tasks to be performed: 1- Import and process the service information collected from the Rate Card API. This task is also performed on the workbooks, where the extract from the Rate Card API is transformed and published to a new rate plan. This new rate plan will be used on the simulations to estimate the Azure prices. 2- Normalize WAP services and Azure services for IaaS. By default, WAP services are based on individual resources (CPU, Memory Size, Disk Size, etc.) while Azure services are based on instance size (A0, A1, A2, etc.). This first task can be performed by Cloud Cruiser s ETL engine, called workbooks, where these resources can be bundled on instance sizes, analog to Azure instance services. Import data from the Rate Card API Cloud Cruiser workbooks provide an automated way to collect and process information from the Rate Card API. ETL (extract-transform-load) workbooks allow you to configure the collection, transformation, and publishing of data into the Cloud Cruiser database. Each workbook can have one or multiple collections. This allows you to correlate information from different sources to complement or augment the usage data. For this example, we ll create a new sheet into an existing workbook, and set a new collection to import information from the Rate Card API.
Figure 1 - Creating a new collection Figure 2 - Import data from the new collection
After importing the data into the workbook, it s possible to create multiple steps and transformation processes, to modify and model the data. For this example, since we are only interested in infrastructure-asa-service (IaaS,) we can use the transformation steps to remove unnecessary rows, or records, related to services other than IaaS. Figure 3 - Transformation steps to process collected data from Rate Card API Defining New Services and Rate Plans There are different ways to define services on Cloud Cruiser. One of the options is to import the services from the usage data. This method is commonly used when working with public clouds, where the services are already defined by the provider. A Rate Plan is a set of rates or prices that can be applied to different services, based on effective dates, or group of customers, among other options. Rate Plans can also be used on Cloud Cruiser to create simulation or What-if scenarios, to understand how changes in services can affect the total cost of a workload.
In this example, we will use the service information from the Rate Card API to define new services in Cloud Cruiser. In the same way, we can use the rates associated to the services to create a new Rate Plan on Cloud Cruiser. At the end of the transformation process, it is possible to create a new step and publish the data from the Rate Card API as new services and rates. Figure 4 - Publishing the data from the Rate Card API as new Services and Rates Verify Azure Services and Rates After publishing the services and rates, you can verify the list of imported services in Cloud Cruiser s Services tab.
Figure 5 - Verifying the new Services On the Rate Plans tab, you can check the new rate plan called AzureSimulation with the rates imported from the Rate Card API. Figure 6 - Verifying the new Rate Plan and associated rates
Normalize WAP and Azure Services By default, WAP provides usage information based on the use of compute, memory and network resources. In Cloud Cruiser, you can define your services based directly on the allocation or metered usage of these resources. For example, you can set a basic rate for each hour of CPU usage, or charge the GB of memory allocated to an instance. For this example, in order to compare costs between WAP and Azure, we need to aggregate the resource usage on WAP into bundles, that then could be mapped to Azure services. This transformation can be implemented easily in the workbooks. Figure 7 - Transforming WAP data to normalize services The last step at the workbook is to publish the data into Cloud Cruiser database. During this step, the usage data is now bundled into services (that map to the Azure Services) and tied to default rates to create the charges. After finishing the workbook, you can automate the processing of the data by adding a new task on the scheduler and specifying the frequency and time for the workbook to run.
Figure 8 - Workbook scheduling Create Reports for Workload Cost Simulation Analysis As the usage is collected and the charges are loaded into the Cloud Cruiser database, we can then leverage the Cloud Cruiser Insights module an advanced analytics reporting tool to create the workload cost simulation that we are looking for. In order to demonstrate this scenario, we created the following report:
Figure 9 - Sample Report for the Workload cost comparison scenario The top graph shows a cost comparison broken by services and compares the price of running the workload for each specific service between WAP (dark blue color) and Azure (light blue color). The bottom graph shows the same data but broken down by department, demonstrating the costs for each department to run their workload on WAP and Azure, along with the difference between these two Savings bar (green color). Next Steps For more information about Cloud Cruiser, please contact info@cloudcruiser.com. For detailed instructions on creating Cloud Cruiser workbooks and reports, please reference Cloud Cruiser s online documentation (valid login required).