Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v1.5.3 #38

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iac/tf-anthos-gke/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ region = "us-central1"
zone = "us-central1-b"
cluster_name = "anthos-sample-cluster1"
sync_repo = "https://github.com/GoogleCloudPlatform/bank-of-anthos"
sync_branch = "release/v1.3.4"
sync_branch = "release/v1.5.3"
sync_rev = ""
policy_dir = "/kubernetes-manifests"
2 changes: 1 addition & 1 deletion kubernetes-manifests/accounts-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
name: accounts-db-config
- configMapRef:
name: demo-data-config
image: ghcr.io/splunk/bank-of-splunk/accounts-db:v1.3.4@sha256:60acf1383d6fd8d5ba3a689268a258171c8d2d240c59cee1ae636aef3f1e8d72
image: ghcr.io/splunk/bank-of-splunk/accounts-db:v1.5.3@sha256:60acf1383d6fd8d5ba3a689268a258171c8d2d240c59cee1ae636aef3f1e8d72
name: accounts-db
ports:
- containerPort: 5432
Expand Down
6 changes: 3 additions & 3 deletions kubernetes-manifests/balance-reader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
name: ledger-db-config
- configMapRef:
name: demo-data-config
image: ghcr.io/splunk/bank-of-splunk/ledger-db:v1.3.4@sha256:de1ae1694d03c6c368245ec88ca016476dffa1f73a5d6cd67ab949a96c93d668
image: ghcr.io/splunk/bank-of-splunk/ledger-db:v1.5.3@sha256:de1ae1694d03c6c368245ec88ca016476dffa1f73a5d6cd67ab949a96c93d668
name: postgres
ports:
- containerPort: 5432
Expand Down Expand Up @@ -165,7 +165,7 @@ spec:
containers:
- env:
- name: VERSION
value: v1.3.4
value: v1.5.3
- name: PORT
value: "8080"
- name: ENABLE_TRACING
Expand All @@ -189,7 +189,7 @@ spec:
name: environment-config
- configMapRef:
name: ledger-db-config
image: ghcr.io/splunk/bank-of-splunk/balancereader:v1.3.4@sha256:928b892a9bbe3db70e68542a7e8b72796a35870c07f4e87b287c29576ddbba30
image: ghcr.io/splunk/bank-of-splunk/balancereader:v1.5.3@sha256:928b892a9bbe3db70e68542a7e8b72796a35870c07f4e87b287c29576ddbba30
livenessProbe:
httpGet:
path: /healthy
Expand Down
6 changes: 3 additions & 3 deletions kubernetes-manifests/contacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
name: accounts-db-config
- configMapRef:
name: demo-data-config
image: ghcr.io/splunk/bank-of-splunk/accounts-db:v1.3.4@sha256:60acf1383d6fd8d5ba3a689268a258171c8d2d240c59cee1ae636aef3f1e8d72
image: ghcr.io/splunk/bank-of-splunk/accounts-db:v1.5.3@sha256:60acf1383d6fd8d5ba3a689268a258171c8d2d240c59cee1ae636aef3f1e8d72
name: accounts-db
ports:
- containerPort: 5432
Expand Down Expand Up @@ -159,7 +159,7 @@ spec:
containers:
- env:
- name: VERSION
value: v1.3.4
value: v1.5.3
- name: PORT
value: "8080"
- name: ENABLE_TRACING
Expand All @@ -179,7 +179,7 @@ spec:
name: environment-config
- configMapRef:
name: accounts-db-config
image: ghcr.io/splunk/bank-of-splunk/contacts:v1.3.4@sha256:bfe6d8970e967130c972779b47bef1999afc3d698cc80c56cade5a52dcc0aa64
image: ghcr.io/splunk/bank-of-splunk/contacts:v1.5.3@sha256:bfe6d8970e967130c972779b47bef1999afc3d698cc80c56cade5a52dcc0aa64
name: contacts
readinessProbe:
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions kubernetes-manifests/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
containers:
- env:
- name: VERSION
value: v1.3.4
value: v1.5.3
- name: PORT
value: "8080"
- name: ENABLE_TRACING
Expand Down Expand Up @@ -141,7 +141,7 @@ spec:
name: environment-config
- configMapRef:
name: service-api-config
image: ghcr.io/splunk/bank-of-splunk/frontend:v1.3.4@sha256:b3cd2828e76ba3197e51d198cfceb09c61f387ffdb9ebace33a5410898cc2bbe
image: ghcr.io/splunk/bank-of-splunk/frontend:v1.5.3@sha256:f6f5b0d973c4c7651e1f4d2756282877ed0752225ad166179b0e90993a505312
livenessProbe:
httpGet:
path: /ready
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/ledger-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
name: ledger-db-config
- configMapRef:
name: demo-data-config
image: ghcr.io/splunk/bank-of-splunk/ledger-db:v1.3.4@sha256:de1ae1694d03c6c368245ec88ca016476dffa1f73a5d6cd67ab949a96c93d668
image: ghcr.io/splunk/bank-of-splunk/ledger-db:v1.5.3@sha256:de1ae1694d03c6c368245ec88ca016476dffa1f73a5d6cd67ab949a96c93d668
name: postgres
ports:
- containerPort: 5432
Expand Down
6 changes: 3 additions & 3 deletions kubernetes-manifests/ledger-writer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
name: ledger-db-config
- configMapRef:
name: demo-data-config
image: ghcr.io/splunk/bank-of-splunk/ledger-db:v1.3.4@sha256:de1ae1694d03c6c368245ec88ca016476dffa1f73a5d6cd67ab949a96c93d668
image: ghcr.io/splunk/bank-of-splunk/ledger-db:v1.5.3@sha256:de1ae1694d03c6c368245ec88ca016476dffa1f73a5d6cd67ab949a96c93d668
name: postgres
ports:
- containerPort: 5432
Expand Down Expand Up @@ -165,7 +165,7 @@ spec:
containers:
- env:
- name: VERSION
value: v1.3.4
value: v1.5.3
- name: PORT
value: "8080"
- name: ENABLE_TRACING
Expand All @@ -187,7 +187,7 @@ spec:
name: service-api-config
- configMapRef:
name: ledger-db-config
image: ghcr.io/splunk/bank-of-splunk/ledgerwriter:v1.3.4@sha256:a257d61f349d13e26d1f2e556d5ff83792d388f97f7402854ce426eceac18e4c
image: ghcr.io/splunk/bank-of-splunk/ledgerwriter:v1.5.3@sha256:a257d61f349d13e26d1f2e556d5ff83792d388f97f7402854ce426eceac18e4c
name: ledgerwriter
readinessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifests/loadgenerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
value: "5"
- name: LOG_LEVEL
value: error
image: ghcr.io/splunk/bank-of-splunk/loadgenerator:v1.3.4@sha256:d184a7ddd273161327695ed8e69dbefdd3a50eece3123203bc0bf0ef17db6fe4
image: ghcr.io/splunk/bank-of-splunk/loadgenerator:v1.5.3@sha256:d184a7ddd273161327695ed8e69dbefdd3a50eece3123203bc0bf0ef17db6fe4
name: loadgenerator
resources:
limits:
Expand Down
210 changes: 210 additions & 0 deletions kubernetes-manifests/rum-loadgen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: loadgen
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bankofsplunk-loadgen
namespace: loadgen
labels:
app: bankofsplunk-loadgen
spec:
replicas: 1
selector:
matchLabels:
app: bankofsplunk-loadgen
template:
metadata:
labels:
app: bankofsplunk-loadgen
spec:
# If you are NOT running this from AWS, but from multipass for example set the below env variable
# set RUM_FRONTEND_IP to the IP address where you can reach your local Online Boutique
#env:
# - name: RUM_FRONTEND_IP
# value: "192.168.1.99"
containers:
- name: bankofsplunk
image: rcastley895/rumloadgen:5.5
imagePullPolicy: Always
env:
- name: NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: RUM_PROTOCOL
value: "http"
- name: RUM_PORT
value: "8083"
resources:
limits:
cpu: 800m
memory: 600Mi
requests:
cpu: 250m
memory: 200Mi
volumeMounts:
- name: puppeteer
subPath: local-file
mountPath: /puppeteer/touchwebsite.js
volumes:
- name: puppeteer
configMap:
name: scriptfile
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: bankofsplunk-loadgen-hpa
namespace: loadgen
spec:
maxReplicas: 8
metrics:
- type: Resource
resource:
name: cpu
target:
averageUtilization: 85
type: Utilization
- type: Resource
resource:
name: memory
target:
averageUtilization: 80
type: Utilization
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: bankofsplunk-loadgen
---
apiVersion: v1
kind: ConfigMap
metadata:
name: scriptfile
namespace: loadgen
data:
local-file: |
const puppeteer = require('puppeteer');

function run() {
return new Promise(async (resolve, reject) => {
const browser = await puppeteer.launch({
headless: true,
defaultViewport: null,
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--disable-session-crashed-bubble',
'--disable-accelerated-2d-canvas',
'--no-first-run',
'--no-zygote',
'--single-process',
'--noerrdialogs',
'--disable-gpu'
]
});
const url = process.env.RUM_PROTOCOL + "://" + process.env.NODE_IP + ":" + process.env.RUM_PORT + "/";
//const url = process.env.RUM_PROTOCOL + "://" + process.env.URL + "/";
try {
const wait_time = 500;
const timeout = 10000; // Timeout for waiting on actions
for (let loop = 0; loop < 1; loop++) {
const page = await browser.newPage();

await page.setUserAgent('Mozilla/5.0 (X11; Linux x86_64; Splunk RUMLoadGen) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36');

// Interaction 1: Set Viewport
console.log("Set Viewport");
await page.setViewport({
width: 1000,
height: 600
});

// Interaction 2: Go to the page and wait for navigation
console.log("Go to " + url + " and wait for navigation");
const promises = [];
promises.push(page.waitForNavigation());
await page.goto(`${url}`);
await Promise.all(promises);
await delay(wait_time);

// Interaction 3: Wait for Sign In button
console.log("Waiting for 'Sign In' button");
await page.waitForSelector('button', { timeout });

// Interaction 4: Click Sign In and wait for navigation
console.log("Click Sign In and wait for navigation");

const signInPromises = [];
const startSignInWaitingForEvents = () => {
signInPromises.push(page.waitForNavigation({ waitUntil: 'networkidle0' })); // Wait for navigation after clicking
};

// Wait for the "Sign In" button and click it
await page.locator('button').click({
offset: {
x: 201.171875,
y: 24.671875,
},
});

// Start waiting for navigation
startSignInWaitingForEvents();
await Promise.all(signInPromises); // Wait for navigation to complete
await page.waitForSelector('h2', { timeout }); // Wait for the Checking Account heading after deposit
await delay(wait_time); // Adding delay after waiting for the element

console.log("Click on Account Username");
// Interaction: Click on Account Username
await page.locator('#account-user-name').click({
offset: {
x: 79,
y: 6.53125,
},
});
await delay(wait_time); // Adding delay between actions

console.log("Wait for Sign Out link");
// Interaction: Wait for Sign Out link
await page.waitForSelector('li > div a', { timeout });

console.log("Click Sign Out and wait for navigation");
// Interaction: Click Sign Out and wait for navigation
const signOutPromises = [];
signOutPromises.push(page.waitForNavigation({ waitUntil: 'networkidle0' }));

await page.locator('li > div a').click({
offset: {
x: 71.796875,
y: 22.15625,
},
});

await Promise.all(signOutPromises); // Wait for navigation after clicking
console.log("Sign out completed");

// Adding a final delay before closing
await browser.close();
}
} catch (e) {
console.log('{"severity":"error","msg": "' + e + '"}');
} finally {
await browser.close();
}
resolve('RUM Loop completed successfully'); // Return a message when resolving
await delay(10000);
});
}

run().then(console.log).catch(console.error);

function delay(time) {
return new Promise(function (resolve) {
setTimeout(resolve, time);
});
}
6 changes: 3 additions & 3 deletions kubernetes-manifests/transaction-history.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ spec:
name: ledger-db-config
- configMapRef:
name: demo-data-config
image: ghcr.io/splunk/bank-of-splunk/ledger-db:v1.3.4@sha256:de1ae1694d03c6c368245ec88ca016476dffa1f73a5d6cd67ab949a96c93d668
image: ghcr.io/splunk/bank-of-splunk/ledger-db:v1.5.3@sha256:de1ae1694d03c6c368245ec88ca016476dffa1f73a5d6cd67ab949a96c93d668
name: postgres
ports:
- containerPort: 5432
Expand Down Expand Up @@ -165,7 +165,7 @@ spec:
containers:
- env:
- name: VERSION
value: v1.3.4
value: v1.5.3
- name: PORT
value: "8080"
- name: ENABLE_TRACING
Expand Down Expand Up @@ -193,7 +193,7 @@ spec:
name: environment-config
- configMapRef:
name: ledger-db-config
image: ghcr.io/splunk/bank-of-splunk/transactionhistory:v1.3.4@sha256:d0fbbb9fe6f3589c0372301ad159975af5cb309891f135444cca49092e66aaa6
image: ghcr.io/splunk/bank-of-splunk/transactionhistory:v1.5.3@sha256:d0fbbb9fe6f3589c0372301ad159975af5cb309891f135444cca49092e66aaa6
livenessProbe:
httpGet:
path: /healthy
Expand Down
6 changes: 3 additions & 3 deletions kubernetes-manifests/userservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
name: accounts-db-config
- configMapRef:
name: demo-data-config
image: ghcr.io/splunk/bank-of-splunk/accounts-db:v1.3.4@sha256:60acf1383d6fd8d5ba3a689268a258171c8d2d240c59cee1ae636aef3f1e8d72
image: ghcr.io/splunk/bank-of-splunk/accounts-db:v1.5.3@sha256:60acf1383d6fd8d5ba3a689268a258171c8d2d240c59cee1ae636aef3f1e8d72
name: accounts-db
ports:
- containerPort: 5432
Expand Down Expand Up @@ -159,7 +159,7 @@ spec:
containers:
- env:
- name: VERSION
value: v1.3.4
value: v1.5.3
- name: PORT
value: "8080"
- name: ENABLE_TRACING
Expand All @@ -183,7 +183,7 @@ spec:
name: environment-config
- configMapRef:
name: accounts-db-config
image: ghcr.io/splunk/bank-of-splunk/userservice:v1.3.4@sha256:337b10ec55610e134d7fb236c4949d73da128c0ce9b03b78cb675d723c7df9d6
image: ghcr.io/splunk/bank-of-splunk/userservice:v1.5.3@sha256:d6d17105ec1248ebf4af6fb5021aa047ed26fcc6ae4d89c7cd018387a7e27baf
name: userservice
ports:
- containerPort: 8080
Expand Down