Skip to content

Commit

Permalink
Merge pull request #95 from DescartesResearch/development
Browse files Browse the repository at this point in the history
Merge dev to master for major release 1.2.0
  • Loading branch information
NSchmittUniWue authored Aug 13, 2018
2 parents 77733d9 + 504aba0 commit 53c6efa
Show file tree
Hide file tree
Showing 183 changed files with 10,818 additions and 8,034 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ The TeaStore is designed to be a reference / test application to be used in benc

Check out our **[wiki](https://github.com/DescartesResearch/TeaStore/wiki)** with information on how to [get started using/developing the TeaStore](https://github.com/DescartesResearch/TeaStore/wiki/Getting-Started), more information on the architecture and services of the Tea Store, guides on how to [run the TeaStore for benchmarking/testing](https://github.com/DescartesResearch/TeaStore/wiki/Testing-and-Benchmarking), and common [troubleshooting tips](https://github.com/DescartesResearch/TeaStore/wiki/Troubleshooting).

You can also watch a short demonstration of the TeaStore running in Kubernetes with its monitoring environment enabled on **[YouTube](https://www.youtube.com/watch?v=6OcSNrErzGE&feature=youtu.be)**.

## Getting Started

To get started, we recommend running the TeaStore in an environment of your choice. We offer three ways of deploying and running the TeaStore:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,39 @@
--[[
Load Balancing version of the teastore_browse profile.
Use in case of multiple WebUI instances in the absense of front-end load balancers.
teastore_browse profile. Sends cyclical requests to webui instance or front-end loadbalancer.
Browses store and updates shopping carts.
Does not perform any actions that would change the database.
--]]

--[[
Global Variables. Initialized at load driver startup.
--]]

--[[
URLS of all WebUI instances. Used as prefix for further requests.
--]]
webuis = {
"http://10.1.1.1:8080/tools.descartes.teastore.webui/",
"http://10.1.1.2:8080/tools.descartes.teastore.webui/",
}
prefix = "http://10.1.1.1:8080/tools.descartes.teastore.webui/"
productviewcount = 30
postIndex = {3, 11}
postIndex = {3, 11, 13}


--[[
Gets called at the beginning of each "call cycle", perform as much work as possible here.
Initialize all global variables here.
Note that math.random is already initialized using fixed seed for reproducibility.
Note that math.random is already initialized using a fixed seed (5) for reproducibility.
--]]
function onCycle()
userpostfix = 1 + math.random(90)
--[[
Calls that can be initialized at cycle start.
They are either complete or serve as prefixes to dynamic calls.
They are appended to the WebUI address prefix.
--]]
calls = {
"",
"login",
--[[[POST]--]]"loginAction?username=user"..userpostfix.."&password=password",
--[[[POST]--]]"category?page=1&category=",
"product?id=",
--[[[POST]--]]"cartAction?addToCart=&productid=",
"category?page=1&category=",
"category?page=",
--[[[POST]--]]"cartAction?addToCart=&productid=",
"profile",
--[[[POST]--]]"loginAction?logout=",
"",
"login",
--[[[POST]--]]"loginAction?username=user"..userpostfix.."&password=password",
--[[[POST]--]]"category?page=1&category=",
"product?id=",
--[[[POST]--]]"cartAction?addToCart=&productid=",
"category?page=1&category=",
"category?page=",
--[[[POST]--]]"cartAction?addToCart=&productid=",
"order",
--[[[POST]--]]"cartAction?firstname=User&lastname=User&address1=Road&address2=City&cardtype=volvo&cardnumber=314159265359&expirydate=12/2050&confirm=Confirm",
"profile",
--[[[POST]--]]"loginAction?logout=",
}
prefix = nextWebUI()
end

--[[
Expand Down Expand Up @@ -102,13 +93,3 @@ function isPost(index)
end
return false
end

webuiindex = math.random(#webuis);

function nextWebUI()
webuiindex = webuiindex + 1;
if webuiindex > #webuis then
webuiindex = 1
end
return webuis[webuiindex]
end
382 changes: 382 additions & 0 deletions examples/jmeter/teastore_browse.jmx

Large diffs are not rendered by default.

382 changes: 382 additions & 0 deletions examples/jmeter/teastore_browse_nogui.jmx

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions examples/kubernetes/teastore-rabbitmq.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teastore-kieker-rabbitmq
spec:
template:
metadata:
labels:
app: teastore
run: teastore-kieker-rabbitmq
spec:
containers:
- name: teastore-kieker-rabbitmq
image: descartesresearch/teastore-kieker-rabbitmq
ports:
- containerPort: 5672
- containerPort: 8080
- containerPort: 15672
---
apiVersion: v1
kind: Service
metadata:
name: teastore-kieker-rabbitmq
labels:
app: teastore
run: teastore-kieker-rabbitmq
spec:
type: NodePort
ports:
- port: 8080
nodePort: 30081
protocol: TCP
name: webui-port
- port: 5672
protocol: TCP
name: rabbitmq-port
selector:
run: teastore-kieker-rabbitmq

204 changes: 204 additions & 0 deletions examples/kubernetes/teastore-ribbon-kieker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teastore-db
spec:
template:
metadata:
labels:
app: teastore
run: teastore-db
spec:
containers:
- name: teastore-db
image: descartesresearch/teastore-db
ports:
- containerPort: 3306
---
apiVersion: v1
kind: Service
metadata:
name: teastore-db
labels:
app: teastore
run: teastore-db
spec:
ports:
- port: 3306
protocol: TCP
selector:
run: teastore-db
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teastore-registry
spec:
template:
metadata:
labels:
app: teastore
run: teastore-registry
spec:
containers:
- name: teastore-registry
image: descartesresearch/teastore-registry
ports:
- containerPort: 8080
env:
- name: USE_POD_IP
value: "true"
---
apiVersion: v1
kind: Service
metadata:
name: teastore-registry
labels:
app: teastore
run: teastore-registry
spec:
ports:
- port: 8080
protocol: TCP
selector:
run: teastore-registry
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teastore-persistence
spec:
template:
metadata:
labels:
app: teastore
run: teastore-persistence
spec:
containers:
- name: teastore-persistence
image: descartesresearch/teastore-persistence-kieker
ports:
- containerPort: 8080
env:
- name: USE_POD_IP
value: "true"
- name: REGISTRY_HOST
value: "teastore-registry"
- name: DB_HOST
value: "teastore-db"
- name: DB_PORT
value: "3306"
- name: RABBITMQ_HOST
value: "teastore-kieker-rabbitmq"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teastore-auth
spec:
template:
metadata:
labels:
app: teastore
run: teastore-auth
spec:
containers:
- name: teastore-auth
image: descartesresearch/teastore-auth-kieker
ports:
- containerPort: 8080
env:
- name: USE_POD_IP
value: "true"
- name: REGISTRY_HOST
value: "teastore-registry"
- name: RABBITMQ_HOST
value: "teastore-kieker-rabbitmq"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teastore-image
spec:
template:
metadata:
labels:
app: teastore
run: teastore-image
spec:
containers:
- name: teastore-image
image: descartesresearch/teastore-image-kieker
ports:
- containerPort: 8080
env:
- name: USE_POD_IP
value: "true"
- name: REGISTRY_HOST
value: "teastore-registry"
- name: RABBITMQ_HOST
value: "teastore-kieker-rabbitmq"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teastore-recommender
spec:
template:
metadata:
labels:
app: teastore
run: teastore-recommender
spec:
containers:
- name: teastore-recommender
image: descartesresearch/teastore-recommender-kieker
ports:
- containerPort: 8080
env:
- name: USE_POD_IP
value: "true"
- name: REGISTRY_HOST
value: "teastore-registry"
- name: RABBITMQ_HOST
value: "teastore-kieker-rabbitmq"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teastore-webui
spec:
template:
metadata:
labels:
app: teastore
run: teastore-webui
spec:
containers:
- name: teastore-webui
image: descartesresearch/teastore-webui-kieker
ports:
- containerPort: 8080
env:
- name: USE_POD_IP
value: "true"
- name: REGISTRY_HOST
value: "teastore-registry"
- name: RABBITMQ_HOST
value: "teastore-kieker-rabbitmq"
---
apiVersion: v1
kind: Service
metadata:
name: teastore-webui
labels:
app: teastore
run: teastore-webui
spec:
type: NodePort
ports:
- port: 8080
nodePort: 30080
protocol: TCP
selector:
run: teastore-webui
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,20 @@ public int hashCode() {
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
Category other = (Category) obj;
if (id != other.id)
if (id != other.id) {
return false;
}
return true;
}
}

}
Loading

0 comments on commit 53c6efa

Please sign in to comment.