HP CloudSystem Enterprise F5 BIG-IP and Apache Load Balancing Reference Implementation Technical white paper Table of contents Introduction... 2 Background assumptions... 2 Overview... 2 Process steps... 2 System configuration... 3 System component details... 3 Network pool requirements... 4 Storage requirements... 4 Server pool requirements... 4 Configuring HP CloudSystem Enterprise... 5 Creating and configuring vcenter templates... 5 Installing and configuring the F5 BIG-IP instance... 6 Configuring the HP Operations Orchestration workflows... 8 Creating the service in HP Cloud Service Automation... 8 Creating and using the application service... 10 Creating a subscription in HP Cloud Service Automation... 10 Verifying the subscription and deployment... 10 Returning the resources... 11 For more information... 12
Introduction This reference implementation demonstrates how HP CloudSystem Enterprise is used to install, configure, and deploy the Apache web server application as part of a load balanced cluster managed by a F5 BIG-IP appliance. Step-bystep instructions are provided to easily guide you through the configuration. The result is a functioning HP CloudSystem Enterprise environment that can automatically provision and decommission an Apache server as part of a cluster. Target audience: You should have working knowledge and hands-on experience with HP CloudSystem Enterprise (VMware vcenter and HP Cloud Service Automation) and F5 BIG-IP Local Traffic Manager. You should also understand the core concepts and have demonstrated proficiency with HP CloudSystem Enterprise. Others may benefit from this document, but much of the background details are omitted because they are available in other HP documentation. The For more information section at the end of this document lists documentation locations that may be helpful to the novice reader. This white paper describes testing performed in October 2011. Background assumptions This reference implementation requires that the HP CloudSystem Enterprise environment is already installed, configured, and functioning correctly. Each component must be verified to work individually and as a complete HP CloudSystem Enterprise environment. The major components include the following: HP Cloud Service Automation HP Operations Orchestration HP Server Automation VMware vcenter F5 BIG-IP Local Traffic Manager (LTM) Virtual Edition (VE) You can find locations of the documentation for installing, configuring, and verifying these components and their interoperability in the For more information section at the end of this document. Overview Process steps This reference implementation details the major steps required to set up and configure the load balancing service. They include the following: 1. Retrieving and unpackaging the zip file provided with this reference implementation 2. Creating and configuring the VMware vcenter templates 3. Configuring the F5 BIG-IP instance 4. Importing and customizing the HP Operations Orchestration workflows 5. Creating the service in HP Cloud Service Automation After these steps are complete, the application is available for business users to automatically deploy using the HP Cloud Service Automation Service Request Catalog. A final step is also included that will decommission the service and return the resources to the HP CloudSystem Enterprise environment. 2
System configuration This reference implementation was tested and completed in an HP CloudSystem Enterprise environment similar to the one shown below. Specific product software, hardware, and firmware versions may be found in the System Component Details section. Figure 1. HP CloudSystem Enterprise environment HP Networking 2 x 5820 Switch Series HP Matrix OE 1 x DL360 G7 VMware Cluster running HP Cloud Service Automation HP Server Automation VMware vcenter F5 BIG-IP LTM VE 2 x BL460c G7 Application Deployment Servers 2 x BL460c G7 HP SAN Switches 2 x 8/24 HP 3PAR Storage System component details Table 1. HP CloudSystem Enterprise components Component Servers Testing Environment Version HP ProLiant BL460c G7 Physical and virtual servers HP Onboard Administrator 3.30 HP Virtual Connect Manager 3.18 HP Integrated Lights-Out 1.20 (ilo 3) HP Matrix Operating Environment (OE) 6.3 HP Server Automation 9.10 HP Cloud Service Automation 2.01 HP Operations Orchestration 9.00 3
Table 2. Open source and third-party components Component Operating System Version Red Hat Enterprise Linux 5.6 x64 Virtualization Manager VMware vcenter Server 4.1 Apache Web Server 3.2.1 F5 BIG-IP LTM VE 11.0.0 Network pool requirements The network requirements for this implementation are detailed in the following table. You should configure these networks before you start this implementation. Table 3. Network requirements Network name Name in service template Notes Production network Prod_A External production network for communication between the users and the F5 BIG-IP virtual server instance. Management network Mgmt_A The deployment network used to install the OS using VMware vcenter (DHCP). Internal network F5Internal Internal production network used for the communication between the F5 BIG-IP load balancer and the actual web servers in each pool (DHCP). Storage requirements For this implementation, a VMware datastore must be available for virtual machine provisioning. Table 4. Storage requirements Description Total # LUNs Size Redundant paths to storage Disk is bootable VM Datastore N/A 40 GB N/A Yes Server pool requirements The table below lists the minimum requirements for physical and virtual servers. These values are specified in the VMware vcenter template and may be adjusted for your environment. Table 5. Server pool requirements Server name Minimum CPU frequency Minimum CPU cores Minimum memory Apache-1/Apache-2 1.0 GHz 2 cores 4 GB 4
Configuring HP CloudSystem Enterprise Creating and configuring vcenter templates The service design uses two vcenter templates that you have to create. Both templates run Red Hat Enterprise Linux 5.6 x64 and have DHCP network interfaces for F5Internal and Mgmt_A. They both also have Apache 3.2.1 installed and configured to start on boot. The only difference between them is the contents of the Apache server homepage, which differ so you can tell which template has been deployed. These templates should be named Apache-1 and Apache-2. Creating the first template To create the vcenter template for Apache-1, complete the following steps: 1. Using the vsphere client, log in to vcenter as Administrator. 2. Click Home > Inventory > VMs and Template. 3. Right-click the RHEL5x64-clone template and select Convert to Virtual machine. 4. Make sure the new virtual machine has IP addresses assigned from the DHCP networks Mgmt_A and F5Internal (primary). 5. Install Apache on the virtual machine by running the following RPMs, which are available from the Red Hat Enterprise Linux distribution: apr-1.2.7-11.x86_64 apr-util-1.2.7-7.el5.x86_64 httpd-2.2.3-22.el5.x86_64 postgresql-libs-8.1.11-1.el5_1.1.x86_64 6. To start Apache on boot, run the following command in a terminal window: chkconfig level 35 httpd on 7. After Apache has been installed on the virtual machine, edit /var/www/html/index.html, or create the file if it doesn t exist. 8. Change the contents of this file to help you identify which vcenter template has been deployed. You could enter something like this in the body of the HTML file: <b>this is Apache-1</b> 9. Right-click the virtual machine and select Template > Clone to Template. 10. Name the new template Apache-1. Creating the second template To create the vcenter template for Apache-2, complete the following steps: 1. Copy the first vcenter template you created in the previous steps. 2. Edit /var/www/html/index.html, or create the file if it doesn t exist. 3. Change the contents of this file to help you identify which vcenter template has been deployed. You could enter something like this in the body of the HTML file: <b>this is Apache-2</b> 4. Right-click the virtual machine and select Template > Clone to Template. 5. Name the new template Apache-2. 5
Testing vcenter templates Now you should test the templates. This is also an opportunity to customize the Apache homepage if needed and recreate the template. To test the vcenter templates, complete the following steps: 1. Manually deploy VMs using the Apache-1 and Apache-2 templates in the vsphere client. 2. Log in to each VM. 3. In a console window, type the following to check that the httpd service is running: httpd status The F5Internal network is not routed outside of the F5 BIG-IP internal VLAN domain, so you cannot test web page access until after the F5 BIG-IP virtual server has been configured, which will be done in the next section. Installing and configuring the F5 BIG-IP instance This reference implementation uses F5 BIG-IP LTM VE v11.0.0, which can be downloaded from the F5 web site. Downloading F5 BIG-IP To download the F5 BIG-IP image file, complete the following steps: 1. Go to http://downloads.f5.com. 2. Log in or register for a user name and password. 3. Navigate to the BIG-IP Virtual Edition (VE) v11.0.0 download page. 4. Download BIGIP-11.0.0.8037.0-scsi.ova.zip. Installing F5 BIG-IP Install F5 BIG-IP as documented in the installation instructions, which are available at http://support.f5.com. Installation involves the import of an OVF template from the vsphere client. During the installation, the following network mapping should be configured. Table 6. Network mapping F5 BIG-IP network interface management internal external HA vcenter network Mgmt_A F5Internal Prod_A Mgmt_A To configure networking, complete the following steps: 1. After F5 BIG-IP is installed, log in to the virtual machine console. 2. At a command prompt, run the following command: config 3. Select manual configuration. 4. Enter the IP address of the management interface for the BIG-IP LTM, which should be part of the Mgmt_A network. 5. Enter the subnet mask and gateway information for the Mgmt_A network. 6. Log in to the F5 web interface https://<f5 BIG-IP IP address> using administrator credentials. 6
7. Activate the license 8. Configure the following networking parameters: VLAN internal mapped to interface 1.1 (untagged) VLAN external mapped to interface 1.2 (untagged) Self IP: VLAN internal: IP from F5Internal network Self IP: VLAN external: IP from Prod_A network One default route: external_default_gateway mapped to Prod_A default gateway Configuring virtual servers and the server pool Now you will configure virtual servers and the server pool. Virtual servers are the external-facing IP addresses the user will connect to when attempting to access the Apache instance. The IP address of the virtual server is in the Prod_A network To configure virtual servers, complete the following steps: 1. Log in to the F5 BIG-IP web interface as administrator at the following URL: https://<f5 BIG-IP IP address> 2. Click Local Traffic > Virtual Servers > Virtual Server List. 3. Click Create to add the first instance. 4. On the next screen, enter the following information: Name: apache-1-vs Destination: select Host. Address: use IP address from the Prod_A network. Service Port: 80 (HTTP) SNAT: Auto Map Leave everything else at the default value. 5. Click Local Traffic > Pools > Pool List. 6. Click Create to add the first pool. 7. On the next screen, enter the following information: Name: Apache-1 Health Monitor: http Load Balancing Method: Round Robin Repeat these steps for the Apache-2 pool. Note: It is important that the names of the pools are the same as the vcenter template names and the HP Operations Orchestration F5 BIG-IP pool list. Before you configure HP Cloud Service Automation, it is important to test the VMware servers created in the previous steps and add them to each F5 BIG-IP pool, then test the access to the servers using the virtual IP address. When two virtual servers have been created from the templates, add them to the Apache-1 and Apache-2 pool using the F5Internal IP address. To configure the server pools, complete the following steps: 1. Log in to the F5 BIG-IP web interface as administrator at the following URL: https://<f5 BIG-IP IP address> 2. Click Local Traffic > Pools > Pool List. 3. Select Apache-1 and click Create. 4. Add the virtual server that was created using the Apache-1 template in the previous section. 7
5. Set the IP address to the IP address for F5Internal and the Service Port HTTP. Repeat these steps for the Apache-2 pool. When you return to the Pool details, the member status should turn green. Test each virtual server by entering the following URLs in a browser: http://<virtual IP Apache-1> and http://<virtual IP Apache-2> Configuring the HP Operations Orchestration workflows A zip file named F5-Apache.zip is supplied for the reference implementation. This file contains HP Operations Orchestration workflows. Importing the HP Operations Orchestration workflows To import the HP Operations Orchestration workflows, complete the following steps: 1. Download F5-Apache.zip from the following URL: http://h71028.www7.hp.com/enterprise/downloads/f5-apache.zip 2. Unzip F5-Apache.zip to a convenient location. 3. On the HP Cloud Service Automation server, open HP Operations Orchestration Studio from the Microsoft Windows Start menu in Hewlett-Packard > Operations Orchestration > HP Operations Orchestration Studio. 4. Log in as admin. Important: Be sure you are connected to the repository on the HP Cloud Service Automation server, and not the CMS (central management server). 5. Click Repository > Add Repository. 6. Name the repository F5. 7. Select the files you unzipped in step 2 and click OK. 8. Click Repository > Set Target Repository. 9. Select Default Public Repository. 10. Click Repository > Publish Source to Target Preview. You should see a new F5 folder in Library/CSA/Contrib/HP. Expand this folder to view the F5 workflows. 11. Click Preview Changes to Publish to the Target Repository. 12. Click Apply. Checking in the workflows To check in the workflows, complete the following steps: 1. In HP Operations Orchestration Studio, check that the newly added workflows are in the Default Public Repository, and are checked out. You can find them in the My Changes/Checkouts panel. 2. Right-click the F5 folder and select Check In Tree to check in the newly added workflows. 3. Expand the Configuration folder and Selection Lists and select F5. 4. Verify that all of the workflows have been checked in. 5. Close HP Operations Orchestration Studio. Creating the service in HP Cloud Service Automation You must create a service offering and a service provider before you can test user requests in HP Cloud Service Automation. 8
Creating a new service provider To create a new service provider in the HP Cloud Service Automation Provider Console, complete the following steps: 1. Log in to the HP Cloud Service Automation Provider Console as admin at https://<hp Cloud Service Automation server IP address>:8444/csa/ 2. Select the Provider Management tab. 3. Click Create a New Provider. The Provider Creation Wizard will open. 4. Enter the following values: Select Manual Entry. Category: Network Vendor: F5 Product: BIG-IP LTM VE Service Access Point: https://<big-ip server management IP address>:443 Enter the appropriate values for the remaining fields. 5. Click Next. 6. Enter the following values: Name: F5 BIG-IP LTM VE You can leave the remaining fields blank. 7. Click Properties in the column on the left. 8. Enter the following values: Name: F5 BIG-IP Load Balancing You can leave the remaining fields blank. 9. Click Create. Creating a new service offering To create a new service offering from the HP Cloud Service Automation Provider Console, complete the following steps: 1. Select the Service Offering tab. 2. Click Create a new Service Offering. 3. Set the following options in this dialog: 4. Click Browse and navigate to the template in Library\CSA\Contrib\HP\F5 Pool\Design\ Load Balanced Simple Compute - Linux on vcenter with F5 and click Select. Note that you may need to click Refresh to see the content. 5. Name the service offering F5 Apache. 6. The Category and Description fields will be visible to the user from the Service Request Catalog. An example category you can use is Network. 7. Enter your desired values for the remaining fields. 8. If you want to use your own logo in the service catalog, you can copy an image file, such as logo.jpg, to your CSA server. For example, if the image is located in C:\Progam Files\Hewlett-Packard\CSA\apachetomcat-6.0.30\webapps\ROOT, the URL field would contain https://<csa server IP address>: 8081/logo.jpg. 9. Click Create. 9
The new service offering will be displayed in the list, and its details will be visible in the lower panel when you select a service. Creating and using the application service Now that the environment is up and running, it s time to see how a customer would request, use, and return the application service. Creating a subscription in HP Cloud Service Automation Let s set up a service subscription, which is what we call an instance of the service that will be requested by a user. Requesting a service subscription To request a service subscription from the HP Service Request Catalog, complete the following steps: 1. Log in to the HP Service Request Catalog by entering the following address in a browser: https://<csa server IP address>:8444/src 2. Log in using your email address for the User Name. Leave the Password field blank. 3. Select the Services tab. 4. Click Browse Catalog to the right of the Services heading. 5. Choose the Category you specified when you created the service offering (Network was suggested). 6. Click Request in the F5-Apache service section. 7. Click the orange Request button. 8. Enter the Number of Servers you wish to add to the pool. 9. For Server Pool, select Apache-1 or Apache-2 to deploy to one of these instances. 10. Click Continue. 11. Click Request. 12. Enter a subscription name and description. 13. Click Continue. 14. Click Submit. Your subscription ID will be displayed in the Confirmation dialog. The service deployment time will vary depending on the hardware environment and whether you are doing a virtual or physical deployment. 15. Click Details to view the status of your subscription. Verifying the subscription and deployment Verifying the requested subscription To verify the requested service subscription in the HP Cloud Service Automation Provider Console, complete the following steps: 1. Log in as an administrator to the HP Cloud Service Automation Provider Console by entering the following address in a browser: https://<csa server IP address>:8444/csa. 2. Select the Service Instances tab. 3. Select the service subscription for F5 Apache deployment that you just created. The lifecycle state and service ID will be displayed in the lower panel. A series of emails will notify you of the service request status. The last email will show that the service has been deployed, which means that it is ready for use. 10
Viewing completed subscription request To view the completed subscription request in the Service Request Catalog, complete the following steps: 1. Log in to the HP Service Request Catalog by entering the following address in a browser: https://<csa server IP address>:8444/src 2. Select the Subscriptions tab. 3. Click Detail to view more information about the service. 4. Click View all servers to see more details about the servers. You can also log in to the HP Cloud Service Automation Provider Console to view the service subscription status. Verifying the deployment To verify that the service is created in vcenter, complete the following steps: 1. Log in to vsphere as Administrator. 2. Select the Tasks and Events tab so you can view the progress of the deployment request in progress. 3. When the vcenter deployment is successful, the servers will be added to the F5 load balancer pool. 4. Log in to the F5 web interface. 5. Click Local Traffic > Pools > Pool List in the menu on the left. 6. Select Apache-1 or Apache-2 to check that the servers were added and that their status icon is green. Verify load balancing To verify that the load balancing is working properly, complete the following steps: 1. You can configure DNS names for each of the virtual IP addresses, such as apache-1.mydomain.com. 2. Access each Apache server by entering the following addresses in a browser: https://<apache-1 virtual IP address> https://<apache-2 virtual IP address> or https://apache-1.mydomain.com and https://apache-2.mydomain.com if you configured DNS names for the servers. You should see the Apache-1 or Apache-2 home page. Returning the resources To conclude the test, we will cancel the subscription to return the resources to our pool. To cancel a subscription, complete the following steps: 1. Log in to the HP Service Request Catalog by entering the following address in a browser: https://<csa server IP address>:8444/src 2. Select the Subscriptions tab. 3. Locate your subscription and click Cancel. The cancellation time may vary depending on the hardware in your environment. You will be notified by email that the service has been cancelled. To verify that the subscription has been cancelled, complete the following steps: 1. Log in as an administrator to the HP Cloud Service Automation Provider Console by entering the following address in a browser: https://<csa server IP address>:8444/csa. 2. Select the Service Instances tab. 3. Locate the service subscription and verify that the Subscription State is set to Cancelled. 11
For more information For more information about HP CloudSystem, visit http://www.hp.com/go/cloudsystem. The reference implementation zip file (F5-Apache.zip) can be found at http://www.hp.com/go/cloudmaps under F5 Networks. More information about configuring F5 BIG-IP Local Traffic Manager can be found at http://support.f5.com. HP software product manuals and documentation for the following products can be found at http://h20230.www2.hp.com/selfsolve/manuals. You will need an HP Passport to sign in and gain access. HP Cloud Service Automation HP Server Automation HP Operations Orchestration HP CSA for Matrix HP Matrix Operating Environment product manuals and documentation can be found at http://h18004.www1.hp.com/products/solutions/insightdynamics/info-library.html. VMware vcenter and vsphere documentation can be found at http://www.vmware.com/support/pubs/. To help us improve our documents, please send feedback to cse.docs@hp.com. Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation. 4AA4-0322ENW, Created March 2012