File tree 5 files changed +53
-1
lines changed
kubernetes-manifests/quick-start
cartservice/cartservice-provider/src/main/java/com/alibabacloud/hipstershop/cartserviceprovider/repository
5 files changed +53
-1
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,10 @@ services:
101
101
- " nacos"
102
102
- " product-mysql"
103
103
104
+ loadgenerator :
105
+ build : ./src/loadgenerator
106
+ image : registry.cn-shanghai.aliyuncs.com/microservice_demo/loadgenerator:1.0.0-SNAPSHOT
107
+ container_name : loadgenerator
104
108
# adservice:
105
109
# build: ./src/adservice
106
110
# image: adservice:1.0.0-SNAPSHOT
Original file line number Diff line number Diff line change @@ -101,6 +101,11 @@ services:
101
101
- " nacos"
102
102
- " product-mysql"
103
103
104
+ loadgenerator :
105
+ build : ./src/loadgenerator
106
+ image : registry.cn-shanghai.aliyuncs.com/microservice_demo/loadgenerator:1.0.0-SNAPSHOT
107
+ container_name : loadgenerator
108
+
104
109
# adservice:
105
110
# build: ./src/adservice
106
111
# image: adservice:1.0.0-SNAPSHOT
Original file line number Diff line number Diff line change @@ -150,6 +150,48 @@ spec:
150
150
limits :
151
151
cpu : 1000m
152
152
memory : 2048Mi
153
+
154
+ ---
155
+
156
+ apiVersion : apps/v1
157
+ kind : Deployment
158
+ metadata :
159
+ name : loadgenerator
160
+ spec :
161
+ selector :
162
+ matchLabels :
163
+ app : loadgenerator
164
+ replicas : 1
165
+ template :
166
+ metadata :
167
+ labels :
168
+ app : loadgenerator
169
+ spec :
170
+ terminationGracePeriodSeconds : 5
171
+ restartPolicy : Always
172
+ containers :
173
+ - name : main
174
+ image : loadgenerator
175
+ env :
176
+ - name : LANG
177
+ value : C.UTF-8
178
+ - name : GPG_KEY
179
+ value : 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
180
+ - name : PYTHON_GET_PIP_URL
181
+ value : https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
182
+ - name : PYTHON_GET_PIP_SHA256
183
+ value : 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
184
+ - name : FRONTEND_ADDR
185
+ value : zuul-gateway-svc
186
+ - name : USERS
187
+ value : ' 20'
188
+ resources :
189
+ limits :
190
+ cpu : 250m
191
+ memory : 512Mi
192
+ terminationMessagePath : /dev/termination-log
193
+ terminationMessagePolicy : File
194
+
153
195
---
154
196
apiVersion : v1
155
197
kind : Service
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public List<CartItem> getUserCartItems(String userId) {
40
40
41
41
public boolean removeUserCartItems (String userId ) {
42
42
//移除购物车商品
43
- // redisTemplate.delete(Common.getRedisKey(userId).getKey());
43
+ redisTemplate .delete (Common .getRedisKey (userId ).getKey ());
44
44
return true ;
45
45
}
46
46
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ def on_start(self):
70
70
browseProduct : 10 ,
71
71
addToCart : 2 ,
72
72
viewCart : 3 ,
73
+ checkout : 3
73
74
}
74
75
75
76
class WebsiteUser (HttpLocust ):
You can’t perform that action at this time.
0 commit comments