VMware 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 T EC H N I C AL W H IT E P AP E R /1 VMware 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 VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Introduction 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 cloud infrastructure, automatically generated deployment execution plans, and open and extensible architecture. Standardized use of application components and middleware: ready-to-use out-of-the-box VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. middleware 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. VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Figure 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 database- aware high availability. 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. Base database template: a template that provides the blueprint for creating a database. A base DB template is converted from a base DBVM. VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Database 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: VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. 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. VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Figure 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 on Create script & service to call vFDD API Use the service & script application blueprint VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Figure 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: DD_HOST # vFDD server FQDN or IP DD_USER # vFDD user that is authorized to create DB in the org DD_PASSWD # vFDD user password DB_NAME # name of the database to be created DB_IP # connection string or IP of the database created DB_OWNER # desired admin user for the database to be created DB_PASSWD # Password for the desired database admin user DD_ORG # the organization where the database is created DD_DB_GROUP # the database group where the database is created DD_DB_TEMPLATE # the base database template to be used DD_PARAMETER_GRP # the database parameter group template to be used DD_RESOURCE_TEMPLATE # the database resource settings template to be used DB_DESCRIPTION # description of the database DD_BACKUP_TEMPLATE # the database backup template to be used DD_USER_TAG # the user tag to be applied to the database DD_SNAPSHOT # whether a snapshot is created after database creation APP_NODE_INDEX # the cluster node index of the application server in AppD 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. VMware, Inc. 3401 Hillview Avenue Palo Alto CA 94304 USA Tel 877-486-9273 Fax 650-427-5001 www.vmware.com Copyright © 2010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Figure 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. [...]... Application Director and vFabric Data Directo, please visit the product pages at http://www .vmware. com/products /application- platform /vfabric- application- director http://www .vmware. com/products /application- platform /vfabric- data -director VMware Contact Information For additional information or to purchase VMware vFabric Application Director and vFabric Data Director, VMware s global network of solutions providers... respective companies VMware vFabric Application Director is an application provisioning solution that simplifies creating and standardizing application deployment topologies on infrastructure clouds VMware vFabric Data Director enables self-service database provisioning and lifecycle management Both products provide essential tools to help application development The integration solution described in... help application developers, IT administrators, and database administrators deploy and manage applications and one of the most critical application components - databases The solution is easy to implement in a customer environment, and can be leveraged to greatly accelerate application development for organizations in their cloud infrastructure For more information about VMware vFabric Application Director. .. States and/ or other jurisdictions All other marks and names mentioned herein may be trademarks of their respective companies Figure 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. .. 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... An optional SQL SCRIPT component can be added to the vFabric Data Director Service to perform database operations In this example use case, such a component is added to create the database schema and populate data for the Dukes Bank application to use during runtime First, drag -and- drop the SQL SCRIPT application component onto the vFabric Data Director Service in the blueprint Then, define the following... registered trademark or trademark of VMware, Inc in the United States and/ or other jurisdictions All other marks and names mentioned herein may be trademarks of their respective companies Figure 15 Deployment execution plan When the vFabric Data Director Service is installed during execution, the database is created in vFabric Data Director as shown in Figure 16 Figure 16 Database creation Conclusion Organizations... /opt /vmware/ darwin/htdocs/artifacts/services/aurora on the Application Director server) as shown in Figure 11 After clicking the button to create a relation between the Dukes_Bank_App component and the vFabric_ Data _Director_ Service, the application is ready to be deployed Figure 12 shows the complete application blueprint Figure 12 Completed application blueprint 8 Deploy the application Click the button to deploy the application The deployment... protected by U.S and international copyright and intellectual property laws VMware products are covered by one or more patents listed at http://www .vmware. com/go/patents VMware is a registered trademark or trademark of VMware, Inc in the United States and/ or other jurisdictions All other marks and names mentioned herein may be trademarks of their respective companies Appendix A – vFabric Data Director Service... 650-427-5001 www .vmware. com Copyright © 2010 VMware, Inc All rights reserved This product is protected by U.S and international copyright and intellectual property laws VMware products are covered by one or more patents listed at http://www .vmware. com/go/patents VMware is a registered trademark or trademark of VMware, Inc in the United States and/ or other jurisdictions All other marks and names mentioned . E R /1 VMware vFabric Application Director and Data Director Integration Solution Guide Table of Contents Introduction 2 vFabric Application Director. Concepts 3 vFabric Data Director 3 Product Overview 3 Key Concepts 4 REST API 5 vFabric Application Director and vFabric Data Director Integration Solution