summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Mancy <rmancy@redhat.com>2011-08-18 14:27:53 +1000
committerRaymond Mancy <rmancy@redhat.com>2011-08-18 14:27:53 +1000
commit193d25dd4856587e3974af92a0ca48218f3eb3b4 (patch)
treecd3818af85eb1cd25121e50f2b48ab3edefac58c
parent3516bff827e74aade31646cedd48d25bd3ffada0 (diff)
-rw-r--r--Tasks/distribution/beaker/load-test/Makefile92
-rw-r--r--Tasks/distribution/beaker/load-test/PURPOSE2
-rw-r--r--Tasks/distribution/beaker/load-test/job.xml99
-rw-r--r--Tasks/distribution/beaker/load-test/load.xml18
-rwxr-xr-xTasks/distribution/beaker/load-test/runtest.sh43
5 files changed, 254 insertions, 0 deletions
diff --git a/Tasks/distribution/beaker/load-test/Makefile b/Tasks/distribution/beaker/load-test/Makefile
new file mode 100644
index 0000000..c2577b7
--- /dev/null
+++ b/Tasks/distribution/beaker/load-test/Makefile
@@ -0,0 +1,92 @@
+# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
+# is made available to anyone wishing to use, modify, copy, or
+# redistribute it subject to the terms and conditions of the GNU General
+# Public License v.2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Raymond Mancy <rmancy@redhat.com>
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
+# Example Makefile for RHTS #
+# This example is geared towards a test for a specific package #
+# It does most of the work for you, but may require further coding #
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
+
+# The toplevel namespace within which the test lives.
+# FIXME: You will need to change this:
+TOPLEVEL_NAMESPACE=distribution
+
+# The name of the package under test:
+# FIXME: you wil need to change this:
+PACKAGE_NAME=beaker
+
+# The path of the test below the package:
+# FIXME: you wil need to change this:
+RELATIVE_PATH=load-test
+
+# Version of the Test. Used with make tag.
+export TESTVERSION=1.1
+
+# The combined namespace of the test.
+export TEST=/$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
+
+
+# A phony target is one that is not really the name of a file.
+# It is just a name for some commands to be executed when you
+# make an explicit request. There are two reasons to use a
+# phony target: to avoid a conflict with a file of the same
+# name, and to improve performance.
+.PHONY: all install download clean
+
+# executables to be built should be added here, they will be generated on the system under test.
+BUILT_FILES=
+
+# data files, .c files, scripts anything needed to either compile the test and/or run it.
+FILES=$(METADATA) runtest.sh Makefile PURPOSE load.xml job.xml
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ chmod a+x ./runtest.sh
+
+clean:
+ rm -f *~ *.rpm $(BUILT_FILES)
+
+# You may need to add other targets e.g. to build executables from source code
+# Add them here:
+
+
+# Include Common Makefile
+include /usr/share/rhts/lib/rhts-make.include
+
+# Generate the testinfo.desc here:
+$(METADATA): Makefile
+ @touch $(METADATA)
+# Change to the test owner's name
+ @echo "Owner: Raymond Mancy <rmancy@redhat.com>" > $(METADATA) # FIXME: customize this
+ @echo "Name: $(TEST)" >> $(METADATA)
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
+ @echo "License: GPLv3" >> $(METADATA)
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
+ @echo "Description: Runs load test against beaker ">> $(METADATA)
+ @echo "TestTime: 80m" >> $(METADATA)
+ @echo "RunFor: $(PACKAGE_NAME)-server" >> $(METADATA)
+ @echo "Releases: Fedora14" >> $(METADATA)
+# add any other packages for which your test ought to run here
+ @echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
+ @echo "Environment: BEAKER_LOAD_SERVER=localhost" >> $(METADATA)
+ @echo "Environment: GRAPHITE_SERVER=localhost" >> $(METADATA)
+
+# add any other requirements for the script to run here
+# FIXME Need to change these to be mandatory passed in with task params
+ rhts-lint $(METADATA)
+
+
diff --git a/Tasks/distribution/beaker/load-test/PURPOSE b/Tasks/distribution/beaker/load-test/PURPOSE
new file mode 100644
index 0000000..edf7e6f
--- /dev/null
+++ b/Tasks/distribution/beaker/load-test/PURPOSE
@@ -0,0 +1,2 @@
+The purpose of this test is to run a load test on a beaker server
+using funnel
diff --git a/Tasks/distribution/beaker/load-test/job.xml b/Tasks/distribution/beaker/load-test/job.xml
new file mode 100644
index 0000000..ca61a95
--- /dev/null
+++ b/Tasks/distribution/beaker/load-test/job.xml
@@ -0,0 +1,99 @@
+<job retention_tag="scratch">
+ <whiteboard>
+ Load test 2RS,4R,10RT
+ </whiteboard>
+<recipeSet priority="Urgent">
+<recipe kernel_options="" kernel_options_post="" ks_meta="" role="RECIPE_MEMBERS" whiteboard="">
+<autopick random="false"/>
+<watchdog panic="ignore"/>
+<packages/>
+<ks_appends/>
+<repos/>
+<distroRequires>
+<and>
+<distro_family op="=" value="Fedora14"/>
+<distro_virt op="=" value=""/>
+<distro_variant op="=" value="Fedora"/>
+<distro_name op="=" value="Fedora-14"/>
+<distro_arch op="=" value="i386"/>
+</and>
+</distroRequires>
+<hostRequires>
+<and>
+<system_type op="=" value="Machine"/>
+</and>
+</hostRequires>
+<partitions/>
+<task name="/distribution/install" role="STANDALONE">
+<params/>
+</task>
+<task name="/distribution/reservesys" role="STANDALONE">
+<params/>
+</task>
+<task name="/distribution/reservesys" role="STANDALONE">
+<params/>
+</task>
+<task name="/distribution/reservesys" role="STANDALONE">
+<params/>
+</task>
+<task name="/distribution/reservesys" role="STANDALONE">
+<params>
+<param name="RESERVETIME" value="3700"/>
+</params>
+
+</task>
+
+</recipe>
+
+
+
+
+
+
+<recipe kernel_options="" kernel_options_post="" ks_meta="" role="RECIPE_MEMBERS" whiteboard="">
+<autopick random="false"/>
+<watchdog panic="ignore"/>
+<packages/>
+<ks_appends/>
+<repos/>
+<distroRequires>
+<and>
+<distro_family op="=" value="Fedora14"/>
+<distro_virt op="=" value=""/>
+<distro_variant op="=" value="Fedora"/>
+<distro_name op="=" value="Fedora-14"/>
+<distro_arch op="=" value="i386"/>
+</and>
+</distroRequires>
+<hostRequires>
+<and>
+<system_type op="=" value="Machine"/>
+</and>
+</hostRequires>
+<partitions/>
+<task name="/distribution/install" role="STANDALONE">
+<params/>
+</task>
+<task name="/distribution/reservesys" role="STANDALONE">
+<params/>
+</task>
+<task name="/distribution/reservesys" role="STANDALONE">
+<params/>
+</task>
+<task name="/distribution/reservesys" role="STANDALONE">
+<params/>
+</task>
+<task name="/distribution/reservesys" role="STANDALONE">
+
+<params>
+<param name="RESERVETIME" value="3700"/>
+</params>
+</task>
+</recipe>
+
+
+
+
+</recipeSet>
+
+</job>
diff --git a/Tasks/distribution/beaker/load-test/load.xml b/Tasks/distribution/beaker/load-test/load.xml
new file mode 100644
index 0000000..b348c84
--- /dev/null
+++ b/Tasks/distribution/beaker/load-test/load.xml
@@ -0,0 +1,18 @@
+<root>
+ <config>
+ <xmlproxy value="/RPC2" />
+ <baseload session='create_jobs' requests='1' unit='hour'/>
+ <baseload session='job_watch' requests='83'/> <!-- This equates to roughly 10k an hour -->
+ </config>
+
+ <load>
+ <user duration='1' unit='minute' session='create_jobs' load-level='1'/>
+
+ <user duration='20' unit='minute' session='job_watch' load-level='1' run-once='1'/>
+
+ <user delay='20' duration='20' unit='minute' session='job_watch' load-level='3' run-once='1'/>
+
+ <user delay='40' duration='20' unit='minute' session='job_watch' load-level='10' run-once='1'/>
+ </load>
+</root>
+
diff --git a/Tasks/distribution/beaker/load-test/runtest.sh b/Tasks/distribution/beaker/load-test/runtest.sh
new file mode 100755
index 0000000..33e6b61
--- /dev/null
+++ b/Tasks/distribution/beaker/load-test/runtest.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
+# is made available to anyone wishing to use, modify, copy, or
+# redistribute it subject to the terms and conditions of the GNU General
+# Public License v.2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Raymond Mancy <rmancy@redhat.com>
+
+function ClientCfg()
+{
+ mkdir -p ~/.beaker_client
+ cat << __EOF__ > ~/.beaker_client/config
+HUB_URL = "https://$BEAKER_LOAD_SERVER/"
+AUTH_METHOD = "password"
+USERNAME = "load"
+PASSWORD = "testing"
+MSG_BUS = False
+__EOF__
+}
+
+function InstallFunnel()
+{
+ yum -y install Funnel
+}
+
+function InstallBeakerFunnel()
+{
+ yum -y install BeakerFunnel
+}
+
+ClientCfg
+InstallFunnel
+InstallBeakerFunnel
+rhts-run-simple-test $TEST "funnel --profile load.xml --graphite-server $GRAPHITE_SERVER --load-server $BEAKER_LOAD_SERVER --ssl"