240 likes | 247 Views
Explore how OpenStack infrastructure APIs enable applications to take advantage of a versatile cloud platform, allowing for dynamic resource allocation, application-centric thinking, and application identity management.
E N D
Let OpenStack Applications Control their Destiny Chandan Dutta Chowdhury Sriram Subramanian Sarath Chandra Mekala
OpenStack and Infrastructure APIs OpenStack has successfully created a Cloud platform IaaS is the point of focus Rich set of APIs to interact/manage the infrastructure End user can think of infrastructure as code APIs to create virtual Servers/Containers/Storage etc. Connectivity services Elasticity of Cloud infrastructure is the most notable differentiator Scale up to serve demands, Scale down to save cost
Infrastructure vs Application How does the Application benefit from this versatile infrastructure ? We are still doing Application the old way Resource allocations are done statically Resource utilization are captured by external polling and monitors Discovery of application services are managed externally What advantage can the applications derive for a cloud platform?
Application centric thinking Move our focus to the application How the Applications can take advantage of the infrastructure ? Let the application request the required resources Let the application provide health and resource utilization data. What can the infrastructure enable ? Discovery of other applications deployed in the environment Formation of clusters that serve as a single application Provide means to seed configuration
Application as a OpenStack Resource Modeling the definition of an Application. Multiple application on an instance or one application across multiple instance APIs to provide access to Applications as a OpenStack resource (Application Infra API) Can be a central registry to track applications Finer grained control and monitoring of Applications
Dynamic Resource Allocation Cloud based platforms provide Elastic infrastructure Applications should monitor their own utilization of resources. Use the App Infra APIs to request for resource, base on the self monitoring data
Dynamic scale down: Cost of resource Additional resource adds to cost of deployment Self Monitoring demand can help recognize opportunity to scale down Analyzing application self resource monitoring over a period of time can provide useful trends. App Infra API can help in generating trends
Limiting resources for an Application How much dynamic resource can an application request ? If we allow applications to ‘ask’ for resources, we also need a way to restrict how much they can ask. Use Application quota to limit dynamic resource allocation Converting dynamic resource request beyond quota to application monitoring data Need supervision Re-evaluate Application quota
App Infra APIs for Application developers The Application instance [/applications/{id}] Application Stats [/applications/{id}/stats] Dynamic Resource Allocation [/applications/{id}/resources] Resource Quota [/applications/{id}/quota]
Making the APIs accessible The App Infra APIs needs to be accessible to all types of deployed APPs It should not force the APP VMs to have special configuration external network access The APIs are for application and APP developer centric and need not be exposed of the external world
Implementing the APIs for Application App Infra APIs as REST based calls Exposing APIs over OpenStack metadata endpoint Extending the metadata service for Application APIs Additional benefit API access restricted to the Instances No additional service required
Application centric API OpenStack Platform Metadata API Endpoint Application Instance Metadata Handler App Insight and tracking App Monitoring & Resource utilization App Infra Handler Infrastructure APIs Client Allocate Resources Allocated Resources
Accessing the APIs curl -X POST -H "X-Tenant-Id: chandan" -H "X-Instance-Id: 1" \ -H "X-App-Auth: password" http://169.254.169.254/applications -d '{"name": "App1"}’ curl -X POST -H "X-Tenant-Id: chandan" -H "X-Instance-Id: 1" -H "X-App-Auth: password" http://169.254.169.254/applications/App1/resources -d '{"Res1": "Value1"}'
Identity of an application What can be used to identify an Application ? Application deployed on an OpenStack instance Owned by a Tenant Location Keep in mind, Application Identity should take care of multi instance application Mobility of application across instances Replicated applications
Securing Application identity Maintaining identity across Application and Instance restarts Replication of application Mobility across instances Restricting access to the Application configuration Associate resource allocation with the application
Configuring Applications Application APIs can be used to provide an infrastructure to share configuration data Applications can be spread across multiple nodes Need a single source of configuration Need notification of configuration changes
Multi node Application How to enable application cluster ? Cluster of similar Application for load sharing Application composed of different components Application Groups can maintain shared configuration Common database, logging, storage configuration Tracking node/app roles in a multi component composed application
Authenticating and Authorization Implementing App identity Authorizing members to join a group Controlling access to group and configuration data A simple approach Group membership based on pre-shared secret
Load Sharing Applications The state of the application can provide important hints to the load balancer OpenStack Services can Trigger Application scale up based on Application state Removing a busy node from the active workers pool and joining back Dynamic migration of instances based on Applications to align to availability requirements of the application.
APIs for Application developers Application Configuration Seed [/applications/{id}/config] Application Groups [/appgroups/{id}] Application Group configuration [/appgroups/{id}/config] Application Clustering [/applications/{id}/groups]
Summary Application APIs will focus on exposing infrastructure interfaces to Application developers Application developers can decide on monitoring and dynamic resources allocation strategy of the application APIs can support Application groups to support scenarios of clustering for load sharing and availability OpenStack will gain access to the internals of applications run by the tenant
Q & A • Author: OpenStack Networking Cookbook • Blog: chandanduttachowdhury.wordpress.com • E-Mail: chandanc@juniper.net • Author: OpenStack Networking Cookbook • Blog: www.innervoice.in/blogs, Twitter: @reachsrirams • E-Mail: srirams@juniper.net • Blog: sarathblogs.blogspot.in • E-Mail: sarathcm@juniper.net • Twitter: @sarathmekala