VMware vFabric Data Director improves agility and drastically reduces database TCO through database-aware virtualization and self-service lifecycle management, empowering administrators
Trang 1VMware vFabric Application Director and vFabric Data Director Integration Solution Guide
T E C H N I C A L W H I T E P A P E R
Trang 2VMware vFabric Application Director and Data Director Integration Solution Guide
Table of Contents
Introduction 2
vFabric Application Director 2
Product Overview 2
Key Concepts 3
vFabric Data Director 3
Product Overview 3
Key Concepts 4
REST API 5
vFabric Application Director and vFabric Data Director Integration Solution 5
Integration Benefits 5
Integration Solution 6
Example Use Case 7
1 Create new service in catalog 7
2 Define service properties 8
3 Implement service creation script 9
4 Create application and blueprint 10
5 Add service to the blueprint 11
6 Assign values to service properties 11
7 Create SQL Script component 12
8 Deploy the application 13
Conclusion 15
VMware Contact Information 16
Appendix A – vFabric Data Director Service script 17
Trang 3Introduction
Application development is evolving faster than ever in the cloud Daily updates to functionality, frequent changes in scale, and constant user demands create rapid change Cloud computing provides application owners with instant access to infrastructure; however, building out applications still requires administrators to individually install and configure components on each virtual machine to plug into the application
architecture Organizations need a better way to accelerate and automate the configuration and deployment
of multi-tier applications across cloud environments
Most of today’s applications contain a database component Database creation, administration, and management typically require a skill set that goes beyond that of application developers Therefore, databases are traditionally managed by DBAs in an organization The separation of responsibilities and resulted business processes may potentially lead to operational complexity and inefficiency among IT administrators, DBAs, and application developers Moreover, in a legacy database environment, organizations often struggle with arduous development cycles, long deployment and provisioning times, difficult and expensive database management, lack of centralized control over critical resources, and expensive licensing schemes Organizations have a strong demand for extending virtualization and cloud computing benefits to their database environments to address these issues
VMware vFabric™ Application Director is an application provisioning solution that provides deployment automation and self-service provisioning by standardizing, streamlining and automating release into hybrid cloud environments VMware vFabric Data Director improves agility and drastically reduces database TCO through database-aware virtualization and self-service lifecycle management, empowering administrators to securely automate routine tasks including database provisioning, high availability, backup, and cloning
Together, vFabric Application Director and vFabric Data Director offer a powerful solution that builds upon the VMware virtualization and cloud infrastructure to automate and accelerate application development This paper provides a technical overview of how vFabric Application Director and vFabric Data Director can
be integrated together as a solution to automated application and database deployment Detailed procedures along with screenshots are provided in this paper to help readers understand the integration method and implement it practically in their specific environments
vFabric Application Director
Product Overview
vFabric Application Director is designed for application teams to leverage highly reusable and available cloud infrastructure to simplify and automate application provisioning and release for cloud ready applications By standardizing infrastructure and application components, and abstracting application specific deployment logic, vFabric Application Director untethers applications from the underlying infrastructure so that applications can be provisioned across any VMware based cloud infrastructure flexibly vFabric Application Director offers the following key features:
Simple and automated application provisioning: use of graphical drag-and-drop canvas for creating
application blueprints, intuitive point-and-click interface for customizable scripts, and comprehensive deployment execution plans
Cloud-ready provisioning: abstraction of application specific deployment logic from the underlying
Trang 4middleware installation and configuration services, optimization for vFabric middleware stack, and integration with cloud templates
For detailed product specifications and systems requirements, refer to the VMware vFabric Application Director documentation
Key Concepts
The following definitions help you understand the key vFabric Application Director concepts in this white paper
Application: logical deployment unit, consisting of application components and their dependent services
and operating systems that can be distributed across multiple virtual machines
Application component: custom code packaged as EAR file, WAR files, and so on
Blueprint: logical topology of an application for deployment A blueprint captures the structure of an
application with logical nodes, their corresponding services and operating systems, dependencies, default configurations, and network topology requirements
Deployment profile: collection of deployment settings for a blueprint, including cluster size, CPU, memory,
cloud tmplates, and networks
Node: virtual machine or a cluster of virtual machines defined in the blueprint
Catalog: library that contains logical templates, which are pointers to cloud templates, as well as scripted
software, called services that can be installed on a virtual machine
Service: scripted software that can be installed on a virtual machine and reused in multiple applications Properties: configuration name-value pairs for services and application components These are variables
used by the scripts to set parameters on a script and run various configurations
Actions: Life cycle stages for the install, configuration, and start scripts for services and application
components to be installed
Execution plan: task plan for viewing the order in which virtual machines are created and software is
installed, configured, and started
vFabric Data Director
Product Overview
vFabric Data Director enables database-aware virtualization on VMware vSphere® and provides self-service lifecycle management for heterogeneous databases, increasing developer agility and reducing database costs vFabric Data Director reduces capex through database-aware virtualization, increases agility through automated lifecycle management, and accelerates application development through policy-based self-service Designed for both enterprises and service providers, vFabric Data Director empowers administrators to securely automate and delegate routine tasks, including database provisioning, backup and cloning Currently, Oracle and VMware vFabric Postgres databases are supported, with more databases to be supported in the future Figure 1 shows the vFabric Data Director architecture
Trang 5Figure 1 vFabric Data Director platform architecture
vFabric Data Director offers the following key features:
Database-aware virtualization: simplified virtualization process through a unified platform with
integrated capabilities, resource management and isolation, integrated template management and database ingestion
Automated lifecycle management: powerful Web-based management console, database provisioning
in minutes using database templates, innovative database cloning, policy compliance, and aware high availability
database- Self-service: self-service database provisioning, self-service database management, and robust
role-based access control (RBAC)
For detailed product specifications and systems requirements, refer to the VMware vFabric Application Director documentation
Key Concepts
The following definitions help you understand the key vFabric Data Director concepts in this white paper
System: the database lifecycle management platform, which is the top level of the vFabric Data director
hierarchy
Organization: the basic component of vFabric Data Director A system can contain multiple organizations,
each of which can have its own administrator and allocated resources
Database group: a component of an organization Each database group contains a set of databases that
share the resources provided to the group, enabling subdivision of resources from the organization’s allocated resources
Database: a component of a database group A database refers to an instance of a database such as
Oracle and vFabric Postgres
DBVM: a virtual machine that contains the virtual hardware, structure, and the required files and
configuration information necessary to build database templates and to create and operate databases
Trang 6Database resource template: a template that defines the computing and storage resources for creating a
database, the database parameter group, and the high availability settings
Resource settings: the specification of number of virtual CPUs, memory size, and recommended database
storage allocation in a resource template Moreover, high availability for the template and all corresponding databases, as well as CPU and memory priority can be specified in resource settings
Parameter group: the specification of connection, memory, I/O, WAL, checkpoint, logging, and other
information for the database in a resource template
Backup template: a template that defines backup settings for databases, such as internal and external
backup frequency, start time, retention, and point-in-time recovery
Point-in-time recovery: when enabled, point-in-time recovery ensures that each database transaction is
recorded and enables reversion of the database to any point in time within a certain time range
User tag: a tag to filter the list of databases that are viewed in an organization
REST API
The vFabric Data Director API provides support for developers who build interactive clients of vFabric Data Director using a RESTful application development style The API calls communicate over HTTP, exchanging representations of vFabric Data Director objects These representations are encoded as XML elements or JSON objects, depending on the format of your request
You can use HTTP GET requests to retrieve the current representation of an object, HTTP POST and PUT requests to create or update an object, and HTTP DELETE requests to delete an object Figure 2 displays the structure of a request More information about the API can be found in document vFabric Data Director API Programming Guide at http://www.vmware.com/support/pubs/vfabric-data-director-pubs.html
Figure 2 Request format
vFabric Application Director and vFabric Data Director Integration Solution
Integration Benefits
vFabric Application Director provides a set of out-of-the-box catalog services that allow certain databases, including Oracle and vFabric Postgres, to be installed and configured for basic deployment An integrated Application Director and Data Director solution enables more advanced database provisioning and management during the application development lifecycle The integration solution offers the following benefits:
Trang 7 Data Director allows template-based database creation to give application developers more flexibility in creating tailored databases Each database template can be customized with configuration settings that satisfy unique application requirements during application deployment
Approved database templates help ensure that best practices widely applied in database deployment are conformed to Databases deployed from these templates can easily be patched and maintained More importantly, common compliance and security requirements associated with database deployment
in the organization can be enforced appropriately to eliminate potential vulnerabilities and risks in the application environment
Data Director makes it easy to ingest and clone databases from a production database and then mask certain production data as needed, enabling application deployment where the application is tested with and run against real or masked production data
Since application developers and DBAs typically operate in different realms, while application developers lack expertise to manage these databases, DBAs may not be aware of the existence of them or have difficulty to locate them in order to manage the lifecycle of these databases centrally This easily leads to database sprawl in the organization where unmanaged and undermanaged databases are difficult to patch, backup, clone, and recover With the integration, each database is created in Data Director, hence making it visible and available for central lifecycle management DBAs can delegate routine tasks on databases to application developers leveraging the built-in database management capabilities in Data Director
Integration Solution
The integration solution is built upon the vFabric Application Director framework for catalog services management and the vFabric Data Director REST APIs Figure 3 illustrates the workflow of the solution implementation in vFabric Application Director
Trang 8Figure 3 Steps to integrate vFabric Data Director into vFabric Application Director
As a prerequisite, the vFabric Application Director server must have network connectivity to the vFabric Data Director server, and the application deployment environment must have network connectivity to the DBVMs
Example Use Case
A use case is provided in this section to demonstrate how the solution works and how to implement the solution in a real-world application deployment In this use case, an application architect creates and deploys an application blueprint for a 3-tier application that is consisted of the Web tier, the application tier, and the database tier The application tier runs the sample Dukes Bank application that is by default included in vFabric Application Director installation, and the database tier operates a vFabric Postgres database provided by vFabric Data Director The implementation process follows the workflow in Figure 3
1 Create new service in catalog Log on to vFabric Application Director and click Manage Catalog Items Click the button to create a new service
Create vFDD service
in catalog
Define service propertie
s
Impleme
nt script using vFDD REST APIs
Create applicati
on blueprint
Add the vFDD service
to blueprint
Specify vFDD service property values
create SQL Script compone
nt
Deploy applicati
Trang 9Figure 4 Create a service in vFabric Application Director
2 Define service properties
Service properties are used to parameterize service scripts so that vFabric Application Director can pass the defined properties as environment variables to scripts running in a virtual machine The vFabric Application Director agent in the virtual machine communicates with the vFabric Application Director server to resolve the properties The agent then proceeds to create environment variables and passes them to the scripts The following properties must be defined for the service:
A default value can be assigned to each of these properties These values can be overridden in application blueprint to accommodate the needs of a specific application The values can be further overridden in the deployment profile to comply with the development environment Figure 5 shows an example of the definition of the service properties
Trang 10Figure 5 Service properties
3 Implement service creation script
Each service includes the three predefined life cycle stages or actions to install, configure, and start scripts
A bash script must be provided for at least one of the lifecycle stages In this solution, a bash script is
created for only the INSTALL stage The script uses the cURL command-line tool to communicate with the vFabric Data Director server over HTTP If the cURL tool is not installed in the logical template already, the
script assumes that Internet access is set up appropriately for the virtual machine to install the tool
Figure 6 Service creation script
The script has a workflow described in Figure 7 The entire script is attached in Appendix A of this white paper
Trang 11Figure 7 DB creation script
vFabric Data Director uses its DB Name Server virtual machine to route database connections to the Data Director-deployed databases The database connection string has a format of
{UUID}.DBNameService_IP_Address, where the curly brackets, {}, are part of the connection string and denote the UUID This leads to the benefit that applications do not need to be modified or reconfigured to connect to the database in case its IP address has changed While this is the recommended method of connecting to a database, you can also simply use the IP address to connect to the database in the traditional way The script will need to be modified slightly to fetch the database IP address rather than the connection string after the database is created successfully
4 Create application and blueprint
For illustration purpose in this use case, find the 3-tier Clustered Dukes Bank App application in vFabric Application Director, and click the button to copy and create a new one named
ClusteredDukesBankWithDataDirector The application blueprint contains a Apache load balancer, a cluster
of Dukes Bank application servers, and a MySQL database server using the out-of-the-box MySQL catalog service
Install the curl tool Query and find ID of the specified org the specified db groupQuery and find ID of DB exists?
Return db connection string
Query and find ID of the specified base db template
Query and find ID of the specified
Create DB Wait for DB creation
Query and find ID of the db being created
Query and find ID of the
db creation task
Check status of the db
Trang 12Figure 8 Create application and blueprint
5 Add service to the blueprint
Remove the MySQL server from the blueprint, and drag-and-drop the vFabric Data Director Service onto the cluster of application servers The DBVM for the application will be created in the vFabric Data Director environment instead of the vFabric Application Director deployment environment
Theoretically, the service can be placed in any node of the application blueprint, in this example including the Apache load balancer If the service is considered a component of clustered nodes, as shown in this paper, a mechanism is put in place to ensure that only one node of the cluster will run the service to create a database while other nodes simply use the database after it is created
6 Assign values to service properties
The Dukes_Bank_App component of the application needs to be updated slightly due to the original MySQL server being replaced by the vFabric Postgres server First, the database-related properties need to be changed to have values shown in Figure 9
Figure 9 Application properties
Secondly, the bash script for the INSTALL lifecycle stage needs to be modified to replace the following two lines: