Skip to content

Commit

Permalink
update php app and loadgen
Browse files Browse the repository at this point in the history
  • Loading branch information
bpschmitt committed Apr 12, 2024
1 parent 73560eb commit 7aac2a6
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 54 deletions.
105 changes: 52 additions & 53 deletions demo/apps/php_deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -29,7 +30,6 @@ spec:
ports:
- containerPort: 6379
---
# SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
apiVersion: v1
kind: Service
metadata:
Expand All @@ -46,57 +46,54 @@ spec:
app: redis
role: leader
tier: backend
# ---
# # SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
# apiVersion: apps/v1
# kind: Deployment
# metadata:
# name: redis-follower
# labels:
# app: redis
# role: follower
# tier: backend
# spec:
# replicas: 2
# selector:
# matchLabels:
# app: redis
# template:
# metadata:
# labels:
# app: redis
# role: follower
# tier: backend
# spec:
# containers:
# - name: follower
# image: us-docker.pkg.dev/google-samples/containers/gke/gb-redis-follower:v2
# resources:
# requests:
# cpu: 100m
# memory: 100Mi
# ports:
# - containerPort: 6379
# ---
# # SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
# apiVersion: v1
# kind: Service
# metadata:
# name: redis-follower
# labels:
# app: redis
# role: follower
# tier: backend
# spec:
# ports:
# # the port that this service should serve on
# - port: 6379
# selector:
# app: redis
# role: follower
# tier: backend
---
# SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-follower
labels:
app: redis
role: follower
tier: backend
spec:
replicas: 2
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
role: follower
tier: backend
spec:
containers:
- name: follower
image: us-docker.pkg.dev/google-samples/containers/gke/gb-redis-follower:v2
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: redis-follower
labels:
app: redis
role: follower
tier: backend
spec:
ports:
# the port that this service should serve on
- port: 6379
selector:
app: redis
role: follower
tier: backend
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -114,21 +111,23 @@ spec:
tier: frontend
annotations:
instrumentation.newrelic.com/inject-php: "true"
instrumentation.newrelic.com/php-exec-command: "apache2-foreground"
spec:
containers:
- name: php-redis
image: us-docker.pkg.dev/google-samples/containers/gke/gb-frontend:v5
env:
- name: GET_HOSTS_FROM
value: "dns"
- name: NEW_RELIC_APP_NAME
value: "php-frontend"
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 80
---
# SOURCE: https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
apiVersion: v1
kind: Service
metadata:
Expand All @@ -146,4 +145,4 @@ spec:
- port: 80
selector:
app: guestbook
tier: frontend
tier: frontend
2 changes: 1 addition & 1 deletion demo/loadgen/locust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ data:
@task
def get_endpoint_five(self):
self.client.get('http://php-frontend-service.ao-demo.svc.cluster.local/', headers=default_headers)
self.client.get('http://php-frontend-service.ao-demo.svc.cluster.local/guestbook.php?cmd=set&value=testing123', headers=default_headers)

0 comments on commit 7aac2a6

Please sign in to comment.