HP LoadRunner Software Version: 12.50
Creating Custom Cloud Images
Document Release Date: July 2016 | Software Release Date: May 2016
Creating Custom Cloud Images
Legal Notices Warranty The only warranties for Hewlett Packard Enterprise Development LP 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. HPE shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice.
Restricted Rights Legend Confidential computer software. Valid license from HPE required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.
Copyright Notice © Copyright 1993-2016 Hewlett Packard Enterprise Development LP
Trademark Notices Adobe® is a trademark of Adobe Systems Incorporated. Microsoft® and Windows® are U.S. registered trademarks of Microsoft Corporation. Oracle and Java are registered trademarks of Oracle and/or its affiliates. UNIX® is a registered trademark of The Open Group.
Support Visit the HPE Software Support Online web site at: https://softwaresupport.hpe.com This web site provides contact information and details about the products, services, and support that HPE Software offers. HPE Software online support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the support web site to: l l l l l l l l
Search for knowledge documents of interest Submit and track support cases and enhancement requests Download software patches Manage support contracts Look up HPE support contacts Review information about available services Enter into discussions with other software customers Research and register for software training
Most of the support areas require that you register as an HPE Passport user and sign in. Many also require a support contract. To register for an HPE Passport ID, go to: https://softwaresupport.hpe.com and click Register. To find more information about access levels, go to: https://softwaresupport.hpe.com/web/softwaresupport/access-levels.
HP LoadRunner (12.50)
Page 2 of 18
Creating Custom Cloud Images
HPE Software Solutions & Integrations and Best Practices Visit HPE Software Solutions Now at https://softwaresupport.hpe.com/group/softwaresupport/search-result//facetsearch/document/KM01702710 to explore how the products in the HPE Software catalog work together, exchange information, and solve business needs. Visit the Cross Portfolio Best Practices Library at https://hpln.hpe.com/group/best-practices-hpsw to access a wide variety of best practice documents and materials.
HP LoadRunner (12.50)
Page 3 of 18
Creating Custom Cloud Images
Contents HP LoadRunner
1
Azure – Windows
5
Azure - Ubuntu
7
Amazon EC2 – Windows
9
Amazon EC2 - Ubuntu
10
Google Cloud - Windows
12
Google Cloud - Ubuntu
14
DigitalOcean - Ubuntu
16
Send Us Feedback
18
HP LoadRunner (12.50)
Page 4 of 18
Creating Custom Cloud Images Azure – Windows
Azure – Windows Creating a custom image for Azure – Windows 1. Create new instance from the cloud console, using a Windows Server 2008 R2 Enterprise SP1 x64 image. For details, see http://azure.microsoft.com/en-us/documentation/articles/virtual-machinescreate-custom/. 2. Connect to the instance that you just created. For details, see http://azure.microsoft.com/enus/documentation/articles/virtual-machines-log-on-windows-server/. 3. Install an LG SA (Standalone Load Generator) in Performance Center (PC) Mode. 4. Turn off firewalls using the following command: netsh advfirewall set allprofiles state off
5. Register the LGCloudAgent service using the following command: sc create LGCloudAgent binPath= "c:\Program Files (x86)\HP\Load Generator\bin\LGCloudAgent.exe" start= auto
6. Disable autostart for the LoadRunnerAgent service: sc config LoadRunnerAgent start= demand sc config remotemanagementagent start= demand
7. Run the System Preparation Tool using the Generalize and Shutdown options, as described in http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-capture-imagewindows-server/. Wait until the instance stops. 8. You must create an SSL certificate in order to upload to Azure. For details, see How to Create Certificates for Azure Cloud in the LoadRunner Help Center. Upload the *.cer file to Azure using Settings > Management Certificates. 9. Create an image from the instance. %LR_PATH%\bin\AzureCaptureRole.exe -s $subscription_id -c $path_to_ certificate_file -n $vmname -i $new_image_name -v $lr_version –d $lr_ drop --proxy proxy_url
Follow these naming guidelines: l $path_to_certificate_file: is the path to the .pem file corresponding to .cer file, that you previously uploaded to Azure. l $vmname: the name of the instance from the Web console. l $lr_version, $lr_drop: the version and drop of LoadRunner, for example "12.50". l $proxy_url: the url and port of a proxy server, if relevant.
HP LoadRunner (12.50)
Page 5 of 18
Creating Custom Cloud Images Azure – Windows
l
$subscription_id: the subscription id of the image. To determine this value, see the Settings > Subscriptions page on the Azure console.
HP LoadRunner (12.50)
Page 6 of 18
Creating Custom Cloud Images Azure - Ubuntu
Azure - Ubuntu Creating a custom image for Azure – Ubuntu 1. Create new instance from the cloud console, using an Ubuntu 12.04 x64 image. 2. Connect to the instance that you just created. 3. Run the following commands to update the image: sudo apt-get update sudo apt-get upgrade
4. Upload the Load Generator standalone installation for Linux to the machine. 5. Execute following command for uploaded files: chmod a+x inst64.bin installer.csh installer.sh unzip
6. Install the Load Generator: sudo apt-get install libc6-i386 lib32stdc++6 lib32ncurses5 libkrb5support0:i386 libkeyutils1:i386 gsoap:i386 mc libglib2.0-0:i386
7. Run the following command: bash installer.sh
8. Install the Standalone Load Generator, accepting all of the defaults. Skip the Certificate Installation step and the Load Generator startup. 9. Insert the following lines into /etc/rc.local: l
egrep '/([[:alnum:]]+:)?CustomData' /var/lib/waagent/ovf-env.xml | sed -re 's,.*<([[:alnum:]] +:)?CustomData>,,;s,.*,,' | base64 -d > /var/lib/waagent/CustomData
l
export LD_LIBRARY_PATH=/opt/HP/HP_LoadGenerator/bin
l
export PRODUCT_DIR=/opt/HP/HP_LoadGenerator
l
export M_LROOT=/opt/HP/HP_LoadGenerator
l
/opt/HP/HP_LoadGenerator/bin/LgCloudAgent
10. Run the following: sudo waagent -deprovision
HP LoadRunner (12.50)
Page 7 of 18
Creating Custom Cloud Images Azure - Ubuntu
11. Shut down the instance and verify that it has stopped. 12. You must create an SSL certificate in order to upload to Azure. For details, see How to Create Certificates for Azure Cloud in the LoadRunner Help Center. 13. Create an image from the instance. %LR_PATH%\bin\AzureCaptureRole.exe -s $subscription_id -c $path_to_ certificate_file -n $vmname -i $new_image_name -v $lr_version --proxy proxy_url
Follow these naming guidelines: l $path_to_certificate_file: is the path to the .pem file corresponding to .cer file, that you previously uploaded to Azure. l $vmname: the name of the instance from the Web console. l $lr_version: the version of LoadRunner, for example "12.50". l $proxy_url: the url and port of a proxy server, if relevant. l $subscription_id: the subscription id of the image. To determine this value, see the Settings > Subscriptions page on the Azure console.
HP LoadRunner (12.50)
Page 8 of 18
Creating Custom Cloud Images Amazon EC2 – Windows
Amazon EC2 – Windows Creating a custom image for Amazon EC2 – Windows 1. Launch a new instance from the cloud console. Use the latest Windows_Server-2008-R2_SP1English-64Bit-Base* image. Make sure the Shutdown behavior is set to Terminate. For details, see the AWS Documentation. 2. Connect to your Amazon EC2 instance. For details, see the AWS Documentation. 3. Install a standalone load generator on the cloud machine in the default PC Mode. The setup file is in the DVD's Standalone Applications folder. 4. Turn off the firewall using the following command: netsh advfirewall set allprofiles state off
5. Install any additional software required, for example, a Citrix client. 6. If you are planning to use the Citrix protocol, check that your network can access the cloud machine. We recommend that you disable firewalls completely on the cloud machine, and use the network management, such as security groups, provided by the cloud provider. 7. Register the LGCloudAgent service on the machine using the following command: sc create LGCloudAgent binPath= "c:\Program Files (x86)\HP\Load Generator\bin\LGCloudAgent.exe" start= auto
8. Disable autostart for the LoadRunnerAgent service: l
sc config LoadRunnerAgent start= demand
l
sc config remotemanagementagent start= demand
9. Run the EC2Config utility and set the Administrator password to Random. 10. Create an AMI from an Instance. l Set the Name according to HP_LR-PC_Load_Generator_
_ template, e.g. HP_LRPC_Load_Generator_12-50_Windows-2008R2x64 l
Set the Description to ״HP LR LG, PC Compatible ״and ״version{} ״template, e.g. ״HP LR LG, PC Compatible, version{12.50}״
11. Set the AMI to public if required. 12. Copy the image to all required regions. Ensure each new image has the correct tags and permissions set after it reaches the active state.
HP LoadRunner (12.50)
Page 9 of 18
Creating Custom Cloud Images Amazon EC2 - Ubuntu
Amazon EC2 - Ubuntu Creating a custom image for Amazon EC2 – Ubuntu 1. Launch a new instance from the cloud console, using an Ubuntu Server 12.04 x64 image. 2. Connect to the instance that you just created, signing in as ubuntu. 3. Run the following commands to update the image: sudo apt-get update sudo apt-get upgrade sudo apt-get -y install libc6-i386 lib32stdc++6 lib32ncurses5 gsoap:i386 mc
4. Upload the Load Generator standalone installation to the Linux machine. You can find the installation files in the DVD folders: DVD\Linux\Web_Installers_64\InstData\Linux\VM or DVD\Linux\Web_Installers_32\InstData\Linux\VM
5. Execute the following command for the uploaded files: chmod a+x inst64.bin installer.csh installer.sh unzip
6. Run the following: bash installer.sh
7. Install the standalone load generator, accepting all of the defaults. Skip the Certificate Installation step and the Load Generator startup. 8. Insert the following lines into /etc/rc.local: l
export LD_LIBRARY_PATH=/opt/HP/HP_LoadGenerator/bin
l
export PRODUCT_DIR=/opt/HP/HP_LoadGenerator
l
export M_LROOT=/opt/HP/HP_LoadGenerator
l
/opt/HP/HP_LoadGenerator/bin/LgCloudAgent
9. Create an AMI from the instance. Set the name and description according to the following example: a. Name: HP_LR-PC_Load_Generator__ template, e.g. HP_LR-PC_Load_
HP LoadRunner (12.50)
Page 10 of 18
Creating Custom Cloud Images Amazon EC2 - Ubuntu
Generator_12-50_Ubuntu12-04x64 b. Description: HP LR LG, PC Compatible, version{12.50} c. $subscription_id: the subscription id of the image. To determine this value, see the Settings > Subscriptions page on the Azure console. 10. Set the AMI to public if necessary. 11. Copy the AMI to all required regions. Make sure to copy all tags and permissions to each new image.
HP LoadRunner (12.50)
Page 11 of 18
Creating Custom Cloud Images Google Cloud - Windows
Google Cloud - Windows Creating a custom image for Google Cloud – Windows 1. Install the Google Compute SDK. It can be downloaded from https://cloud.google.com/sdk/.
For the following steps, use the SDK’s Web interface from your browser. 2. Define a network with any name (in our example, network1) and add the following rules: Name
Source tag / IP range
Allowed protocols / ports
Target tags
default-allow-lg
0.0.0.0/0
tcp:54345 (LR agent port)
hp-lr-lg
default-allow-rdp
0.0.0.0/0
tcp:3389
rdp
3. Create an instance: a. Provide a name for the instance (for our example instance1). b. Specify a region for the instance (for our example, us-central1-a). c. Specify a machine size g1-small (1 vCPU, 1.7 GB RAM), or higher. d. Specify Windows Server 2008 R2 Enterprise SP1 x64 as the operating system. e. Select Create New image -> Management, Disk, Networking, Access & Security Options -> Management and specify the tag "rdp". f. Select Create New image -> Management, Disk, Networking, Access & Security Options -> Networking and specify network1 as the network. g. Confirm that you want to create the instance. 4. Connect to the instance that you just created via RDP. 5. Download Load Generator Standalone installation file to the instance, and install in Performance Center (PC) Mode. 6. Turn off firewalls using the following command: netsh advfirewall set allprofiles state off
7. Register the LGCloudAgent service using the following command: sc create LGCloudAgent binPath= "c:\Program Files (x86)\HP\Load Generator\bin\LGCloudAgent.exe" start= auto
8. Disable autostart for the LoadRunnerAgent service: sc config LoadRunnerAgent start= demand sc config remotemanagementagent start= demand
9. Run the System Preparation Tool using the Generalize and Shutdown options:
HP LoadRunner (12.50)
Page 12 of 18
Creating Custom Cloud Images Google Cloud - Windows
cd %windir%\system32\sysprep sysprep (generalize, shutdown)
Using the Google Compute SDK console: 10. Authenticate yourself: gcloud auth login
11. Set current project: gcloud config set project
Use the SDK’s Web interface to determine the Project ID. 12. Terminate the instance using the SDK console: gcloud compute instances delete instance1 --keep-disks boot
13. Create an image from the instance disk. gcloud compute images create --description "HP LR LG, PC Compatible, version{12.50}, windows" --source-disk instance1 -source-disk-zone us-central1-a
HP LoadRunner (12.50)
Page 13 of 18
Creating Custom Cloud Images Google Cloud - Ubuntu
Google Cloud - Ubuntu Creating a custom image for Google Cloud – Ubuntu 1. Install the Google Compute SDK. It can be downloaded from https://cloud.google.com/sdk/.
For the following steps, use the SDK’s Web interface from your browser. 2. Define a network with any name (in our example, network1) and add the following rules: Name
Source tag / IP range
Allowed protocols / ports
Target tags
default-allow-lg
0.0.0.0/0
tcp:54345 (LR agent port)
hp-lr-lg
default-allow-ssh
0.0.0.0/0
tcp:22
ssh
3. Create an instance: a. Provide a name for the instance (for our example instance1). b. Specify a region for the instance (for our example, us-central1-a). c. Specify a machine size g1-small (1 vCPU, 1.7 GB RAM), or higher. d. Specify Windows Server 2008 R2 Enterprise SP1 x64 as the operating system. e. Select Create New image -> Management, Disk, Networking, Access & Security Options -> Management and specify the tag "ssh". f. Select Create New image -> Management, Disk, Networking, Access & Security Options -> Networking and specify network1 as the network. g. Confirm that you want to create the instance. 4. Connect to the instance that you just created via SSH. 5. Download Load Generator Standalone installation file to instance1 from: DVD\Linux\Web_Installers_64\InstData\Linux\VM or DVD\Linux\Web_Installers_32\InstData\Linux\VM
6. Run the following commands to update the image: sudo apt-get update sudo apt-get upgrade
7. Upload the Load Generator standalone installation to the machine. Execute the following command on the uploaded files: chmod a+x inst64.bin installer.csh installer.sh unzip
HP LoadRunner (12.50)
Page 14 of 18
Creating Custom Cloud Images Google Cloud - Ubuntu
8. Install the load generator machine’s prerequisites: sudo apt-get install libc6-i386 lib32stdc++6 lib32ncurses5 libkrb5support0:i386 libkeyutils1:i386 gsoap:i386 mc libglib2.0-0:i386
9. Install the Load Generator, accepting all of the defaults. Skip the certificate installation and set the load generator to startup. 10. Insert the following lines into /etc/rc.local: l
export LD_LIBRARY_PATH=/opt/HP/HP_LoadGenerator/bin
l
export PRODUCT_DIR=/opt/HP/HP_LoadGenerator
l
export M_LROOT=/opt/HP/HP_LoadGenerator
l
/opt/HP/HP_LoadGenerator/bin/LgCloudAgent
11. Shut down the instance and verify that it has stopped.
Use the SDK’s console for the next steps: 12. Authenticate yourself with the following command: gcloud auth login
13. Set the current project. gcloud config set project
14. Terminate the instance: gcloud compute instances delete instance1 --keep-disks boot
15. Create an image from the instance disk. gcloud compute images create --description "HP LR LG, PC Compatible, version{12.50}, linux" --source-disk instance1 --sourcedisk-zone us-central1-a
HP LoadRunner (12.50)
Page 15 of 18
Creating Custom Cloud Images DigitalOcean - Ubuntu
DigitalOcean - Ubuntu Creating a custom image for DigitalOcean – Ubuntu Note: This integration requires a patch over LoadRunner 12.50.
1. Create new instance from the cloud console using the Ubuntu 14.04 x64 image. 2. Connect to the instance using the credentials from your mailbox. 3. Install the required packages: dpkg --add-architecture i386 && apt-get update && apt-get -y upgrade && apt-get -y install libc6-i386 lib32stdc++6 lib32ncurses5 libkrb5support0:i386 libkeyutils1:i386 gsoap:i386 mc libglib2.0-0:i386
4. Upload the standalone load generator files. The files may be found in the following locations: \Linux\Web_Installers_64\InstData\Linux\VM or \Linux\Web_Installers_32\InstData\Linux\VM
5. Execute following command for uploaded files: chmod a+x inst64.bin installer.csh installer.sh unzip 6. Run the following: bash installer.sh
7. Install the Load Generator, accepting all of the defaults. Skip the Certificate Installation step and the Load Generator startup. 8. Insert the following lines into /etc/rc.local: a. export LD_LIBRARY_PATH=/opt/HP/HP_LoadGenerator/bin b. export PRODUCT_DIR=/opt/HP/HP_LoadGenerator c. export M_LROOT=/opt/HP/HP_LoadGenerator d. export CLOUD=DigitalOcean e. /opt/HP/HP_LoadGenerator/bin/LgCloudAgent 9. Power off. Wait for the instance to be in the Off state in the Web UI. 10. Create a snapshot (Select droplet, and select the ‘snapshots’ menu item, fill in a name and click the button). The name should contain "HP LR LG" and version {12.50} or any other relevant version
HP LoadRunner (12.50)
Page 16 of 18
Creating Custom Cloud Images DigitalOcean - Ubuntu
number. Wait while the snapshot is processed. 11. Copy the image to other regions. Go to https://cloud.digitalocean.com/images, select the new image, click Edit region availability and transfer it to other regions. 12. Make sure that all metadata and tags are copied to each of the images.
HP LoadRunner (12.50)
Page 17 of 18
Creating Custom Cloud Images Send Us Feedback
Send Us Feedback Let us know how we can improve your experience with the Creating Custom Cloud Images. Send your email to: [email protected]
HP LoadRunner (12.50)
Page 18 of 18