25 Jan Openbook API for Cloud Cost and Capacity Management
The modern datacenter has many stakeholders demanding data and insights to make informed operational and strategic decisions: architects, developers, managers, executives, finance, project owners. A plethora of solutions and processes exist to provide that data. We understand that as data centers evolve to incorporate cloud services into their business models, cost and capacity data must be easily integrated into these solutions and processes. Legacy virtualization management solutions are not designed to provide this critical cost and capacity information and do not easily integrate with third party systems. To be the cost and capacity knowledgebase, a modern cloud management solution has to be flexible in three key ways:
- Accept user-defined or third party infrastructure information
- Integrate with existing workflows
- Providing relevant usage data to existing management systems such as purchasing, accounting, and project management systems, and customer and operations dashboards.
Openbook has been designed with this integration in mind. Openbook v3 comes equipped with a comprehensive API that provides easy access to all data stored in the Openbook knowledgebase. This API is used to drive the charts and reports in the Openbook UI and can be similarly used for your custom portals and reports. This information can also be exported to business intelligence tools like Tableau, invoicing and CRM systems like Oracle Financials, Zuora, or Salesforce, and accounting solutions like Microsoft Dynamics.
The information available to be queried or posted through the API includes:
- History of raw cloud metrics
- Tenant and customer resource usage
- Calculated cost data used for invoicing, showback, and budget planning
- Demonstrating ROI against public cloud alternatives
- Remaining credit or budget assigned to a tenant
- Products and their assigned costs
- User defined products and services (beyond the OpenStack metrics).
Openbook integrates with the APIs of the various OpenStack services (including but not limited to Ceilometer, Nova, Swift, Cinder, etc.) and stores a detailed history of your cloud environment. This history includes assigned and consumed resources, state of those resources, tenant assignments and customer roll-ups. Multiple tenants can be assigned to a single Customer for reporting purposes. As mentioned, the OpenStack services provide the stream of events and metric data but do not store the history. A solution such as Talligent Openbook is required to store the data in order to provide the history and customer tracking which is so useful for chargeback, cost assignments, and capacity planning.
We also need additional metrics beyond what is available in OpenStack to effectively manage cloud usage. Custom metrics can be a useful way of tracking other infrastructure elements such as load balancers, or other ad hoc charges. The metric fields can be created and populated via an automated workflow using the Openbook API explained below.
The Openbook Open Adapter API is based on a RESTful framework and supports the standard Get, Put, Post, and Delete commands in an easy to understand frameworks. The schema, requests, and outputs are clearly defined. The data is stored in a JSON format so that it can be accessed using standard workflows. You can find the entire list of data elements available from the API in this document: http://talligent.com/openbook-faqs-resources/openbook-v3-how-to-guide-extracting-data/
Accessing the API
The Open Adapter API interface comes fully deployed with all installations of Openbook (Heat, Fuel, or manual installation). Once Openbook is installed, the API can be accessed from this address:
The current list of available API types is shown below. As the API expands to accommodate new services, this list in Openbook will update accordingly. You must be logged in to the Openbook console as an administrator to have access to this list.
Each metric type has a predefined set of Get, Post, Put, and Delete REST API commands, easily accessible through the use interface for exploring and testing.
By expanding the action window, you can see the relevant details about the API request. This can include relevant parameters, description, parameter type, and data type. By entering parameter values, you can test the API and see the response. All Openbook API calls are authenticated via a Basic Auth header containing credentials for a user with the RegionAdmin role. As the button says “Try it out!”
The Response details in the navigator view provide the detail you need to incorporate the API into your custom portal or automate certain workflow items.
All the information available in the Openbook interface is available through the API and is, therefore, easily shared with the various audiences interested in your OpenStack cloud initiative. Here are some ideas to get your feet wet:
- Show a current list of all tenants that roll up to a vice president or business unit
- Identify all orphaned resources in the environment to target for removal
- Audit system access by creating a list of all users assigned by tenant, customer and region
- Export all rate plans so the finance department can model the expected cost/benefit of adding new hardware.
- Show the current snapshot of available compute capacity by host, as well as the growth trends, to plan placement of new projects
There is a lot to explore with the Talligent Openbook Open Adapter API – Please contact us with questions or for more information!