Migrating LAMP stack from x86 to Power using the Server Consolidation Tool Naveen N. Rao Lucio J.H. Correia IBM Linux Technology Center November 2014 Version 3.0 1 of 24
Table of Contents 1.Introduction...3 2.Terminology...3 3.Migration Procedure Overview...4 4.Assumptions...5 5.Prerequisites for Migration...6 5.1.Source x86 server setup... 6 5.2.Target LPAR setup... 6 5.3.Server Consolidation Tool setup...7 6.Migrating x86 server to Power...8 7.Post-migration setup and verification...11 8.References...12 Trademarks and special notices...13 2 of 24
1. Introduction The IBM Installation Toolkit for PowerLinux provides a set of tools to quickly install supported Linux distributions on Power Systems servers. For an overview of the IBM Installation Toolkit for PowerLinux and the tools it provides, refer to the user guide available at: http://pic.dhe.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaan/powerpack.htm This guide will focus on the Server Consolidation Tool, which allows users to migrate the Linux, Apache, MySQL, and PHP (LAMP) stack and related data from an existing x86 server to a Power Systems server. This functionality is crucial for users who already have comprehensive LAMP stack setup on their x86 servers and wish to migrate their setup to IBM PowerLinux servers with minimal effort. The next sections details the steps that need to be followed for migrating workloads from x86 servers to Power Systems servers using the IBM Installation Toolkit. 2. Terminology LPAR: Logical Partition HMC: Hardware Management Console VIOS: Virtual I/O Server LAMP: Linux, Apache, MySQL and PHP TFTP: Trivial File Transfer Protocol NFS: Network File Server PowerVM: Power Hypervisor PowerKVM: KVM Hypervisor running on Power Systems 3 of 24
ssh Migrating LAMP stack from x86 to Power using the Server Consolidation Tool 3. Migration Procedure Overview Migrating x86 servers to Power Systems servers using Server Consolidation Tool involves the use of three entities: - a source x86 server containing the LAMP stack and data to be migrated. - a target LPAR on the destination Power Systems server. - a Server Consolidation Tool instance running in the target LPAR or in a second LPAR. Server Consolidation Tool orchestrates the migration process from the x86 source server to the target Power Systems LPAR. Power System Server Consolidation Tool IBMIT LiveDVD ssh X86 Source Server RHEL 6.4 ssh Target LPAR RHEL 6.5 Figure 3.1 Note: For purposes of this guide, an LPAR can refer to either: - a HMC/VIOS created Logical Partition running on PowerVM, or - a qemu/kvm virtual machine running on PowerKVM 4 of 24
4. Assumptions This guide assumes that the user has already obtained the IBM Installation Toolkit ISO image from the below location: http://www14.software.ibm.com/webapp/set2/sas/f/lopdiags/installtools/ This guide was prepared using IBM Installation Toolkit v5.7. In addition, users must have the appropriate Red Hat Enterprise Linux 6.5 Linux distribution installed to target LPAR, with LAMP services installed and running. Finally, this guide assumes that the source x86 server is running Red Hat Enterprise Linux 6.4. For detailed system and software requirements, please refer to the IBM Installation Toolkit user guide: http://pic.dhe.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaan/pphardsoftware.htm 5 of 24
5. Prerequisites for Migration 5.1. Source x86 server setup The source x86 server must be reachable over ssh from both the target LPAR and the Server Consolidation Tool system. It is recommended that SELinux be disabled on the source x86 server during migration. On Red Hat Enterprise Linux 6.x, this can be achieved by setting SELINUX=disabled in /etc/selinux/config and rebooting the server. In addition, it is recommended to disable iptables firewall during the migration process: service stop iptables service disable iptables If rebooting the server is not an option, SELinux can be set to permissive mode using the command 'setenforce 0'. Please note that this setting does not persist across a reboot. Also, please be sure to re-enable iptables firewall and SELinux once the migration process is complete. Note: Server Consolidation Tool does not support migration of samba v3 to v4 or the opposite. Ensure that both source and target servers have the same major version of samba. 5.2. Target LPAR setup On the destination Power System, it is recommended to create the target LPARs in advance. Install Linux on the target LPAR using either the Linux distribution ISO image directly or through IBM Installation Toolkit. If installing Linux using the Linux distribution install image, please refer to the distribution installation guide: https://access.redhat.com/site/documentation/en- US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/index.html If installing Linux using IBM Installation Toolkit, the user manual has detailed installation instructions: http://pic.dhe.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp? topic=/liaan/ppwelcomeinstalllinux.htm After installation, ensure that the yum repository is set up (using either a network repository or a local install disc) and that yum can be used to install additional Red Hat Enterprise Linux software. Server Consolidation Tool will only migrate LAMP services installed in both source server and target Power LPAR. Thus the target LPAR needs to have the same LAMP services to from x86 source server, or at least the ones that must be migrated. The following command can be used to install all LAMP services and samba v3: 6 of 24
yum install httpd mysql-server php samba If MySQL will be migrated, it is necessary to start up the service in order Server Consolidation Tool can verify its password: service mysqld start 5.3. Server Consolidation Tool setup Server Consolidation Tool runs on Power systems and may be installed directly in the target LPAR system through ibmit4linux package, without the need of a third system to orchestrate the migration between source and target servers. If there is a preference for using a third system to orchestrate the migration, there are two options: install ibmit4linux package in case that is a supported Linux system, or boot IBM Installation Toolkit ISO and use Server Consolidation Tool from its live system. To install ibmit4linux package in a Red Hat Enterprise Linux 6.5 system, mount the IBM Installation Toolkit ISO and run the install script: mount -o loop ibmit.iso /mount/point cd /mount/point./install Refer to the IBM Installation Toolkit website for the supported Linux distributions: http://www14.software.ibm.com/webapp/set2/sas/f/lopdiags/installtools/ 7 of 24
6. Migrating x86 server to Power 1. From the IBM Installation Toolkit main screen, select Migrate x86 LAMP stack to Power Systems. 2. Under Source system access credentials, enter the x86 source server hostname, ssh port (if different from the default 22), and the root password. 3. Under Target system access credentials, enter the target Power LPAR hostname, ssh port and the root password. Click Next. Illustration 6.1 4. Server Consolidation Tool retrieves the source and target system profiles and does some verification on them. Once the process completes, the Next button is enabled. Click Next. 8 of 24
9 of 24
10 of 24
11 of 24
12 of 24
13 of 24
14 of 24
15 of 24
16 of 24
17 of 24
18 of 24
Illustration 6.2 Note: The source machine profile retrieval may take up to 10 minutes to complete. It may fail depending on source machine configuration and network performance. Ensure that iptables firewall and SELinux are disabled on the source x86 and retry this step a second time. 5. In next page, Settings to be migrated shows the LAMP workloads that will be migrated based on verification done on source and target system profiles. If a LAMP workload is missing in that list, check if it is installed in both source x86 and target LPAR, make the necessary adjustments and click Quit to start a new process. Illustration 6.3 6. Select the Data to be migrated from the source x86 server. 7. If additional data directories need to be migrated, inform the full path and click Add for each 19 of 24
one. 8. If MySQL data was selected to be migrated, inform the MySQL root password for both source and target systems. 9. Click Next and review the summary. 10. Click Next to start the migration process. Server Consolidation Tool will show the migration progress in Task Monitor. Illustration 6.4 Note: Another migration can be started in parallel. It is possible to go back to the progress screen by accessing Task Monitor from the IBM Installation Toolkit main screen, selecting the migration process, and clicking Details. 20 of 24
7. Post-migration setup and verification Once the migration completes, Server Consolidation Tool may not enable and start all the services on the target LPAR. Enable and start the necessary services using chkconfig/service commands. At this point, the migration process is complete. 21 of 24
8. References 1. IBM Installation Toolkit User Manual: http://pic.dhe.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaan/powerpack.htm 2. IBM Installation Toolkit Download: http://www14.software.ibm.com/webapp/set2/sas/f/lopdiags/installtools/ 3. Installing Linux on Power Systems Servers: http://pic.dhe.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp? topic=/liaab/concepts/installsetupparent.htm 4. Red Hat Enterprise Linux 6.5 Installation Guide: https://access.redhat.com/site/documentation/en- US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/index.html 22 of 24
Trademarks and special notices Copyright IBM Corporation 2014. References in this document to IBM products or services do not imply that IBM intends to make them available in every country. IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol ( or ), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Intel, Intel Inside (logos), MMX, and Pentium are trademarks of Intel Corporation in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others. Information is provided "AS IS" without warranty of any kind. Customers should refer to IBM official product guides and manuals for operating procedures. In case of a conflict between this guide and the product guides/manuals, the official product guides/manuals are to be followed. All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Information concerning non-ibm products was obtained from a supplier of these products, published announcement material, or other publicly available sources and does not constitute an endorsement of such products by IBM. Sources for non-ibm list prices and performance numbers are taken from publicly available information, including vendor announcements and vendor worldwide homepages. IBM has not tested these products and cannot confirm the accuracy of performance, capability, or any other claims related to non-ibm products. Questions on the capability of non-ibm products should be addressed to the supplier of those products. 23 of 24
All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. Contact your local IBM office or IBM authorized reseller for the full text of the specific Statement of Direction. Some information addresses anticipated future capabilities. Such information is not intended as a definitive statement of a commitment to specific levels of performance, function or delivery schedules with respect to any future products. Such commitments are only made in IBM product announcements. The information is presented here to communicate IBM's current investment and development activities as a good faith effort to help with our customers' future planning. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here. Photographs shown are of engineering prototypes. Changes may be incorporated in production models. Any references in this information to non-ibm websites are provided for convenience only and do not in any manner serve as an endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those websites is at your own risk. 24 of 24