Building a Test Platform in the Cloud with Open Source Technologies, Page 3
Creating the MySQL Image
The steps for creating the MySQL image are same as those for creating the Tomcat image.
Mount a CentOS 5.2 pre-bundled image to a specific folder.
#Mount Imagemount -o loop /mnt/Mount#Mount the Procmount -t proc none /mnt/Mount/proc/
Change the root to mount-point (i.e. /mnt/Mount) and execute the following commands in the command prompt.
cd /mnt/Mountchroot .
When this is done, the command prompt shows the following to indicate that the root is changed to mount point.
Now install all the RPMs required for MySQL, including its dependencies. When all the RPMs are installed, exit from the root.
To learn how to enable remote access to MySQL databases, refer to the tutorial How to Enable Remote Access To MySQL Database.
To ensure that MySQL starts automatically during instance bootup, add the startup script in etc/rc.local inside the mount folder.
To configure JPetStore to use the new MySQL instance, begin with this command:
When the instances are up and running, you can change JPetStore application's default database to MySQL, as per our requirements. For that, update the database.properties file of JPetStore in the Tomcat image. To learn how to upload and run the images, refer to the Eucalyptus Image Management documentation.
Start all instances and make sure that an IP is obtained for each instance. You can execute performance testing on these cloud instances in a similar fashion to that of performance tests on physical machines.
Moving a test environment to the cloud has a lot of potential benefits over a physical test environment. We performed many rounds of testing on a physical test environment as well as on a cloud test environment. Both the physical test machines and cloud test instances had the same configuration. Based on the test results, the cloud-based solution reduced the amount of effort and time required to set up a test environment considerably, while the difference in performance metrics was negligible.
About the Authors
Rini Susan specializes in J2EE, client/server architecture, and performance engineering. At Infosys SETLabs, she was a member of a team that built a private enterprise cloud.
Vikas Valikan is a member of the Performance Engineering and Cloud Computing team at Infosys SETLabs. He specializes in .NET, J2EE and performance lifecycle analysis. He also was a member of the team that built a private enterprise cloud with open source technologies.