Technical white paper HP CloudSystem Enterprise A LAMP and WordPress reference implementation Table of contents Introduction... 2 Background assumptions... 2 Additional requirements for SiteScope... 2 Overview... 3 Process steps... 3 System configuration... 3 Network pool requirements... 3 Storage requirements... 4 Server pool requirements... 4 Configuring HP CloudSystem Enterprise... 4 Configuring HP Matrix infrastructure orchestration templates... 4 Downloading the required software packages... 7 Importing software and creating HP Server Automation policies... 7 Installing HP SiteScope integrations and importing monitors... 9 Configuring the credentials for server monitoring... 10 Importing the application into HP Application Deployment Manager... 10 Creating a new service provider in Cloud Service Automation for SiteScope... 10 Import and configure the LAMP + WordPress service design blueprint... 11 Create and publish the service offering... 11 Creating and using the application service... 12 Creating a subscription in HP Cloud Service Automation... 12 Creating WordPress users... 13 Posting test entries in WordPress... 13 Returning the resource... 13 System component details... 14 Glossary... 15 Troubleshooting... 16 Appendix... 17 HP Server Automation sample kickstart file for Red Hat Linux... 17 Deploying the Server Automation agent and configuration scripts on virtual machines... 18 For more information... 20
Introduction HP CloudSystem Enterprise integrates servers, storage, networking, security and management to automate the infrastructure-to-application lifecycle for hybrid service delivery. HP CloudSystem Enterprise presents an integrated catalog of easy-to-order services and applications designed for business users who aren t necessarily IT knowledgeable. Behind the scenes CloudSystem Enterprise automatically provisions those services by configuring and installing servers, storage, networking, virtualization, middleware, databases and applications. It also includes advanced application lifecycle management that manages resources automatically without the need for intervention by your IT staff. HP CloudSystem reference implementations document how to implement a cloud service for infrastructure and applications. Reference implementations include detailed step-by-step instructions, templates and scripts necessary for the IT specialist to deliver an end user consumable service for CloudSystem. For cloud service providers, system integrators, and enterprise IT organizations who are looking to build their own cloud infrastructure, the decision to use a cloud for the delivery of IT service is best done by starting with the knowledge and experience gained from previous work. This reference implementation demonstrates how HP CloudSystem Enterprise is used to install, configure and deploy the WordPress application on a LAMP infrastructure. LAMP is an industry acronym for Linux, Apache, MySQL/MariaDB, and PHP/Python. Step-by-step 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 a WordPress application and infrastructure instance. Target audience: This reference implementation is designed for a user with working knowledge and hands-on experience with HP CloudSystem Enterprise (HP Matrix Operating Environment and HP Cloud Service Automation). The reader is assumed to understand the core concepts and have demonstrated proficiency with CloudSystem Enterprise. Others may benefit from this document, although much of the background details are omitted but contained in other HP documentation. The For more information section has links to more information that may be helpful to the novice reader. This white paper describes testing performed in January 2013. Background assumptions The 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 CloudSystem HP Cloud Service Automation (CSA) HP Matrix Operating Environment (Matrix OE) HP Operations Orchestration (OO) HP Server Automation (SA) with HP Application Deployment Manager (ADM) HP SiteScope Pointers to the documentation for installing, configuring, and verifying these components and their interoperability may be found in the For more information section. Additional requirements for SiteScope This implementation has the following requirements: The HP SiteScope server must be configured with two network interfaces: one on the management network and one on the production network. The production network should have a static IP address and should be on the same subnet as configured in the Central Management Server (CMS). The HP SiteScope server must have a valid license. HP SiteScope cannot be hosted on the same server as HP Operations Orchestration or the same server as Matrix OE. The server credentials (SSH) for physical deployment and virtual deployment must match and must be configured in HP SiteScope as part of the template definition. 2
Overview Process steps The reference implementation details the major steps required to install and configure the WordPress application. They include the following: 1. Retrieving and unpackaging the scripts and content provided with this reference implementation. 2. Importing and customizing the HP Matrix infrastructure orchestration templates. 3. Importing and customizing the HP Server Automation software policies. 4. Configuring credentials for HP SiteScope monitoring. 5. Importing Service Designs and publishing Service Offerings in CSA. 6. Creating and using the application service. After these steps are complete, the application will be available for business users to automatically deploy using the CSA Consumer portal. A final step is also included that will decommission the service and return the resources to the HP CloudSystem Enterprise environment. System configuration This reference implementation was tested and completed on 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. HP Networking 2 x 5820 Switch Series HP Matrix OE 1 x DL360p Gen8 VMware Cluster running HP Cloud Service Automation VMware vcenter 2 x BL460c Gen8 Application Deployment Servers 2 x BL460c Gen8 HP SAN Switches 2 x 8/24 HP 3PAR StoreServ Storage Network pool requirements Table 1: Network pool requirements Network name Name in service template Notes Production network PROD_A Production network for communication between the web server and the database server Management network MGMT_A The deployment network used to install the OS using HP Server Automation 3
Storage requirements HP Matrix OE storage pool entries must be defined for physical server deployment. A VMware datastore must be available for virtual machine provisioning. Table 2: Storage requirements Description Total # LUNs Size Redundant paths to storage Disk is bootable Storage pool entry 2 40 GB Yes Yes VM datastore N/A 100 GB Yes No Server pool requirements The table below lists the minimum requirements for physical and virtual servers. These values are specified in the HP Matrix infrastructure orchestration (HPIO) templates and may be adjusted for your environment. Table 3: Server pool requirements Server name Minimum CPU frequency Minimum CPU cores Minimum memory database 1.0 GHz 2 cores 4 GB webapps 1.0 GHz 2 cores 4 GB Configuring HP CloudSystem Enterprise The reference implementation is supplied with a zip file (HP-LAMP-WordPress-v4.zip) that contains a number of templates and other content required to complete the configuration. The zip file should be unpacked into a location that is accessible to the Central Management Server (CMS) and the other servers in the CloudSystem Enterprise environment. The contents include the files listed in the following table. Table 4: Downloaded zip file contents Folder File name Description HP Application Deployment Manager HP-LAMP-Example-v4.xml LAMP ADM Application HP Cloud Service Automation Service Design HP Matrix infrastructure orchestration templates CSL_BP_MOE_LAMP+WordPress_v3.10.00.zip HP-LAMP.xml HP-LAMP-VM.xml LAMP for WordPress Service Design blueprint LAMP physical server template LAMP VM template HP Server Automation Content HP-LAMP-SA.zip LAMP required scripts NOTE: For the full URL on where to find the reference implementation zip file, see For more information. Configuring HP Matrix infrastructure orchestration templates The HP infrastructure orchestration templates define a two-tier architecture deployed on either physical or virtual machines. The templates define the networks, storage and server requirements. Before you import the templates, you must have an operating system (OS) Sequence which deploys Linux as boot from storage area network (SAN) available in HP Server Automation with the proper permissions for the HP Matrix infrastructure orchestration user to access it. A sample HP Server Automation Linux kickstart file is included in the Appendix. A VMware template is also needed, which includes configuration scripts and the HP Server Automation (SA) agent installation software, to deploy the HP-LAMP-VM template successfully. Instructions on how to deploy and configure the 4
required SA agent files on the VM prior to creating the template is included in the Appendix. Testing these deployments using the HP Matrix infrastructure orchestration user portal is recommended, prior to attempting to deploy from the CSA Consumer portal. Two HP Matrix infrastructure orchestration (HPIO) templates are provided with the reference implementation: one for physical server deployment and one for virtual machine deployment using VMware. The following steps demonstrate how to import the HP-LAMP template using HPIO Designer Studio. Repeat these steps for the HP-LAMP-VM template. Importing the HP Matrix infrastructure orchestration templates To import the HP Matrix infrastructure orchestration templates, complete the following steps: 1. Launch HPIO from the browser or the Windows Start Menu. Log on as an administrator to the HP Matrix infrastructure orchestration Designer. https://<cms_ip>:51443/hpio/designer or Start menu in HP Insight Management HP Matrix infrastructure orchestration HP Matrix IO Designer 2. Click Import and browse to the location where you unpacked HP-LAMP-WordPress-v4.zip. The templates are found in the HP Matrix infrastructure orchestration templates folder. Select the HP-LAMP.xml template. 3. You will get a warning that the imported template references software that is not found on this CMS. You can ignore this message because the software deployment jobs will be configured in a later step. 4. Click Finish to complete the import. The Validation Status will be marked with a red X, which indicates that there are errors. In the next steps, you will configure networks, software deployment jobs and server groups for the template to fix the errors. Configuring networks and software deployment jobs in the template To configure the appropriate networks and software deployment jobs for the template, complete the following steps: 1. Click Show Issues in the Validation Status area to see the issues which require attention. The issues are indicated with red boxes, as shown in the image below. 2. Right-click the network icon MGMT_A and select Edit Network Configuration. 3. Select the Select a specific network option in the Configure Network dialog. The Management network must be the network used to connect to Server Automation. 4. Select the network you want to use. If you are unsure of which to use, check with your CloudSystem Enterprise system administrator. 5. Click OK. 6. Repeat these steps for PROD_A. Configuring server groups To configure the server groups, complete the following steps: 1. Right-click the webapps server and select Edit Server Group Configuration. 2. Select the Config tab in the Configure Server Group dialog. Modify the attributes for the servers in the group if desired. You can keep the defaults or change these values as necessary. These values are used to select appropriate servers during deployment, so be sure you have servers 5
available that match any processor or memory requirement you set. The minimum values provided are acceptable for the LAMP deployment. 3. You should not change the Group Name. 4. Select the Networks tab. 5. Verify that PROD_A is selected as the Primary Interface. 6. Set the Assignment Type for the MGMT_A and PROD_A networks. You may get this information from the HP Matrix OE administrator. 7. Select the Software tab. 8. Select software where the Source is SA (Server Automation) and the OS Type is Linux. The Linux distribution used for this reference implementation is Red Hat Enterprise Linux 6 update 3. Consult your Server Automation administrator if necessary to ensure you are choosing the appropriate Linux distribution. A sample kickstart file for OS deployment is included in the Appendix. 9. Click OK. 10. Repeat these steps for the database server. The errors should now be resolved for the HP-LAMP template. The Validation Status will be marked with a green check mark. You can now change the template to Published: 1. Select the Published option. 2. Click Save to save the template, and then close the dialog box. The HP-LAMP template has now been successfully imported. Repeat these steps to import the HP-LAMP-VM template, starting with Importing the HP Matrix infrastructure orchestration templates. The software selected for the VM template must be a VMware template. Instructions on how to create the VM template including the Server Automation agent installation software are found in the Appendix. The Source field indicates VMware and the template must include the Server Automation agent installation software and configuration scripts. When you are finished, the template will look similar to this in HP Matrix infrastructure orchestration Designer: 6
When you have finished editing the templates, you should deploy each template from the HP Matrix infrastructure orchestration Self Service Portal https://<cms_ip>:51443/hpio/portal to be sure it works before you attempt to deploy it from the CSA Consumer portal. Downloading the required software packages Create a temporary folder on your CMS and download the required software packages. The packages listed below were used to develop and test the reference implementation. Newer versions may be available and supersede those listed here. If you are unable to obtain the listed versions, be sure that new versions are compatible, and include all the necessary dependencies. Download the following RPM packages for Red Hat Enterprise Linux (RHEL) 6 from http://pkgs.org/centos-6-rhel-6/centos-rhel-x86_64/: apr-1.3.9-3.el6_1.2.x86_64 apr-util-1.3.9-3.el6_0.1.x86_64 apr-util-ldap-1.3.9-3.el6_0.1.x86_64 epel-release-6-8.noarch httpd-tools-2.2.23-1.el6.x86_64 httpd-2.2.23-1.el6.x86_64 libtool-ltdl-2.2.6-15.5.el6.x86_64 php-5.3.3-3.el6_2.8.x86_64 php-cli-5.3.3-3.el6_2.8.x86_64 php-common-5.3.3-3.el6_2.8.x86_64 php-ldap-5.3.3-3.el6_2.8.x86_64 php-mysql-5.3.3-3.el6_2.8.x86_64 php-pdo-5.3.3-3.el6_2.8.x86_64 Download the following packages from mariadb.org MariaDB-compat-5.5.28a-1.28a-centos6-x86_64-compat MariaDB-common-5.5.28a-1.28a-centos6-x86_64-common MariaDB-client-5.5.28a-1.28a-centos6-x86_64-client MariaDB-server-5.5.28a-1.28a-centos6-x86_64-server MariaDB-shared-5.5.28a-1.28a-centos6-x86_64-shared Download the WordPress application in zip file format from wordpress.org/download/: wordpress-3.5.zip Importing software and creating HP Server Automation policies HP Server Automation policies are used to deploy and configure MariaDB, Apache web server, and the WordPress application. The downloaded files will now be imported into HP Server Automation and used in software policies. Importing the packages To import software into HP Server Automation, complete the following steps: 1. Log in to HP Server Automation Java Client as an administrative user. Note: You can download the Server Automation Java client from the Server Automation web client accessible at https://<sa Core IP address>. The link to download the Java client is on the login page. Click on Download Hewlett-Packard Launcher to install the application. The installer has an option to create a shortcut on your desktop. You don t need to log in to the web client. 2. Select Library from the button on the bottom left. Click on the By Folder tab and Right-click on the Library folder and select Import Software. 3. Click Browse to the right of the File(s) field and select all the RPM packages that were downloaded in the previous section. The Type field should be automatically set to RPM. 4. Change the value for Folder to /Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64. Click Select. 7
5. Change the value for Platforms to Red Hat Enterprise Linux Server 6 X86_64. 6. Click Import. 7. Import the wordpress-3.5.zip package: A. Right-click Library and select Import Software. B. Click Browse to the right of the File(s) field and select wordpress-3.5.zip. The Type field should be automatically set to ZIP Archive. C. Change the value for Folder to /Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64. Click Select. D. Change the value for Platforms to Red Hat Enterprise Linux Server 6 X86_64. E. Click Import. 8. Import the get_rmt_srvr_ip.zip package. This file is included in the HP-LAMP-WordPress-v4.zip file under the HP Server Automation Content folder. Extract it from the HP-LAMP-SA.zip file. A. Right-click Library and select Import Software. B. Click Browse to the right of the File(s) field and select get_rmt_srvr_ip.zip from the HP Server Automation Content folder. The Type field should be automatically set to ZIP Archive. C. Change the value for Folder to /Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64. Click Select. D. Change the value for Platforms to Red Hat Enterprise Linux Server 6 X86_64. E. Click Import. 9. Browse to Library/Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64. 10. Right-click the get_rmt_srvr_ip.zip package and select Open. 11. Change the Default Install Path value to /tmp. 12. Click File Save to save your changes. Close the window. 13. From Library/Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64, right-click the wordpress-3.5.zip package and select Open. 14. Change the Default Install Path value to /usr/local/wordpress. 15. Click File Save to save your changes. Close the window. 8 Creating new policies Two new policies are required. The first is ApacheWordPress-RHEL6 which is created using the following steps: 1. Right-click the Library folder and select New Software Policy. 2. Set the following values: A. Set Name to ApacheWordPress-RHEL6. B. Click Select and set the Location to /Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64. C. Set the OS to Red Hat Enterprise Linux Server 6 X86_64. 3. Select Policy Items in the Views panel. 4. Click Add in the toolbar. Click on the Browse Folders tab. 5. Add Red Hat policies: 6. Expand the Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64 folder. A. Select the following 15 files: epel-release-6-8.noarch get_rmt_srvr_ip.zip apr-1.3.9-3.el6_1.2.x86_64 apr-util-1.3.9-3.el6_0.1.x86_64 apr-util-ldap-1.3.9-3.el6_0.1.x86_64 libtool-ltdl-2.2.6-15.5.el6.x86_64 httpd-tools-2.2.23-1.el6.x86_64 httpd-2.2.23-1.el6.x86_64
php-5.3.3-3.el6_2.8.x86_64 php-cli-5.3.3-3.el6_2.8.x86_64 php-common-5.3.3-3.el6_2.8.x86_6 php-ldap-5.3.3-3.el6_2.8.x86_64 php-mysql-5.3.3-3.el6_2.8.x86_64 php52-pdo-5.3.3-3.el6_2.8.x86_64 wordpress-3.5.zip 7. Click Select. 8. Click Add in the toolbar. Click on the Browse Folders tab. 9. Add Python policies: A. Browse to the Library/Opsware/Tools/Python Opsware API Access folder. B. Select OPSWagent_tools_unix-45.0.19256.0.zip. C. Click Select. 10. Click File Save to save the ApacheWordPress-RHEL6 policy. 11. Verify that the 16 files you selected in the steps above are listed. 12. Close the View window. The second required policy is the MariaDB-RHEL6 policy, which is created using the following steps: 1. Right-click the Library folder and select New Software Policy. 2. Set the following values: A. Set Name to MariaDB-RHEL6. B. Click Select and browse to set the Location to /Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64. C. Set the OS to Red Hat Enterprise Linux Server 6 X86_64. 3. Select Policy Items in the Views panel. 4. Click Add in the toolbar. Click on the Browse Folders tab. 5. Browse to the /Package Repository/All Red Hat Linux/Red Hat Enterprise Linux Server 6 X86_64 folder. 6. Select the following: get_rmt_srvr_ip.zip MariaDB-compat-5.5.28a-1.28a-centos6-x86_64-compat MariaDB-common-5.5.28a-1.28a-centos6-x86_64-common MariaDB-client-5.5.28a-1.28a-centos6-x86_64-client MariaDB-server-5.5.28a-1.28a-centos6-x86_64-server MariaDB-shared-5.5.28a-1.28a-centos6-x86_64-shared 7. Click Select. 8. Click Add in the toolbar. Click on the Browse Folders tab. 9. Browse to the /Opsware/Tools/Python Opsware API Access folder. 10. Select OPSWagent_tools_unix-45.0.19256.0.zip. 11. On the File menu, click Save to save the MariaDB-RHEL6 software policy. 12. Verify that the 7 files you selected are listed. 13. Close the window. Installing HP SiteScope integrations and importing monitors To install HP SiteScope integrations for CSA and import monitors, complete the steps described in the HP Cloud Service Automation Installation and Configuration Guide for version 3.1. You can find the locations of documentation and other resources in the For more information section at the end of this document. These steps are in the Install HP SiteScope and Configure HP SiteScope sections. These steps involve making sure Java is installed at the client, importing the license file, importing the basic CSA templates and defining the LINUX-CSA-TARGETs. 9
Configuring the credentials for server monitoring To configure the HP SiteScope template credentials, complete the following steps: 1. Open http://<sitescope Server>:8080. 2. Select the Preferences tab. 3. Select Credential Preferences. 4. Double click on LINUX-CSA-TARGETS to edit the credential profile. 5. Configure the root user and password for your Linux targets. 6. Select the Templates tab. 7. Expand SiteScope/CSA templates/linux 8. Select user. Validate that the default value for the user is root. Click Save to save any changes. 9. Select password. Set the password for root access. Check the Password variable box to hide the password value. Click Save. Importing the application into HP Application Deployment Manager The Application Deployment Manager application deploys and configures the database and WordPress application on the servers. It deploys the Server Automation policies and includes scripts to configure required users and permissions for the database and WordPress application. The software policies ApacheWordPress-RHEL6 and MariaDB-RHEL6 must be created in Server Automation before the application is imported into Application Deployment Manager. The application file is found in the HP Application Deployment Manager folder. Importing the LAMP application into HP Server Automation To import the LAMP and WordPress application into HP Server Automation, complete the following steps: 1. Copy HP-LAMP-Example-v4.xml under the HP Application Deployment Manager folder to the /tmp directory on your HP Server Automation server. You can use the scp command or WinSCP. 2. Log in to the HP Server Automation server: ssh -l root <ip address of SA> 3. Change directories: cd /opt/opsware/da/bin 4. Run the admtool.sh script to import the application:./admtool.sh -i --importfile /tmp/hp-lamp-example-v4.xml --importconflict skip 5. Type exit to close your ssh session. 6. Login to the HP Server Automation Java Client as an administrative user. 7. Click Tools Application Deployment in the main menu. 8. Select the Applications tab in the left panel. Select CSA HP Lamp Example V2 Release in the Select Release drop-down list located at the top of the Applications panel. 9. Click Manage Applications to create a new version. 10. Expand CSA HP LAMP Example and select V2 Release. 11. Click Create Version. 12. Keep the default values in the Create New Version dialog and click Create. Note: The version should be automatically set to 1. When the progress bar reaches 100%, the application import is complete. Close the Create New Version and Manage Applications dialogs. You may close the ADM session. Creating a new service provider in Cloud Service Automation for SiteScope Providers are management platforms that offer centralized control over the infrastructure and resources used in a cloud computing environment. For example, a provider such as HP Matrix Operating Environment infrastructure orchestration can deploy virtual machines or physical servers, while a provider such as HP SiteScope can monitor applications. Enabling service designs that include monitors requires you to create a provider (with a provider type of HP SiteScope) in the Cloud Service Management Console. To create a new service provider for SiteScope complete the following steps: 1. Go to https://<hp CSA Server>:8444/csa. 2. Select the Resource Management tab. 3. Select HP SiteScope category. 10
4. If a SiteScope provider is defined, then you may skip the remaining steps in this section. 5. Click Create a New Provider. 6. Set the following options in the Provider Creation Wizard: Display Name: create a name for your SiteScope Monitor Description: fill in a description if desired Type: select HP SiteScope in the dropdown menu 7. Click Next. The administrative user and password set here must match the administrative credentials that were set during SiteScope configuration. User ID: an administrative user (i.e. admin) Password: enter the password for your administrative user Retype Password: re-enter the password Service Access Point: http://<sitescope server management IP address>:8080 8. Click Create. Import and configure the LAMP + WordPress service design blueprint The next step is to import the LAMP + WordPress service design blueprint into HP Cloud Service Automation. The HP Cloud Service Automation Service Design folder in the distribution file contains the service design blueprint in the form of a zip file: CSL_BP_MOE_LAMP+WordPress_v3.10.00.zip To import the service design blueprint, complete the following steps: 1. Log on to the HP Cloud Service Automation Administrator portal using an account with administrator privileges. 2. Select the Service Design tab. 3. Click Import Service Design. 4. Browse to select CSL_BP_MOE_LAMP+WordPress_v3.10.00.zip from the distribution files. 5. Click Open to import the Service Design blueprint. Create and publish the service offering A service offering must be created in HP Cloud Service Automation before subscribers can request services based on this service design. To create a service offering, complete the following steps: 1. Log on to the HP Cloud Service Automation Administrator portal using an account with administrator privileges. 2. Select the Service Offerings tab to display all available service offerings. 3. Click Create Offering in the left panel. The Create New Service Offering dialog will open. 4. Enter a name for the new LAMP + WordPress service offering. This is the name of the offering that will be visible to the subscribers of this service. 5. Select the MOE_LAMP+WordPress_v3.10 service design and click Create. 6. After the offering is created, you can modify the pricing information, associate documents, or modify the subscriber options for this subscription and save the changes. HP Cloud Service Automation is installed with a default global catalog named Global Shared Catalog. When you publish a service offering in this global catalog, that service offering will be visible in every organization s Cloud Subscriber Portal. To publish a service offering in the default catalog, complete the following steps: 1. Log on to the HP Cloud Service Automation Administrator portal using an account with administrator privileges 2. Select the Service Catalogs tab. 3. Select Global Shared Catalog in the panel on the left. 4. Select Published Offerings in the central panel. 5. Click Add Offering. 6. Select the service offering you created for LAMP + WordPress and click Select. 11
7. For Select Category, select the category under which this service offering should appear in the consumer portal. Suggestion is to put the LAMP + WordPress service offering under Application Services. 8. Click Add. 9. Click OK on the Success message box. Creating and using the application service This section gives examples of how a subscriber can order the LAMP + WordPress service using HP Cloud Service Automation. It does not give a complete list of what the subscriber can do. Creating a subscription in HP Cloud Service Automation You can order the LAMP + WordPress service from the HP Cloud Service Automation Consumer Portal Catalog. 1. Enter the URL for the HP Cloud Service Automation Consumer Portal in a web browser. The default URL is https://<hp CSA Server>:8444/csp. The URL will be unique to your installation. Contact your administrator if you are not using the default HP CSA Consumer portal. 2. Enter the following information: User Name: Your HP Cloud Service Automation Consumer Portal user name. Password: Your HP Cloud Service Automation Consumer Portal password. 3. Click Log In. 4. Select the Catalog tab. In the previous section we suggested that you publish your offerings in the Application Services Catalog. Select a catalog in the panel on the left. The offerings available in this catalog will be displayed. 5. Select the LAMP + WordPress service and click on Select. 6. Enter a name and description for the subscription. 7. Select a start and end date for the subscription (if required). 8. In the Template section, choose either the LAMP+WordPress Physical or Virtual server deployment. 9. Click Request Now. The status of your subscription can be monitored on the subscriptions panel, by clicking Subscriptions on the tab. Note This reference implementation uses the default HP CSA Consumer portal. If your environment is set up for a different consumer organization, please contact your administrator for the URL. If you wish to follow the service deployment process more closely, you can do so through the various provider interfaces. The first part of the service deployment process is the creation of the service through HPIO. Login to Matrix OE as Administrator at https://<matrix OE IP address>:50000. Go to Tools Infrastructure orchestration Requests tab and you can track the progress of the deployment request in progress. Once HPIO is successful, you can check the progress of the service deployment process in SA Application Deployment. Launch the HP Server Automation Java Client. Click Tools Application Deployment in the main menu. Select the Jobs tab in the left panel to track the progress of the application deployment job for the current service deployment. Log on to HP SiteScope at http://<sitescope server management IP address>:8080 and verify that the servers are correctly monitored. The service requestor user log in, as defined in the CSA Consumer portal, is created as a parent folder. When the service has been deployed, the HP SiteScope server monitors for CPU, memory, and disk usage will be displayed in the HP SiteScope interface under the CSA Monitors folder with the HP Cloud Service Automation requestor username. 12
Figure 1. HP SiteScope displaying server monitors Creating WordPress users The WordPress application is configured from a web browser interface to the application tier of your deployed service. 1. Log in to the CSA Consumer Portal at https://<hp CSA Server>:8444/csp 2. Click on the Subscriptions tab and the View Details button for your newly deployed service. 3. Scroll down to the Server Group Web Group and find the IP address for the deployed web server. You must create an administrator and WordPress user before you can test the application: 4. Using the web server IP address obtained in the previous step, open the following URL in a web browser: http://<web server ip address>/wp-admin/install.php 5. Enter a website title of your choice and create a new WordPress admin user account. 6. Log in to WordPress using the admin account. 7. Click Users in the left column. 8. Click Add New under Users. 9. Enter details for the new user. 10. Click Add New User to complete the process. 11. Change the role of your new user to Author. Click Edit to open the Edit User menu. Scroll to the bottom and click Update User to accept your edits. 12. Log out of the admin account by clicking on the drop down menu of the admin name at the top right corner of the page. Posting test entries in WordPress Posting a test entry in WordPress will show you that the LAMP stack is working correctly. To post entries in WordPress, complete the following steps: 1. Open the following URL in a web browser: http://<web server ip address>/. Click on Log in and enter your newly added user name and password on the login screen. 2. Click Posts Add New at the top of the WordPress page. 3. Enter a title and some content. 4. Click Publish. 5. Click View Post to verify your newly created page. Your new post should be visible in the blog, http://<web server ip address>/, which demonstrates that the server is working correctly. Returning the resource 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 CSA Consumer Portal by entering the following address in a browser: https://<hp CSA Server>:8444/csp 2. Select the Subscriptions tab. 13
3. Locate your subscription and click the View Details button. 4. Click on the red Cancel Subscription button. 5. Click Yes on the message box pop-up and then click on OK. 6. The Subscription Status is updated to Cancelled and Service Instance Status to Offline. Note: Your cancellation time may vary depending on the hardware in your environment. You will be notified by email that the service has been cancelled. System component details Table 5: HP CloudSystem Enterprise components Component Servers Testing Environment Version HP ProLiant BL460c Gen8 Physical and virtual servers HP Onboard Administrator 3.70 HP Virtual Connect Manager 3.70 HP Integrated Lights-Out 1.10 (ilo 4) HP Matrix Operating Environment 7.1u2 HP Server Automation 9.13 HP Cloud Service Automation 3.10 HP Operations Orchestration 9.03.0001 Note Please contact your HP support representative and verify that the following hotfix has been installed: HOTFIX_CSA4M_QX148348_26_07_2012_SAPLUGIN. Table 6: Open source and third party components Component Version Operating System Red Hat Enterprise Linux 6.3 Virtualization Manager VMware vcenter Server 5.0.0 WordPress 3.5 MariaDB 5.5.28 PHP 5.3.3 14
Glossary Table 7: Abbreviation definitions Term CSA HPIO CMS IO LAMP HP Matrix OE OO SA Definition HP Cloud Service Automation HP Matrix infrastructure orchestration Central Management Server where HP Matrix OE is installed HP Matrix infrastructure orchestration Linux, Apache, MySQL/MariaDB, PHP/Python/Perl HP Matrix Operating Environment HP Operations Orchestration HP Server Automation 15
Troubleshooting Physical servers are not cleaned up properly after service is deleted This problem can occur if the boot order is not properly set for servers being used for physical server deployment. Boot order must be set to PXE boot from NIC first. Even if the boot order is properly set prior to deployment, sometimes it gets reset to the default boot order. You can check the boot order of a blade from the Onboard Administrator. Select the blade, and choose Boot Options. In the section showing IPL Device; (Boot order) verify that PXE NIC 1 and PXE NIC 2 are at the top. Move them up to the top with the arrow buttons if they are not in the correct order. Click on the Apply button. You can also use the Onboard Administrator CLI to set boot order for blade servers. Blades with local disks will not boot from SAN when provisioned with Server Automation Even though the Virtual Connect profile is set to boot from SAN, if there are local drives present, a scripted Linux installation will fail. Remove the drives or disable the Array Controller. Deployment fails in CSA, but provisioning completes successfully in HPIO One cause could be that the links to HP Server Automation policies inside the ADM Application HP LAMP Example are not working correctly. To check this, do the following in the ADM console: 1. From the Application tab, click on the policy links to determine if they open Server Automation policies. 2. If a link does not open a policy, click Change and search for the policy by name. 3. Then click on OK to update the link. Do this for all the policies. 4. Next, from the Administration tab, check the links at the Tier level to ensure they open the correct policies. Correct the ones that are not working properly. 5. Check the ADM Jobs tab and search for any jobs that failed after the infrastructure was provisioned. Requirements for Linux installation SELinux must be disabled or the WordPress configuration will fail. Disable it in the kickstart files used for Linux installation. Verify that it is not included in any captured virtual machine templates. The configuration file for SELinux is /etc/selinux/config. Servers deploy and register with Server Automation but policies fail to deploy IPv4 and IPv6 firewalls must be disabled on the deployed servers. For physical servers this is configured in the kickstart file. For virtual machine templates, verify that both IPv4 and IPv6 firewalls are disabled in the template. Disable IPv4 and IPv6 firewalls. service iptables save service iptables stop chkconfig iptables off service ip6tables save service ip6tables stop chkconfig ip6tables off Verify that the firewalls are disabled. service iptables status service ip6tables status 16
Appendix HP Server Automation sample kickstart file for Red Hat Linux This kickstart file was used for testing. It is important to set selinux to disabled. Be sure to save your kickstart file in UNIX format prior to uploading to HP Server Automation. # Default Kickstart file for # Red Hat Enterprise Linux 6.y x86-64 # # For information on the kickstart installation mechanism, # see the Red Hat Linux customization guide. # install lang en_us.utf-8 keyboard "us" # Red Hat installation key # Use --skip for only core server package availability key --skip network --bootproto=dhcp --device eth1 --noipv6 --onboot yes text zerombr selinux --disabled firewall --disabled timezone --utc America/Chicago rootpw password authconfig --enableshadow --passalgo=sha512 #auth --useshadow --enablemd5 #---------------------------------------------------------------------- # Automatic LVM-based partition configuration # # For LVM based automatic partitioning use autopart. Red Hat makes the # decisions on drive devices, partitions, and their sizes. #autopart #---------------------------------------------------------------------- bootloader grub --append="pci=bfsort" mpath clearpart --all --initlabel part /boot --fstype ext3 --size=200 --asprimary part / --fstype ext3 --size=1500 --asprimary --grow part swap --size=1024 reboot %packages @additional-devel @base @client-mgmt-tools @compat-libraries @console-internet @core @debugging @development @directory-client @storage-client-fcoe @hardware-monitoring @java-platform @large-systems @network-file-system-client @network-tools @performance @perl-runtime @system-management-snmp @security-tools 17
@server-platform @server-platform-devel @server-policy @system-management @system-admin-tools libxinerama-devel xorg-x11-proto-devel libgnomeui-devel libbonobo-devel libxau-devel libgcrypt-devel popt-devel libxrandr-devel libxslt-devel libglade2-devel gnutls-devel mtools pax python-dmidecode oddjob sgpio jpackage-utils certmonger pam_krb5 krb5-workstation perl-dbd-sqlite hmaccalc dhcp lm_sensors net-snmp libnl sysstat # # PRE # %pre # # POST # %post #-- Turn on snmp daemon -------------------------------------------------- chkconfig snmpd on %end # Default Kickstart file for Deploying the Server Automation agent and configuration scripts on virtual machines The instructions below describe how to deploy the Server Automation agent installation executable file and configuration scripts on a virtual machine prior to converting it to a template. There are two files, startagent.sh and runonce, included in HP-LAMP-SA.zip which you will copy to the virtual machines. HP-LAMP-SA.zip is found in the HP Server Automation Content folder in the HP-LAMP-WordPress-v4.zip file you downloaded. 1. Create a base Red Hat Enterprise Linux 6u3 Virtual Machine from the vsphere client. Include the management network connected to your SA server. 2. Once the Red Hat Enterprise Linux OS is deployed, login and install the VMware Tools from the vsphere client console window. 3. Obtain the IP address of your virtual machine. 4. From Server Automation Java Client, choose the Devices tab, then Servers Unmanaged servers. 5. In the dropdown box, select Explicit IPs/Hostnames. Enter the IP address of your virtual machine and click on the Scan button. 6. Right click on the discovered server and select Manage Server. Enter the Username and password. Under Actions select Verify prerequisites and copy agent installer to servers. Important Note: You are not going to install the agent now. You are just copying it to the virtual machine into the /tmp folder. 7. Expand the Installer Options list. Uncheck Start the Agent after installation. 18
8. Click on OK to copy the agent files to the VM. 9. Login to your Red Hat Virtual Machine. 10. Create a directory: mkdir p /etc/local/runonce.d/ran 11. Copy the file startagent.sh to /etc/local/runonce.d. Edit the startagent.sh file, changing the IP address to match your SA core server. 12. Change the permissions on the script: chmod +x /etc/local/runonce.d/startagent.sh 13. Copy runonce to /usr/local/bin and change the file permissions: chmod +x /usr/local/bin/runonce 14. Edit /etc/rc.d/rc.local. 15. Add a new line to the end of the file which will run the script when the server boots: /usr/local/bin/runonce 16. Save and exit the file. 17. Disable IPv4 and IPv6 firewalls. service iptables save service iptables stop chkconfig iptables off service ip6tables save service ip6tables stop chkconfig ip6tables off 18. Verify that the firewalls are disabled. service iptables status service ip6tables status 19. Shutdown the virtual machine and convert it to a VM template from the vsphere client. 20. Make a note of the name of your virtual machine template. You will use this when you import the Matrix OE infrastructure orchestration template and specify the software for your virtual machine deployment. 19
For more information To access other toolkits to design and extend cloud services running on HP CloudSystem, go to hp.com/go/csdevelopers. For more information on HP CloudSystem, visit hp.com/go/cloudsystem. The reference implementation zip file (HP-LAMP-WordPress) can be found at: http://h71028.www7.hp.com/enterprise/downloads/hp-lamp-wordpress-v4.zip 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 SiteScope 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 To help us improve our documents, please send feedback to cse.docs@hp.com. Sign up for updates hp.com/go/getupdated Copyright 2012, 2013 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. Windows is a U.S. registered trademark of Microsoft Corporation. Java is a registered trademark of Oracle and/or its affiliates. UNIX is a registered trademark of The Open Group. 4AA4-3051ENW, January 2013, Rev. 2