From 4ec71cc3e334b42e0257ec8cf8a85a778a817e56 Mon Sep 17 00:00:00 2001 From: wangyaoguang Date: Thu, 7 Apr 2016 19:29:38 +0800 Subject: add puppet manifests for rubbos client module 1. add manifests fro rubbos client module 2. add client configuration files 3. modify some related common parameters JIRA: BOTTLENECK-55 Change-Id: Ia87090687217bdfe82ae89f7e497f0a665a83201 Signed-off-by: wangyaoguang --- .../modules/rubbos_client/files/Makefile | 86 ++++++++++++++++++++++ .../modules/rubbos_client/files/build.properties | 16 ++++ .../modules/rubbos_client/files/config.mk | 36 +++++++++ .../rubbos_client/files/rubbos.properties.template | 85 +++++++++++++++++++++ .../modules/rubbos_client/files/run_emulator.sh | 16 ++++ 5 files changed, 239 insertions(+) create mode 100755 testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/Makefile create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/build.properties create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/config.mk create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/rubbos.properties.template create mode 100755 testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/run_emulator.sh (limited to 'testsuites/rubbos/puppet_manifests/modules/rubbos_client/files') diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/Makefile b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/Makefile new file mode 100755 index 00000000..77dec805 --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/Makefile @@ -0,0 +1,86 @@ +############################################################################# +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + +########################### +# RUBBoS Makefile # +########################### + +include config.mk + +############################## +# Environment variables # +############################## + +JAVA = $(JAVA_HOME)/bin/java +JAVAC = $(JAVA_HOME)/bin/javac +JAVACOPTS = -deprecation +JAVACC = $(JAVAC) $(JAVACOPTS) +RMIC = $(JAVA_HOME)/bin/rmic +RMIREGISTRY= $(JAVA_HOME)/bin/rmiregistry +CLASSPATH = .:$(J2EE_HOME)/lib/j2ee.jar:$(JAVA_HOME)/jre/lib/rt.jar +JAVADOC = $(JAVA_HOME)/javadoc + + +######################### +# Servlets version # +######################### +#ServletPrinter +Servlets = Config TimeManagement BrowseCategories Auth RegisterUser RubbosHttpServlet BrowseRegions SearchItemsByCategory SearchItemsByRegion ViewItem ViewBidHistory ViewUserInfo SellItemForm RegisterItem PutCommentAuth PutComment StoreComment BuyNowAuth BuyNow StoreBuyNow PutBidAuth PutBid StoreBid AboutMe + +all_servlets_sources = $(addprefix edu/rice/rubbos/servlets/, $(addsuffix .java, $(Servlets))) +all_servlets_obj = $(addprefix edu/rice/rubbos/servlets/, $(addsuffix .class, $(Servlets))) + +servlets: $(all_servlets_obj) + +clean_servlets: + rm -f edu/rice/rubbos/servlets/*.class + +#################### +# Client # +#################### + +ClientFiles = URLGenerator URLGeneratorPHP RUBBoSProperties Stats \ + TransitionTable ClientEmulator UserSession + +all_client_sources = $(addprefix edu/rice/rubbos/client/, $(addsuffix .java, $(ClientFiles))) +all_client_obj = $(addprefix edu/rice/rubbos/client/, $(addsuffix .class, $(ClientFiles))) edu/rice/rubbos/beans/TimeManagement.class + +client: $(all_client_obj) + +initDB: + ${JAVA} -classpath .:./database edu.rice.rubbos.client.InitDB ${PARAM} + +emulator: + ${JAVA} -classpath Client:Client/rubbos_client.jar:. -Xms256m -Xmx2048m -Dhttp.keepAlive=true -Dhttp.maxConnections=1000000 edu.rice.rubbos.client.ClientEmulator + +emulatorDebug: + ${JAVA} -classpath Client:Client/rubbos_client.jar:. -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Xms128m -Xmx1024m -Dhttp.keepAlive=true -Dhttp.maxConnections=1000000 edu.rice.rubbos.client.ClientEmulator + + +############################ +# Global rules # +############################ + + +all: beans ejb_servlets client javadoc flush_cache + +world: all servlets + +javadoc : + ${JAVADOC} -d ./doc/api -bootclasspath ${CLASSPATH} -version -author -windowtitle "RUBBoS API" -header "RUBBoS (C)2001 Rice University/INRIA
" edu.rice.rubbos.beans edu.rice.rubbos.beans.servlets edu.rice.rubbos.client + +clean: + rm -f core edu/rice/rubbos/beans/*.class edu/rice/rubbos/beans/JOnAS* edu/rice/rubbos/beans/servlets/*.class edu/rice/rubbos/client/*.class edu/rice/rubbos/servlets/*.class + +%.class: %.java + ${JAVACC} -classpath ${CLASSPATH} $< + +flush_cache: bench/flush_cache.c + gcc bench/flush_cache.c -o bench/flush_cache diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/build.properties b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/build.properties new file mode 100644 index 00000000..77de8ba3 --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/build.properties @@ -0,0 +1,16 @@ +############################################################################# +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + +src = . +dist =. +classes.dir = ./build +web.dir = ../Servlet_HTML + +j2ee = REPLACED_RUBBOS_APP_TOOLS/j2sdkee1.3.1 diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/config.mk b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/config.mk new file mode 100644 index 00000000..407bc25d --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/config.mk @@ -0,0 +1,36 @@ +############################################################################# +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +## Environment variables +JAVA = $(JAVA_HOME)/bin/java +JAVAC = $(JAVA_HOME)/bin/javac +JAVACOPTS = -deprecation +JAVACC = $(JAVAC) $(JAVACOPTS) +RMIC = $(JAVA_HOME)/bin/rmic +RMIREGISTRY= $(JAVA_HOME)/bin/rmiregistry +CLASSPATH = .:$(J2EE_HOME)/lib/j2ee.jar:$(JAVA_HOME)/jre/lib/rt.jar:$(CATALINA_HOME)/common/lib/servlet-api.jar +JAVADOC = $(JAVA_HOME)/bin/javadoc +JAR = $(JAVA_HOME)/bin/jar + +GENIC = ${JONAS_ROOT}/bin/unix/GenIC + +MAKE = gmake +CP = /bin/cp +RM = /bin/rm +MKDIR = /bin/mkdir + + +# EJB server: supported values are jonas or jboss +EJB_SERVER = jonas + +# DB server: supported values are MySQL or PostgreSQL +DB_SERVER = MySQL + +%.class: %.java + ${JAVACC} -classpath ${CLASSPATH} $< diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/rubbos.properties.template b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/rubbos.properties.template new file mode 100644 index 00000000..33aa46e9 --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/rubbos.properties.template @@ -0,0 +1,85 @@ +############################################################################# +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + +# HTTP server information +httpd_hostname = REPLACED_WEB_SERVER +httpd_port = 8000 + +# C/JDBC server to monitor (if any) +cjdbc_hostname = + +# Precise which version to use. Valid options are : PHP, Servlets, EJB +httpd_use_version = Servlets + +# EJB server information +ejb_server = +ejb_html_path = +ejb_script_path = + +# Servlets server information +servlets_server = REPLACED_APPLICATION_SERVER +servlets_html_path = /rubbos +servlets_script_path = /rubbos/servlet + +# PHP information +php_html_path = /PHP +php_script_path = /PHP + +#Database information +database_master_server = REPLACED_DB_SERVER + +database_slave_servers = +workload_remote_client_nodes = REPLACED_CLIENT_SERVERS +workload_remote_client_command = REPLACED_RUBBOS_APP_TOOLS/jdk1.6.0_27/bin/java -classpath .:REPLACED_RUBBOS_HOME/Client/:REPLACED_RUBBOS_HOME/Client/rubbos_client.jar -Xms512m -Xmx2048m -Dhttp.keepAlive=true -Dhttp.maxConnections=1000000 edu.rice.rubbos.client.ClientEmulator + +workload_number_of_clients_per_node = REPLACED_NUMBER_OF_CLIENTS_PER_NODE + +# Workload: precise which transition table to use +workload_user_transition_table = REPLACED_RUBBOS_HOME/workload/user_transitions.txt +workload_author_transition_table = REPLACED_RUBBOS_HOME/workload/author_transitions.txt +workload_number_of_columns = 24 +workload_number_of_rows = 26 +workload_maximum_number_of_transitions = 1000 +workload_use_tpcw_think_time = yes +workload_number_of_stories_per_page = 20 + +workload_up_ramp_time_in_ms = 15000 +workload_up_ramp_slowdown_factor = 2 + +workload_session_run_time_in_ms = 60000 + +workload_down_ramp_time_in_ms = 10000 +workload_down_ramp_slowdown_factor = 3 +workload_percentage_of_author = 10 + +# Users policy +database_number_of_authors = 50 +database_number_of_users = 500000 + +# Stories policy +database_story_dictionnary = REPLACED_RUBBOS_HOME/database/dictionary +database_story_maximum_length = 1024 +database_oldest_story_year = 1998 +database_oldest_story_month = 1 + +# Comments policy +database_comment_max_length = 1024 + +# Connection timedout settings +connection_time_out_interval = 300 + +# Monitoring Information +monitoring_debug_level = 1 +monitoring_program = REPLACED_RUBBOS_APP/sysstat-9.0.6/bin/sar +monitoring_options = -u ALL -I SUM +monitoring_sampling_in_seconds = 1 +monitoring_rsh = /usr/bin/ssh +monitoring_scp = /usr/bin/scp +monitoring_gnuplot_terminal = png diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/run_emulator.sh b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/run_emulator.sh new file mode 100755 index 00000000..5e8a6e95 --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_client/files/run_emulator.sh @@ -0,0 +1,16 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +## Usage: run_emulator.sh +echo "==> Rubbos emulator start $(date)" + +REPLACED_RUBBOS_APP_TOOLS/jdk1.6.0_27/bin/java -classpath .:REPLACED_RUBBOS_HOME/Client:REPLACED_RUBBOS_HOME/Client/rubbos_client.jar -Xms512m -Xmx2048m -Dhttp.keepAlive=true -Dhttp.maxConnections=1000000 edu.rice.rubbos.client.ClientEmulator + +echo "==> Rubbos emulator end $(date)" -- cgit 1.2.3-korg